allow use of multiple image pull secrets in KubernetesAgent, DaskKubernetesEnvironment #3596
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Today, you can customize the value of
imagePullSecrets(the secrets used to pull docker images) used byKubernetesAgentandDaskKubernetesAgent. However,prefectonly allows you to specify a single secret.This PR proposes expanding that, to allow multiple image pull secrets to be provided.
Changes
Changes
KubernetesAgentandDaskKubernetesAgentto accept multipleimagPullSecretsvalues. What I'm proposing here is backwards compatible with howprefectworks today"my-secret""my-secret,other-secret"Importance
I started looking into this because of this message that Docker sent out last night:
More details are available in this blog post.
This change means that people using
prefectkubernetes components that pull public images from Docker Hub might want to now make authenticated (instead of anonymous) calls to Docker Hub, to reduce the risk of hitting that rate limit.This PR makes it possible to run these components with multiple secrets so that, for example, an agent could pull images from either Docker Hub or a private registry like AWS ECR.
Checklist
This PR:
changes/directory (if appropriate)docs/outline.tomlfor API reference docs (if appropriate)Notes for reviewers
Environmentclasses entirely #2928) but thought they should continue to get patches like this until they do. Let me know if you disagree and I can remove theDaskKubernetesEnvironmentcode from thisQuestions for reviewers
KubernetesJobEnvironment? Is the thinking the idea there that the customization should just go intojob_spec_fileinstead of adding new environment variables / kwargs to that class?Thanks for your time and consideration.