Skip to content

Commit

Permalink
Merge pull request #240 from percona/k8sps-267
Browse files Browse the repository at this point in the history
K8SPS-267 - Update ps-db and ps-operator charts for 0.6.0 release
  • Loading branch information
tplavcic authored Sep 5, 2023
2 parents f206b41 + 1dbe952 commit b2eb55e
Show file tree
Hide file tree
Showing 9 changed files with 651 additions and 79 deletions.
6 changes: 2 additions & 4 deletions charts/ps-db/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
apiVersion: v2
appVersion: "0.5.0"
appVersion: "0.6.0"
description: A Helm chart for installing Percona Server Databases using the PS Operator.
name: ps-db
home: https://www.percona.com/doc/kubernetes-operator-for-mysql/ps
version: 0.5.5
version: 0.6.0
maintainers:
- name: tplavcic
email: tomislav.plavcic@percona.com
- name: cap1984
email: ivan.pylypenko@percona.com
- name: nmarukovich
email: natalia.marukovich@percona.com
77 changes: 43 additions & 34 deletions charts/ps-db/README.md

Large diffs are not rendered by default.

53 changes: 44 additions & 9 deletions charts/ps-db/templates/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ spec:
{{- if .Values.initImage }}
initImage: {{ .Values.initImage }}
{{- end }}
{{- if .Values.updateStrategy }}
updateStrategy: {{ .Values.updateStrategy }}
{{- end }}
{{- if hasKey .Values.upgradeOptions "versionServiceEndpoint" }}
upgradeOptions:
versionServiceEndpoint: {{ .Values.upgradeOptions.versionServiceEndpoint }}
Expand Down Expand Up @@ -63,6 +66,9 @@ spec:
{{- if $mysql.clusterType }}
clusterType: {{ $mysql.clusterType }}
{{- end }}
{{- if $mysql.autoRecovery }}
autoRecovery: {{ $mysql.autoRecovery }}
{{- end }}
{{- if $mysql.image }}
image: "{{ $mysql.image.repository }}:{{ $mysql.image.tag }}"
{{- end }}
Expand All @@ -79,9 +85,6 @@ spec:
{{- if $mysql.size }}
size: {{ $mysql.size }}
{{- end }}
{{- if $mysql.sizeSemiSync }}
sizeSemiSync: {{ $mysql.sizeSemiSync }}
{{- end }}
affinity:
{{ $mysql.affinity | toYaml | indent 6 }}
{{- if $mysql.priorityClassName }}
Expand All @@ -96,6 +99,14 @@ spec:
{{ tpl ($mysql.resources.requests | toYaml) $ | indent 8 }}
limits:
{{ tpl ($mysql.resources.limits | toYaml) $ | indent 8 }}
{{- if $mysql.livenessProbe }}
livenessProbe:
{{ $mysql.livenessProbe | toYaml | indent 6 }}
{{- end }}
{{- if $mysql.readinessProbe }}
readinessProbe:
{{ $mysql.readinessProbe | toYaml | indent 6 }}
{{- end }}
tolerations:
{{ $mysql.tolerations | toYaml | indent 6 }}
nodeSelector:
Expand Down Expand Up @@ -156,7 +167,7 @@ spec:
proxy:
{{- $haproxy := .Values.proxy.haproxy }}
haproxy:
{{- if or (not $haproxy.enabled) (ne .Values.mysql.clusterType "async") }}
{{- if not $haproxy.enabled }}
enabled: false
image: {{ $haproxy.image.repository }}:{{ $haproxy.image.tag }}
{{- else }}
Expand Down Expand Up @@ -193,6 +204,26 @@ spec:
{{ tpl ($haproxy.resources.requests | toYaml) $ | indent 10 }}
limits:
{{ tpl ($haproxy.resources.limits | toYaml) $ | indent 10 }}
{{- if $haproxy.env }}
env:
{{ $haproxy.env | toYaml | indent 8 }}
{{- end }}
{{- if $haproxy.envFrom }}
envFrom:
{{ $haproxy.envFrom | toYaml | indent 8 }}
{{- end }}
{{- if $haproxy.livenessProbe }}
livenessProbe:
{{ $haproxy.livenessProbe | toYaml | indent 8 }}
{{- end }}
{{- if $haproxy.readinessProbe }}
readinessProbe:
{{ $haproxy.readinessProbe | toYaml | indent 8 }}
{{- end }}
{{- if $haproxy.configuration }}
configuration: |
{{- tpl $haproxy.configuration $ | nindent 8 }}
{{- end }}
{{- if $haproxy.volumeSpec }}
volumeSpec:
{{- if $haproxy.volumeSpec.hostPath }}
Expand Down Expand Up @@ -230,8 +261,12 @@ spec:
{{- end }}

