mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-06 03:57:52 +09:00
Rewrite resourcesPreset values in every apps/* and extras/* chart from the legacy flat names to the new instance-type form, using the 1:1 mapping: nano -> t1.nano micro -> t1.micro small -> t1.small medium -> c1.small large -> c1.medium xlarge -> c1.large 2xlarge -> c1.xlarge Each affected values.yaml carries the canonical 47-value enum (40 instance-type names plus 7 legacy aliases) so the schema accepts both forms during the deprecation window. cozyvalues-gen regenerates the matching api/apps/v1alpha1/*/types.go kubebuilder enum and defaults, the chart values.schema.json, the README parameter table, and the ApplicationDefinition openAPISchema in packages/system/*-rd/cozyrds. Three hardcoded legacy literals in chart templates migrated: - packages/apps/harbor/templates/harbor.yaml:121 (portal) - packages/apps/opensearch/templates/opensearch.yaml:43 (dashboards) - packages/system/keycloak/templates/sts.yaml:115 (heap fallback) packages/apps/foundationdb/Makefile gains the missing hack/update-crd.sh call. Without it, every regen left foundationdb-rd cozyrds stale and new FoundationDB app CRs through cozystack-api were rejected at validation for any non-legacy resourcesPreset value. Every default-rendered chart produces identical CPU and memory to the value applied before the rename, courtesy of the legacy alias table in cozy-lib and the 1:1 default mapping. Co-authored-by: Matthieu ROBIN <matthieu@hidora.com> Signed-off-by: Aleksei Sviridkin <f@lex.la>
162 lines
7.0 KiB
YAML
162 lines
7.0 KiB
YAML
##
|
|
## @section Common parameters
|
|
##
|
|
|
|
## @typedef {struct} Resources - Explicit CPU and memory configuration for each ClickHouse replica.
|
|
## @field {quantity} [cpu] - CPU available to each replica.
|
|
## @field {quantity} [memory] - Memory (RAM) available to each replica.
|
|
|
|
## @enum {string} ResourcesPreset - Default sizing preset.
|
|
## @value t1.nano
|
|
## @value t1.micro
|
|
## @value t1.small
|
|
## @value t1.medium
|
|
## @value t1.large
|
|
## @value t1.xlarge
|
|
## @value t1.2xlarge
|
|
## @value t1.4xlarge
|
|
## @value c1.nano
|
|
## @value c1.micro
|
|
## @value c1.small
|
|
## @value c1.medium
|
|
## @value c1.large
|
|
## @value c1.xlarge
|
|
## @value c1.2xlarge
|
|
## @value c1.4xlarge
|
|
## @value s1.nano
|
|
## @value s1.micro
|
|
## @value s1.small
|
|
## @value s1.medium
|
|
## @value s1.large
|
|
## @value s1.xlarge
|
|
## @value s1.2xlarge
|
|
## @value s1.4xlarge
|
|
## @value u1.nano
|
|
## @value u1.micro
|
|
## @value u1.small
|
|
## @value u1.medium
|
|
## @value u1.large
|
|
## @value u1.xlarge
|
|
## @value u1.2xlarge
|
|
## @value u1.4xlarge
|
|
## @value m1.nano
|
|
## @value m1.micro
|
|
## @value m1.small
|
|
## @value m1.medium
|
|
## @value m1.large
|
|
## @value m1.xlarge
|
|
## @value m1.2xlarge
|
|
## @value m1.4xlarge
|
|
## @value nano
|
|
## @value micro
|
|
## @value small
|
|
## @value medium
|
|
## @value large
|
|
## @value xlarge
|
|
## @value 2xlarge
|
|
|
|
## @param {int} replicas - Number of ClickHouse replicas.
|
|
replicas: 2
|
|
|
|
## @param {int} shards - Number of ClickHouse shards.
|
|
shards: 1
|
|
|
|
## @param {Resources} [resources] - Explicit CPU and memory configuration for each ClickHouse replica. When omitted, the preset defined in `resourcesPreset` is applied.
|
|
resources: {}
|
|
|
|
## @param {ResourcesPreset} resourcesPreset="t1.small" - Default sizing preset used when `resources` is omitted.
|
|
resourcesPreset: "t1.small"
|
|
|
|
## @param {quantity} size - Persistent Volume Claim size available for application data.
|
|
size: 10Gi
|
|
|
|
## @param {string} storageClass - StorageClass used to store the data.
|
|
storageClass: ""
|
|
|
|
##
|
|
## @section Application-specific parameters
|
|
##
|
|
|
|
## @param {quantity} logStorageSize - Size of Persistent Volume for logs.
|
|
logStorageSize: 2Gi
|
|
|
|
## @param {int} logTTL - TTL (expiration time) for `query_log` and `query_thread_log`.
|
|
logTTL: 15
|
|
|
|
## @typedef {struct} User - User configuration.
|
|
## @field {string} [password] - Password for the user.
|
|
## @field {bool} [readonly] - User is readonly (default: false).
|
|
|
|
## @param {map[string]User} users - Users configuration map.
|
|
users: {}
|
|
## Example:
|
|
## users:
|
|
## user1:
|
|
## password: strongpassword
|
|
## user2:
|
|
## readonly: true
|
|
## password: hackme
|
|
##
|
|
|
|
##
|
|
## @section Backup parameters
|
|
##
|
|
|
|
## @typedef {struct} S3CredentialsSecret - Reference to a pre-existing Secret with S3 credentials and bucket coordinates consumed by the chart-emitted `clickhouse-backup` sidecar (rendered into the ClickHouseInstallation Pod by `templates/clickhouse.yaml`). The strategy Pod itself is a curl/jq HTTP client and never reads this Secret. Setting `name` skips the chart-emitted `<release>-backup-s3` Secret in favour of the referenced one. Use this to keep credentials out of the chart values.
|
|
## @field {string} [name] - Name of the Secret in the application namespace. Empty means the chart materialises `<release>-backup-s3` from the legacy `s3*` fields.
|
|
## @field {string} [bucketKey] - Key in the Secret holding the bucket name. Defaults to `bucketName`.
|
|
## @field {string} [endpointKey] - Key in the Secret holding the S3 endpoint URL. Defaults to `endpoint`.
|
|
## @field {string} [regionKey] - Key in the Secret holding the S3 region. Defaults to `region`.
|
|
## @field {string} [accessKeyIDKey] - Key in the Secret holding the access key ID. Defaults to `accessKey`.
|
|
## @field {string} [secretAccessKeyKey] - Key in the Secret holding the secret access key. Defaults to `secretKey`.
|
|
|
|
## @typedef {struct} Backup - Backup configuration.
|
|
## @field {bool} enabled - Enable backup integration. Materialises the chart-emitted `<release>-backup-s3` Secret consumed by the Altinity backup strategy and, when `schedule` is non-empty, also renders the legacy chart-managed CronJob.
|
|
## @field {string} s3Region - AWS S3 region where backups are stored.
|
|
## @field {string} s3Bucket - S3 bucket used for storing backups.
|
|
## @field {string} [endpoint] - S3 endpoint URL. Stored in the chart-emitted `<release>-backup-s3` Secret and consumed at runtime by the in-Pod `clickhouse-backup` sidecar. Empty means use the AWS default endpoint; in that case the chart also drops `S3_FORCE_PATH_STYLE` from the sidecar env, since AWS public S3 requires vhost-style.
|
|
## @field {string} [s3PathOverride] - Object-key prefix the sidecar uses inside `s3Bucket`. Empty (default) scopes backups under the Helm release name so multiple ClickHouse releases sharing one bucket cannot clobber each other. Set this on a to-copy restore destination to point at the source release's prefix.
|
|
## @field {string} [schedule] - Legacy. Cron schedule for the chart-emitted CronJob that runs the dump+restic backup. Empty (default) skips the legacy CronJob; recommended when a `BackupClass` + `Plan` from `backups.cozystack.io` already drives backup orchestration via the Altinity strategy.
|
|
## @field {string} [cleanupStrategy] - Legacy. Restic retention policy passed to the legacy CronJob (`restic forget …`). Unused by the Altinity strategy.
|
|
## @field {string} s3AccessKey - Access key for S3 authentication. Ignored when `s3CredentialsSecret.name` is set.
|
|
## @field {string} s3SecretKey - Secret key for S3 authentication. Ignored when `s3CredentialsSecret.name` is set.
|
|
## @field {string} [resticPassword] - Legacy. Password for Restic backup encryption used by the legacy CronJob. Unused by the Altinity strategy.
|
|
## @field {S3CredentialsSecret} [s3CredentialsSecret] - Reference to a pre-existing Secret carrying S3 credentials and bucket coordinates consumed by the chart-emitted `clickhouse-backup` sidecar. When `name` is set, the chart skips materialising `<release>-backup-s3` and the sidecar reads from the referenced Secret instead. The strategy Pod is a curl/jq HTTP client and does not bind to this Secret directly.
|
|
|
|
## @param {Backup} backup - Backup configuration.
|
|
backup:
|
|
enabled: false
|
|
s3Region: us-east-1
|
|
s3Bucket: "s3.example.org/clickhouse-backups"
|
|
endpoint: ""
|
|
s3PathOverride: ""
|
|
schedule: ""
|
|
cleanupStrategy: "--keep-last=3 --keep-daily=3 --keep-within-weekly=1m"
|
|
s3AccessKey: "<your-access-key>"
|
|
s3SecretKey: "<your-secret-key>"
|
|
resticPassword: "<password>"
|
|
s3CredentialsSecret:
|
|
name: ""
|
|
bucketKey: ""
|
|
endpointKey: ""
|
|
regionKey: ""
|
|
accessKeyIDKey: ""
|
|
secretAccessKeyKey: ""
|
|
|
|
##
|
|
## @section ClickHouse Keeper parameters
|
|
##
|
|
|
|
## @typedef {struct} ClickHouseKeeper - ClickHouse Keeper configuration.
|
|
## @field {bool} [enabled] - Deploy ClickHouse Keeper for cluster coordination.
|
|
## @field {quantity} [size] - Persistent Volume Claim size available for application data.
|
|
## @field {ResourcesPreset} [resourcesPreset] - Default sizing preset.
|
|
## @field {int} [replicas] - Number of Keeper replicas.
|
|
|
|
## @param {ClickHouseKeeper} clickhouseKeeper - ClickHouse Keeper configuration.
|
|
clickhouseKeeper:
|
|
enabled: true
|
|
size: 1Gi
|
|
resourcesPreset: "t1.micro"
|
|
replicas: 3
|