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 12, 2021
1 parent 37118e4 commit 8c44853
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 17 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,5 @@ magda-tenant-api/lib/

#typescript
tsconfig.tsbuildinfo

deploy/*/charts
1 change: 1 addition & 0 deletions .helmdocsignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
deploy/*/charts
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# 1.0.0

- Upgrade dependencies
- Upgrade CI scripts
- Related to https://github.com/magda-io/magda/issues/3229, Use magda-common for docker image related logic
6 changes: 6 additions & 0 deletions deploy/magda-minion-broken-link/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-12T20:12:30.701077+11:00"
7 changes: 6 additions & 1 deletion deploy/magda-minion-broken-link/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,9 @@ version: "0.0.57-0"
kubeVersion: ">= 1.14.0-0"
home: "https://github.com/magda-io/magda-minion-broken-link"
sources: ["https://github.com/magda-io/magda-minion-broken-link"]

annotations:
magdaModuleType: "minion"
dependencies:
- name: magda-common
version: "1.0.0-alpha.4"
repository: "https://charts.magda.io"
7 changes: 4 additions & 3 deletions deploy/magda-minion-broken-link/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ spec:
labels:
cron: minion-broken-link-recrawl
spec:
{{- include "magda.imagePullSecrets" (dict "image" .Values.cronJobImage) | indent 10 }}
containers:
- image: "alpine"
imagePullPolicy: IfNotPresent
name: minion-broken-link-recrawl
- name: minion-broken-link-recrawl
image: {{ include "magda.image" (dict "image" .Values.cronJobImage) | quote }}
imagePullPolicy: {{ include "magda.imagePullPolicy" (dict "image" .Values.cronJobImage) | quote }}
command:
- "/bin/sh"
- "-c"
Expand Down
13 changes: 3 additions & 10 deletions deploy/magda-minion-broken-link/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,11 @@ spec:
labels:
service: minion-broken-link
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.minions.image.imagePullSecret | typeOf) "<nil>") | ternary .Values.global.minions.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: minion-broken-link
image: "{{ .Values.image.repository | default .Values.global.minions.image.repository | default .Values.global.image.repository | default .Values.defaultImage.repository }}/{{ .Values.image.name }}:{{ .Values.image.tag | default .Values.global.minions.image.tag | default .Values.global.image.tag | default .Values.defaultImage.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy | default .Values.global.minions.image.pullPolicy | default .Values.global.image.pullPolicy | default .Values.defaultImage.pullPolicy }}
image: {{ include "magda.image" . | quote }}
imagePullPolicy: {{ include "magda.imagePullPolicy" . | quote }}
{{- if .Values.global.enableLivenessProbes }}
livenessProbe:
httpGet:
Expand Down
10 changes: 7 additions & 3 deletions deploy/magda-minion-broken-link/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,24 @@ global:
# image setting loadding order: (from higher priority to lower priority)
# - Values.image.x
# - Values.global.minions.image.x
# - Values.global.image.x
# - Values.defaultImage.x
# You can set `imagePullSecret` value to `false` (bool) to reset the value (see example below)

image:
name: "magda-minion-broken-link"
# repository:
# tag:
# pullPolicy:
# imagePullSecret:

cronJobImage:
name: "alpine"
repository: "docker.io"
tag: "latest"
pullPolicy: IfNotPresent
pullSecrets: false

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

Expand Down

0 comments on commit 8c44853

Please sign in to comment.