Browse Source

[Improvement][K8s] Support local image

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

7
docker/kubernetes/dolphinscheduler/README.md

@ -81,7 +81,6 @@ The Configuration file is `values.yaml`, and the following tables lists the conf
| `nameOverride` | String to partially override common.names.fullname | `nil` |
| `fullnameOverride` | String to fully override common.names.fullname | `nil` |
| `timezone` | World time and date for cities in all time zones | `Asia/Shanghai` |
| `image.registry` | Docker image registry for the DolphinScheduler | `docker.io` |
| `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` |
@ -283,7 +282,7 @@ docker build -t apache/dolphinscheduler:mysql .
4. Push the docker image `apache/dolphinscheduler:mysql` to a docker registry
5. Modify image `registry` and `repository`, and update `tag` to `mysql` in `values.yaml`
5. Modify image `repository` and update `tag` to `mysql` in `values.yaml`
6. Modify postgresql `enabled` to `false`
@ -326,7 +325,7 @@ docker build -t apache/dolphinscheduler:mysql-driver .
4. Push the docker image `apache/dolphinscheduler:mysql-driver` to a docker registry
5. Modify image `registry` and `repository`, and update `tag` to `mysql-driver` in `values.yaml`
5. Modify image `repository` and update `tag` to `mysql-driver` in `values.yaml`
6. Run a DolphinScheduler release in Kubernetes (See **Installing the Chart**)
@ -355,7 +354,7 @@ docker build -t apache/dolphinscheduler:oracle-driver .
4. Push the docker image `apache/dolphinscheduler:oracle-driver` to a docker registry
5. Modify image `registry` and `repository`, and update `tag` to `oracle-driver` in `values.yaml`
5. Modify image `repository` and update `tag` to `oracle-driver` in `values.yaml`
6. Run a DolphinScheduler release in Kubernetes (See **Installing the Chart**)

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

@ -80,25 +80,14 @@ Create the name of the service account to use
{{- end -}}
{{/*
Create a default docker image registry.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "dolphinscheduler.image.registry" -}}
{{- $registry := default "docker.io" .Values.image.registry -}}
{{- printf "%s" $registry | trunc 63 | trimSuffix "/" -}}
{{- end -}}
{{/*
Create a default docker image repository.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
Create a default docker image fullname.
*/}}
{{- define "dolphinscheduler.image.repository" -}}
{{- printf "%s/%s:%s" (include "dolphinscheduler.image.registry" .) .Values.image.repository .Values.image.tag -}}
{{- define "dolphinscheduler.image.fullname" -}}
{{- printf "%s:%s" .Values.image.repository .Values.image.tag -}}
{{- end -}}
{{/*
Create a default image pull secrects.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "dolphinscheduler.image.pullSecrets" -}}
{{- default nil .Values.image.pullSecrets -}}
@ -124,9 +113,8 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
{{/*
Create a default fully qualified zookkeeper quorum.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "dolphinscheduler.zookeeper.quorum" -}}
{{- $port := default "2181" (.Values.zookeeper.service.port | toString) -}}
{{- printf "%s:%s" (include "dolphinscheduler.zookeeper.fullname" .) $port | trunc 63 | trimSuffix "-" -}}
{{- printf "%s:%s" (include "dolphinscheduler.zookeeper.fullname" .) $port -}}
{{- end -}}

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

@ -63,7 +63,7 @@ spec:
{{- end }}
containers:
- name: {{ include "dolphinscheduler.fullname" . }}-alert
image: {{ include "dolphinscheduler.image.repository" . | quote }}
image: {{ include "dolphinscheduler.image.fullname" . | quote }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
args:
- "alert-server"

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

@ -63,7 +63,7 @@ spec:
{{- end }}
containers:
- name: {{ include "dolphinscheduler.fullname" . }}-api
image: {{ include "dolphinscheduler.image.repository" . | quote }}
image: {{ include "dolphinscheduler.image.fullname" . | quote }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
args:
- "api-server"

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

@ -60,7 +60,7 @@ spec:
{{- end }}
containers:
- name: {{ include "dolphinscheduler.fullname" . }}-master
image: {{ include "dolphinscheduler.image.repository" . | quote }}
image: {{ include "dolphinscheduler.image.fullname" . | quote }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
args:
- "master-server"

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

@ -60,7 +60,7 @@ spec:
{{- end }}
containers:
- name: {{ include "dolphinscheduler.fullname" . }}-worker
image: {{ include "dolphinscheduler.image.repository" . | quote }}
image: {{ include "dolphinscheduler.image.fullname" . | quote }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
args:
- "worker-server"

1
docker/kubernetes/dolphinscheduler/values.yaml

@ -25,7 +25,6 @@ fullnameOverride: ""
timezone: "Asia/Shanghai"
image:
registry: "docker.io"
repository: "apache/dolphinscheduler"
tag: "latest"
pullPolicy: "IfNotPresent"

Loading…
Cancel
Save