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

Add ability to specify global image registry in values #27

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/dremio/templates/dremio-admin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ metadata:
spec:
containers:
- name: dremio-admin
image: {{.Values.image}}:{{.Values.imageTag}}
image: {{.Values.global.imageRegistry}}{{.Values.image}}:{{.Values.imageTag}}
imagePullPolicy: IfNotPresent
stdin: true
tty: true
Expand Down
8 changes: 4 additions & 4 deletions charts/dremio/templates/dremio-coordinator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ spec:
{{- end }}
containers:
- name: dremio-coordinator
image: {{.Values.image}}:{{.Values.imageTag}}
image: {{.Values.global.imageRegistry}}{{.Values.image}}:{{.Values.imageTag}}
imagePullPolicy: IfNotPresent
resources:
requests:
Expand Down Expand Up @@ -66,11 +66,11 @@ spec:
name: server
initContainers:
- name: wait-for-zk
image: busybox
image: {{.Values.global.imageRegistry}}busybox
command: ["sh", "-c", "until nc -z dremio-client {{ .Values.coordinator.web.port | default 9047 }} > /dev/null; do echo waiting for dremio master; sleep 2; done;"]
{{- if .Values.tls.ui.enabled }}
- name: generate-ui-keystore
image: {{.Values.image}}:{{.Values.imageTag}}
image: {{.Values.global.imageRegistry}}{{.Values.image}}:{{.Values.imageTag}}
imagePullPolicy: IfNotPresent
volumeMounts:
- name: dremio-tls
Expand All @@ -92,7 +92,7 @@ spec:
{{- end }}
{{- if .Values.tls.client.enabled }}
- name: generate-client-keystore
image: {{.Values.image}}:{{.Values.imageTag}}
image: {{.Values.global.imageRegistry}}{{.Values.image}}:{{.Values.imageTag}}
imagePullPolicy: IfNotPresent
volumeMounts:
- name: dremio-tls
Expand Down
6 changes: 3 additions & 3 deletions charts/dremio/templates/dremio-executor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ spec:
{{- end }}
containers:
- name: dremio-executor
image: {{.Values.image}}:{{.Values.imageTag}}
image: {{.Values.global.imageRegistry}}{{.Values.image}}:{{.Values.imageTag}}
imagePullPolicy: IfNotPresent
resources:
requests:
Expand Down Expand Up @@ -59,12 +59,12 @@ spec:
name: server
initContainers:
- name: wait-for-zk
image: busybox
image: {{.Values.global.imageRegistry}}busybox
command: ["sh", "-c", "until ping -c 1 -W 1 zk-hs > /dev/null; do echo waiting for zookeeper host; sleep 2; done;"]
# since we're mounting a separate volume, reset permission to
# dremio uid/gid
- name: chown-data-directory
image: {{.Values.image}}:{{.Values.imageTag}}
image: {{.Values.global.imageRegistry}}{{.Values.image}}:{{.Values.imageTag}}
imagePullPolicy: IfNotPresent
securityContext:
runAsUser: 0
Expand Down
14 changes: 7 additions & 7 deletions charts/dremio/templates/dremio-master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ spec:
{{- end }}
containers:
- name: dremio-master-coordinator
image: {{.Values.image}}:{{.Values.imageTag}}
image: {{.Values.global.imageRegistry}}{{.Values.image}}:{{.Values.imageTag}}
imagePullPolicy: IfNotPresent
resources:
requests:
Expand Down Expand Up @@ -85,14 +85,14 @@ spec:
periodSeconds: 5
initContainers:
- name: start-only-one-master
image: busybox
image: {{.Values.global.imageRegistry}}busybox
command: ["sh", "-c", "INDEX=${HOSTNAME##*-}; if [ $INDEX -ne 0 ]; then echo Only one master should be running.; exit 1; fi; "]
- name: wait-for-zk
image: busybox
image: {{.Values.global.imageRegistry}}busybox
command: ["sh", "-c", "until ping -c 1 -W 1 zk-hs > /dev/null; do echo waiting for zookeeper host; sleep 2; done;"]
# since we're mounting a separate volume, reset permission to dremio uid/gid
- name: chown-data-directory
image: {{.Values.image}}:{{.Values.imageTag}}
image: {{.Values.global.imageRegistry}}{{.Values.image}}:{{.Values.imageTag}}
imagePullPolicy: IfNotPresent
securityContext:
runAsUser: 0
Expand All @@ -104,7 +104,7 @@ spec:
- "dremio:dremio"
- "/opt/dremio/data"
- name: upgrade-task
image: {{.Values.image}}:{{.Values.imageTag}}
image: {{.Values.global.imageRegistry}}{{.Values.image}}:{{.Values.imageTag}}
imagePullPolicy: IfNotPresent
volumeMounts:
- name: dremio-master-volume
Expand All @@ -114,7 +114,7 @@ spec:
- "upgrade"
{{- if .Values.tls.ui.enabled }}
- name: generate-ui-keystore
image: {{.Values.image}}:{{.Values.imageTag}}
image: {{.Values.global.imageRegistry}}{{.Values.image}}:{{.Values.imageTag}}
imagePullPolicy: IfNotPresent
volumeMounts:
- name: dremio-tls
Expand All @@ -136,7 +136,7 @@ spec:
{{- end }}
{{- if .Values.tls.client.enabled }}
- name: generate-client-keystore
image: {{.Values.image}}:{{.Values.imageTag}}
image: {{.Values.global.imageRegistry}}{{.Values.image}}:{{.Values.imageTag}}
imagePullPolicy: IfNotPresent
volumeMounts:
- name: dremio-tls
Expand Down
6 changes: 6 additions & 0 deletions charts/dremio/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
image: dremio/dremio-oss
imageTag: latest

