mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-05 19:47:37 +09:00
Fourth review round fixes. Simplify backup validation by dropping placeholder-regex guards and switching default values of s3AccessKey, s3SecretKey, destinationPath, and endpointURL from angle-bracketed hints to empty strings. A single 'required' check on each field is now the whole validation for presence; the regex guard was brittle (silently stopped matching if the hint ever changed) and dropping it makes the values.yaml defaults match the behavior contract the README describes. s3:// prefix and '//' rejection still live in etcd-backup-schedule.yaml as template-time fail branches. Add helm-unittest suites in packages/extra/etcd/tests/ covering both templates end-to-end: rendered output assertions for the happy path (bucket/key split, region passthrough, conditional rendering of optional fields) and failedTemplate assertions for every fail branch. A 'test' target is wired into the package Makefile so hack/helm-unit-tests.sh picks it up on 'make unit-tests'. Add type: Opaque to backup-secret.yaml for consistency with the mongodb template. E2E: wait for HelmRelease, Secret, and EtcdBackupSchedule deletion in setup() so the empty-backup case does not flake against lingering state from the previous test. Replace the fictitious minio-e2e hostname with no-such-endpoint.invalid and explicitly document that the e2e verifies schedule/CronJob materialization, not backup execution. Restore via EtcdCluster.spec.bootstrap and the one-shot EtcdBackup CRD are still not exposed through this chart; both are explicit follow-ups called out in the README. Assisted-By: Claude <noreply@anthropic.com> Signed-off-by: Aleksei Sviridkin <f@lex.la>
51 lines
1.6 KiB
YAML
51 lines
1.6 KiB
YAML
##
|
|
## @section Common parameters
|
|
##
|
|
|
|
## @param {quantity} [size] - Persistent Volume size.
|
|
size: 4Gi
|
|
|
|
## @param {string} [storageClass] - StorageClass used to store the data.
|
|
storageClass: ""
|
|
|
|
## @param {int} [replicas] - Number of etcd replicas.
|
|
replicas: 3
|
|
|
|
## @typedef {struct} Resources - Resource configuration for etcd.
|
|
## @field {quantity} [cpu] - Number of CPU cores allocated.
|
|
## @field {quantity} [memory] - Amount of memory allocated.
|
|
|
|
## @param {Resources} [resources] - Resource configuration for etcd.
|
|
resources:
|
|
cpu: 1000m
|
|
memory: 512Mi
|
|
|
|
##
|
|
## @section Backup parameters
|
|
##
|
|
|
|
## @typedef {struct} Backup - Backup configuration.
|
|
## @field {bool} [enabled] - Enable scheduled S3 backups.
|
|
## @field {string} [schedule] - Cron schedule for automated backups.
|
|
## @field {string} [destinationPath] - Destination path for backups (e.g. s3://bucket/path/).
|
|
## @field {string} [endpointURL] - S3 endpoint URL for uploads.
|
|
## @field {string} [region] - S3 region.
|
|
## @field {bool} [forcePathStyle] - Use path-style S3 URLs (required for MinIO and most S3-compatible providers).
|
|
## @field {string} [s3AccessKey] - Access key for S3 authentication.
|
|
## @field {string} [s3SecretKey] - Secret key for S3 authentication.
|
|
## @field {int} [successfulJobsHistoryLimit] - Number of successful backup jobs to retain.
|
|
## @field {int} [failedJobsHistoryLimit] - Number of failed backup jobs to retain.
|
|
|
|
## @param {Backup} backup - Backup configuration.
|
|
backup:
|
|
enabled: false
|
|
schedule: "0 2 * * *"
|
|
destinationPath: ""
|
|
endpointURL: ""
|
|
region: ""
|
|
forcePathStyle: true
|
|
s3AccessKey: ""
|
|
s3SecretKey: ""
|
|
successfulJobsHistoryLimit: 3
|
|
failedJobsHistoryLimit: 1
|