Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions charts/patroni-services/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -419,3 +419,14 @@ Service Name for dbaas adapter
{{- define "dbaas.serviceName" -}}
{{ printf "dbaas-postgres-adapter" }}
{{- end -}}

{{/*
Return securityContext for powaUI
*/}}
{{- define "powaUI.securityContext" -}}
{{- if .Values.powaUI.securityContext -}}
{{- if not (.Capabilities.APIVersions.Has "security.openshift.io/v1/SecurityContextConstraints") -}}
{{- toYaml .Values.powaUI.securityContext | nindent 6 }}
{{- end -}}
{{- end -}}
{{- end -}}
10 changes: 4 additions & 6 deletions charts/patroni-services/templates/cr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ spec:
enabled: true
names:
{{- range $i, $v := .Values.privateRegistry.secrets }}
- {{ $v.name }}
{{- end }}
- {{ $v.name }}
{{- end }}
{{- end }}
installationTimestamp: {{ now | unixEpoch | quote }}
{{ if .Values.serviceAccount.create }}
Expand Down Expand Up @@ -159,7 +159,7 @@ spec:
connectionName: "{{ .Values.externalDataBase.connectionName }}"
authSecretName: "{{ .Values.externalDataBase.authSecretName }}"
{{- if .Values.externalDataBase.restoreConfig }}
restoreConfig:
restoreConfig:
{{ .Values.externalDataBase.restoreConfig | toYaml | nindent 6 }}
{{- end }}
{{ end }}
Expand Down Expand Up @@ -271,9 +271,7 @@ spec:
{{ toYaml .Values.powaUI.resources | indent 6 }}
securityContext:
{{- include "restricted.globalPodSecurityContext" . | nindent 6 }}
{{- with .Values.powaUI.securityContext }}
{{- toYaml . | nindent 6 -}}
{{- end }}
{{- include "powaUI.securityContext" . }}
{{- end }}
{{- if .Values.queryExporter.install }}
queryExporter:
Expand Down
7 changes: 4 additions & 3 deletions charts/patroni-services/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ privateRegistry:
create: false
# registry: ghcr.io/netcracker
# username:
# password:
# email:
# password:
# email:

global:
cloudIntegrationEnabled: true
Expand Down Expand Up @@ -373,7 +373,8 @@ powaUI:
limits:
cpu: 500m
memory: 512Mi
securityContext: {}
securityContext:
runAsUser: 1001

replicationController:
install: false
Expand Down
Loading