Files
charts/bitnami/postgresql-ha/templates/role.yaml
Francisco de Paz Galán 55f65fa863 [bitnami/postgresql-ha] Chart standardised and bump to PSQL@14 (#9777)
* [bitnami/postgresql-ha] Chart standarization

Signed-off-by: FraPazGal <fdepaz@vmware.com>

* Update resources names

Signed-off-by: FraPazGal <fdepaz@vmware.com>

* Remove obsolete comments

Signed-off-by: FraPazGal <fdepaz@vmware.com>

* Quote namespaces and fix port typo in serviceMonitor

Signed-off-by: FraPazGal <fdepaz@vmware.com>

* Bump PSQL major

Signed-off-by: FraPazGal <fdepaz@vmware.com>

* Regenerate README

Signed-off-by: FraPazGal <fdepaz@vmware.com>

* Revert updateStrategy changes

Signed-off-by: FraPazGal <fdepaz@vmware.com>

* Add upgrade notes

Signed-off-by: FraPazGal <fdepaz@vmware.com>

* Modify nodePort params and fix typo

Signed-off-by: FraPazGal <fdepaz@vmware.com>

* Apply suggested changes

Signed-off-by: FraPazGal <fdepaz@vmware.com>

* [bitnami/postgresql-ha] Update components versions

Signed-off-by: Bitnami Containers <containers@bitnami.com>

Co-authored-by: Bitnami Containers <containers@bitnami.com>
2022-04-20 13:21:49 +02:00

27 lines
1.1 KiB
YAML

{{- if .Values.rbac.create }}
kind: Role
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
metadata:
name: {{ template "common.names.fullname" . }}
namespace: {{ include "common.names.namespace" . | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
rules:
{{- $pspAvailable := (semverCompare "<1.25-0" (include "common.capabilities.kubeVersion" .)) -}}
{{- if and $pspAvailable .Values.psp.create }}
- apiGroups: ["extensions"]
resources: ["podsecuritypolicies"]
verbs: ["use"]
resourceNames:
- {{ template "common.names.fullname" . }}
{{- end }}
{{- if .Values.rbac.rules }}
{{- include "common.tplvalues.render" ( dict "value" .Values.rbac.rules "context" $ ) | nindent 2 }}
{{- end }}
{{- end }}