Skip to content
Open
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
129 changes: 129 additions & 0 deletions control-plane/roles/valkey/meta/argument_specs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
---
argument_specs:
main:
short_description: Deploys a Valkey instance with the backup-restore-sidecar
options:
valkey_name:
type: str
description: Name of the valkey deployment.
valkey_namespace:
type: str
description: The namespace to deploy valkey to.
valkey_image_pull_policy:
type: str
description: Image pull policy for the valkey container.
valkey_storage_size:
type: str
description: Size of the persistent volume.
valkey_storage_class:
type: str
description: Storage class of the persistent volume.
valkey_backup_restore_sidecar_image_pull_policy:
type: str
description: Image pull policy for the backup-restore-sidecar container.
valkey_backup_restore_sidecar_provider:
type: str
choices:
- local
- gcp
- s3
description: Backup provider used by the backup-restore-sidecar.
valkey_backup_restore_sidecar_backup_cron_schedule:
type: str
description: Cron schedule for creating backups.
valkey_backup_restore_sidecar_log_level:
type: str
description: Log level of the backup-restore-sidecar.
valkey_backup_restore_sidecar_gcp_bucket_name:
type: str
description: GCP bucket name for storing backups.
valkey_backup_restore_sidecar_gcp_backup_location:
type: str
description: GCP bucket location for storing backups.
valkey_backup_restore_sidecar_gcp_project_id:
type: str
description: GCP project id of the backup bucket.
valkey_backup_restore_sidecar_gcp_serviceaccount_json:
type: str
no_log: true
description: GCP service account JSON used for accessing the backup bucket.
valkey_backup_restore_sidecar_s3_bucket_name:
type: str
description: S3 bucket name for storing backups.
valkey_backup_restore_sidecar_s3_region:
type: str
description: S3 region of the backup bucket.
valkey_backup_restore_sidecar_s3_endpoint:
type: str
description: S3 endpoint of the backup bucket.
valkey_backup_restore_sidecar_s3_access_key:
type: str
description: S3 access key for the backup bucket.
valkey_backup_restore_sidecar_s3_secret_key:
type: str
no_log: true
description: S3 secret key for the backup bucket.
valkey_backup_restore_sidecar_s3_insecure_skip_verify:
type: bool
description: Whether to skip TLS certificate verification for the S3 endpoint.
valkey_backup_restore_sidecar_s3_trusted_ca_cert:
type: str
description: Trusted CA certificate for the S3 endpoint.
valkey_backup_restore_sidecar_object_max_keep:
type: int
description: Maximum amount of backup objects to keep.
valkey_backup_restore_sidecar_s3_object_days_max_keep:
type: int
description: Maximum amount of days to keep a backup object in the bucket.
valkey_backup_restore_sidecar_s3_request_checksum_calculation:
type: str
description:
- Controls the RequestChecksumCalculation setting of the S3 client.
- Either C(when_required) or C(when_supported).
- Not expressed as C(choices) because the default is unset and
choices would reject that.
valkey_backup_restore_sidecar_encryption_key:
type: str
no_log: true
description: Encryption key (32 characters) for encrypting backups.
valkey_resources:
type: dict
description: Resource requests and limits for the valkey container.
Comment on lines +89 to +91

@vknabel vknabel Aug 19, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to add options here and / or in other places?
Of course we don't have to mirror k8s here and especially not all levels deep, but it might make sense in some cases to at least provide top-level attributes. The resources aren't necessarily a good example of this. Might be handy for upcoming PRs though :)

e.g.

options:
  resources:
    type: dict
  limits:
    type: dict
  claims:
    type: list
    elements: dict

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For certain variables this would be quite useful. As long as it does not prevent some degree of freedom, which might already be used by some consumers.

valkey_backup_restore_sidecar_resources:
type: dict
description: Resource requests and limits for the backup-restore-sidecar container.
valkey_init_resources:
type: dict
description: Resource requests and limits for the init container.
valkey_registry_auth_enabled:
type: bool
description: Whether to deploy an image pull secret for the registry.
Comment on lines +98 to +100

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Must be a bool

valkey_registry_auth:
type: dict
no_log: true
description: Docker auth configuration for the image pull secret.
valkey_enable_security_context:
type: bool
description: Whether to render the pod and container security contexts.
valkey_sts_security_context:
type: dict
description: Pod security context for the statefulset.
valkey_container_security_context:
type: dict
description: Security context for the containers.
# The image variables below are resolved from the metal-stack release
# vector by the setup_yaml task at the start of this role. Role argument
# validation runs BEFORE that task, so they cannot be marked required
# here - the assert in tasks/main.yaml keeps checking them.
valkey_image_name:
type: str
description: Image name of valkey.
valkey_image_tag:
type: str
description: Image tag of valkey.
valkey_backup_restore_sidecar_image_name:
type: str
description: Image name of the backup-restore-sidecar.
valkey_backup_restore_sidecar_image_tag:
type: str
description: Image tag of the backup-restore-sidecar.
8 changes: 0 additions & 8 deletions control-plane/roles/valkey/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,6 @@
- valkey_backup_restore_sidecar_image_name is defined
- valkey_backup_restore_sidecar_image_tag is defined
- valkey_backup_restore_sidecar_encryption_key is none or valkey_backup_restore_sidecar_encryption_key | length == 32
- valkey_backup_restore_sidecar_provider in ["local", "gcp", "s3"]

- name: Check mandatory variables for this role are set
ansible.builtin.assert:
fail_msg: "not all mandatory variables given, check role documentation"
quiet: true
that:
- valkey_backup_restore_sidecar_image_tag is defined

- name: Deploy valkey (backup-restore)
kubernetes.core.k8s:
Expand Down
Loading