I have a question about.Capabilities.APIVersions.Has - I am not sure how it works I have the following function:
{{- define "fybrik.certManagerApiVersion" -}}
{{- if .Capabilities.APIVersions.Has "cert-manager.io/v1beta1" -}}
cert-manager.io/v1beta1
{{- else if .Capabilities.APIVersions.Has "cert-manager.io/v1alpha2" -}}
cert-manager.io/v1alpha2
{{- else if .Capabilities.APIVersions.Has "certmanager.k8s.io/v1alpha1" -}}
certmanager.k8s.io/v1alpha1
{{- else -}}
cert-manager.io/v1
{{- end -}}
kubectl api-versions shows:
cert-manager.io/v1
cert-manager.io/v1alpha2
cert-manager.io/v1alpha3
cert-manager.io/v1beta1
but I always get cert-manager.io/v1 as the api when the resource is generated using helm install command. I would expect the api would be cert-manager.io/v1beta1 and I wonder what am missing? Thanks