@@ -18,10 +18,10 @@ spec:
1818 labels :
1919 {{- include "taskchampion-sync-server.selectorLabels" . | nindent 8 }}
2020 spec :
21- {{- if .Values.serviceAccount.create }}
22- serviceAccountName : {{ include "taskchampion-sync-server.fullname" . }}
23- {{- else if .Values.serviceAccount.name }}
24- serviceAccountName : {{ .Values.serviceAccount.name }}
21+
22+ {{- with .Values.image.pullSecrets }}
23+ imagePullSecrets :
24+ {{- toYaml . | nindent 8 }}
2525 {{- end }}
2626 securityContext :
2727 {{- toYaml .Values.securityContext | nindent 8 }}
3232 imagePullPolicy : {{ .Values.postgres.initContainer.imagePullPolicy }}
3333 securityContext :
3434 allowPrivilegeEscalation : false
35+ runAsNonRoot : true
36+ runAsUser : 999
3537 env :
3638 - name : PGURI
3739 valueFrom :
@@ -90,11 +92,18 @@ spec:
9092 imagePullPolicy : {{ .Values.image.pullPolicy }}
9193 securityContext :
9294 allowPrivilegeEscalation : false
95+ runAsNonRoot : true
96+ runAsUser : 1092
97+ readOnlyRootFilesystem : true
98+ {{- if eq .Values.postgres.enabled true }}
99+ command :
100+ - /bin/taskchampion-sync-server-postgres
101+ {{- else }}
102+ command :
103+ - /bin/taskchampion-sync-server
104+ {{- end }}
93105 env :
94- {{- range $name, $value := .Values.env }}
95- - name : {{ $name }}
96- value : {{ $value | quote }}
97- {{- end }}
106+ {{- toYaml .Values.env | nindent 12 }}
98107 {{- if .Values.clientIdSecret }}
99108 - name : CLIENT_ID
100109 valueFrom :
@@ -117,9 +126,24 @@ spec:
117126 - name : http
118127 containerPort : {{ .Values.service.targetPort }}
119128 protocol : TCP
120- {{- with .Values.resources }}
129+ livenessProbe :
130+ httpGet :
131+ path : /
132+ port : http
133+ initialDelaySeconds : 5
134+ periodSeconds : 10
135+ readinessProbe :
136+ httpGet :
137+ path : /
138+ port : http
139+ initialDelaySeconds : 5
140+ periodSeconds : 10
141+ {{- if eq .Values.postgres.enabled true }}
142+ resources :
143+ {{- toYaml .Values.postgres.resources | nindent 12 }}
144+ {{- else }}
121145 resources :
122- {{- toYaml . | nindent 12 }}
146+ {{- toYaml .Values.sqlite.resources | nindent 12 }}
123147 {{- end }}
124148 {{- if eq .Values.sqlite.enabled true }}
125149 volumeMounts :
0 commit comments