# Global image registry
# make sure to add slash in the end of URL
# Example: your_private_global_registry:8080/
global:
imageRegistry: ""

# Check out Dremio documentation for memory and cpu requirements for
# the coordinators and the executors.
# The value of memory should be in MB. CPU is in no of cores.
Expand Down
8 changes: 4 additions & 4 deletions charts/dremio_v2/docs/Values-Reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ For example, to have an `initContainer` with the Dremio image, you can specify t
```yaml
extraInitContainers: |
- name: dremio-hello-world
image: {{ $.Values.image }}:{{ $.Values.imageTag }}
image: {{ $.Values.global.imageRegistry }}{{ $.Values.image }}:{{ $.Values.imageTag }}
command: ["echo", "Hello World"]
[...]
```
Expand Down Expand Up @@ -565,7 +565,7 @@ coordinator:
[...]
extraInitContainers: |
- name: dremio-hello-world
image: {{ $.Values.image }}:{{ $.Values.imageTag }}
image: {{ $.Values.global.imageRegistry }}{{ $.Values.image }}:{{ $.Values.imageTag }}
command: ["echo", "Hello World"]
[...]
```
Expand Down Expand Up @@ -842,7 +842,7 @@ coordinator:
[...]
extraInitContainers: |
- name: dremio-hello-world
image: {{ $.Values.image }}:{{ $.Values.imageTag }}
image: {{ $.Values.global.imageRegistry }}{{ $.Values.image }}:{{ $.Values.imageTag }}
command: ["echo", "Hello World"]
[...]
```
Expand Down Expand Up @@ -940,7 +940,7 @@ executor:

extraInitContainers: |
- name: dremio-hello-world
image: {{ $.Values.image }}:{{ $.Values.imageTag }}
image: {{ $.Values.global.imageRegistry }}{{ $.Values.image }}:{{ $.Values.imageTag }}
command: ["echo", "Hello World"]

