Skip to content

Commit

Permalink
🔧 : setup gaia service
Browse files Browse the repository at this point in the history
  • Loading branch information
juwit committed Feb 28, 2022
1 parent e19d3a8 commit 91c1ffb
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
9 changes: 9 additions & 0 deletions templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/}}
Expand Down
13 changes: 10 additions & 3 deletions templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ spec:
{{- end }}
selector:
matchLabels:
{{- include "..selectorLabels" . | nindent 6 }}
{{- include "..gaiaSelectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "..selectorLabels" . | nindent 8 }}
{{- include "..gaiaSelectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ spec:
protocol: TCP
name: http
selector:
{{- include "..selectorLabels" . | nindent 4 }}
{{- include "..gaiaSelectorLabels" . | nindent 4 }}

0 comments on commit 91c1ffb

Please sign in to comment.