Skip to content

Commit d9a3f08

Browse files
baurmattAMecea
authored andcommitted
Add an example for initContainer usage
Relates to #600.
1 parent dfdea2b commit d9a3f08

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

Changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
1212
* Add the ability to set the `imagePullSecrets` for the operator statefulset.
1313
* Add Google Drive via service account as backup option.
1414
* Add `initBucketURL` and `initBucketSecretName` options to MysqlCluster chart. This bumps the chart version to `0.3.0`
15+
* Add an example of how initContainers can be used to fix hostPath permissions.
1516
### Changed
1617
* Only add `binlog-space-limit` for `percona` image
1718
* Make user-defined InitContainer take the precedence

examples/example-cluster.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,19 @@ spec:
5757
# tolerations: []
5858
# priorityClassName:
5959
# serviceAccountName: default
60+
# # Use a initContainer to fix the permissons of a hostPath volume.
61+
# initContainers:
62+
# - name: volume-permissions
63+
# image: busybox
64+
# securityContext:
65+
# runAsUser: 0
66+
# command:
67+
# - sh
68+
# - -c
69+
# - chmod 750 /data/mysql; chown 999:999 /data/mysql
70+
# volumeMounts:
71+
# - name: data
72+
# mountPath: /data/mysql
6073

6174
## Specify additional volume specification
6275
# volumeSpec:

0 commit comments

Comments
 (0)