Skip to content

Commit

Permalink
Merge pull request #362 from percona/K8SPXC-1363-pxc-1150
Browse files Browse the repository at this point in the history
K8SPXC-1363 - Update PXC operator chart for 1.15.0 release
  • Loading branch information
jvpasinatto authored Aug 21, 2024
2 parents 7272932 + b5b261a commit 7372a3e
Show file tree
Hide file tree
Showing 10 changed files with 1,005 additions and 337 deletions.
4 changes: 2 additions & 2 deletions charts/pxc-db/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apiVersion: v2
appVersion: 1.14.0
appVersion: 1.15.0
description: A Helm chart for installing Percona XtraDB Cluster Databases using the PXC Operator.
name: pxc-db
home: https://www.percona.com/doc/kubernetes-operator-for-pxc/kubernetes.html
version: 1.14.4
version: 1.15.0
maintainers:
- name: tplavcic
email: [email protected]
Expand Down
521 changes: 265 additions & 256 deletions charts/pxc-db/README.md

Large diffs are not rendered by default.

24 changes: 0 additions & 24 deletions charts/pxc-db/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -68,30 +68,6 @@ This filters the backup.storages hash for S3 credentials. If we detect them, the
{{/*
Functions returns image URI according to parameters set
*/}}
{{- define "pxc-db.haproxy-image" -}}
{{- if .Values.haproxy.image }}
{{- .Values.haproxy.image }}
{{- else }}
{{- printf "%s:%s-haproxy" .Values.operatorImageRepository .Chart.AppVersion }}
{{- end }}
{{- end -}}

{{- define "pxc-db.proxysql-image" -}}
{{- if .Values.proxysql.image }}
{{- .Values.proxysql.image }}
{{- else }}
{{- printf "%s:%s-proxysql" .Values.operatorImageRepository .Chart.AppVersion }}
{{- end }}
{{- end -}}

{{- define "pxc-db.logcollector-image" -}}
{{- if .Values.logcollector.image }}
{{- .Values.logcollector.image }}
{{- else }}
{{- printf "%s:%s-logcollector" .Values.operatorImageRepository .Chart.AppVersion }}
{{- end }}
{{- end -}}

