Giter Site home page Giter Site logo

Comments (7)

kfirfer avatar kfirfer commented on August 16, 2024 1

yes it is, thanks !

from argo-cd-helmfile.

travisghansen avatar travisghansen commented on August 16, 2024

Put something like this in your helmfiles:

apiVersions:
{{- if (env "KUBE_API_VERSIONS") }}
{{- range $apiV := ( requiredEnv "KUBE_API_VERSIONS" | split "," ) }}
- {{ $apiV }}
{{- end }}
{{- end }}

I personally put that snippet in as base file and have something like this at the top of all my release yaml:

---
bases:
- ../../bases/repositories.yaml
- ../../bases/environments.yaml.gotmpl
- ../../bases/api-versions.yaml

# https://github.com/roboll/helmfile/issues/1230
---
releases:
...

from argo-cd-helmfile.

kfirfer avatar kfirfer commented on August 16, 2024

Thanks ill try it

I also trying to put this env var of repo server:

    - name: HELM_TEMPLATE_OPTIONS
      value: "--kube-version 1.22 --validate"

Will update if its works

from argo-cd-helmfile.

kfirfer avatar kfirfer commented on August 16, 2024

The HELM_TEMPLATE_OPTIONS envar doesnt worked
although I tried to run helm templat and its outputting the prometheusrule:

helm template ingress-nginx ingress-nginx/ingress-nginx --version 4.2.1 --namespace ingress-nginx --values nucs/dev/us-east/infra/namespaces/ingress-nginx/helmfile/ingress-nginx/values.yaml --values nucs/dev/us-east/infra/namespaces/ingress-nginx/helmfile/ingress-nginx/values-env-specific.yaml --kube-version 1.22 --validate > output.yaml

from argo-cd-helmfile.

travisghansen avatar travisghansen commented on August 16, 2024

You shouldn't need to handle those values manually, argocd passes both the kube version and api versions off to the plugin as standard procedure (which is good because if you have argocd handling multiple clusters the values should be dynamic anyway).

from argo-cd-helmfile.

kfirfer avatar kfirfer commented on August 16, 2024

I think what makes the difference is the --validate argument to the helm template, not the kubeapi version

I mean both makes the differences I guess

from argo-cd-helmfile.

travisghansen avatar travisghansen commented on August 16, 2024

Is it working with the snippet I sent then?

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.