extraVolumes:
Expand Down
2 changes: 1 addition & 1 deletion charts/dremio_v2/templates/_helpers_executor.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ Executor - Cloud Cache Peristent Volume Mounts
{{- $cloudCacheConfig := coalesce $engineConfiguration.cloudCache $context.Values.executor.cloudCache -}}
{{- if $cloudCacheConfig.enabled -}}
- name: chown-cloudcache-directory
image: {{ $context.Values.image }}:{{ $context.Values.imageTag }}
image: {{ $context.Values.global.imageRegistry }}{{ $context.Values.image }}:{{ $context.Values.imageTag }}
imagePullPolicy: IfNotPresent
securityContext:
runAsUser: 0
Expand Down
2 changes: 1 addition & 1 deletion charts/dremio_v2/templates/dremio-admin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ metadata:
spec:
containers:
- name: dremio-admin
image: {{ $.Values.image }}:{{ $.Values.imageTag }}
image: {{ $.Values.global.imageRegistry }}{{ $.Values.image }}:{{ $.Values.imageTag }}
imagePullPolicy: IfNotPresent
stdin: true
tty: true
Expand Down
10 changes: 5 additions & 5 deletions charts/dremio_v2/templates/dremio-coordinator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spec:
{{- include "dremio.coordinator.tolerations" $ | nindent 6 }}
containers:
- name: dremio-coordinator
image: {{ $.Values.image }}:{{ $.Values.imageTag }}
image: {{ $.Values.global.imageRegistry }}{{ $.Values.image }}:{{ $.Values.imageTag }}
imagePullPolicy: IfNotPresent
resources:
requests:
Expand Down Expand Up @@ -92,11 +92,11 @@ spec:
initContainers:
{{- include "dremio.coordinator.extraInitContainers" $ | nindent 6 }}
- name: wait-for-dremio-master
image: busybox
image: {{ $.Values.global.imageRegistry }}busybox
command: ["sh", "-c", "until nc -z dremio-client {{ $.Values.coordinator.web.port }} > /dev/null; do echo Waiting for Dremio master.; sleep 2; done;"]
{{- if $.Values.coordinator.web.tls.enabled }}
- name: generate-ui-keystore
image: {{ $.Values.image }}:{{ $.Values.imageTag }}
image: {{ $.Values.global.imageRegistry }}{{ $.Values.image }}:{{ $.Values.imageTag }}
imagePullPolicy: IfNotPresent
volumeMounts:
- name: dremio-tls
Expand All @@ -108,7 +108,7 @@ spec:
{{- end }}
{{- if $.Values.coordinator.client.tls.enabled }}
- name: generate-client-keystore
image: {{ $.Values.image }}:{{ $.Values.imageTag }}
image: {{ $.Values.global.imageRegistry }}{{ $.Values.image }}:{{ $.Values.imageTag }}
imagePullPolicy: IfNotPresent
volumeMounts:
- name: dremio-tls
Expand All @@ -120,7 +120,7 @@ spec:
{{- end }}
{{- if $.Values.coordinator.flight.tls.enabled }}
- name: generate-flight-keystore
image: {{ $.Values.image }}:{{ $.Values.imageTag }}
image: {{ $.Values.global.imageRegistry }}{{ $.Values.image }}:{{ $.Values.imageTag }}
imagePullPolicy: IfNotPresent
volumeMounts:
- name: dremio-tls
Expand Down
6 changes: 3 additions & 3 deletions charts/dremio_v2/templates/dremio-executor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ spec:
{{- include "dremio.executor.tolerations" (list $ $engineName) | nindent 6}}
containers:
- name: dremio-executor
image: {{ $.Values.image }}:{{ $.Values.imageTag }}
image: {{ $.Values.global.imageRegistry }}{{ $.Values.image }}:{{ $.Values.imageTag }}
imagePullPolicy: IfNotPresent
resources:
requests:
Expand Down Expand Up @@ -82,7 +82,7 @@ spec:
initContainers:
{{- include "dremio.executor.extraInitContainers" (list $ $engineName) | nindent 6 }}
- name: chown-data-directory
image: {{ $.Values.image }}:{{ $.Values.imageTag }}
image: {{ $.Values.global.imageRegistry }}{{ $.Values.image }}:{{ $.Values.imageTag }}
imagePullPolicy: IfNotPresent
securityContext:
runAsUser: 0
Expand All @@ -93,7 +93,7 @@ spec:
args: ["dremio:dremio", "/opt/dremio/data"]
{{- include "dremio.executor.cloudCache.initContainers" (list $ $engineName) | nindent 6 }}
- name: wait-for-zookeeper
image: busybox
image: {{ $.Values.global.imageRegistry }}busybox
command: ["sh", "-c", "until ping -c 1 -W 1 zk-hs > /dev/null; do echo Waiting for Zookeeper to be ready.; sleep 2; done;"]
volumes:
- name: dremio-config
Expand Down
16 changes: 8 additions & 8 deletions charts/dremio_v2/templates/dremio-master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ spec:
{{- include "dremio.coordinator.tolerations" $ | nindent 6 }}
containers:
- name: dremio-master-coordinator
image: {{ $.Values.image }}:{{ $.Values.imageTag }}
image: {{ $.Values.global.imageRegistry }}{{ $.Values.image }}:{{ $.Values.imageTag }}
imagePullPolicy: IfNotPresent
resources:
requests:
Expand Down Expand Up @@ -106,13 +106,13 @@ spec:
initContainers:
{{- include "dremio.coordinator.extraInitContainers" $ | nindent 6 }}
- name: start-only-one-dremio-master
image: busybox
image: {{ $.Values.global.imageRegistry }}busybox
command: ["sh", "-c", "INDEX=${HOSTNAME##*-}; if [ $INDEX -ne 0 ]; then echo Only one master should be running.; exit 1; fi; "]
- name: wait-for-zookeeper
image: busybox
image: {{ $.Values.global.imageRegistry }}busybox
command: ["sh", "-c", "until ping -c 1 -W 1 zk-hs > /dev/null; do echo Waiting for Zookeeper to be ready.; sleep 2; done;"]
- name: chown-data-directory
image: {{ $.Values.image }}:{{ $.Values.imageTag }}
image: {{ $.Values.global.imageRegistry }}{{ $.Values.image }}:{{ $.Values.imageTag }}
imagePullPolicy: IfNotPresent
securityContext:
runAsUser: 0
Expand All @@ -124,7 +124,7 @@ spec:
- "dremio:dremio"
- "/opt/dremio/data"
- name: upgrade-task
image: {{ $.Values.image }}:{{ $.Values.imageTag }}
image: {{ $.Values.global.imageRegistry }}{{ $.Values.image }}:{{ $.Values.imageTag }}
imagePullPolicy: IfNotPresent
volumeMounts:
- name: dremio-master-volume
Expand All @@ -136,7 +136,7 @@ spec:
- "upgrade"
{{- if $.Values.coordinator.web.tls.enabled }}
- name: generate-ui-keystore
image: {{ $.Values.image }}:{{ $.Values.imageTag }}
image: {{ $.Values.global.imageRegistry }}{{ $.Values.image }}:{{ $.Values.imageTag }}
imagePullPolicy: IfNotPresent
volumeMounts:
- name: dremio-tls
Expand All @@ -148,7 +148,7 @@ spec:
{{- end }}
{{- if $.Values.coordinator.client.tls.enabled }}
- name: generate-client-keystore
image: {{ $.Values.image }}:{{ $.Values.imageTag }}
image: {{ $.Values.global.imageRegistry }}{{ $.Values.image }}:{{ $.Values.imageTag }}
imagePullPolicy: IfNotPresent
volumeMounts:
- name: dremio-tls
Expand All @@ -160,7 +160,7 @@ spec:
{{- end }}
{{- if $.Values.coordinator.flight.tls.enabled }}
- name: generate-flight-keystore
image: {{ $.Values.image }}:{{ $.Values.imageTag }}
image: {{ $.Values.global.imageRegistry }}{{ $.Values.image }}:{{ $.Values.imageTag }}
imagePullPolicy: IfNotPresent
volumeMounts:
- name: dremio-tls
Expand Down
14 changes: 10 additions & 4 deletions charts/dremio_v2/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
image: dremio/dremio-oss
imageTag: latest