{{- define "pxc-db.operator-image" -}}
{{- if .Values.image }}
{{- .Values.image }}
Expand Down
2 changes: 1 addition & 1 deletion charts/pxc-db/templates/cluster-ssl-secret.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if not .Values.pxc.disableTLS }}
{{- if .Values.tls.enabled }}
{{- if not .Values.pxc.certManager }}
{{- $nameDB := printf "%s" (include "pxc-database.fullname" .) }}
{{ $ca := genCA (printf "%s-ca" $nameDB ) 365 }}
Expand Down
20 changes: 13 additions & 7 deletions charts/pxc-db/templates/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ spec:
{{- else }}
secretsName: {{ include "pxc-database.fullname" . }}-secrets
{{- end }}
{{- if not .Values.pxc.disableTLS }}
{{- if .Values.tls.enabled }}
{{- if hasKey .Values.secrets.tls "cluster" }}
sslSecretName: {{ .Values.secrets.tls.cluster }}
{{- else }}
Expand Down Expand Up @@ -67,11 +67,12 @@ spec:
{{- end }}
{{- end }}
{{- end }}
{{- if or .Values.allowUnsafeConfigurations .Values.pxc.disableTLS }}
allowUnsafeConfigurations: true
{{- end }}
enableCRValidationWebhook: {{ .Values.enableCRValidationWebhook }}
pause: {{ .Values.pause }}
{{- if .Values.unsafeFlags }}
unsafeFlags:
{{ .Values.unsafeFlags | toYaml | indent 4 }}
{{- end }}
updateStrategy: {{ .Values.updateStrategy }}
{{- if hasKey .Values.upgradeOptions "versionServiceEndpoint" }}
upgradeOptions:
Expand All @@ -81,6 +82,7 @@ spec:
{{- end }}
{{- if .Values.tls }}
tls:
enabled: {{ .Values.tls.enabled }}
{{- if hasKey .Values.tls "SANs" }}
SANs:
{{ .Values.tls.SANs | toYaml | indent 6 }}
Expand Down Expand Up @@ -181,6 +183,10 @@ spec:
{{- end }}
{{- end }}
accessModes: [{{ $pxc.persistence.accessMode | quote }}]
{{- if $pxc.persistence.dataSource }}
dataSource:
{{ $pxc.persistence.dataSource| toYaml | indent 10 }}
{{- end }}
resources:
requests:
storage: {{ $pxc.persistence.size | quote }}
Expand Down Expand Up @@ -221,7 +227,7 @@ spec:
haproxy:
enabled: true
size: {{ $haproxy.size }}
image: {{ include "pxc-db.haproxy-image" . }}
image: {{ .Values.haproxy.image }}
{{- if $haproxy.imagePullPolicy }}
imagePullPolicy: {{ $haproxy.imagePullPolicy }}
{{- end }}
Expand Down Expand Up @@ -329,7 +335,7 @@ spec:
proxysql:
enabled: true
size: {{ $proxysql.size }}
image: {{ include "pxc-db.proxysql-image" . }}
image: {{ .Values.proxysql.image }}
{{- if $proxysql.imagePullPolicy }}
imagePullPolicy: {{ $proxysql.imagePullPolicy }}
{{- end }}
Expand Down Expand Up @@ -442,7 +448,7 @@ spec:
{{- else }}
{{- $logcollector := .Values.logcollector }}
enabled: true
image: {{ include "pxc-db.logcollector-image" . }}
image: {{ .Values.logcollector.image }}
{{- if $logcollector.imagePullPolicy }}
imagePullPolicy: {{ $logcollector.imagePullPolicy }}
{{- end }}
Expand Down
43 changes: 25 additions & 18 deletions charts/pxc-db/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
# Declare variables to be passed into your templates.

finalizers:
- delete-pxc-pods-in-order
- percona.com/delete-pxc-pods-in-order
## Set this if you want to delete proxysql persistent volumes on cluster deletion
# - delete-proxysql-pvc
# - percona.com/delete-proxysql-pvc
## Set this if you want to delete database persistent volumes on cluster deletion
# - delete-pxc-pvc
# - percona.com/delete-pxc-pvc
## Set this if you want to delete cert manager certificates on cluster deletion
# - delete-ssl
# - percona.com/delete-ssl

nameOverride: ""
fullnameOverride: ""
Expand All @@ -19,29 +19,34 @@ annotations: {}

operatorImageRepository: percona/percona-xtradb-cluster-operator

crVersion: 1.14.0
crVersion: 1.15.0
ignoreAnnotations: []
# - iam.amazonaws.com/role
ignoreLabels: []
# - rack
pause: false
# initContainer:
# image: ""
# image: "percona/percona-xtradb-cluster-operator:1.15.0"
# resources:
# requests:
# memory: 100M
# cpu: 100m
# limits:
# memory: 200M
# cpu: 200m
allowUnsafeConfigurations: false
# unsafeFlags:
# tls: false
# pxcSize: false
# proxySize: false
# backupIfUnhealthy: false
updateStrategy: SmartUpdate
upgradeOptions:
versionServiceEndpoint: https://check.percona.com
apply: disabled
schedule: "0 4 * * *"
enableCRValidationWebhook: false
tls: {}
tls:
enabled: true
# SANs:
# - pxc-1.example.com
# - pxc-2.example.com
Expand Down Expand Up @@ -164,11 +169,12 @@ pxc:
##
# storageClass: "-"
accessMode: ReadWriteOnce
# dataSource:
# name: new-snapshot-test
# kind: VolumeSnapshot
# apiGroup: snapshot.storage.k8s.io
size: 8Gi

# If you set this to true the cluster will be created without TLS
disableTLS: false