{{- $router := .Values.proxy.router }}
{{ if .Values.proxy.router }}
router:
{{- if or (not $router.enabled) (ne .Values.mysql.clusterType "group-replication") }}
enabled: false
image: {{ $router.image.repository }}:{{ $router.image.tag }}
{{- else }}
enabled: true
image: {{ $router.image.repository }}:{{ $router.image.tag }}
{{- if $router.imagePullPolicy }}
imagePullPolicy: {{ $router.imagePullPolicy }}
Expand Down Expand Up @@ -294,8 +329,6 @@ spec:
{{- end }}
{{- if $router.serviceAccountName }}
serviceAccountName: {{ $router.serviceAccountName }}
{{- else }}
serviceAccountName: {{ include "ps-database.fullname" . }}-orchestrator
{{- end }}
{{- if $router.runtimeClassName }}
runtimeClassName: {{ $router.runtimeClassName }}
Expand All @@ -308,10 +341,10 @@ spec:

orchestrator:
{{- $orc := .Values.orchestrator }}
{{- if or (not $orc.enabled) (ne .Values.mysql.clusterType "async") }}
{{- if or (not $orc.enabled) (ne .Values.mysql.clusterType "async") }}
enabled: false
image: {{ $orc.image.repository }}:{{ $orc.image.tag }}
{{- else }}
{{- else }}
enabled: true
image: {{ $orc.image.repository }}:{{ $orc.image.tag }}
{{- if $orc.imagePullPolicy }}
Expand All @@ -323,6 +356,8 @@ spec:
{{- end }}
{{- if $orc.serviceAccountName }}
serviceAccountName: {{ $orc.serviceAccountName }}
{{- else }}
serviceAccountName: {{ include "ps-database.fullname" . }}-orchestrator
{{- end }}
{{- if $orc.initImage }}
initImage: "{{ $orc.initImage }}"
Expand Down
109 changes: 91 additions & 18 deletions charts/ps-db/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ finalizers:
- delete-mysql-pods-in-order
# - delete-ssl

crVersion: 0.5.0
crVersion: 0.6.0
pause: false
allowUnsafeConfigurations: false
# initImage: percona/percona-server-mysql-operator:0.5.0
# initImage: percona/percona-server-mysql-operator:0.6.0

updateStrategy: SmartUpdate
upgradeOptions:
versionServiceEndpoint: https://check.percona.com
apply: disabled
Expand All @@ -38,16 +39,16 @@ upgradeOptions:

mysql:
clusterType: group-replication
autoRecovery: true
image:
repository: percona/percona-server
tag: 8.0.32-24
tag: 8.0.33-25
imagePullPolicy: Always
imagePullSecrets: []
# - name: private-registry-credentials
# initImage: percona/percona-server-mysql-operator:0.5.0
# initImage: percona/percona-server-mysql-operator:0.6.0

size: 3
sizeSemiSync: 0

# configuration: |
# max_connections=250
Expand All @@ -58,6 +59,20 @@ mysql:
limits:
memory: 1G

# readinessProbe:
# initialDelaySeconds: 30
# timeoutSeconds: 10
# periodSeconds: 10
# failureThreshold: 3
# successThreshold: 1

# livenessProbe:
# initialDelaySeconds: 15
# timeoutSeconds: 10
# periodSeconds: 10
# failureThreshold: 3
# successThreshold: 1

affinity:
antiAffinityTopologyKey: "kubernetes.io/hostname"
# advanced:
Expand All @@ -75,7 +90,7 @@ mysql:
enabled: false
type: ClusterIP
# annotations:
# service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http
# service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp
# externalTrafficPolicy: Cluster
# internalTrafficPolicy: Cluster
# labels:
Expand Down Expand Up @@ -142,13 +157,13 @@ mysql:

proxy:
haproxy:
enabled: false
enabled: true
image:
repository: percona/haproxy
tag: 2.5.12
tag: 2.8.1
imagePullPolicy: Always
imagePullSecrets: []
# initImage: percona/percona-server-mysql-operator:0.5.0
# initImage: percona/percona-server-mysql-operator:0.6.0

size: 3

Expand All @@ -158,6 +173,63 @@ proxy:
cpu: 600m
limits: {}

# env:
# - name: HA_CONNECTION_TIMEOUT
# value: "1000"

# envFrom:
# - secretRef:
# name: haproxy-env-secret

# readinessProbe:
# timeoutSeconds: 3
# periodSeconds: 5
# failureThreshold: 3
# successThreshold: 1

# livenessProbe:
# timeoutSeconds: 3
# periodSeconds: 5
# failureThreshold: 3
# successThreshold: 1

