Skip to content

Commit

Permalink
add minio settings to dwp and make into a helm test job
Browse files Browse the repository at this point in the history
  • Loading branch information
tobybellwood committed Nov 14, 2023
1 parent 5bb3d45 commit ab14966
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 28 deletions.
2 changes: 1 addition & 1 deletion charts/lagoon-test/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ appVersion: v2.16.0
annotations:
artifacthub.io/changes: |
- kind: changed
description: add minio settings to api-data-watcher-pusher
description: add minio settings to api-data-watcher-pusher and make into a helm test job
6 changes: 3 additions & 3 deletions charts/lagoon-test/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@ app.kubernetes.io/instance: {{ .Release.Name }}


{{/*
Create a default fully qualified app name for local-git.
Create a default fully qualified app name for local-api-data-watcher-pusher.
*/}}
{{- define "lagoon-test.localAPIDataWatcherPusher.fullname" -}}
{{- include "lagoon-test.fullname" . }}-local-api-data-watcher-pusher
{{- end }}

{{/*
Common labels local-git.
Common labels local-api-data-watcher-pusher.
*/}}
{{- define "lagoon-test.localAPIDataWatcherPusher.labels" -}}
helm.sh/chart: {{ include "lagoon-test.chart" . }}
Expand All @@ -111,7 +111,7 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels local-git.
Selector labels local-api-data-watcher-pusher.
*/}}
{{- define "lagoon-test.localAPIDataWatcherPusher.selectorLabels" -}}
app.kubernetes.io/name: {{ include "lagoon-test.name" . }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,34 +1,29 @@
apiVersion: apps/v1
kind: Deployment
apiVersion: batch/v1
kind: Job
metadata:
name: {{ include "lagoon-test.localAPIDataWatcherPusher.fullname" . }}
labels:
{{- include "lagoon-test.localAPIDataWatcherPusher.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": test
"helm.sh/hook-weight": "10"
spec:
selector:
matchLabels:
{{- include "lagoon-test.localAPIDataWatcherPusher.selectorLabels" . | nindent 6 }}
backoffLimit: 2
template:
metadata:
{{- with .Values.localAPIDataWatcherPusher.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "lagoon-test.localAPIDataWatcherPusher.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.localAPIDataWatcherPusher.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
restartPolicy: Never
securityContext:
{{- toYaml .Values.localAPIDataWatcherPusher.podSecurityContext | nindent 8 }}
terminationGracePeriodSeconds: 120
containers:
- name: api-data-watcher-pusher
securityContext:
{{- toYaml .Values.localAPIDataWatcherPusher.securityContext | nindent 10 }}
image: "{{ .Values.localAPIDataWatcherPusher.image.repository }}:{{ coalesce .Values.localAPIDataWatcherPusher.image.tag .Values.imageTag .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.localAPIDataWatcherPusher.image.pullPolicy }}
securityContext:
{{- toYaml .Values.localAPIDataWatcherPusher.securityContext | nindent 10 }}
env:
- name: API_HOST
value: {{ .Values.apiHost | quote }}
Expand All @@ -55,13 +50,6 @@ spec:
value: {{ .Values.minioPass | quote }}
- name: TOKEN
value: {{ required "A valid .Values.token required!" .Values.token | quote }}
startupProbe:
exec:
command:
- test
- -f
- /tmp/api-data-pushed
failureThreshold: 90
resources:
{{- toYaml .Values.localAPIDataWatcherPusher.resources | nindent 10 }}
{{- with .Values.localAPIDataWatcherPusher.nodeSelector }}
Expand Down
3 changes: 2 additions & 1 deletion charts/lagoon-test/templates/tests/test-connection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ metadata:
labels:
{{- include "lagoon-test.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": test-success
"helm.sh/hook": test
"helm.sh/hook-weight": "30"
spec:
containers:
- name: nc
Expand Down
3 changes: 2 additions & 1 deletion charts/lagoon-test/templates/tests/test-suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ metadata:
labels:
{{- include "lagoon-test.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": test-success
"helm.sh/hook": test
"helm.sh/hook-weight": "50"
spec:
serviceAccountName: {{ include "lagoon-test.serviceAccountName" . }}
containers:
Expand Down

0 comments on commit ab14966

Please sign in to comment.