Skip to content

Commit

Permalink
add jdbc-init container
Browse files Browse the repository at this point in the history
  • Loading branch information
ruckc committed Jul 12, 2022
1 parent ef9e5f0 commit 91515a3
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 2 deletions.
4 changes: 2 additions & 2 deletions charts/guacamole-client/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.5
version: 0.1.6

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.4.0-5"
appVersion: "1.4.0-6"
41 changes: 41 additions & 0 deletions charts/guacamole-client/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,31 @@ spec:
serviceAccountName: {{ include "guacamole-client.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
initContainers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
env:
- name: PGHOST
value: {{ .Values.database.hostname }}
- name: PGPORT
value: {{ .Values.database.port | default "5432" }}
- name: PGDATABASE
value: {{ .Values.database.name }}
- name: PGUSER
valueFrom:
secretKeyRef:
name: {{ .Values.database.username.secret }}
key: username
- name: PGPASSWORD
valueFrom:
secretKeyRef:
name: {{ .Values.database.password.secret }}
key: password
containers:
- name: {{ .Chart.Name }}
securityContext:
Expand All @@ -40,6 +65,22 @@ spec:
resources:
{{- toYaml .Values.resources | nindent 12 }}
env:
- name: POSTGRESQL_HOSTNAME
value: {{ .Values.database.hostname }}
- name: POSTGRESQL_PORT
value: {{ .Values.database.port | default "5432" }}
- name: POSTGRESQL_DATABASE
value: {{ .Values.database.name }}
- name: POSTGRESQL_USERNAME
valueFrom:
secretKeyRef:
name: {{ .Values.database.username.secret }}
key: username
- name: POSTGRESQL_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Values.database.password.secret }}
key: password
{{- toYaml .Values.configEnv | nindent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
Expand Down
9 changes: 9 additions & 0 deletions charts/guacamole-client/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,12 @@ nodeSelector: {}
tolerations: []

affinity: {}

database:
host: localhost
port: 5432
name: guacamole
username:
secret: database-credentials
password:
secret: database-credentials

0 comments on commit 91515a3

Please sign in to comment.