Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Commit

Permalink
[stable/percona-xtradb-cluster] Fixes #23207 (#23208)
Browse files Browse the repository at this point in the history
* [stable/percona-xtradb-cluster] Fixes #23207

Signed-off-by: Rafael Rivero <[email protected]>

* [stable/percona-xtradb-cluster] fix linting issues

Signed-off-by: Rafael Rivero <[email protected]>

Co-authored-by: Rafael Rivero <[email protected]>
  • Loading branch information
rg2011 and Rafael Rivero authored Jul 16, 2020
1 parent ee9f01f commit e07ae54
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 2 deletions.
2 changes: 1 addition & 1 deletion stable/percona-xtradb-cluster/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: percona-xtradb-cluster
version: 1.0.4
version: 1.0.5
appVersion: 5.7.19
description: free, fully compatible, enhanced, open source drop-in replacement for
MySQL with Galera Replication (xtradb)
Expand Down
4 changes: 4 additions & 0 deletions stable/percona-xtradb-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ The following table lists the configurable parameters of the Percona chart and t
| `mysqlUser` | Username of new user to create. | `nil` |
| `mysqlPassword` | Password for the new user. | `nil` |
| `mysqlDatabase` | Name for new database to create. | `nil` |
| `serviceAccountName` | Name for the pod's serviceAccount | `nil` |
| `securityContext.runAsUser` | Run the pod with this uid | `nil` |
| `securityContext.runAsGroup` | Run the pod with this gid | `nil` |
| `securityContext.fsGroup` | Set GID for mounted volumes | `nil` |
| `persistence.enabled` | Create a volume to store data | false |
| `persistence.size` | Size of persistent volume claim | 8Gi RW |
| `persistence.storageClass` | Type of persistent volume claim | nil (uses alpha storage class annotation) |
Expand Down
9 changes: 8 additions & 1 deletion stable/percona-xtradb-cluster/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ spec:
{{ toYaml .Values.podAnnotations | indent 8 }}
{{- end }}
spec:
{{- with .Values.serviceAccountName }}
serviceAccountName: "{{ . }}"
{{- end }}
{{- with .Values.securityContext }}
securityContext:
{{ . | toYaml | nindent 8 }}
{{- end }}
initContainers:
- name: "remove-lost-found"
image: "busybox:1.25.0"
Expand Down Expand Up @@ -101,7 +108,7 @@ spec:
timeoutSeconds: 2
readinessProbe:
exec:
command: ["mysql", "-h", "127.0.0.1", "-e", "SELECT 1"]
command: ["mysql", "--defaults-extra-file=/root/.my.cnf", "-h", "127.0.0.1", "-e", "SELECT 1"]
initialDelaySeconds: 30
timeoutSeconds: 2
volumeMounts:
Expand Down
12 changes: 12 additions & 0 deletions stable/percona-xtradb-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -167,3 +167,15 @@ podDisruptionBudget:
service:
percona:
headless: false

## Set the serviceAccountName.
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/
# serviceAccountName:

## Set the securityContext parameters.
## 999 is the UID of mysql user.
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
# securityContext:
# runAsUser: 999
# runAsGroup: 999
# fsGroup: 999

0 comments on commit e07ae54

Please sign in to comment.