simplified helm chart
This commit is contained in:
committed by
Jens Kristian Villadsen
parent
79fddf8309
commit
eaffce0d42
@@ -28,10 +28,9 @@ spec:
|
||||
{{- end }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||
{{- if .Values.postgresql.enabled }}
|
||||
initContainers:
|
||||
- name: wait-for-db
|
||||
image: busybox:1.32
|
||||
- name: wait-for-db-to-be-ready
|
||||
image: "{{ .Values.postgresql.image.registry }}/{{ .Values.postgresql.image.repository }}:{{ .Values.postgresql.image.tag }}"
|
||||
imagePullPolicy: IfNotPresent
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
@@ -41,15 +40,27 @@ spec:
|
||||
drop:
|
||||
- ALL
|
||||
runAsNonRoot: true
|
||||
runAsUser: 11111
|
||||
runAsGroup: 11111
|
||||
command: ["sh", "-c", "while ! nc -z {{ .Release.Name }}-postgresql 5432 -w 5; do echo $(date) waiting for database; sleep 5; done;"]
|
||||
{{- end }}
|
||||
runAsUser: 1001
|
||||
runAsGroup: 1001
|
||||
env:
|
||||
- name: PGHOST
|
||||
value: "{{ include "hapi-fhir-jpaserver.database.host" . }}"
|
||||
- name: PGPORT
|
||||
value: "{{ include "hapi-fhir-jpaserver.database.port" . }}"
|
||||
- name: PGUSER
|
||||
value: "{{ include "hapi-fhir-jpaserver.database.user" . }}"
|
||||
command: ["/bin/sh", "-c"]
|
||||
args:
|
||||
- |
|
||||
until pg_isready; do
|
||||
echo "Waiting for DB ${PGUSER}@${PGHOST}:${PGPORT} to be up";
|
||||
sleep 15;
|
||||
done;
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||
image: {{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ include "hapi-fhir-jpaserver.imageTag" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
ports:
|
||||
- name: http
|
||||
@@ -68,7 +79,7 @@ spec:
|
||||
{{- end }}
|
||||
startupProbe:
|
||||
httpGet:
|
||||
path: /fhir/Patient?_count=1
|
||||
path: /fhir/metadata
|
||||
port: http
|
||||
{{- with .Values.startupProbe }}
|
||||
initialDelaySeconds: {{ .initialDelaySeconds }}
|
||||
@@ -88,7 +99,7 @@ spec:
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "hapi-fhir-jpaserver.postgresql.secretName" . }}
|
||||
key: postgresql-password
|
||||
key: {{ include "hapi-fhir-jpaserver.postgresql.secretKey" . }}
|
||||
- name: SPRING_DATASOURCE_DRIVERCLASSNAME
|
||||
value: org.postgresql.Driver
|
||||
- name: SPRING_JPA_PROPERTIES_HIBERNATE_DIALECT
|
||||
|
||||
Reference in New Issue
Block a user