Repository navigation
fix: render deployments when podAnnotations is null - #173
Open
RaphaelFakhri wants to merge 1 commit into
Open
RaphaelFakhri wants to merge 1 commit into
RaphaelFakhri wants to merge 1 commit into
Conversation
Setting podAnnotations to null, the Helm way to drop the default sidecar.istio.io/inject and linkerd.io/inject annotations, skipped the annotations key but still emitted checksum/config, leaving it indented under pod metadata. helm install and helm template then failed with "YAML parse error ... did not find expected key" for livekit-server, egress and ingress. Always emit the annotations block with checksum/config and append podAnnotations to it. Add chart-testing ci values files so ct install covers both the default values and podAnnotations: null.
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.
Summary
Setting
podAnnotations: nullis the Helm way to remove the defaultsidecar.istio.io/injectandlinkerd.io/injectpod annotations (an empty map{}merges with the defaults and keeps them). Withnull, thewith .Values.podAnnotationsblock skips theannotations:key, butchecksum/configis still emitted with annotation indentation directly under the podmetadata. The livekit-server, egress, and ingress charts then fail to install:This change always emits the
annotationsblock withchecksum/configand appendspodAnnotationsto it. Rendering with the default values is unchanged apart from the order of the annotation keys.Testing
Each chart gets a
ci/directory that chart-testing picks up inct lintandct install:ci/default-values.yamlkeeps the existing install with default values.ci/no-pod-annotations-values.yamlsetspodAnnotations: null.helm lintkeeps the null-valued key and does not catch the error, soct installis the step that covers it. Local check with Helm v3.11.2 (the CI version) andkubeconform -strict:did not find expected keyfor eachno-pod-annotations-values.yaml).ct lint --all --chart-dirs . --validate-maintainers=falsepasses for all three charts. Chart versions are not bumped; the version check passes as is.Fixes #172