# disable Helm creating TLS certificates if you want to let the operator
# request certificates from cert-manager
certManager: false
Expand Down Expand Up @@ -201,13 +207,13 @@ pxc:
haproxy:
enabled: true
size: 3
image: ""
image: percona/haproxy:2.8.5
# imagePullPolicy: Always
imagePullSecrets: []
# - name: private-registry-credentials
# configuration: |
#
# the actual default configuration file can be found here https://github.com/percona/percona-docker/blob/main/haproxy/dockerdir/etc/haproxy/haproxy-global.cfg
# the actual default configuration file can be found here https://raw.githubusercontent.com/percona/percona-xtradb-cluster-operator/main/build/haproxy-global.cfg
#
# global
# maxconn 2048
Expand Down Expand Up @@ -344,7 +350,8 @@ haproxy:
# - 10.0.0.0/8
# loadBalancerIP: 127.0.0.1
# exposeReplicas:
# enabled: false
# enabled: true
# onlyReaders: false
# type: ClusterIP
# annotations:
# service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp
Expand All @@ -367,7 +374,7 @@ haproxy:
proxysql:
enabled: false
size: 3
image: "percona/percona-xtradb-cluster-operator:1.14.0-proxysql2.5.5-1.2"
image: "percona/proxysql2:2.5.5"
# imagePullPolicy: Always
imagePullSecrets: []
# configuration: |
Expand Down Expand Up @@ -519,7 +526,7 @@ proxysql:

logcollector:
enabled: true
image: ""
image: percona/percona-xtradb-cluster-operator:1.15.0-logcollector-fluentbit3.1.4
# imagePullPolicy: Always
imagePullSecrets: []
# configuration: |
Expand All @@ -543,7 +550,7 @@ pmm:
enabled: false
image:
repository: percona/pmm-client
tag: 2.41.2
tag: 2.42.0
# imagePullPolicy: Always
imagePullSecrets: []
serverHost: monitoring-service
Expand All @@ -563,7 +570,7 @@ backup:
# allowParallel: true
image:
repository: percona/percona-xtradb-cluster-operator
tag: 1.14.0-pxc8.0-backup-pxb8.0.35
tag: 1.15.0-pxc8.0-backup-pxb8.0.35
# backoffLimit: 6
# serviceAccountName: percona-xtradb-cluster-operator
# imagePullPolicy: Always
Expand Down
4 changes: 2 additions & 2 deletions charts/pxc-operator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apiVersion: v2
appVersion: 1.14.0
appVersion: 1.15.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.14.2
version: 1.15.0
maintainers:
- name: tplavcic
email: [email protected]
Expand Down
6 changes: 3 additions & 3 deletions charts/pxc-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Useful links
* [Operator Documentation](https://www.percona.com/doc/kubernetes-operator-for-pxc/index.html)

## Pre-requisites
* Kubernetes 1.24+
* Kubernetes 1.28+
* Helm v3

# Installation
Expand All @@ -19,14 +19,14 @@ To install the chart with the `pxc` release name using a dedicated namespace (re

```sh
helm repo add percona https://percona.github.io/percona-helm-charts/
helm install my-operator percona/pxc-operator --version 1.14.0 --namespace my-namespace
helm install my-operator percona/pxc-operator --version 1.15.0 --namespace my-namespace
```

The chart can be customized using the following configurable parameters:

| Parameter | Description | Default |
| ------------------------------- | -----------------------------------------------------------------------------------------------| -------------------------------------------------|
| `image` | PXC Operator Container image full path | `percona/percona-xtradb-cluster-operator:1.14.0` |
| `image` | PXC Operator Container image full path | `percona/percona-xtradb-cluster-operator:1.15.0` |
| `imagePullPolicy` | PXC Operator Container pull policy | `Always` |
| `containerSecurityContext` | PXC Operator Container securityContext | `{}` |
| `imagePullSecrets` | PXC Operator Pod pull secret | `[]` |
Expand Down
Loading

0 comments on commit 7372a3e

Please sign in to comment.