Skip to content

Commit

Permalink
chore: add GC_FREQUENCY_SECONDS env for dataProtection deployment (ap…
Browse files Browse the repository at this point in the history
  • Loading branch information
ldming authored Oct 31, 2023
1 parent 6bb7117 commit 396bbfd
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 62 deletions.
2 changes: 2 additions & 0 deletions deploy/helm/templates/dataprotection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ spec:
key: dataProtectionEncryptionKey
- name: DATASAFED_IMAGE
value: "{{ .Values.dataProtection.image.registry | default "docker.io" }}/{{ .Values.dataProtection.image.datasafed.repository }}:{{ .Values.dataProtection.image.datasafed.tag | default "latest" }}"
- name: GC_FREQUENCY_SECONDS
value: "{{ .Values.dataProtection.gcFrequencySeconds }}"
{{- with .Values.securityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
Expand Down
10 changes: 2 additions & 8 deletions deploy/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -298,21 +298,15 @@ admissionWebhooks:
## Data protection settings
##
## @param dataProtection.enabled - set the dataProtection controllers for backup functions
## @param dataProtection.enableVolumeSnapshot - set this to true if cluster does have snapshot.storage.k8s.io API installed
## @param dataProtection.backupPVCName - set the default pvc to store the file for backup
## @param dataProtection.backupPVCInitCapacity - set the default pvc initCapacity if the pvc need to be created by backup controller
## @param dataProtection.backupPVCStorageClassName - set the default pvc storageClassName if the pvc need to be created by backup controller
## @param dataProtection.backupPVCCreatePolicy - set the default create policy of the pvc, optional values: IfNotPresent, Never
## @param dataProtection.backupPVConfigMapName - set the default configmap name which contains key "persistentVolume" and value of the persistentVolume struct.
## @param dataProtection.backupPVConfigMapNamespace - set the default configmap namespace of pv template.
## @param dataProtection.gcFrequencySeconds - the frequency of garbage collection
dataProtection:
enabled: true
enableVolumeSnapshot: false
# customizing the encryption key is strongly recommended.
# if you do not specify a custom key, the default key will be used.
# using the default key can potentially lead to the exposure of database passwords
# if 'get/list' role of the backup CR are compromised.
encryptionKey: ""
gcFrequencySeconds: 3600

image:
registry: infracreate-registry.cn-zhangjiakou.cr.aliyuncs.com
Expand Down
27 changes: 0 additions & 27 deletions docs/user_docs/cli/kbcli_kubeblocks_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,33 +13,6 @@ kbcli kubeblocks config [flags]
```
# Enable the snapshot-controller and volume snapshot, to support snapshot backup.
kbcli kubeblocks config --set snapshot-controller.enabled=true
Options Parameters:
# If you have already installed a snapshot-controller, only enable the snapshot backup feature
dataProtection.enableVolumeSnapshot=true
# the global pvc name which persistent volume claim to store the backup data.
# replace the pvc name when it is empty in the backup policy.
dataProtection.backupPVCName=backup-data
# the init capacity of pvc for creating the pvc, e.g. 10Gi.
# replace the init capacity when it is empty in the backup policy.
dataProtection.backupPVCInitCapacity=100Gi
# the pvc storage class name. replace the storageClassName when it is unset in the backup policy.
dataProtection.backupPVCStorageClassName=csi-s3
# the pvc creation policy.
# if the storageClass supports dynamic provisioning, recommend "IfNotPresent" policy.
# otherwise, using "Never" policy. only affect the backupPolicy automatically created by KubeBlocks.
dataProtection.backupPVCCreatePolicy=Never
# the configmap name of the pv template. if the csi-driver does not support dynamic provisioning,
# you can provide a configmap which contains key "persistentVolume" and value of the persistentVolume struct.
dataProtection.backupPVConfigMapName=pv-template
# the configmap namespace of the pv template.
dataProtection.backupPVConfigMapNamespace=default
```

### Options
Expand Down
27 changes: 0 additions & 27 deletions pkg/cli/cmd/kubeblocks/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,33 +56,6 @@ var sensitiveValues = []string{
var backupConfigExample = templates.Examples(`
# Enable the snapshot-controller and volume snapshot, to support snapshot backup.
kbcli kubeblocks config --set snapshot-controller.enabled=true
Options Parameters:
# If you have already installed a snapshot-controller, only enable the snapshot backup feature
dataProtection.enableVolumeSnapshot=true
# the global pvc name which persistent volume claim to store the backup data.
# replace the pvc name when it is empty in the backup policy.
dataProtection.backupPVCName=backup-data
# the init capacity of pvc for creating the pvc, e.g. 10Gi.
# replace the init capacity when it is empty in the backup policy.
dataProtection.backupPVCInitCapacity=100Gi
# the pvc storage class name. replace the storageClassName when it is unset in the backup policy.
dataProtection.backupPVCStorageClassName=csi-s3
# the pvc creation policy.
# if the storageClass supports dynamic provisioning, recommend "IfNotPresent" policy.
# otherwise, using "Never" policy. only affect the backupPolicy automatically created by KubeBlocks.
dataProtection.backupPVCCreatePolicy=Never
# the configmap name of the pv template. if the csi-driver does not support dynamic provisioning,
# you can provide a configmap which contains key "persistentVolume" and value of the persistentVolume struct.
dataProtection.backupPVConfigMapName=pv-template
# the configmap namespace of the pv template.
dataProtection.backupPVConfigMapNamespace=default
`)

var describeConfigExample = templates.Examples(`
Expand Down

0 comments on commit 396bbfd

Please sign in to comment.