Skip to content

Commit

Permalink
Related to magda-io/magda#3229, Use magda-common for docker image rel…
Browse files Browse the repository at this point in the history
…ated logic
  • Loading branch information
t83714 committed Oct 11, 2021
1 parent 5a9f70e commit 82896dd
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 22 deletions.
6 changes: 6 additions & 0 deletions deploy/magda-dap-connector/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dependencies:
- name: magda-common
repository: https://charts.magda.io
version: 1.0.0-alpha.4
digest: sha256:a5dcf2df16ca5a3972f92d91434c2e78be0ce411994d2a3cb89c674a711ddc24
generated: "2021-10-11T17:26:37.278002+11:00"
7 changes: 7 additions & 0 deletions deploy/magda-dap-connector/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,10 @@ version: "0.0.57-0"
kubeVersion: ">= 1.14.0-0"
home: "https://github.com/magda-io/magda-dap-connector"
sources: ["https://github.com/magda-io/magda-dap-connector"]
annotations:
magdaModuleType: "connector"
dependencies:
- name: magda-common
version: "1.0.0-alpha.4"
repository: "https://charts.magda.io"

13 changes: 3 additions & 10 deletions deploy/magda-dap-connector/templates/cronjobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,11 @@ spec:
metadata:
name: connector-{{ .Values.config.id }}
spec:
{{- /*
See chart value file for details of the logic used to generate this setting value below.!!!
*/}}
{{- $imagePullSecret := (ne (.Values.image.imagePullSecret | typeOf) "<nil>") | ternary .Values.image.imagePullSecret ( (ne (.Values.global.connectors.image.imagePullSecret | typeOf) "<nil>") | ternary .Values.global.connectors.image.imagePullSecret ( (ne (.Values.global.image.imagePullSecret | typeOf) "<nil>") | ternary .Values.global.image.imagePullSecret .Values.defaultImage.imagePullSecret ) ) -}}
{{- if ne ($imagePullSecret | toString) "false" }}
imagePullSecrets:
- name: {{ $imagePullSecret }}
{{- end }}
{{- include "magda.imagePullSecrets" . | indent 10 }}
containers:
- name: connector-{{ .Values.config.id }}
image: "{{ .Values.image.repository | default .Values.global.connectors.image.repository | default .Values.global.image.repository | default .Values.defaultImage.repository }}/{{ .Values.image.name }}:{{ .Values.image.tag | default .Values.global.connectors.image.tag | default .Values.global.image.tag | default .Values.defaultImage.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy | default .Values.global.connectors.image.pullPolicy | default .Values.global.image.pullPolicy | default .Values.defaultImage.pullPolicy }}
image: {{ include "magda.image" . | quote }}
imagePullPolicy: {{ include "magda.imagePullPolicy" . | quote }}
command:
- "node"
- "/usr/src/app/component/dist/index.js"
Expand Down
13 changes: 3 additions & 10 deletions deploy/magda-dap-connector/templates/jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,11 @@ spec:
metadata:
name: connector-{{ .Values.config.id }}
spec:
{{- /*
See chart value file for details of the logic used to generate this setting value below.!!!
*/}}
{{- $imagePullSecret := (ne (.Values.image.imagePullSecret | typeOf) "<nil>") | ternary .Values.image.imagePullSecret ( (ne (.Values.global.connectors.image.imagePullSecret | typeOf) "<nil>") | ternary .Values.global.connectors.image.imagePullSecret ( (ne (.Values.global.image.imagePullSecret | typeOf) "<nil>") | ternary .Values.global.image.imagePullSecret .Values.defaultImage.imagePullSecret ) ) -}}
{{- if ne ($imagePullSecret | toString) "false" }}
imagePullSecrets:
- name: {{ $imagePullSecret }}
{{- end }}
{{- include "magda.imagePullSecrets" . | indent 6 }}
containers:
- name: connector-{{ .Values.config.id }}
image: "{{ .Values.image.repository | default .Values.global.connectors.image.repository | default .Values.global.image.repository | default .Values.defaultImage.repository }}/{{ .Values.image.name }}:{{ .Values.image.tag | default .Values.global.connectors.image.tag | default .Values.global.image.tag | default .Values.defaultImage.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy | default .Values.global.connectors.image.pullPolicy | default .Values.global.image.pullPolicy | default .Values.defaultImage.pullPolicy }}
image: {{ include "magda.image" . | quote }}
imagePullPolicy: {{ include "magda.imagePullPolicy" . | quote }}
command:
- "node"
- "/usr/src/app/component/dist/index.js"
Expand Down
2 changes: 0 additions & 2 deletions deploy/magda-dap-connector/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ global:
# image setting loadding order: (from higher priority to lower priority)
# - Values.image.x
# - Values.global.connectors.image.x
# - Values.global.image.x
# - Values.defaultImage.x
# You can set `imagePullSecret` value to `false` (bool) to reset the value (see example below)

Expand All @@ -20,7 +19,6 @@ image:

defaultImage:
repository: docker.io/data61
tag: 0.0.57-0
pullPolicy: IfNotPresent
imagePullSecret: false

Expand Down

0 comments on commit 82896dd

Please sign in to comment.