Skip to content
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

Helm chart: add imagePullSecrets for gateway.backend #583

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -6,7 +6,7 @@

from kubernetes_asyncio import client, config
from kubernetes_asyncio.client.rest import ApiException
from traitlets import Dict, Float, Unicode, default
from traitlets import Dict, Float, List, Unicode, default
from traitlets.config import LoggingConfigurable

from ... import __version__ as VERSION
Expand Down Expand Up @@ -54,6 +54,10 @@ def _default_namespace(self):
config=True,
)

image_pull_secrets = List(
Unicode, help="The pull secret(s) associated with the ``image``.", config=True
)

# Kubernetes is a bit different in types/granularity of resource requests.
# We redefine these common fields here to support that.
worker_cores = Float(
Expand Down
2 changes: 2 additions & 0 deletions resources/helm/dask-gateway/templates/gateway/configmap.yaml
Expand Up @@ -52,6 +52,8 @@ data:
"%s:%s" % (image_name, image_tag) if image_tag else image_name
)

c.KubeClusterConfig.image_pull_secrets = {{ .Values.gateway.backend.imagePullSecrets }}

# Forward dask cluster configuration
for field, prop_name in [
# Scheduler config
Expand Down
2 changes: 2 additions & 0 deletions resources/helm/dask-gateway/values.schema.yaml
Expand Up @@ -239,6 +239,7 @@ properties:
additionalProperties: false
required:
- image
- imagePullSecrets
- scheduler
- worker
description: |
Expand All @@ -253,6 +254,7 @@ properties:
Set a custom image name, tag, pullPolicy, or pullSecrets for Dask
Cluster's scheduler and worker pods.
properties: *image-properties
imagePullSecrets: *imagePullSecrets-spec
namespace:
type: [string, "null"]
description: |
Expand Down
3 changes: 3 additions & 0 deletions resources/helm/dask-gateway/values.yaml
Expand Up @@ -87,6 +87,9 @@ gateway:
tag: "set-by-chartpress"
pullPolicy: IfNotPresent

# Image pull secrets for schedulers and worker pods
imagePullSecrets: []

# The namespace to launch dask clusters in. If not specified, defaults to
# the same namespace the gateway is running in.
namespace:
Expand Down