# configuration: |
#
# the actual default configuration file can be found here https://github.com/percona/percona-server-mysql-operator/blob/main/build/haproxy-global.cfg
#
# global
# maxconn 2048
# external-check
# insecure-fork-wanted
# stats socket /etc/haproxy/mysql/haproxy.sock mode 600 expose-fd listeners level admin
#
# defaults
# default-server init-addr last,libc,none
# log global
# mode tcp
# retries 10
# timeout client 28800s
# timeout connect 100500
# timeout server 28800s
#
# frontend mysql-primary-in
# bind *:3309 accept-proxy
# bind *:3306
# mode tcp
# option clitcpka
# default_backend mysql-primary
#
# frontend mysql-replicas-in
# bind *:3307
# mode tcp
# option clitcpka
# default_backend mysql-replicas
#
# frontend stats
# bind *:8404
# mode http
# http-request use-service prometheus-exporter if { path /metrics }

affinity:
antiAffinityTopologyKey: "kubernetes.io/hostname"
# advanced:
Expand Down Expand Up @@ -197,7 +269,7 @@ proxy:
# expose:
# type: ClusterIP
# annotations:
# service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http
# service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp
# externalTrafficPolicy: Cluster
# internalTrafficPolicy: Cluster
# labels:
Expand All @@ -207,12 +279,13 @@ proxy:
# - 10.0.0.0/8

router:
enabled: false
image:
repository: percona/percona-mysql-router
tag: 8.0.32
tag: 8.0.33
imagePullPolicy: Always
imagePullSecrets: []
# initImage: percona/percona-server-mysql-operator:0.5.0
# initImage: percona/percona-server-mysql-operator:0.6.0

size: 3

Expand Down Expand Up @@ -267,7 +340,7 @@ proxy:
# expose:
# type: ClusterIP
# annotations:
# service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http
# service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp
# externalTrafficPolicy: Cluster
# internalTrafficPolicy: Cluster
# labels:
Expand All @@ -280,12 +353,12 @@ orchestrator:
enabled: false
image:
repository: percona/percona-orchestrator
tag: 3.2.6-8
tag: 3.2.6-9
imagePullPolicy: Always
imagePullSecrets: []
# - name: private-registry-credentials
# serviceAccountName: percona-server-mysql-operator-orchestrator
# initImage: percona/percona-server-mysql-operator:0.5.0
# initImage: percona/percona-server-mysql-operator:0.6.0

size: 3

Expand Down Expand Up @@ -330,7 +403,7 @@ orchestrator:
# expose:
# type: ClusterIP
# annotations:
# service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http
# service.beta.kubernetes.io/aws-load-balancer-backend-protocol: tcp
# externalTrafficPolicy: Cluster
# internalTrafficPolicy: Cluster
# labels:
Expand All @@ -357,7 +430,7 @@ backup:
enabled: true
image:
repository: percona/percona-xtrabackup
tag: 8.0.32-25
tag: 8.0.33-27
imagePullPolicy: Always
imagePullSecrets: []
resources:
Expand Down Expand Up @@ -411,7 +484,7 @@ backup:
toolkit:
image:
repository: percona/percona-server-mysql-operator
tag: 0.5.0-toolkit
tag: 0.6.0-toolkit
imagePullPolicy: Always
resources:
requests: {}
Expand Down
6 changes: 2 additions & 4 deletions charts/ps-operator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
apiVersion: v2
appVersion: "0.5.0"
appVersion: "0.6.0"
description: A Helm chart for Deploying the Percona Operator for MySQL (based on Percona Server for MySQL)
name: ps-operator
home: https://docs.percona.com/percona-operator-for-mysql/ps/
version: 0.5.0
version: 0.6.0
maintainers:
- name: tplavcic
email: tomislav.plavcic@percona.com
- name: cap1984
email: ivan.pylypenko@percona.com
- name: nmarukovich
email: natalia.marukovich@percona.com
- name: spron-in
Expand Down
4 changes: 2 additions & 2 deletions charts/ps-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ To install the chart with the `ps` release name using a dedicated namespace (rec

```sh
helm repo add percona https://percona.github.io/percona-helm-charts/
helm install my-operator percona/ps-operator --version 0.5.0 --namespace my-namespace
helm install my-operator percona/ps-operator --version 0.6.0 --namespace my-namespace
```

The chart can be customized using the following configurable parameters:

| Parameter | Description | Default |
| ------------------------------- | ------------------------------------------------------------------------------| ------------------------------------------|
| `image.repository` | PS Operator Container image name | `percona/percona-server-mysql-operator` |
| `image.tag` | PS Operator Container image tag | `0.5.0` |
| `image.tag` | PS Operator Container image tag | `0.6.0` |
| `image.pullPolicy` | PS Operator Container pull policy | `Always` |
| `image.pullSecrets` | PS Operator Pod pull secret | `[]` |
| `replicaCount` | PS Operator Pod quantity | `1` |
Expand Down
Loading

0 comments on commit b2eb55e

Please sign in to comment.