Skip to content

Commit

Permalink
Merge branch 'main' into PMM-7-update-pmm-2.39.0
Browse files Browse the repository at this point in the history
  • Loading branch information
BupycHuk authored Aug 15, 2023
2 parents 9bd8d30 + e4d6a83 commit 9fb6fcd
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 97 deletions.
2 changes: 1 addition & 1 deletion charts/pg-db/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: pg-db
description: 'A Helm chart to deploy the PostgreSQL database with the Percona Operator for PostgreSQL'
type: application
version: 2.2.3
version: 2.2.5
appVersion: 2.2.0
home: https://docs.percona.com/percona-operator-for-postgresql/2.0/
maintainers:
Expand Down
142 changes: 56 additions & 86 deletions charts/pg-db/templates/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,8 @@ spec:
{{- end }}
{{- end }}

{{- if .Values.openshift }}
openshift: .Values.openshift
{{- end }}

openshift: {{ default false .Values.openshift }}

{{- if .Values.users }}
users:
{{- range $user := .Values.users }}
Expand Down Expand Up @@ -99,16 +97,11 @@ spec:
expose:
type: {{ .Values.expose.type }}
annotations:
{{- range $annotation := .Values.expose.annotations}}
$annotation
{{- end }}
{{ .Values.expose.annotations | toYaml | indent 6 }}
labels:
{{- range $label := .Values.expose.labels}}
$labels
{{- end }}
{{ .Values.expose.labels | toYaml | indent 6 }}
{{- end }}


instances:
{{- range $instance := .Values.instances }}
- name: {{ $instance.name }}
Expand All @@ -128,14 +121,14 @@ spec:
{{- end }}
{{- if $instance.topologySpreadConstraints }}
topologySpreadConstraints:
- maxSkew: {{ $instance.topologySpreadConstraints.maxSkew}}
topologyKey: {{ $instance.topologySpreadConstraints.topologyKey }}
whenUnsatisfiable: {{ $instance.topologySpreadConstraints.whenUnsatisfiable}}
labelSelector:
matchLabels:
{{- range $label := $instance.topologySpreadConstraints.labelSelector.matchLabels}}
$label
{{- end }}
{{- range $constraint := $instance.topologySpreadConstraints }}
- maxSkew: {{ $constraint.maxSkew }}
topologyKey: {{ $constraint.topologyKey }}
whenUnsatisfiable: {{ $constraint.whenUnsatisfiable }}
labelSelector:
matchLabels:
{{ $constraint.labelSelector.matchLabels | toYaml | indent 6 }}
{{- end }}
{{- end }}

{{- if $instance.tolerations }}
Expand Down Expand Up @@ -188,13 +181,9 @@ spec:
expose:
type: {{ .Values.proxy.pgBouncer.expose.type }}
annotations:
{{- range $annotation := .Values.proxy.pgBouncer.expose.annotations}}
$annotation
{{- end }}
{{ .Values.proxy.pgBouncer.expose.annotations | toYaml | indent 10 }}
labels:
{{- range $label := .Values.proxy.pgBouncer.expose.labels}}
$labels
{{- end }}
{{.Values.proxy.pgBouncer.expose.labels | toYaml | indent 10 }}
{{- end }}
{{- if .Values.proxy.pgBouncer.sidecars }}
sidecars:
Expand All @@ -210,35 +199,30 @@ spec:
{{- if .Values.proxy.pgBouncer.config }}
config:
global:
{{- range $setting := .Values.proxy.pgBouncer.config.global }}
$setting
{{- end }}
{{ .Values.proxy.pgBouncer.config.global | toYaml | indent 10 }}
{{- end }}

