Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add multi-dump-args in backup arguments section #373

Merged
merged 3 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions apis/installer/v1alpha1/stash_catalog_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,6 @@ type StashMysqlSpec struct {
type MySQLBackup struct {
// +optional
Args string `json:"args"`
// +optional
Args57 string `json:"args5_7"`
}

type MySQLRestore struct {
Expand Down
1 change: 1 addition & 0 deletions catalog/raw/mysql/8.0.14/mysql-backup-function.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ spec:
- --max-connections=${MAX_CONNECTIONS:=0}
- --hostname=${HOSTNAME:=}
- --mysql-args=${args:=--all-databases}
- --multi-dump-args=${multiDumpArgs:=}
- --wait-timeout=${waitTimeout:=300}
- --namespace=${NAMESPACE:=default}
- --appbinding=${TARGET_NAME:=}
Expand Down
1 change: 1 addition & 0 deletions catalog/raw/mysql/8.0.21/mysql-backup-function.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ spec:
- --max-connections=${MAX_CONNECTIONS:=0}
- --hostname=${HOSTNAME:=}
- --mysql-args=${args:=--all-databases}
- --multi-dump-args=${multiDumpArgs:=}
- --wait-timeout=${waitTimeout:=300}
- --namespace=${NAMESPACE:=default}
- --appbinding=${TARGET_NAME:=}
Expand Down
1 change: 1 addition & 0 deletions catalog/raw/mysql/8.0.3/mysql-backup-function.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ spec:
- --max-connections=${MAX_CONNECTIONS:=0}
- --hostname=${HOSTNAME:=}
- --mysql-args=${args:=--all-databases}
- --multi-dump-args=${multiDumpArgs:=}
- --wait-timeout=${waitTimeout:=300}
- --namespace=${NAMESPACE:=default}
- --appbinding=${TARGET_NAME:=}
Expand Down
1 change: 0 additions & 1 deletion charts/stash-catalog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ The following table lists the configurable parameters of the `stash-catalog` cha
| mongodb.restore.args | Arguments to pass to `mongorestore` command during restore process | <code>""</code> |
| mysql.enabled | If true, deploys MySQL addon | <code>true</code> |
| mysql.backup.args | Arguments to pass to `mysqldump` command during bakcup process | <code>"--all-databases"</code> |
| mysql.backup.args5_7 | Arguments to pass to `mysqldump` command during MySQL 5.7.x bakcup process | <code>""</code> |
| mysql.restore.args | Arguments to pass to `mysql` command during restore process | <code>""</code> |
| perconaxtradb.enabled | If true, deploys Percona XtraDB addon | <code>true</code> |
| perconaxtradb.backup.args | Arguments to pass to `mysqldump` command during bakcup process | <code>"--all-databases"</code> |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ spec:
- --enable-cache=${ENABLE_CACHE:=true}
- --max-connections=${MAX_CONNECTIONS:=0}
- --hostname=${HOSTNAME:=}
- --mysql-args=${args:={{ .Values.mysql.backup.args5_7 }}}
- --mysql-args=${args:={{ .Values.mysql.backup.args }}}
- --wait-timeout=${waitTimeout:={{ .Values.waitTimeout}}}
- --namespace=${NAMESPACE:=default}
- --appbinding=${TARGET_NAME:=}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
- --max-connections=${MAX_CONNECTIONS:=0}
- --hostname=${HOSTNAME:=}
- --mysql-args=${args:={{ .Values.mysql.backup.args }}}
- --multi-dump-args=${multiDumpArgs:=}
- --wait-timeout=${waitTimeout:={{ .Values.waitTimeout}}}
- --namespace=${NAMESPACE:=default}
- --appbinding=${TARGET_NAME:=}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
- --max-connections=${MAX_CONNECTIONS:=0}
- --hostname=${HOSTNAME:=}
- --mysql-args=${args:={{ .Values.mysql.backup.args }}}
- --multi-dump-args=${multiDumpArgs:=}
- --wait-timeout=${waitTimeout:={{ .Values.waitTimeout}}}
- --namespace=${NAMESPACE:=default}
- --appbinding=${TARGET_NAME:=}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spec:
- --max-connections=${MAX_CONNECTIONS:=0}
- --hostname=${HOSTNAME:=}
- --mysql-args=${args:={{ .Values.mysql.backup.args }}}
- --multi-dump-args=${multiDumpArgs:=}
- --wait-timeout=${waitTimeout:={{ .Values.waitTimeout}}}
- --namespace=${NAMESPACE:=default}
- --appbinding=${TARGET_NAME:=}
Expand Down
2 changes: 0 additions & 2 deletions charts/stash-catalog/values.openapiv3_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,6 @@ properties:
properties:
args:
type: string
args5_7:
type: string
type: object
enabled:
type: boolean
Expand Down
2 changes: 0 additions & 2 deletions charts/stash-catalog/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ mysql:
backup:
# Arguments to pass to `mysqldump` command during bakcup process
args: "--all-databases"
# Arguments to pass to `mysqldump` command during MySQL 5.7.x bakcup process
args5_7: ""
restore:
# Arguments to pass to `mysql` command during restore process
args: ""
Expand Down
2 changes: 1 addition & 1 deletion charts/stash-enterprise/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ The following table lists the configurable parameters of the `stash-enterprise`
| license | License for the product. Get a license by following the steps from [here](https://stash.run/docs/latest/setup/install/enterprise#get-a-trial-license). <br> Example: <br> `helm install appscode/stash-enterprise \` <br> `--set-file license=/path/to/license/file` <br> `or` <br> `helm install appscode/stash-enterprise \` <br> `--set license=<license file content>` | <code>""</code> |
| licenseSecretName | Name of Secret with the license as key.txt key | <code>""</code> |
| licenseApiService | Name of the ApiService to use by the addon to identify the respective service and certificate for license verification request | <code>v1beta1.admission.stash.appscode.com</code> |
| registryFQDN | Docker registry fqdn used to pull Stash related images. Set this to use docker registry hosted at ${registryFQDN}/${registry}/${image} | <code>ghcr.io</code> |
| registryFQDN | Docker registry fqdn used to pull Stash related images. Set this to use docker registry hosted at ${registryFQDN}/${registry}/${image} | <code>""</code> |
| operator.registry | Docker registry used to pull operator image | <code>stashed</code> |
| operator.repository | Name of operator container image | <code>stash-enterprise</code> |
| operator.tag | Operator container image tag | <code>""</code> |
Expand Down
3 changes: 2 additions & 1 deletion charts/stash-enterprise/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ licenseSecretName: ""
licenseApiService: v1beta1.admission.stash.appscode.com
# Docker registry fqdn used to pull Stash related images.
# Set this to use docker registry hosted at ${registryFQDN}/${registry}/${image}
registryFQDN: ghcr.io
registryFQDN: ""
anisurrahman75 marked this conversation as resolved.
Show resolved Hide resolved
# cleanerRegistryFQDN: ghcr.io
operator:
# Docker registry used to pull operator image
registry: stashed
Expand Down
2 changes: 0 additions & 2 deletions charts/stash/values.openapiv3_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,6 @@ properties:
properties:
args:
type: string
args5_7:
type: string
type: object
enabled:
type: boolean
Expand Down
6 changes: 1 addition & 5 deletions hack/fmt/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,7 @@ func main() {

case "mysql":
if strings.HasPrefix(args[i], "--mysql-args=") {
if r.Resource.GetName() == "mysql-backup-5.7.25" {
args[i] = fmt.Sprintf(`--mysql-args=${args:={{ .Values.%s.%s.args5_7 }}}`, loc.App, r.Type)
} else {
args[i] = fmt.Sprintf(`--mysql-args=${args:={{ .Values.%s.%s.args }}}`, loc.App, r.Type)
}
args[i] = fmt.Sprintf(`--mysql-args=${args:={{ .Values.%s.%s.args }}}`, loc.App, r.Type)
}

case "perconaxtradb":
Expand Down
Loading