Installation failes on argocd #251

Closed
opened 2021-11-21 12:31:56 +00:00 by iMartyn · 1 comment
iMartyn commented 2021-11-21 12:31:56 +00:00 (Migrated from gitea.com)

Because argocd depends upon helm template, and the helm folks tend to not consider helm template, the use of

{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" -}}

does not do the right thing, and then the rendered yaml doesn't create the correct version of the object and everything falls over.

Suggestion (somewhat based on what airflow are doing on https://github.com/airflow-helm/charts/blob/main/charts/airflow/templates/flower/flower-ingress.yaml ) :

+{{- if .Values.ingress.APIVersionOverride -}}
+apiVersion: .Values.ingress.APIVersionOverride
+{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" -}}
-{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" -}}
apiVersion: networking.k8s.io/v1
{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1/Ingress" -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}

This would allow overriding for those of us using argocd and not affect those using helm install / helm upgrade.

Because argocd depends upon `helm template`, and the helm folks tend to not consider `helm template`, the use of ``` {{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" -}} ``` does not do the right thing, and then the rendered yaml doesn't create the correct version of the object and everything falls over. Suggestion (somewhat based on what airflow are doing on https://github.com/airflow-helm/charts/blob/main/charts/airflow/templates/flower/flower-ingress.yaml ) : ```diff +{{- if .Values.ingress.APIVersionOverride -}} +apiVersion: .Values.ingress.APIVersionOverride +{{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" -}} -{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1/Ingress" -}} apiVersion: networking.k8s.io/v1 {{- else if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1/Ingress" -}} apiVersion: networking.k8s.io/v1beta1 {{- else -}} apiVersion: extensions/v1beta1 {{- end }} ``` This would allow overriding for those of us using argocd and not affect those using helm install / helm upgrade.
iMartyn commented 2021-11-21 12:32:52 +00:00 (Migrated from gitea.com)

Note: I would create the PR myself but due to missing data on gitea.com, my fork is a 500 and therefore I can't interact with it, nor fork again.
Thanks to lunny, PR is possible again.

~~Note: I would create the PR myself but due to missing data on gitea.com, my fork is a 500 and therefore I can't interact with it, nor fork again.~~ Thanks to lunny, PR is possible again.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: lunny/helm-chart#251
No description provided.