Giter Site home page Giter Site logo

Comments (13)

travisghansen avatar travisghansen commented on August 16, 2024 1

v0.3.2 has kustomize installed. Can you point me to the source of the kubevirt (or other chart) which execs? I've never seen that and so will try to run some tests.

from argo-cd-helmfile.

crabique avatar crabique commented on August 16, 2024 1

Yes, I mean without downloading stuff, same way as argo-cd passes down /var/run/argocd/argocd-cmp-server, so argo-cd could pass down a directory like that with helm/kustomize/kubectl etc, and it can be added to volumeMounts and to PATH, so all of the binaries could be shared across argo-cd and all the CMP plugins.

from argo-cd-helmfile.

travisghansen avatar travisghansen commented on August 16, 2024 1

You could create your own init image which has all binaries bundled and then just cp (instead of wget) to the custom tools dir.

from argo-cd-helmfile.

travisghansen avatar travisghansen commented on August 16, 2024 1

When the new feature lands in argocd this should just work now e995102

from argo-cd-helmfile.

travisghansen avatar travisghansen commented on August 16, 2024

Welcome! I probably canโ€™t align perfectly with argo-cd versions but Iโ€™m happy to add those tools to the image.

Let me check on the exec issue with someone from the argo team.

from argo-cd-helmfile.

crabique avatar crabique commented on August 16, 2024

Thank you, that is great!

As for the exec issue, it is a bit of a customized setup thing around helm hooks, here is how to reproduce it:

applications/kubevirt/helmfile.yaml

releases:
- name: kubevirt-operator
  chart: manifests/v0.58.1/operator
  hooks:
  - events: ["prepare"]
    showlogs: true
    command: "../../hacks/kubevirt/download.sh"
    args: ["v0.58.1", "operator"]
- name: kubevirt-cr
  chart: manifests/v0.58.1/cr
  needs:
    - kubevirt-operator
  hooks:
  - events: ["prepare"]
    showlogs: true
    command: "../../hacks/kubevirt/download.sh"
    args: ["v0.58.1", "cr"]

../../hacks/kubevirt/download.sh

#!/usr/bin/env bash

set -eo pipefail

KUBEVIRT_URL="https://github.com/kubevirt/kubevirt/releases/download"
KUBEVIRT_VER="$1"
KUBEVIRT_APP="$2"

[[ $KUBEVIRT_VER =~ ^v[0-9]{1}.[0-9]{1,3} ]] || (echo "Kubevirt version does not match regexp, for example v0.57.1"; exit 1)
[[ $KUBEVIRT_APP =~ (operator|cr) ]] || (echo "Incorrect kubevirt app, expected operator or cr"; exit 1)

mkdir -p manifests/$KUBEVIRT_VER/$KUBEVIRT_APP

curl -Lk "$KUBEVIRT_URL/$KUBEVIRT_VER/kubevirt-$KUBEVIRT_APP.yaml" -o "manifests/$KUBEVIRT_VER/$KUBEVIRT_APP/manifest.yaml"

from argo-cd-helmfile.

travisghansen avatar travisghansen commented on August 16, 2024

Can you exec into the container and find the tmp dir where the data is and see if the files are marked as executable? Iโ€™m wondering if something is different in how the data now gets sent to the sidecar which leaves the files without the executable biit.

from argo-cd-helmfile.

crenshaw-dev avatar crenshaw-dev commented on August 16, 2024

Iโ€™m wondering if something is different in how the data now gets sent to the sidecar which leaves the files without the executable biit.

That's exactly it. :-) argoproj/argo-cd#9647

At the Argo CD contributors' meeting yesterday, Alex Matyushentsev said he plans to implement the "preserve executable" config option for the plugin.

For now, the plugin itself can be modified to chmod +x the file.

from argo-cd-helmfile.

crabique avatar crabique commented on August 16, 2024

Ohh... Now I understand what's going on ๐Ÿ™‚

For now, I changed it to command: "bash" and moved the script path to args[0], also changed the script to use wget instead of curl, so that nothing needs to be installed additionally. Not the most elegant workarounds but I expect the sidecar-cmp integration architecture will get better in the future, so this is completely fine.

Everything seems to be working perfectly now, thank you for your help!

from argo-cd-helmfile.

travisghansen avatar travisghansen commented on August 16, 2024

I'll make sure wget/curl are in the images. Any other tools you think would be helpful?

from argo-cd-helmfile.

crabique avatar crabique commented on August 16, 2024

Not at all, argo-cd containers don't have curl either, so previously we were adding it with an init-container, I just didn't get to see it's missing because of the -x error ๐Ÿ™‚ Just wget is fine, as it's what is used in the Dockerfile, imo there is no need to bloat the image with something not also present in argo-cd images.

I hope in the future there will be some mechanism to pass down a PATH-able volume from argo-cd and not bundle duplicate stuff with every plugin, but for now I don't see anything obvious missing.

from argo-cd-helmfile.

travisghansen avatar travisghansen commented on August 16, 2024

You can actually pass down a PATH yes.

Something like this is possible.

#  - name: KREW_ROOT
#    value: /home/argocd/.krew
  - name: PATH
    #value: $(KREW_ROOT)/bin:/opt/custom-tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
    value: /opt/custom-tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

from argo-cd-helmfile.

crabique avatar crabique commented on August 16, 2024

Very nice, thanks for the quick fix!

from argo-cd-helmfile.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.