Service-catalog: Helm template cmd does not support .Capabilities.APIVersions.Has

Created on 10 Apr 2019  路  4Comments  路  Source: kubernetes-sigs/service-catalog

Bug Report

What happened:
https://github.com/kubernetes-incubator/service-catalog/blob/master/charts/catalog/templates/apiregistration.yaml#L7-L10

helm template cmd does not support this. https://github.com/helm/helm/issues/3377

What you expected to happen:

Allow default either in values.yaml or just pick one and doc the kube version you need. Just add additional else if to allow the default to take effect.

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • Kubernetes version (use kubectl version):
  • service-catalog version:
  • Cloud provider or hardware configuration:
  • Do you have api aggregation enabled?

    • Do you see the configmap in kube-system?

    • Does it have all the necessary fields?

    • kubectl get cm -n kube-system extension-apiserver-authentication -o yaml and look for requestheader-XXX fields

  • Install tools:

    • Did you use helm? What were the helm arguments? Did you --set any extra values?

  • Are you trying to use ALPHA features? Did you enable them?

Most helpful comment

FYI, helm template now supports passing Capabilities.APIVersions: helm/helm#3377

All 4 comments

This is a bug with template - these values are intended to be filled in with information from the kube server when you use these templates to helm install.

If you have a supported Minimum kube version (1.12) for this, it would make fixing this very easy:

{{- if .Capabilities.APIVersions.Has "apiregistration.k8s.io/v1beta1" }}
apiVersion: apiregistration.k8s.io/v1beta1
{{- else if .Capabilities.APIVersions.Has "apiregistration.k8s.io/v1alpha1" }}
apiVersion: apiregistration.k8s.io/v1alpha1
{{- else }}
apiVersion: apiregistration.k8s.io\/v1beta1
{{- end }}

this was fixed in Dug's #2609, right? Closing.

FYI, helm template now supports passing Capabilities.APIVersions: helm/helm#3377

Was this page helpful?
0 / 5 - 0 ratings

Related issues

duglin picture duglin  路  6Comments

spadgett picture spadgett  路  9Comments

georgifarashev picture georgifarashev  路  4Comments

junneyang picture junneyang  路  3Comments

piotrmiskiewicz picture piotrmiskiewicz  路  3Comments