From 475282864f94b1d3c59db1fff159d5fcc4ea0285 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 20 Oct 2026 06:17:25 +0000 Subject: [PATCH] chore: update patternizer-managed files --- .claude/skills/pattern-author/SKILL.md | 4 +-- .claude/skills/pattern-author/reference.md | 29 +++++++++++++++++++--- .cursor/skills/pattern-author/SKILL.md | 4 +-- .cursor/skills/pattern-author/reference.md | 29 +++++++++++++++++++--- Makefile-common | 3 ++- 5 files changed, 58 insertions(+), 11 deletions(-) diff --git a/.claude/skills/pattern-author/SKILL.md b/.claude/skills/pattern-author/SKILL.md index 281eef3b4..0634687a8 100644 --- a/.claude/skills/pattern-author/SKILL.md +++ b/.claude/skills/pattern-author/SKILL.md @@ -26,7 +26,7 @@ When creating a new Pattern: 1. **Initialize** — Determine the Pattern name and whether secrets are needed. Run `pattern init` or `pattern init --with-secrets` in the Pattern directory. 2. **Identify requirements** — What operators, applications, and custom helm charts does this Pattern need? -3. **Define namespaces** — Add all required namespaces to the clustergroup values file (`values-.yaml`). Include OperatorGroup configuration for operator namespaces. +3. **Define namespaces** — Add all required namespaces to the clustergroup values file (`variants//values-.yaml`). Include OperatorGroup configuration for operator namespaces. 4. **Define subscriptions** — Add operator subscriptions with at minimum the operator `name`. Set `namespace`, `channel`, and `source` as needed. 5. **Define applications** — Wire in helm charts as applications: - Local charts: set `path` to the chart location in the repository @@ -234,7 +234,7 @@ Define a custom global variable and use `sharedValueFiles`: global: device: gpu -# values-.yaml +# variants//values-.yaml clusterGroup: sharedValueFiles: - /overrides/values-{{ $.Values.global.device }}.yaml diff --git a/.claude/skills/pattern-author/reference.md b/.claude/skills/pattern-author/reference.md index 1a24ddaf5..10b6c6886 100644 --- a/.claude/skills/pattern-author/reference.md +++ b/.claude/skills/pattern-author/reference.md @@ -79,7 +79,7 @@ global: secretLoader: disabled: false main: - clusterGroupName: prod + variant: prod multiSourceConfig: enabled: true clusterGroupChartVersion: 0.9.* @@ -93,7 +93,7 @@ main: `global.secretLoader.disabled` — When `true`, skip loading secrets. Useful for Patterns that don't use the secrets framework. -`main.clusterGroupName` — The name of the primary clustergroup. Determines which `values-.yaml` file defines the main cluster. If you change this value, the next `pattern init` run creates the corresponding values file (you would need to manually delete the old unused one). +`main.variant` — The name of the primary clustergroup. Determines which `values-.yaml` file defines the main cluster, located at `variants//values-.yaml` (see [Variants folder structure](#variants-folder-structure)). If you change this value, the next `pattern init` run creates the corresponding values file (you would need to manually delete the old unused one). This replaces the deprecated `main.clusterGroupName` field (deprecated by the Validated Patterns operator in version 0.0.78); patternizer automatically migrates `main.clusterGroupName` to `main.variant` on `init`. `main.multiSourceConfig.enabled` — Enable ArgoCD multi-source applications. Should always be `true` for modern Patterns. @@ -111,6 +111,27 @@ There are also some global options that can be set in `values-global.yaml` but a `values-prod.yaml` is the values file that defines the main clustergroup of the Pattern. In hub/spoke Patterns (see [Spoke clusters](#spoke-clusters)) this would be the hub cluster. In single cluster Patterns this defines the solitary cluster. If there is one file to look at which defines the Pattern, it is this one. Its contents are explored in [The clustergroup values](#the-clustergroup-values) section. +With the [variants folder structure](#variants-folder-structure) (the layout patternizer now generates), this file lives at `variants//values-.yaml` (e.g. `variants/prod/values-prod.yaml`) rather than at the repository root. + +### Variants folder structure + +Per-cluster (per-variant) values files live under a top-level `variants/` directory, with one subfolder per variant named after the variant: + +```console +. +├── values-global.yaml +├── charts/ +└── variants/ + ├── prod/ + │ └── values-prod.yaml + └── standalone/ + └── values-standalone.yaml +``` + +The Validated Patterns operator auto-detects a top-level `variants/` directory and, when `main.variant` is set, looks for per-cluster values files under `variants//` instead of the repository root. This keeps the root uncluttered as you add more variants. This structure was introduced in operator version 0.0.78; see the [variants folder structure blog post](https://validatedpatterns.io/blog/2026-08-04-variants-folder-structure/) for details. + +`patternizer init` creates and uses this structure automatically, migrating a legacy root-level `values-.yaml` into `variants//` when present. The flat (root-level) layout is still supported by the operator; `patternizer upgrade` does not move files but prints a deprecation warning when the variant's file is missing from the variants folder. + ### The Pattern CR When you run `./pattern.sh make install` to deploy the Pattern, the values in `values-global.yaml` are passed to the [pattern-install chart](https://github.com/validatedpatterns/pattern-install-chart) by the [rhvp.cluster_utils.install](https://github.com/validatedpatterns/rhvp.cluster_utils/blob/main/playbooks/install.yml) playbook. This chart creates a subscription for the Validated Patterns Operator, a configmap with default operator configuration, and the Pattern CR: @@ -152,6 +173,8 @@ The following values files are automatically included for each application, in t ArgoCD is configured with `ignoreMissingValueFiles: true`, so it silently skips any of these files that do not exist. Only create the files you actually need. +When the [variants folder structure](#variants-folder-structure) is in use, the variant-specific files above (those named after the clustergroup/variant, such as `values-.yaml`) are resolved from `variants//` instead of the repository root. + In multi-source mode (the default), values files from the Pattern repository are prefixed with `$patternref/` to tell ArgoCD which source they come from. This is handled automatically by the clustergroup chart. Some of these values files are cross-clustergroup. For example, `values-AWS.yaml` would apply to both hub and spoke clustergroups running on AWS. @@ -184,7 +207,7 @@ global: pattern: ai-quickstart-rag device: cpu # one of 'cpu' (no GPU) or 'gpu' (NVIDIA GPU) main: - clusterGroupName: prod + variant: prod multiSourceConfig: enabled: true clusterGroupChartVersion: 0.9.* diff --git a/.cursor/skills/pattern-author/SKILL.md b/.cursor/skills/pattern-author/SKILL.md index 281eef3b4..0634687a8 100644 --- a/.cursor/skills/pattern-author/SKILL.md +++ b/.cursor/skills/pattern-author/SKILL.md @@ -26,7 +26,7 @@ When creating a new Pattern: 1. **Initialize** — Determine the Pattern name and whether secrets are needed. Run `pattern init` or `pattern init --with-secrets` in the Pattern directory. 2. **Identify requirements** — What operators, applications, and custom helm charts does this Pattern need? -3. **Define namespaces** — Add all required namespaces to the clustergroup values file (`values-.yaml`). Include OperatorGroup configuration for operator namespaces. +3. **Define namespaces** — Add all required namespaces to the clustergroup values file (`variants//values-.yaml`). Include OperatorGroup configuration for operator namespaces. 4. **Define subscriptions** — Add operator subscriptions with at minimum the operator `name`. Set `namespace`, `channel`, and `source` as needed. 5. **Define applications** — Wire in helm charts as applications: - Local charts: set `path` to the chart location in the repository @@ -234,7 +234,7 @@ Define a custom global variable and use `sharedValueFiles`: global: device: gpu -# values-.yaml +# variants//values-.yaml clusterGroup: sharedValueFiles: - /overrides/values-{{ $.Values.global.device }}.yaml diff --git a/.cursor/skills/pattern-author/reference.md b/.cursor/skills/pattern-author/reference.md index 1a24ddaf5..10b6c6886 100644 --- a/.cursor/skills/pattern-author/reference.md +++ b/.cursor/skills/pattern-author/reference.md @@ -79,7 +79,7 @@ global: secretLoader: disabled: false main: - clusterGroupName: prod + variant: prod multiSourceConfig: enabled: true clusterGroupChartVersion: 0.9.* @@ -93,7 +93,7 @@ main: `global.secretLoader.disabled` — When `true`, skip loading secrets. Useful for Patterns that don't use the secrets framework. -`main.clusterGroupName` — The name of the primary clustergroup. Determines which `values-.yaml` file defines the main cluster. If you change this value, the next `pattern init` run creates the corresponding values file (you would need to manually delete the old unused one). +`main.variant` — The name of the primary clustergroup. Determines which `values-.yaml` file defines the main cluster, located at `variants//values-.yaml` (see [Variants folder structure](#variants-folder-structure)). If you change this value, the next `pattern init` run creates the corresponding values file (you would need to manually delete the old unused one). This replaces the deprecated `main.clusterGroupName` field (deprecated by the Validated Patterns operator in version 0.0.78); patternizer automatically migrates `main.clusterGroupName` to `main.variant` on `init`. `main.multiSourceConfig.enabled` — Enable ArgoCD multi-source applications. Should always be `true` for modern Patterns. @@ -111,6 +111,27 @@ There are also some global options that can be set in `values-global.yaml` but a `values-prod.yaml` is the values file that defines the main clustergroup of the Pattern. In hub/spoke Patterns (see [Spoke clusters](#spoke-clusters)) this would be the hub cluster. In single cluster Patterns this defines the solitary cluster. If there is one file to look at which defines the Pattern, it is this one. Its contents are explored in [The clustergroup values](#the-clustergroup-values) section. +With the [variants folder structure](#variants-folder-structure) (the layout patternizer now generates), this file lives at `variants//values-.yaml` (e.g. `variants/prod/values-prod.yaml`) rather than at the repository root. + +### Variants folder structure + +Per-cluster (per-variant) values files live under a top-level `variants/` directory, with one subfolder per variant named after the variant: + +```console +. +├── values-global.yaml +├── charts/ +└── variants/ + ├── prod/ + │ └── values-prod.yaml + └── standalone/ + └── values-standalone.yaml +``` + +The Validated Patterns operator auto-detects a top-level `variants/` directory and, when `main.variant` is set, looks for per-cluster values files under `variants//` instead of the repository root. This keeps the root uncluttered as you add more variants. This structure was introduced in operator version 0.0.78; see the [variants folder structure blog post](https://validatedpatterns.io/blog/2026-08-04-variants-folder-structure/) for details. + +`patternizer init` creates and uses this structure automatically, migrating a legacy root-level `values-.yaml` into `variants//` when present. The flat (root-level) layout is still supported by the operator; `patternizer upgrade` does not move files but prints a deprecation warning when the variant's file is missing from the variants folder. + ### The Pattern CR When you run `./pattern.sh make install` to deploy the Pattern, the values in `values-global.yaml` are passed to the [pattern-install chart](https://github.com/validatedpatterns/pattern-install-chart) by the [rhvp.cluster_utils.install](https://github.com/validatedpatterns/rhvp.cluster_utils/blob/main/playbooks/install.yml) playbook. This chart creates a subscription for the Validated Patterns Operator, a configmap with default operator configuration, and the Pattern CR: @@ -152,6 +173,8 @@ The following values files are automatically included for each application, in t ArgoCD is configured with `ignoreMissingValueFiles: true`, so it silently skips any of these files that do not exist. Only create the files you actually need. +When the [variants folder structure](#variants-folder-structure) is in use, the variant-specific files above (those named after the clustergroup/variant, such as `values-.yaml`) are resolved from `variants//` instead of the repository root. + In multi-source mode (the default), values files from the Pattern repository are prefixed with `$patternref/` to tell ArgoCD which source they come from. This is handled automatically by the clustergroup chart. Some of these values files are cross-clustergroup. For example, `values-AWS.yaml` would apply to both hub and spoke clustergroups running on AWS. @@ -184,7 +207,7 @@ global: pattern: ai-quickstart-rag device: cpu # one of 'cpu' (no GPU) or 'gpu' (NVIDIA GPU) main: - clusterGroupName: prod + variant: prod multiSourceConfig: enabled: true clusterGroupChartVersion: 0.9.* diff --git a/Makefile-common b/Makefile-common index cf9b7bfe0..d68f1f0fd 100644 --- a/Makefile-common +++ b/Makefile-common @@ -18,7 +18,8 @@ operator-deploy operator-upgrade: ## Installs/updates the pattern on a cluster ( @$(ANSIBLE_RUN) rhvp.cluster_utils.operator_deploy .PHONY: install -install: pattern-install ## Installs the pattern onto a cluster (Loads secrets as well if configured) +install: ## Installs the pattern onto a cluster (Loads secrets as well if configured) + @$(ANSIBLE_RUN) rhvp.cluster_utils.install .PHONY: uninstall uninstall: ## (EXPERIMENTAL) See https://validatedpatterns.io/blog/2026-02-16-pattern-uninstall/.