{{- if .Values.proxy.pgBouncer.topologySpreadConstraints }}
topologySpreadConstraints:
- maxSkew: {{.Values.proxy.pgBouncer.topologySpreadConstraints.maxSkew}}
topologyKey: {{ .Values.proxy.pgBouncer.topologySpreadConstraints.topologyKey }}
whenUnsatisfiable: {{ .Values.proxy.pgBouncer.topologySpreadConstraints.whenUnsatisfiable}}
labelSelector:
matchLabels:
{{- range $label := .Values.proxy.pgBouncer.topologySpreadConstraints.labelSelector.matchLabels}}
$label
{{- end }}
{{- range $constraint := .Values.proxy.pgBouncer.topologySpreadConstraints }}
- maxSkew: {{ $constraint.maxSkew }}
topologyKey: {{ $constraint.topologyKey }}
whenUnsatisfiable: {{ $constraint.whenUnsatisfiable }}
labelSelector:
matchLabels:
{{ $constraint.labelSelector.matchLabels | toYaml | indent 6 }}
{{- end }}
{{- end }}

{{- if .Values.proxy.pgBouncer.affinity }}
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: {{ .Values.proxy.pgBouncer.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution.weight }}
podAffinityTerm:
labelSelector:
matchLabels:
{{- range $label := .Values.proxy.pgBouncer.affinity.podAntiAffinity.podAffinityTerm.labelSelector.matchLabels }}
$label
{{- end }}
topologyKey: {{ .Values.proxy.pgBouncer.affinity.podAntiAffinity.podAffinityTerm.topologyKey }}
- weight: {{ .Values.proxy.pgBouncer.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution.weight }}
podAffinityTerm:
labelSelector:
matchLabels:
{{ .Values.proxy.pgBouncer.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution.podAffinityTerm.labelSelector.matchLabels | toYaml | indent 18 }}
topologyKey: {{ .Values.proxy.pgBouncer.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution.podAffinityTerm.topologyKey }}
{{- end }}
{{- if .Values.proxy.pgBouncer.tolerations }}
tolerations:
Expand Down Expand Up @@ -279,36 +263,32 @@ spec:
{{- end }}
{{- if .Values.backups.pgbackrest.global }}
global:
{{- range $setting := .Values.backups.pgbackrest.global }}
$setting
{{- end }}
{{ .Values.backups.pgbackrest.global | toYaml | indent 8 }}
{{- end }}
{{- if .Values.backups.pgbackrest.repoHost }}
repoHost:
priorityClassName: {{ .Values.backups.pgbackrest.repoHost.priorityClassName }}
{{- if .Values.backups.pgbackrest.repoHost.topologySpreadConstraints }}
topologySpreadConstraints:
- maxSkew: {{.Values.backups.pgbackrest.repoHost.topologySpreadConstraints.maxSkew}}
topologyKey: {{ .Values.backups.pgbackrest.repoHost.topologySpreadConstraints.topologyKey }}
whenUnsatisfiable: {{ .Values.backups.pgbackrest.repoHost.topologySpreadConstraints.whenUnsatisfiable }}
labelSelector:
matchLabels:
{{- range $label := .Values.backups.pgbackrest.repoHost.topologySpreadConstraints.labelSelector.matchLabels }}
$label
{{- end }}
{{- range $constraint := .Values.backups.pgbackrest.repoHost.topologySpreadConstraints }}
- maxSkew: {{ $constraint.maxSkew }}
topologyKey: {{ $constraint.topologyKey }}
whenUnsatisfiable: {{ $constraint.whenUnsatisfiable }}
labelSelector:
matchLabels:
{{ $constraint.labelSelector.matchLabels | toYaml | indent 6 }}
{{- end }}
{{- end }}
{{- if .Values.backups.pgbackrest.repoHost.affinity }}
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: {{ .Values.backups.pgbackrest.repoHost.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution.weight }}
podAffinityTerm:
labelSelector:
matchLabels:
{{- range $label := .Values.backups.pgbackrest.repoHost.affinity.podAntiAffinity.podAffinityTerm.labelSelector.matchLabels }}
$label
{{- end }}
topologyKey: {{ .Values.backups.pgbackrest.repoHost.affinity.podAntiAffinity.podAffinityTerm.topologyKey }}
- weight: {{ .Values.backups.pgbackrest.repoHost.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution.weight }}
podAffinityTerm:
labelSelector:
matchLabels:
{{ .Values.backups.pgbackrest.repoHost.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution.podAffinityTerm.labelSelector.matchLabels | toYaml | indent 18 }}
topologyKey: {{ .Values.backups.pgbackrest.repoHost.affinity.podAntiAffinity.preferredDuringSchedulingIgnoredDuringExecution.podAffinityTerm.topologyKey }}
{{- end }}
{{- end }}
manual:
Expand Down Expand Up @@ -344,26 +324,16 @@ spec:
container: {{ $repo.azure.container}}
{{- end }}
{{- end }}
{{- if .Values.backups.pgbackrest.restore }}
restore:
enabled: {{ .Values.backups.pgbackrest.restore.enabled }}
repoName: {{ .Values.backups.pgbackrest.restore.repoName }}
{{- if .Values.backups.pgbackrest.options }}
options:
{{- range $option := .Values.backups.pgbackrest.options }}
# PITR restore in place
- $option
{{- end }}
{{- end }}
{{- end }}

