Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions deploy/charts/istio-csr/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ spec:
{{- $x := list $annotation.name $annotation.value | join "=" }}
{{- $annotations = append $annotations $x }}
{{- end }}
- {{ printf "%s=%s" "--certificate-request-additional-annotations" ( join "," $annotations ) | quote -}}
- {{ printf "\"%s=%s\"" "--certificate-request-additional-annotations" ( join "," $annotations ) | quote -}}
Copy link

Copilot AI Oct 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding inner quotes via printf ""%s=%s"" and then piping to quote will produce a literal argument that starts and ends with a double-quote, e.g. ""--certificate-request-additional-annotations=..."" in argv. Kubernetes does not invoke a shell for container args, so these quotes are not stripped and become part of the flag string, which can break flag parsing. If the intent is to quote only the value to preserve commas, quote the value portion instead of the entire flag, for example:

Suggested change
- {{ printf "\"%s=%s\"" "--certificate-request-additional-annotations" ( join "," $annotations ) | quote -}}
- --certificate-request-additional-annotations="{{ join "," $annotations }}"

Copilot uses AI. Check for mistakes.
{{- end }}

# tls
Expand Down Expand Up @@ -135,7 +135,7 @@ spec:
{{- range $annotation := .Values.app.certmanager.additionalAnnotations }}
{{ $annotationList = append $annotationList (printf "%s=%s" $annotation.name $annotation.value) }}
{{- end }}
- {{ printf "%s=%s" "--istiod-cert-additional-annotations" ( join "," $annotationList ) | quote -}}
- {{ printf "\"%s=%s\"" "--istiod-cert-additional-annotations" ( join "," $annotationList ) | quote -}}
Copy link

Copilot AI Oct 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same double-quoting issue as above; this will pass a literal string beginning and ending with a quote to the process. Prefer quoting the value portion only, or revert if literal quotes are not required. For example:

  • {{ printf "%s=%s" "--istiod-cert-additional-annotations" ( printf ""%s"" ( join "," $annotationList ) ) | quote -}}
Suggested change
- {{ printf "\"%s=%s\"" "--istiod-cert-additional-annotations" ( join "," $annotationList ) | quote -}}
- {{ printf "%s=%s" "--istiod-cert-additional-annotations" ( join "," $annotationList ) | quote -}}

Copilot uses AI. Check for mistakes.
{{- end }}
- "--istiod-cert-istio-revisions={{ join "," .Values.app.istio.revisions }}"
{{- if .Values.volumeMounts }}
Expand Down