-
Notifications
You must be signed in to change notification settings - Fork 69
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
chore(docs): document how to set imagePullSecrets in baseJobTemplate #446
Conversation
Documents how to set imagePullSecrets in the baseJobTemplate. Will be expanded as part of https://linear.app/prefect/issue/PLA-1020/expand-documentation-on-how-to-use-basejobtemplate Closes https://linear.app/prefect/issue/PLA-1029/document-how-to-set-image-pull-secrets-in-the-base-job-template
'.Values' is how values are referenced from within Helm templates, not how end users set it.
charts/prefect-worker/README.md
Outdated
"spec": { | ||
"template": { | ||
"spec": { | ||
"imagePullSecrets": [ | ||
{ | ||
"name": "my-pull-secret" | ||
} | ||
] | ||
} | ||
} |
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.
$ k explain deployment.spec.template.spec.imagePullSecrets
GROUP: apps
KIND: Deployment
VERSION: v1
FIELD: imagePullSecrets <[]LocalObjectReference>
DESCRIPTION:
ImagePullSecrets is an optional list of references to secrets in the same
namespace to use for pulling any of the images used by this PodSpec. If
specified, these secrets will be passed to individual puller implementations
for them to use. More info:
https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod
LocalObjectReference contains enough information to let you locate the
referenced object inside the same namespace.
FIELDS:
name <string>
Name of the referent. This field is effectively required, but due to
backwards compatibility is allowed to be empty. Instances of this type with
an empty value here are almost certainly wrong. More info:
https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
|
||
1. Define the base job template in a local file. To get a formatted template, run the following command & store locally in `base-job-template.json` | ||
**Note**: if the target work pool (`config.workPool`) already exists, the base job template passed **will be ignored**. |
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.
Is this definitely true? In my testing, I was able to modify the base job template and each time it would update the configuration seen in the UI - even though I created the work pool before attaching the worker.
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.
hm good question. it is true i think - but maybe with the addition of the init container it is no longer true for our helm charts.
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.
I bet that's it, since we're directly using prefect work-pool update <json-file>
now. I'll remove that warning.
Now that we have the initContainer that calls `prefect work-pool update`, updates are indeed respected.
Summary
Documents how to set imagePullSecrets in the baseJobTemplate.
Will be expanded as part of https://linear.app/prefect/issue/PLA-1020/expand-documentation-on-how-to-use-basejobtemplate
Closes https://linear.app/prefect/issue/PLA-1029/document-how-to-set-image-pull-secrets-in-the-base-job-template
Testing
I installed the
prefect-server
chart, and then deployed theprefect-worker
chart with this config:I then confirmed the configuration appeared as expected in the UI.