-
Notifications
You must be signed in to change notification settings - Fork 51
add imagePullSecrets in helm chart #500
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -59,3 +59,7 @@ spec: | |
| secretName: {{ .Values.controllerManager.webhook.tls.certSecretName }} | ||
| optional: true | ||
| serviceAccountName: kthena-controller-manager | ||
| {{- with .Values.global.imagePullSecrets }} | ||
| imagePullSecrets: | ||
| {{- toYaml . | nindent 8 }} | ||
| {{- end }} | ||
|
Comment on lines
+62
to
+65
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -72,3 +72,4 @@ global: | |
| # This is ONLY required when certManagementMode is set to "manual". | ||
| # You can generate it with: cat /path/to/your/ca.crt | base64 | tr -d '\n' | ||
| caBundle: "" | ||
| imagePullSecrets: [] | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A schema definition for this new Example for ...
"global": {
"type": "object",
"properties": {
// ... existing properties
"imagePullSecrets": {
"type": "array",
"description": "Secrets for pulling images from a private registry.",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the image pull secret."
}
},
"required": ["name"]
}
}
}
}
...
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is not clear how to sepcify secrets Can you add a comment
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @lx1036 would you please update |
||
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.
While adding
imagePullSecretsdirectly to the Deployment works, a more robust and maintainable approach in Helm charts is to associate them with the ServiceAccount. This ensures that any Pod using this ServiceAccount automatically gets theimagePullSecrets, reducing duplication and potential for errors if new workloads are added.I recommend removing this logic from the Deployment and adding it to the
kthena-routerServiceAccount template instead.Here's an example of how you could modify the ServiceAccount template: