Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api and kube versions from argocd build env vars #80

Merged

Conversation

martijnvdp
Copy link
Contributor

@martijnvdp martijnvdp commented Nov 12, 2022

PR to add api versions and cluster versions to the helm template command
there both available in the build environment variables

KUBE_VERSION = the version of kubernetes cluster
KUBE_API_VERSIONS = the version of kubernetes APIs (csv formated string)

https://argo-cd.readthedocs.io/en/stable/user-guide/build-environment/

tested it in argocd and this works , i'm getting the correct cluster version and
created a configmap with all api versions
issue: #57

apiVersion: v1
kind: ConfigMap
metadata:
  name: lovely-test
  namespace: lovely-test
data:
  apiVersions.txt: |
    {{ .Capabilities.APIVersions }}

@martijnvdp martijnvdp force-pushed the helm-template-kubernetes-and-api-versions branch 7 times, most recently from 7be7f27 to b7c038d Compare November 13, 2022 00:15
@martijnvdp
Copy link
Contributor Author

martijnvdp commented Nov 13, 2022

I also see there still is an open issue with specifying multiple api versions, helm will see it currently as one single capability
helm/helm#11485
so i have to specify each api version with --api-versions param

this wont be needed if the outstanding pr at helm gets merged which makes it possible to use csv format
and the KUBE_API_VERSIONS in the build env is already csv

@martijnvdp martijnvdp force-pushed the helm-template-kubernetes-and-api-versions branch from b7c038d to e62938f Compare November 13, 2022 11:44
@martijnvdp martijnvdp force-pushed the helm-template-kubernetes-and-api-versions branch from e62938f to a4e292a Compare November 13, 2022 12:07
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GoGitOps Review

Grade: A+ (100.0%)

Files: 12

Issues: 0

gofmt: 100%

go_vet: 100%

gocyclo: 100%

golint: 100%

ineffassign: 100%

license: 100%

misspell: 100%

This report was generated using GoGitOps.

@Joibel
Copy link
Contributor

Joibel commented Nov 13, 2022

Thanks for this, it looks great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants