diff --git a/charts/mysqldump/Chart.yaml b/charts/mysqldump/Chart.yaml index 8eb2cec..8e684cc 100644 --- a/charts/mysqldump/Chart.yaml +++ b/charts/mysqldump/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 -version: 5.0.0 -appVersion: 3.0.0 +version: 5.1.0 +appVersion: v3.0.16 description: A Helm chart to help backup MySQL databases using mysqldump name: mysqldump keywords: @@ -18,6 +18,6 @@ maintainers: type: application dependencies: - name: mariadb - version: "9.3.5" + version: 11.0.14 repository: "https://charts.bitnami.com/bitnami" condition: mariadb.enabled diff --git a/charts/mysqldump/README.md b/charts/mysqldump/README.md index 802825c..a468a5d 100644 --- a/charts/mysqldump/README.md +++ b/charts/mysqldump/README.md @@ -44,68 +44,68 @@ The command removes all the Kubernetes components associated with the chart and The following tables lists the configurable parameters of the mysqldump chart and their default values. -| Parameter | Description | Default | -| --------------------------------------------- | ------------------------------------------------------------------------------ | ---------------------------- | -| image.registry | Name of docker registry to use | quay.io | -| image.repository | Name of image to use | monotek/gcloud-mysql | -| image.tag | Version of image to use | "master-15" | -| image.pullPolicy | Pull Policy to use for image | IfNotPresent | -| mysql.db | single mysql db to backup (optional) | mysql | -| mysql.host | mysql host to backup | mysql | -| mysql.username | mysql username | root | -| mysql.password | mysql password | "" | -| mysql.existingSecret | existing secret name, used to get mysql password (if set) | | -| mysql.existingSecretKey | existing secret key | mysql-root-password | -| mysql.port | mysql port | 3306 | -| schedule | crontab schedule to run on. set as `now` to run as a one time job | "0 3 \* \* \*" | -| options | options to pass onto MySQL | "--opt --single-transaction" | -| debug | print some extra debug logs during backup | false | -| dumpAllToStdout | dump all database contents to stdout when not uploading | false | -| additionalSteps | run these extra shell steps after all backup jobs completed | [] | -| successfulJobsHistoryLimit | number of successful jobs to remember | 5 | -| failedJobsHistoryLimit | number of failed jobs to remember | 5 | -| sshMountpath | User's path (used to mount ssh key if needed) | "/home/cloudsdk" | -| persistentVolumeClaim | existing Persistent Volume Claim to backup to, leave blank to create a new one | | -| persistence.enabled | create new PVC (unless `persistentVolumeClaim` is set) | true | -| persistence.size | size of PVC to create | 8Gi | -| persistence.accessMode | accessMode to use for PVC | ReadWriteOnce | -| persistence.storageClass | storage class to use for PVC | | -| persistence.subPath | subPath for PVC | | -| allDatabases.enabled | backup all databases | true | -| allDatabases.SingleSqlFile | backup all databases to single file | false | -| housekeeping.enabled | delete olf backups in pvc | true | -| housekeeping.keepDays | keep last x days of backups in PVC | 10 | -| saveToDirectory | saves the sql backup to a directory named like the database or alldatabases | false | -| upload.googlestoragebucket.enabled | upload backups to google storage | false | -| upload.googlestoragebucket.bucketname | google storage address | gs://mybucket/test | -| upload.googlestoragebucket.jsonKeyfile | json keyfile for serviceaccount | "" | -| upload.googlestoragebucket.existingSecret | specify a secretname to use | nil | -| upload.googlestoragebucket.usingGCPController | enable the use of the GCP Service Account Controller | false | -| upload.googlestoragebucket.serviceAccountName | specify a service account name to use | nil | -| upload.ssh.enabled | upload backups via ssh | false | -| upload.ssh.existingSecret | specify a secretname to use | nil | -| upload.ssh.user | ssh user | backup | -| upload.ssh.host | ssh server url | yourdomain.com | -| upload.ssh.dir | directory on server | /backup | -| upload.ssh.privatekey | ssh user private key | "" | -| upload.openstack.enabled | upload backups via swift to openstack | false | -| upload.openstack.user | user name | backup@mydomain | -| upload.openstack.userDomain | user domain | default | -| upload.openstack.password | user password, overridden by `existingSecret`/`existingSecretKey` if set | | -| upload.openstack.authUrl | openstack auth url (v3) | | -| upload.openstack.project | project name | my_project | -| upload.openstack.projectDomain | project domain | default | -| upload.openstack.destination | destination path, starting witch container | backup/mysql | -| upload.openstack.existingSecret | optional, specify a secret name to use for password | | -| upload.openstack.existingSecretKey | optional, specify a secret key to use for password | openstack-backup-password | -| upload.openstack.ttlDays | days to set time-to-live on uploaded objects (0 to disable) | 30 | -| resources | resource definitions | {} | -| nodeSelector | node selector | {} | -| tolerations | tolerations | \[] | -| affinity | affinity | {} | -| securityContext.enabled | set true to change default security context of job/cronjob | false | -| securityContext.fsGroup | group id to use | 999 | -| securityContext.runAsUser | user id to use | 999 | +| Parameter | Description | Default | +| --------------------------------------------- | ------------------------------------------------------------------------------- | ---------------------------- | +| image.registry | Name of docker registry to use | quay.io | +| image.repository | Name of image to use | monotek/gcloud-mysql | +| image.tag | Version of image to use (uses appVersion form Chart.yaml as default if not set) | "" | +| image.pullPolicy | Pull Policy to use for image | IfNotPresent | +| mysql.db | single mysql db to backup (optional) | mysql | +| mysql.host | mysql host to backup | mysql | +| mysql.username | mysql username | root | +| mysql.password | mysql password | "" | +| mysql.existingSecret | existing secret name, used to get mysql password (if set) | | +| mysql.existingSecretKey | existing secret key | mysql-root-password | +| mysql.port | mysql port | 3306 | +| schedule | crontab schedule to run on. set as `now` to run as a one time job | "0 3 \* \* \*" | +| options | options to pass onto MySQL | "--opt --single-transaction" | +| debug | print some extra debug logs during backup | false | +| dumpAllToStdout | dump all database contents to stdout when not uploading | false | +| additionalSteps | run these extra shell steps after all backup jobs completed | [] | +| successfulJobsHistoryLimit | number of successful jobs to remember | 5 | +| failedJobsHistoryLimit | number of failed jobs to remember | 5 | +| sshMountpath | User's path (used to mount ssh key if needed) | "/home/cloudsdk" | +| persistentVolumeClaim | existing Persistent Volume Claim to backup to, leave blank to create a new one | | +| persistence.enabled | create new PVC (unless `persistentVolumeClaim` is set) | true | +| persistence.size | size of PVC to create | 8Gi | +| persistence.accessMode | accessMode to use for PVC | ReadWriteOnce | +| persistence.storageClass | storage class to use for PVC | | +| persistence.subPath | subPath for PVC | | +| allDatabases.enabled | backup all databases | true | +| allDatabases.SingleSqlFile | backup all databases to single file | false | +| housekeeping.enabled | delete olf backups in pvc | true | +| housekeeping.keepDays | keep last x days of backups in PVC | 10 | +| saveToDirectory | saves the sql backup to a directory named like the database or alldatabases | false | +| upload.googlestoragebucket.enabled | upload backups to google storage | false | +| upload.googlestoragebucket.bucketname | google storage address | gs://mybucket/test | +| upload.googlestoragebucket.jsonKeyfile | json keyfile for serviceaccount | "" | +| upload.googlestoragebucket.existingSecret | specify a secretname to use | nil | +| upload.googlestoragebucket.usingGCPController | enable the use of the GCP Service Account Controller | false | +| upload.googlestoragebucket.serviceAccountName | specify a service account name to use | nil | +| upload.ssh.enabled | upload backups via ssh | false | +| upload.ssh.existingSecret | specify a secretname to use | nil | +| upload.ssh.user | ssh user | backup | +| upload.ssh.host | ssh server URL | yourdomain.com | +| upload.ssh.dir | directory on server | /backup | +| upload.ssh.privatekey | ssh user private key | "" | +| upload.openstack.enabled | upload backups via swift to openstack | false | +| upload.openstack.user | username | backup@mydomain | +| upload.openstack.userDomain | user-domain | default | +| upload.openstack.password | password, overridden by `existingSecret`/`existingSecretKey` if set | | +| upload.openstack.authUrl | openstack auth URL (v3) | | +| upload.openstack.project | project name | my_project | +| upload.openstack.projectDomain | project domain | default | +| upload.openstack.destination | destination path, starting witch container | backup/mysql | +| upload.openstack.existingSecret | optional, specify a secret name to use for password | | +| upload.openstack.existingSecretKey | optional, specify a secret key to use for password | openstack-backup-password | +| upload.openstack.ttlDays | days to set time-to-live on uploaded objects (0 to disable) | 30 | +| resources | resource definitions | {} | +| nodeSelector | k8s-node selector | {} | +| tolerations | tolerations | \[] | +| affinity | affinity | {} | +| securityContext.enabled | set true to change default security context of job/cronjob | false | +| securityContext.fsGroup | group ID to use | 999 | +| securityContext.runAsUser | user ID to use | 999 | ### Auto generating the gcp service account diff --git a/charts/mysqldump/files/job.tpl b/charts/mysqldump/files/job.tpl index 97cb9e9..64562b4 100755 --- a/charts/mysqldump/files/job.tpl +++ b/charts/mysqldump/files/job.tpl @@ -15,7 +15,7 @@ spec: {{- end }} containers: - name: mysql-backup - image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}" + image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy | quote }} command: ["/bin/bash", "/scripts/backup.sh"] {{- if or .Values.mysql.existingSecret .Values.upload.openstack.existingSecret }} diff --git a/charts/mysqldump/values.yaml b/charts/mysqldump/values.yaml index 911e6c7..ed3ceae 100644 --- a/charts/mysqldump/values.yaml +++ b/charts/mysqldump/values.yaml @@ -5,7 +5,8 @@ image: registry: quay.io repository: monotek/gcloud-mysql - tag: "master-15" + # uses appVersion form Chart.yaml if not set + tag: "" ## Specify a imagePullPolicy ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' ## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images#