diff --git a/charts/ps-db/Chart.yaml b/charts/ps-db/Chart.yaml index 0be2deb5..cfd00129 100644 --- a/charts/ps-db/Chart.yaml +++ b/charts/ps-db/Chart.yaml @@ -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 diff --git a/charts/ps-db/README.md b/charts/ps-db/README.md index e6da13b8..9370384d 100644 --- a/charts/ps-db/README.md +++ b/charts/ps-db/README.md @@ -19,37 +19,38 @@ 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-db percona/ps-db --version 0.5.0 --namespace my-namespace +helm install my-db percona/ps-db --version 0.6.0 --namespace my-namespace ``` The chart can be customized using the following configurable parameters: | Parameter | Description | Default | | ------------------------------- | ------------------------------------------------------------------------------|-----------------------------------------| -| `crVersion` | CR Cluster Manifest version | `0.5.0` | -| `finalizers:delete-mysql-pods-in-order` | Set this if you want to delete MySQL pods in order on cluster deletion | `[]` | -| `finalizers:delete-ssl` | Deletes objects created for SSL (Secret, certificate, and issuer) after the cluster deletion | `[]` | +| `crVersion` | CR Cluster Manifest version | `0.6.0` | +| `finalizers:delete-mysql-pods-in-order` | Set this if you want to delete MySQL pods in order on cluster deletion | `[]` | +| `finalizers:delete-ssl` | Deletes objects created for SSL (Secret, certificate, and issuer) after the cluster deletion | `[]` | | `pause` | Stop PS Cluster safely | `false` | | `allowUnsafeConfigurations` | Allows forbidden configurations like even number of Orchestrator pods | `false` | | `initImage` | An alternative image for the initial Operator installation | `""` | +| `updateStrategy` | Strategy for updating pods in a cluster (SmartUpdate, OnDelete, RollingUpdate) | `SmartUpdate` | | `upgradeOptions.versionServiceEndpoint` | Endpoint for actual PS Versions provider | `https://check.percona.com` | -| `upgradeOptions.apply` | PS image to apply from version service - `recommended`, `latest`, actual version like `8.0.32-24` | `disabled` | +| `upgradeOptions.apply` | PS image to apply from version service - `recommended`, `latest`, actual version like `8.0.32-24` | `disabled` | | `secretsName` | Secret name for user passwords | `-secrets` | | `sslSecretName` | Secret name for ssl certificates | `{}` | | `ignoreAnnotations` | Mark annotations which will be ignored by the operator | `[]` | | `ignoreLabels` | Mark labels which will be ignored by the operator | `[]` | -| `tls.SANs` | Additional domains (SAN) to be added to the TLS certificate within the extended cert-manager configuration | `[]` | +| `tls.SANs` | Additional domains (SAN) to be added to the TLS certificate within the extended cert-manager configuration | `[]` | | `tls.issuerConf.name` | A cert-manager issuer name | `""` | | `tls.issuerConf.kind` | A cert-manager issuer type | `""` | | `tls.issuerConf.group` | A cert-manager issuer group | `""` | | `mysql.clusterType` | MySQL Cluster type (`async` or `group-replication`) | `group-replication` | +| `mysql.autoRecovery` | Enable/Disable auto recovery from full cluster crash | `true` | | `mysql.image.repository` | MySQL Container image repository | `percona/percona-server` | -| `mysql.image.tag` | MySQL Container image tag | `8.0.32-24` | +| `mysql.image.tag` | MySQL Container image tag | `8.0.33-25` | | `mysql.imagePullPolicy` | The policy used to update images | `Always` | | `mysql.imagePullSecrets` | MySQL Container pull secret | `[]` | | `mysql.initImage` | An alternative image for the initial mysql setup | `""` | | `mysql.size` | Number of MySQL pods | `3` | -| `mysql.sizeSemiSync` | Number of MySQL pods with enabled semi-sync replication | `0` | | `mysql.annotations` | MySQL Pods user-defined annotations | `{}` | | `mysql.priorityClassName` | MySQL Pods priority Class defined by user | `""` | | `mysql.runtimeClassName` | Name of the Kubernetes Runtime Class for MySQL Pods | `""` | @@ -57,8 +58,10 @@ The chart can be customized using the following configurable parameters: | `mysql.schedulerName` | The Kubernetes Scheduler | `""` | | `mysql.resources.requests` | MySQL Pods resource requests | `memory: 512M` | | `mysql.resources.limits` | MySQL Pods resource limits | `memory: 1G` | +| `mysql.livenessProbe` | MySQL Pods livenessProbe structure | `{}` | +| `mysql.readinessProbe` | MySQL Pods readinessProbe structure | `{}` | | `mysql.nodeSelector` | MySQL Pods key-value pairs setting for K8S node assignment | `{}` | -| `mysql.affinity.antiAffinityTopologyKey` | MySQL Pods simple scheduling restriction on/off for host, zone, region | `"kubernetes.io/hostname"` | +| `mysql.affinity.antiAffinityTopologyKey` | MySQL Pods simple scheduling restriction on/off for host, zone, region | `"kubernetes.io/hostname"` | | `mysql.affinity.advanced` | MySQL Pods advanced scheduling restriction with match expression engine | `{}` | | `mysql.tolerations` | List of node taints to tolerate for MySQL Pods | `[]` | | `mysql.expose.enabled` | Allow access to MySQL from outside of Kubernetes | `false` | @@ -68,7 +71,7 @@ The chart can be customized using the following configurable parameters: | `mysql.expose.internalTrafficPolicy` | Network service internalTrafficPolicy | `` | | `mysql.expose.labels` | Network service labels | `{}` | | `mysql.expose.loadBalancerIP` | The static IP-address for the load balancer | `""` | -| `mysql.expose.loadBalancerSourceRanges` | The range of client IP addresses from which the load balancer should be reachable | `[]` | +| `mysql.expose.loadBalancerSourceRanges` | The range of client IP addresses from which the load balancer should be reachable | `[]` | | `mysql.volumeSpec` | MySQL Pods storage resources | `{}` | | `mysql.volumeSpec.pvc` | MySQL Pods PVC request parameters | | | `mysql.volumeSpec.pvc.storageClassName` | MySQL Pods PVC target storageClass | `""` | @@ -78,13 +81,13 @@ The chart can be customized using the following configurable parameters: | `mysql.sidecars` | MySQL Pod sidecars | `{}` | | `mysql.sidecarVolumes` | MySQL Pod sidecar volumes | `[]` | | `mysql.sidecarPVCs` | MySQL Pod sidecar PVCs | `[]` | -| `mysql.containerSecurityContext` | A custom Kubernetes Security Context for a Container to be used instead of the default one | `{}` | -| `mysql.podSecurityContext` | A custom Kubernetes Security Context for a Pod to be used instead of the default one | `{}` | +| `mysql.containerSecurityContext` | A custom Kubernetes Security Context for a Container to be used instead of the default one | `{}` | +| `mysql.podSecurityContext` | A custom Kubernetes Security Context for a Pod to be used instead of the default one | `{}` | | `mysql.serviceAccountName` | A custom service account to be used instead of the default one | `""` | || -| `proxy.haproxy.enabled` | Enable/Disable HAProxy pods in async replication | `false` | +| `proxy.haproxy.enabled` | Enable/Disable HAProxy pods | `true` | | `proxy.haproxy.image.repository` | HAProxy Container image repository | `percona/haproxy` | -| `proxy.haproxy.image.tag` | HAProxy Container image tag | `2.5.12` | +| `proxy.haproxy.image.tag` | HAProxy Container image tag | `2.8.1` | | `proxy.haproxy.imagePullPolicy` | The policy used to update images | `Always` | | `proxy.haproxy.imagePullSecrets` | HAProxy Container pull secret | `[]` | | `proxy.haproxy.initImage` | An alternative image for the initial haproxy setup | `""` | @@ -95,13 +98,18 @@ The chart can be customized using the following configurable parameters: | `proxy.haproxy.labels` | HAProxy Pods user-defined labels | `{}` | | `proxy.haproxy.schedulerName` | The Kubernetes Scheduler | `""` | | `proxy.haproxy.nodeSelector` | HAProxy Pods key-value pairs setting for K8S node assignment | `{}` | -| `proxy.haproxy.affinity.antiAffinityTopologyKey` | HAProxy Pods simple scheduling restriction on/off for host, zone, region | `"kubernetes.io/hostname"` | -| `proxy.haproxy.affinity.advanced` | HAProxy Pods advanced scheduling restriction with match expression engine | `{}` | +| `proxy.haproxy.affinity.antiAffinityTopologyKey` | HAProxy Pods simple scheduling restriction on/off for host, zone, region | `"kubernetes.io/hostname"` | +| `proxy.haproxy.affinity.advanced` | HAProxy Pods advanced scheduling restriction with match expression engine | `{}` | | `proxy.haproxy.tolerations` | List of node taints to tolerate for HAProxy Pods | `[]` | | `proxy.haproxy.resources.requests` | HAProxy Pods resource requests | `memory: 1G cpu: 600m` | | `proxy.haproxy.resources.limits` | HAProxy Pods resource limits | `{}` | -| `proxy.haproxy.containerSecurityContext` | A custom Kubernetes Security Context for a Container to be used instead of the default one | `{}` | -| `proxy.haproxy.podSecurityContext` | A custom Kubernetes Security Context for a Pod to be used instead of the default one | `{}` | +| `proxy.haproxy.env` | HAProxy Pods set env variable | `[]` | +| `proxy.haproxy.envFrom` | HAProxy Pods set env variable from secret | `[]` | +| `proxy.haproxy.livenessProbe` | HAProxy Pods livenessProbe structure | `{}` | +| `proxy.haproxy.readinessProbe` | HAProxy Pods readinessProbe structure | `{}` | +| `proxy.haproxy.configuration` | Custom config for HAProxy | `""` | +| `proxy.haproxy.containerSecurityContext` | A custom Kubernetes Security Context for a Container to be used instead of the default one | `{}` | +| `proxy.haproxy.podSecurityContext` | A custom Kubernetes Security Context for a Pod to be used instead of the default one | `{}` | | `proxy.haproxy.serviceAccountName` | A custom service account to be used instead of the default one | `""` | | `proxy.haproxy.expose.type` | Network service access point type | `""` | | `proxy.haproxy.expose.annotations` | Network service annotations | `{}` | @@ -109,10 +117,11 @@ The chart can be customized using the following configurable parameters: | `proxy.haproxy.expose.internalTrafficPolicy` | Network service internalTrafficPolicy | `` | | `proxy.haproxy.expose.labels` | Network service labels | `{}` | | `proxy.haproxy.expose.loadBalancerIP` | The static IP-address for the load balancer | `""` | -| `proxy.haproxy.expose.loadBalancerSourceRanges` | The range of client IP addresses from which the load balancer should be reachable | `[]` | +| `proxy.haproxy.expose.loadBalancerSourceRanges` | The range of client IP addresses from which the load balancer should be reachable | `[]` | || +| `proxy.router.enabled` | Enable/Disable Router pods in group replication | `false` | | `proxy.router.image.repository` | Router Container image repository | `percona/percona-mysql-router` | -| `proxy.router.image.tag` | Router Container image tag | `8.0.32` | +| `proxy.router.image.tag` | Router Container image tag | `8.0.33` | | `proxy.router.imagePullPolicy` | The policy used to update images | `Always` | | `proxy.router.imagePullSecrets` | Router Container pull secret | `[]` | | `proxy.router.initImage` | An alternative image for the initial router setup | `""` | @@ -123,14 +132,14 @@ The chart can be customized using the following configurable parameters: | `proxy.router.labels` | Router Pods user-defined labels | `{}` | | `proxy.router.schedulerName` | The Kubernetes Scheduler | `""` | | `proxy.router.nodeSelector` | Router Pods key-value pairs setting for K8S node assignment | `{}` | -| `proxy.router.affinity.antiAffinityTopologyKey` | Router Pods simple scheduling restriction on/off for host, zone, region | `"kubernetes.io/hostname"` | +| `proxy.router.affinity.antiAffinityTopologyKey` | Router Pods simple scheduling restriction on/off for host, zone, region | `"kubernetes.io/hostname"` | | `proxy.router.affinity.advanced` | Router Pods advanced scheduling restriction with match expression engine | `{}` | | `proxy.router.configuration` | User defined Router options according to Router configuration file syntax | `` | | `proxy.router.tolerations` | List of node taints to tolerate for Router Pods | `[]` | | `proxy.router.resources.requests` | Router Pods resource requests | `memory: 256M` | | `proxy.router.resources.limits` | Router Pods resource limits | `memory: 256M` | -| `proxy.router.containerSecurityContext` | A custom Kubernetes Security Context for a Container to be used instead of the default one | `{}` | -| `proxy.router.podSecurityContext` | A custom Kubernetes Security Context for a Pod to be used instead of the default one | `{}` | +| `proxy.router.containerSecurityContext` | A custom Kubernetes Security Context for a Container to be used instead of the default one | `{}` | +| `proxy.router.podSecurityContext` | A custom Kubernetes Security Context for a Pod to be used instead of the default one | `{}` | | `proxy.router.serviceAccountName` | A custom service account to be used instead of the default one | `""` | | `proxy.router.expose.type` | Network service access point type | `""` | | `proxy.router.expose.annotations` | Network service annotations | `{}` | @@ -138,11 +147,11 @@ The chart can be customized using the following configurable parameters: | `proxy.router.expose.internalTrafficPolicy` | Network service internalTrafficPolicy | `` | | `proxy.router.expose.labels` | Network service labels | `{}` | | `proxy.router.expose.loadBalancerIP` | The static IP-address for the load balancer | `""` | -| `proxy.router.expose.loadBalancerSourceRanges` | The range of client IP addresses from which the load balancer should be reachable | `[]` | +| `proxy.router.expose.loadBalancerSourceRanges` | The range of client IP addresses from which the load balancer should be reachable | `[]` | || | `orchestrator.enabled` | Enable/Disable orchestrator pods in async replication | `false` | | `orchestrator.image.repository` | Orchestrator Container image repository | `percona/percona-orchestrator` | -| `orchestrator.image.tag` | Orchestrator Container image tag | `3.2.6-8` | +| `orchestrator.image.tag` | Orchestrator Container image tag | `3.2.6-9` | | `orchestrator.imagePullPolicy` | The policy used to update images | `Always` | | `orchestrator.imagePullSecrets` | Orchestrator Container pull secret | `[]` | | `orchestrator.serviceAccountName` | A custom service account to be used instead of the default one | `""` | @@ -154,8 +163,8 @@ The chart can be customized using the following configurable parameters: | `orchestrator.labels` | Orchestrator Pods user-defined labels | `{}` | | `orchestrator.schedulerName` | The Kubernetes Scheduler | `""` | | `orchestrator.nodeSelector` | Orchestrator Pods key-value pairs setting for K8S node assignment | `{}` | -| `orchestrator.affinity.antiAffinityTopologyKey` | Orchestrator Pods simple scheduling restriction on/off for host, zone, region | `"kubernetes.io/hostname"` | -| `orchestrator.affinity.advanced` | Orchestrator Pods advanced scheduling restriction with match expression engine | `{}` | +| `orchestrator.affinity.antiAffinityTopologyKey` | Orchestrator Pods simple scheduling restriction on/off for host, zone, region | `"kubernetes.io/hostname"` | +| `orchestrator.affinity.advanced` | Orchestrator Pods advanced scheduling restriction with match expression engine | `{}` | | `orchestrator.tolerations` | List of node taints to tolerate for Orchestrator Pods | `[]` | | `orchestrator.resources.requests` | Orchestrator Pods resource requests | `memory: 128M` | | `orchestrator.resources.limits` | Orchestrator Pods resource limits | `memory: 256M` | @@ -164,18 +173,18 @@ The chart can be customized using the following configurable parameters: | `orchestrator.volumeSpec.pvc.storageClassName` | Orchestrator Pods PVC target storageClass | `""` | | `orchestrator.volumeSpec.pvc.accessModes` | Orchestrator Pods PVC access policy | `[]` | | `orchestrator.volumeSpec.pvc.resources.requests.storage` | Orchestrator Pods PVC storage size | `1G` | -| `orchestrator.containerSecurityContext` | A custom Kubernetes Security Context for a Container to be used instead of the default one | `{}` | -| `orchestrator.podSecurityContext` | A custom Kubernetes Security Context for a Pod to be used instead of the default one | `{}` | +| `orchestrator.containerSecurityContext` | A custom Kubernetes Security Context for a Container to be used instead of the default one | `{}` | +| `orchestrator.podSecurityContext` | A custom Kubernetes Security Context for a Pod to be used instead of the default one | `{}` | | `orchestrator.expose.type` | Network service access point type | `""` | | `orchestrator.expose.annotations` | Network service annotations | `{}` | | `orchestrator.expose.externalTrafficPolicy` | Network service externalTrafficPolicy | `` | | `orchestrator.expose.internalTrafficPolicy` | Network service internalTrafficPolicy | `` | | `orchestrator.expose.labels` | Network service labels | `{}` | | `orchestrator.expose.loadBalancerIP` | The static IP-address for the load balancer | `""` | -| `orchestrator.expose.loadBalancerSourceRanges` | The range of client IP addresses from which the load balancer should be reachable | `[]` | +| `orchestrator.expose.loadBalancerSourceRanges` | The range of client IP addresses from which the load balancer should be reachable | `[]` | || | `pmm.image.repository` | PMM Container image repository | `percona/pmm-client` | -| `pmm.image.tag` | PMM Container image tag | `2.39.0` | +| `pmm.image.tag` | PMM Container image tag | `2.39.0` | | `pmm.imagePullPolicy` | The policy used to update images | `` | | `pmm.serverHost` | PMM server related K8S service hostname | `monitoring-service` | | `pmm.serverUser` | PMM server user | `admin` | @@ -183,19 +192,19 @@ The chart can be customized using the following configurable parameters: | `pmm.resources.limits` | PMM Container resource limits | `{}` | || | `toolkit.image.repository` | Percona Toolkit Container image repository | `percona/percona-server-mysql-operator` | -| `toolkit.image.tag` | Percona Toolkit Container image tag | `0.5.0-toolkit` | +| `toolkit.image.tag` | Percona Toolkit Container image tag | `0.6.0-toolkit` | | `toolkit.imagePullPolicy` | The policy used to update images | `` | | `toolkit.resources.requests` | Toolkit Container resource requests | `{}` | | `toolkit.resources.limits` | Toolkit Container resource limits | `{}` | || | `backup.enabled` | Enable backups | `true` | | `backup.image.repository` | Backup Container image repository | `percona/percona-xtrabackup` | -| `backup.image.tag` | Backup Container image tag | `8.0.32-25` | +| `backup.image.tag` | Backup Container image tag | `8.0.33-27` | | `backup.imagePullPolicy` | The policy used to update images | `Always` | | `backup.imagePullSecrets` | Backup Container pull secret | `[]` | | `backup.initImage` | An alternative image for the backup setup | `""` | | `backup.serviceAccountName` | Run Backup Container under specified K8S SA | `""` | -| `backup.containerSecurityContext` | A custom Kubernetes Security Context for a Container to be used instead of the default one | `{}` | +| `backup.containerSecurityContext` | A custom Kubernetes Security Context for a Container to be used instead of the default one | `{}` | | `backup.resources` | Backup Pods resource requests and limits | `{}` | | `backup.storages` | Local/remote backup storages settings | `{}` | || diff --git a/charts/ps-db/templates/cluster.yaml b/charts/ps-db/templates/cluster.yaml index bb0d6131..2f447a2e 100644 --- a/charts/ps-db/templates/cluster.yaml +++ b/charts/ps-db/templates/cluster.yaml @@ -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 }} @@ -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 }} @@ -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 }} @@ -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: @@ -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 }} @@ -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 }} @@ -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 }} @@ -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 }} @@ -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 }} @@ -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 }}" diff --git a/charts/ps-db/values.yaml b/charts/ps-db/values.yaml index 29990186..8b11059e 100644 --- a/charts/ps-db/values.yaml +++ b/charts/ps-db/values.yaml @@ -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 @@ -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 @@ -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: @@ -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: @@ -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 @@ -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: @@ -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: @@ -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 @@ -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: @@ -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 @@ -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: @@ -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: @@ -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: {} diff --git a/charts/ps-operator/Chart.yaml b/charts/ps-operator/Chart.yaml index 14625caf..c3e37a6c 100644 --- a/charts/ps-operator/Chart.yaml +++ b/charts/ps-operator/Chart.yaml @@ -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 diff --git a/charts/ps-operator/README.md b/charts/ps-operator/README.md index d8305867..f479bacc 100644 --- a/charts/ps-operator/README.md +++ b/charts/ps-operator/README.md @@ -19,7 +19,7 @@ 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: @@ -27,7 +27,7 @@ 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` | diff --git a/charts/ps-operator/crds/crd.yaml b/charts/ps-operator/crds/crd.yaml index 8bec15dd..1520c254 100644 --- a/charts/ps-operator/crds/crd.yaml +++ b/charts/ps-operator/crds/crd.yaml @@ -2905,6 +2905,8 @@ spec: additionalProperties: type: string type: object + autoRecovery: + type: boolean clusterType: type: string configuration: @@ -2970,6 +2972,93 @@ spec: type: string type: object type: object + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array expose: properties: annotations: @@ -3277,8 +3366,6 @@ spec: type: string schedulerName: type: string - semiSyncType: - type: string serviceAccountName: type: string sidecarPVCs: @@ -4484,6 +4571,19 @@ spec: format: int32 type: integer type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic resources: properties: claims: @@ -4705,11 +4805,6 @@ spec: size: format: int32 type: integer - sizeSemiSync: - anyOf: - - type: integer - - type: string - x-kubernetes-int-or-string: true startupProbe: properties: exec: @@ -5301,6 +5396,8 @@ spec: additionalProperties: type: string type: object + configuration: + type: string containerSecurityContext: properties: allowPrivilegeEscalation: @@ -5364,6 +5461,93 @@ spec: type: object enabled: type: boolean + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array expose: properties: annotations: @@ -6378,6 +6562,8 @@ spec: additionalProperties: type: string type: object + configuration: + type: string containerSecurityContext: properties: allowPrivilegeEscalation: @@ -6441,6 +6627,93 @@ spec: type: object enabled: type: boolean + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array expose: properties: annotations: @@ -7405,6 +7678,95 @@ spec: type: string type: object type: object + enabled: + type: boolean + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array expose: properties: annotations: @@ -8018,6 +8380,93 @@ spec: type: string type: object type: object + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + envFrom: + items: + properties: + configMapRef: + properties: + name: + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array image: type: string imagePullPolicy: @@ -8298,6 +8747,8 @@ spec: required: - image type: object + updateStrategy: + type: string upgradeOptions: properties: apply: diff --git a/charts/ps-operator/templates/role.yaml b/charts/ps-operator/templates/role.yaml index 3a6e9e24..a47ed4ff 100644 --- a/charts/ps-operator/templates/role.yaml +++ b/charts/ps-operator/templates/role.yaml @@ -59,6 +59,7 @@ rules: resources: - configmaps - pods + - pods/exec - secrets - services verbs: @@ -69,6 +70,13 @@ rules: - patch - update - watch +- apiGroups: + - "" + resources: + - events + verbs: + - create + - patch - apiGroups: - "" resources: diff --git a/charts/ps-operator/values.yaml b/charts/ps-operator/values.yaml index e70cdf2e..1f2509e0 100644 --- a/charts/ps-operator/values.yaml +++ b/charts/ps-operator/values.yaml @@ -6,7 +6,7 @@ replicaCount: 1 image: repository: percona/percona-server-mysql-operator - tag: 0.5.0 + tag: 0.6.0 pullPolicy: IfNotPresent imagePullSecrets: []