Repository navigation
charts: fix three templates that fail to render when their value is set - #1036
Draft
marcleblanc2 wants to merge 1 commit into
Draft
marcleblanc2 wants to merge 1 commit into
marcleblanc2 wants to merge 1 commit into
Conversation
- jaeger.serviceAccount.create: true failed with a nil pointer, because jaeger.ServiceAccount.yaml looked up values under "tracing", which is not a values key. Use "jaeger", as the jaeger Deployment does. - openTelemetry.agent.env indented each list item under env, so value: landed outside its item and the YAML was invalid. - privateDockerRegistry.serviceAnnotations indented annotations: under metadata by 4 spaces instead of 2, which made the YAML invalid. The kustomize render check's allValues files now render. Co-authored-by: Amp <amp@ampcode.com> Amp-Thread-ID: https://ampcode.com/threads/T-01a2140d-bf64-751f-9812-0c8757baf6fd
2 of 3 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Three templates fail to render as soon as a customer sets their value. These are the first three rows of the Problem table in #1034:
jaeger.serviceAccount.create: truefails withindex of nil pointer:jaeger.ServiceAccount.yamllooks up values under"tracing", which is not a values keyopenTelemetry.agent.envrenders invalid YAML: each list item is indented underenv:by 2 extra spaces, sovalue:lands outside its itemprivateDockerRegistry.serviceAnnotationsin the dind executor chart renders invalid YAML:annotations:is indented 4 spaces undermetadata:instead of 2Stacked on #1035. With both, the kustomize render check from #1034 passes.
Solution
jaeger.ServiceAccount.yamluses"jaeger", as thejaegerDeployment already does, so the ServiceAccount's name matches theserviceAccountNamethe Deployment references. Theapp.kubernetes.io/component: tracinglabel is unchanged.otel-agent.DaemonSet.yamlindentsenvitems like theotel-collectorDeployment does.private-docker-registry.Service.yamlindentsannotations:by 2 spaces.Checklist
sourcegraphandsourcegraph-executorTest plan
scripts/ci/kustomize-render.shpasses all 17 values files:helm template,kubeconform -strict, the Go template output grep, andkubectl kustomize.allValues: the jaeger ServiceAccount is namedexample-jaegerwith its annotations, matching the Deployment'sserviceAccountName. The otel-agentenvis a list ofname/valueitems. The registry Service has its annotations undermetadata.allValuesfiles: rendered this PR and ci: render charts with exhaustive test values through kubeconform and kustomize #1034 with only these three fixes applied, parsed both with duplicate keys resolved last-wins, and compared them. Identical for every file and every chart's defaults.helm unittest(281 tests) andscripts/ci/lint.shpass, and./scripts/helm-docs.shchanges nothing.Linked PRs
Amp threads