-
Notifications
You must be signed in to change notification settings - Fork 75
fix: make handling of additionalAnnotations more robust #537
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
fix: make handling of additionalAnnotations more robust #537
Conversation
…<[email protected]> Signed-off-by: jrhoward <[email protected]>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @jrhoward. Thanks for your PR. I'm waiting for a cert-manager member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
@jrhoward I agree that the PR itself is simple but the supporting usecase is not something I would recommend (that is assuming I am understanding the underlying usecase correctly) Create a CA issuer with Venafi as your issuer. As you will create this with a |
removed example as it is auto generated anyway Signed-off-by: jrhoward <[email protected]>
Thanks @sitaramkm , have taken your advice on board and will be looking to change our strategy, would still be good to get this merged as it makes the passing of cli arguments to the CSR agent safer. |
Hi folks, would it be possible to get this reviewed ? |
/ok-to-test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes issues with handling complex additionalAnnotations
in the istio-csr Helm chart by ensuring annotation values are properly quoted and formatted to prevent chart rendering failures.
- Updates command-line argument formatting to use proper quoting for annotation values
- Changes certificate annotation value handling to use YAML literal block format instead of inline values
Reviewed Changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
deploy/charts/istio-csr/templates/deployment.yaml | Updates command-line argument formatting to properly quote annotation values using printf and quote functions |
deploy/charts/istio-csr/templates/certificate.yaml | Changes annotation value rendering from inline to YAML literal block format with proper indentation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
{{ $annotation.name }}: | | ||
{{ $annotation.value | indent 6 }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The literal block scalar format with |
may not be appropriate for all annotation values. Consider using {{ $annotation.value | toYaml }}
instead, which will properly handle strings, numbers, booleans, and complex values while maintaining YAML compliance.
{{ $annotation.name }}: | | |
{{ $annotation.value | indent 6 }} | |
{{ $annotation.name }}: {{ $annotation.value | toYaml | nindent 6 }} |
Copilot uses AI. Check for mistakes.
@jrhoward: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
…[email protected]
The helm chart interprets more complex additionalAnnotation incorrectly and will not render charts.
See linked issue for more detail:
#534
In summary this PR ensures annotation values passed to the csr agent are safe and ensures bootstrap Certificate annotation values are interpreted as a string.