Baoyuantop commented on code in PR #916:
URL: https://github.com/apache/apisix-helm-chart/pull/916#discussion_r2981876238
##########
charts/apisix-ingress-controller/values.yaml:
##########
@@ -52,6 +52,7 @@ deployment:
nodeSelector: {}
tolerations: []
affinity: {}
+ imagePullSecrets: []
Review Comment:
The data format of `global.imagePullSecrets` in the main apisix chart is a
string array:
```
# charts/apisix/values.yaml
global:
imagePullSecrets: []
# - my-registry-secrets
# - other-registry-secrets
```
The rendering logic in the corresponding template is:
```
# charts/apisix/templates/deployment.yaml
{{- with .Values.global.imagePullSecrets }}
imagePullSecrets:
{{- range $.Values.global.imagePullSecrets }}
- name: {{ . }}
{{- end }}
{{- end }}
```
However, the expected format of `deployment.imagePullSecrets` in this PR is
an array of objects (Kubernetes native format):
```
# PR testing example
deployment:
imagePullSecrets:
- name: my-registry-secret
```
Risk: When used as a child chart (passed from the parent chart's
`global.imagePullSecrets`), if the parent chart's `global.imagePullSecrets`
uses the main apisix chart's string array format (e.g., `["my-secret"]`), this
PR's `toYaml` will render an invalid `imagePullSecrets` structure (a string
instead of a `{name: ...}` object), causing Deployment creation to fail.
It is recommended to maintain consistency with the main apisix chart, accept
string arrays, and render them in the template using range + - name: {{ . }}.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]