{{- if .Values.patroni}}
patroni:
dynamicConfiguration:
postgresql:
parameters:
max_parallel_workers: {{ .Values.patroni.dynamicConfiguration.postgresql.parameters.max_parallel_workers }}
max_worker_processes: {{ .Values.patroni.dynamicConfiguration.postgresql.parameters.max_worker_processes }}
shared_buffers: {{ .Values.patroni.dynamicConfiguration.postgresql.parameters.shared_buffers }}
work_mem: {{ .Values.patroni.dynamicConfiguration.postgresql.parameters.work_mem }}
{{- end }}

{{- if .Values.patroni }}
patroni:
dynamicConfiguration:
postgresql:
parameters:
{{- .Values.patroni.dynamicConfiguration.postgresql.parameters | toYaml | nindent 10 }}
pg_hba:
{{- range $pg_hba_entry := .Values.patroni.dynamicConfiguration.postgresql.pg_hba }}
- {{ $pg_hba_entry }}
{{- end }}
{{- end }}
9 changes: 0 additions & 9 deletions charts/pg-db/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -244,15 +244,6 @@ backups:
# azure:
# container: "<YOUR_AZURE_CONTAINER>"
#
# restore:
# enabled: true
# repoName: repo1
# options:
# PITR restore in place
# - --type=time
# - --target="2021-06-09 14:15:11-04"
# restore individual databases
# - --db-include=hippo

pmm:
enabled: false
Expand Down
2 changes: 1 addition & 1 deletion charts/pxc-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ appVersion: 1.13.0
description: A Helm chart for deploying the Percona Operator for MySQL (based on Percona XtraDB Cluster)
name: pxc-operator
home: https://docs.percona.com/percona-operator-for-mysql/pxc/
version: 1.13.0
version: 1.13.1
maintainers:
- name: tplavcic
email: [email protected]
Expand Down
1 change: 1 addition & 0 deletions charts/pxc-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ The chart can be customized using the following configurable parameters:
| ------------------------------- | -----------------------------------------------------------------------------------------------| -------------------------------------------------|
| `image` | PXC Operator Container image full path | `percona/percona-xtradb-cluster-operator:1.13.0` |
| `imagePullPolicy` | PXC Operator Container pull policy | `Always` |
| `containerSecurityContext` | PXC Operator Container securityContext | `{}` |
| `imagePullSecrets` | PXC Operator Pod pull secret | `[]` |
| `replicaCount` | PXC Operator Pod quantity | `1` |
| `tolerations` | List of node taints to tolerate | `[]` |
Expand Down
4 changes: 4 additions & 0 deletions charts/pxc-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ spec:
scheme: HTTP
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.containerSecurityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
2 changes: 2 additions & 0 deletions charts/pxc-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ resources:
cpu: 100m
memory: 20Mi

containerSecurityContext: {}

nodeSelector: {}

tolerations: []
Expand Down

0 comments on commit 9fb6fcd

Please sign in to comment.