Browse Source

[Improvement][K8s] Optimize image pull secret

pull/3/MERGE
chengshiwen 4 years ago
parent
commit
b689630970
  1. 2
      docker/kubernetes/dolphinscheduler/README.md
  2. 7
      docker/kubernetes/dolphinscheduler/templates/_helpers.tpl
  3. 4
      docker/kubernetes/dolphinscheduler/templates/deployment-dolphinscheduler-alert.yaml
  4. 4
      docker/kubernetes/dolphinscheduler/templates/deployment-dolphinscheduler-api.yaml
  5. 4
      docker/kubernetes/dolphinscheduler/templates/statefulset-dolphinscheduler-master.yaml
  6. 4
      docker/kubernetes/dolphinscheduler/templates/statefulset-dolphinscheduler-worker.yaml
  7. 3
      docker/kubernetes/dolphinscheduler/values.yaml

2
docker/kubernetes/dolphinscheduler/README.md

@ -84,7 +84,7 @@ The Configuration file is `values.yaml`, and the following tables lists the conf
| `image.repository` | Docker image repository for the DolphinScheduler | `apache/dolphinscheduler` |
| `image.tag` | Docker image version for the DolphinScheduler | `latest` |
| `image.pullPolicy` | Image pull policy. One of Always, Never, IfNotPresent | `IfNotPresent` |
| `image.pullSecrets` | Image pull secrets. An optional list of references to secrets in the same namespace to use for pulling any of the images | `[]` |
| `image.pullSecret` | Image pull secret. An optional reference to secret in the same namespace to use for pulling any of the images | `nil` |
| | | |
| `postgresql.enabled` | If not exists external PostgreSQL, by default, the DolphinScheduler will use a internal PostgreSQL | `true` |
| `postgresql.postgresqlUsername` | The username for internal PostgreSQL | `root` |

7
docker/kubernetes/dolphinscheduler/templates/_helpers.tpl

@ -86,13 +86,6 @@ Create a default docker image fullname.
{{- printf "%s:%s" .Values.image.repository .Values.image.tag -}}
{{- end -}}
{{/*
Create a default image pull secrects.
*/}}
{{- define "dolphinscheduler.image.pullSecrets" -}}
{{- default nil .Values.image.pullSecrets -}}
{{- end -}}
{{/*
Create a default fully qualified postgresql name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).

4
docker/kubernetes/dolphinscheduler/templates/deployment-dolphinscheduler-alert.yaml

@ -57,9 +57,9 @@ spec:
{{- if .Values.alert.tolerations }}
tolerations: {{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.image.pullSecrets }}
{{- if .Values.image.pullSecret }}
imagePullSecrets:
- name: {{ include "dolphinscheduler.image.pullSecrets" . }}
- name: {{ .Values.image.pullSecret }}
{{- end }}
containers:
- name: {{ include "dolphinscheduler.fullname" . }}-alert

4
docker/kubernetes/dolphinscheduler/templates/deployment-dolphinscheduler-api.yaml

@ -57,9 +57,9 @@ spec:
{{- if .Values.api.tolerations }}
tolerations: {{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.image.pullSecrets }}
{{- if .Values.image.pullSecret }}
imagePullSecrets:
- name: {{ include "dolphinscheduler.image.pullSecrets" . }}
- name: {{ .Values.image.pullSecret }}
{{- end }}
containers:
- name: {{ include "dolphinscheduler.fullname" . }}-api

4
docker/kubernetes/dolphinscheduler/templates/statefulset-dolphinscheduler-master.yaml

@ -54,9 +54,9 @@ spec:
{{- if .Values.master.tolerations }}
tolerations: {{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.image.pullSecrets }}
{{- if .Values.image.pullSecret }}
imagePullSecrets:
- name: {{ include "dolphinscheduler.image.pullSecrets" . }}
- name: {{ .Values.image.pullSecret }}
{{- end }}
containers:
- name: {{ include "dolphinscheduler.fullname" . }}-master

4
docker/kubernetes/dolphinscheduler/templates/statefulset-dolphinscheduler-worker.yaml

@ -54,9 +54,9 @@ spec:
{{- if .Values.worker.tolerations }}
tolerations: {{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.image.pullSecrets }}
{{- if .Values.image.pullSecret }}
imagePullSecrets:
- name: {{ include "dolphinscheduler.image.pullSecrets" . }}
- name: {{ .Values.image.pullSecret }}
{{- end }}
containers:
- name: {{ include "dolphinscheduler.fullname" . }}-worker

3
docker/kubernetes/dolphinscheduler/values.yaml

@ -28,7 +28,7 @@ image:
repository: "apache/dolphinscheduler"
tag: "latest"
pullPolicy: "IfNotPresent"
pullSecrets: []
pullSecret: ""
## If not exists external database, by default, Dolphinscheduler's database will use it.
postgresql:
@ -51,7 +51,6 @@ externalDatabase:
username: "root"
password: "root"
database: "dolphinscheduler"
## multi params should join with & char
params: "characterEncoding=utf8"
## If not exists external zookeeper, by default, Dolphinscheduler's zookeeper will use it.

Loading…
Cancel
Save