Closed havard-fjaer closed 2 years ago
Probably a good first issue. We have some new engineers starting so hopefully they can pick it up
I just tried this with the latest portal version:
helm template gloo-portal gloo-portal/gloo-portal -n gloo-portal --values values.yaml --version v1.3.0-beta1
and it appears to be resolved:
# Source: gloo-portal/templates/crd.yaml
# Generate CRDs inside the templates directory to support Helm 2 installs# Code generated by skv2. DO NOT EDIT.
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
crd.solo.io/specHash: 16e45e9e2abcdf4d
labels:
app: gloo-portal
app.kubernetes.io/name: gloo-portal
name: portals.portal.gloo.solo.io
However, it is only resolved because the first line of the schemas is itself a comment. Would be good to still clean this up in case that auto generated comment is removed
Resolved by solo-io/dev-portal#2198, to be released in the next 1.3.0 beta
Describe the bug The first line
apiextensions.k8s.io/v1
for CRDportals.portal.gloo.solo.io
becomes part of a comment on the line above.To Reproduce When running:
helm template gloo-portal gloo-portal/gloo-portal -n gloo-portal --values helm-values.yaml --version v1.1.2
with helm values:
apiVersion: apiextensions.k8s.io/v1
becomes part of the above comment, and installation of the CRD fails in the cluster:Expected behavior
apiVersion: apiextensions.k8s.io/v1
should be on a line by itself.Mitigation When running:
helm template gloo-portal gloo-portal/gloo-portal -n gloo-portal --values helm-values.yaml --include-crds --version v1.1.2
with crd/create:false:the CRD is generated as expected. The comment:
# Generate CRDs inside the templates directory to support Helm 2 installs
is not part of the generated templates when only using the--include-crds
flag.None of the other CRDs are affected by this problem. Suspect there is a line break missing in or somewhere near the template.
Additional context Add any other context about the problem here, e.g.