From 91c1ffba3fcb7604d00285d22be1a5d67489bdc4 Mon Sep 17 00:00:00 2001 From: Julien WITTOUCK Date: Sat, 19 Feb 2022 15:42:22 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20:=20setup=20gaia=20service?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/_helpers.tpl | 9 +++++++++ templates/deployment.yaml | 13 ++++++++++--- templates/service.yaml | 2 +- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/templates/_helpers.tpl b/templates/_helpers.tpl index 47c5d4a..f0d2e98 100644 --- a/templates/_helpers.tpl +++ b/templates/_helpers.tpl @@ -50,6 +50,15 @@ app.kubernetes.io/name: {{ include "..name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} +{{/* +Gaia Selector labels +*/}} +{{- define "..gaiaSelectorLabels" -}} +app.kubernetes.io/name: {{ include "..name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +app.kubernetes.io/component: gaia-app +{{- end }} + {{/* Database Selector labels */}} diff --git a/templates/deployment.yaml b/templates/deployment.yaml index ff1b5d2..fdc1be9 100644 --- a/templates/deployment.yaml +++ b/templates/deployment.yaml @@ -10,7 +10,7 @@ spec: {{- end }} selector: matchLabels: - {{- include "..selectorLabels" . | nindent 6 }} + {{- include "..gaiaSelectorLabels" . | nindent 6 }} template: metadata: {{- with .Values.podAnnotations }} @@ -18,7 +18,7 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} labels: - {{- include "..selectorLabels" . | nindent 8 }} + {{- include "..gaiaSelectorLabels" . | nindent 8 }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: @@ -33,9 +33,16 @@ spec: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} + env: + - name: GAIA_MONGODB_URI + value: "mongodb://gaia-database:27017/gaia" + - name: GAIA_RUNNER_API_PASSWORD + value: "1234" + - name: LOGGING_LEVEL_ORG_SPRINGFRAMEWORK_DATA_MONGODB + value: WARN ports: - name: http - containerPort: 80 + containerPort: 8080 protocol: TCP livenessProbe: httpGet: diff --git a/templates/service.yaml b/templates/service.yaml index 806ad98..01a336a 100644 --- a/templates/service.yaml +++ b/templates/service.yaml @@ -12,4 +12,4 @@ spec: protocol: TCP name: http selector: - {{- include "..selectorLabels" . | nindent 4 }} + {{- include "..gaiaSelectorLabels" . | nindent 4 }}