Oteemo / charts

Helm chart repository
https://oteemo.github.io/charts
MIT License
180 stars 231 forks source link

Incorrect check for Ingress APIversion for sonarqube 9.8.0 and 9.6.6 #305

Closed tomberget closed 3 years ago

tomberget commented 3 years ago

For both sonarqube charts, there is an error checking for APIversion capabilities:

{{- 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 }}

/Ingress needs to be dropped, as that is part of Kind:.

So it would be something like this:

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

As it is now, both charts fail on deployment.

rjkernick commented 3 years ago

Thanks, missed that in the review and didn't get a chance to test it out. Fixing it now

sennetheunisporphy commented 3 years ago

@rjkernick Will this fix be deployed soon?