# Global image registry
# make sure to add slash in the end of URL
# Example: your_private_global_registry:8080/
global:
imageRegistry: ""

# Annotations, labels, node selectors, and tolerations
#
# annotations: Annotations are applied to the StatefulSets that are deployed.
Expand Down Expand Up @@ -62,7 +68,7 @@ coordinator:
# Uncomment the below lines to use a custom set of extra init containers for the coordinator.
#extraInitContainers: |
# - name: extra-init-container
# image: {{ $.Values.image }}:{{ $.Values.imageTag }}
# image: {{ $.Values.global.imageRegistry }}{{ $.Values.image }}:{{ $.Values.imageTag }}
# command: ["echo", "Hello World"]

# Extra Volumes
Expand Down Expand Up @@ -152,7 +158,7 @@ executor:
# Uncomment the below lines to use a custom set of extra init containers for executors.
#extraInitContainers: |
# - name: extra-init-container
# image: {{ $.Values.image }}:{{ $.Values.imageTag }}
# image: {{ $.Values.global.imageRegistry }}{{ $.Values.image }}:{{ $.Values.imageTag }}
# command: ["echo", "Hello World"]

# Extra Volumes
Expand Down Expand Up @@ -230,7 +236,7 @@ executor:
#
# extraInitContainers: |
# - name: extra-init-container
# image: {{ $.Values.image }}:{{ $.Values.imageTag }}
# image: {{ $.Values.global.imageRegistry }}{{ $.Values.image }}:{{ $.Values.imageTag }}
# command: ["echo", "Hello World"]
#
#
Expand Down Expand Up @@ -425,7 +431,7 @@ distStorage:
# Uncomment the below lines to provide extra init containers to be run first.
#extraInitContainers: |
# - name: extra-init-container
# image: {{ $.Values.image }}:{{ $.Values.imageTag }}
# image: {{ $.Values.global.imageRegistry }}{{ $.Values.image }}:{{ $.Values.imageTag }}
# command: ["echo", "Hello World"]

# Kubernetes Service Account
Expand Down