Skip to content

feat: add feature-aware values-hub.yaml generator#119

Merged
mlorenzofr merged 8 commits into
validatedpatterns:mainfrom
minmzzhang:gen-feature-variants
Apr 23, 2026
Merged

feat: add feature-aware values-hub.yaml generator#119
mlorenzofr merged 8 commits into
validatedpatterns:mainfrom
minmzzhang:gen-feature-variants

Conversation

@minmzzhang
Copy link
Copy Markdown
Collaborator

@minmzzhang minmzzhang commented Apr 9, 2026

Add a declarative, composable YAML generator using ruamel.yaml for producing values-hub.yaml overrides per deployment scenario.

Features are defined as small YAML fragment files under scripts/features/ with automatic dependency resolution.
Supported scenarios: rhtpa, quay, rhtas, pipelines, storage, and full supply-chain (with registry option 1/2/3).

Usage:
python3 scripts/gen-feature-variants.py --features rhtpa
python3 scripts/gen-feature-variants.py --features supply-chain --registry-option all

P.S. This PR has a dependency on #99 (BYO container registry support).

Copy link
Copy Markdown
Collaborator

@mlorenzofr mlorenzofr left a comment

Choose a reason for hiding this comment

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

Apart from the file comments, which are quite self-explanatory, a short README explaining how to prepare the environment and run the script (locally, using virtualenvs, in a container, etc.) might be helpful.

Comment thread scripts/gen-feature-variants.py Outdated
Comment thread scripts/requirements.txt
@minmzzhang
Copy link
Copy Markdown
Collaborator Author

Apart from the file comments, which are quite self-explanatory, a short README explaining how to prepare the environment and run the script (locally, using virtualenvs, in a container, etc.) might be helpful.

Added gen-feature-variants.md.

Copy link
Copy Markdown
Collaborator

@mlorenzofr mlorenzofr left a comment

Choose a reason for hiding this comment

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

The changes and tests have worked well. I like it a lot.

LGTM

@minmzzhang minmzzhang force-pushed the gen-feature-variants branch 4 times, most recently from e014582 to 7061d87 Compare April 20, 2026 17:16
@minmzzhang minmzzhang requested review from p-rog and sabre1041 April 21, 2026 03:05
@minmzzhang
Copy link
Copy Markdown
Collaborator Author

@mlorenzofr , I've rebased to the latest main (with #99 merged). Would you please review again? Thank you!

@minmzzhang minmzzhang requested a review from mlorenzofr April 21, 2026 12:30
Copy link
Copy Markdown
Collaborator

@mlorenzofr mlorenzofr left a comment

Choose a reason for hiding this comment

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

I've encountered a problem using the option 1 (Built-in Quay registry). PTAL

Comment thread scripts/features/registry/option-1-quay.yaml
minmzzhang and others added 8 commits April 23, 2026 14:33
Add a declarative, composable YAML generator using ruamel.yaml
for producing values-hub.yaml overrides per deployment scenario.

Features are defined as small YAML fragment files under
scripts/features/ with automatic dependency resolution.
Supported scenarios: rhtpa, quay, rhtas, pipelines, storage,
and full supply-chain (with registry option 1/2/3).

Usage:
  python3 scripts/gen-feature-variants.py --features rhtpa
  python3 scripts/gen-feature-variants.py --features supply-chain --registry-option all
Signed-off-by: Min Zhang <minzhang@redhat.com>
- Rename _merge_into to merge_into_applications for clarity
  on which section it targets (review: Manuel)
- Strip comments from clusterGroup.namespaces/subscriptions/
  applications in generated output to avoid confusing placement
  of commented-out blocks near merged content; preserve all
  other comments (top-level headers, spire, sharedValueFiles,
  imperative, etc.)
- Add gen-feature-variants.md with environment setup and usage

Signed-off-by: Min Zhang <minzhang@redhat.com>
…efactor

Update feature YAML files and gen-feature-variants script/docs for:
- org -> repository (e.g. "ztvp/qtodo")
- embeddedOCP -> embeddedOpenShift
- Rename option-3-embedded-ocp.yaml -> option-3-embedded-openshift.yaml

Signed-off-by: Min Zhang <minzhang@redhat.com>
Signed-off-by: Min Zhang <minzhang@redhat.com>
Signed-off-by: Min Zhang <minzhang@redhat.com>
- Add empty supply-chain and qtodo override placeholders in
  features/supply-chain.yaml for future enablement
- Pin RHTAS operator channel to stable-v1.3

Signed-off-by: Min Zhang <minzhang@redhat.com>
The new gen-feature-variants.py covers all registry options
declaratively; no need to maintain two generators.

Signed-off-by: Min Zhang <minzhang@redhat.com>
@mlorenzofr mlorenzofr force-pushed the gen-feature-variants branch from 437b9fa to f1d51dd Compare April 23, 2026 12:33
@mlorenzofr mlorenzofr merged commit 6773186 into validatedpatterns:main Apr 23, 2026
3 checks passed
mlorenzofr added a commit to mlorenzofr/layered-zero-trust that referenced this pull request Apr 23, 2026
)

* feat: add feature-aware values-hub.yaml generator

Add a declarative, composable YAML generator using ruamel.yaml
for producing values-hub.yaml overrides per deployment scenario.

Features are defined as small YAML fragment files under
scripts/features/ with automatic dependency resolution.
Supported scenarios: rhtpa, quay, rhtas, pipelines, storage,
and full supply-chain (with registry option 1/2/3).

Usage:
  python3 scripts/gen-feature-variants.py --features rhtpa
  python3 scripts/gen-feature-variants.py --features supply-chain --registry-option all
Signed-off-by: Min Zhang <minzhang@redhat.com>

* fix: address review feedback for gen-feature-variants

- Rename _merge_into to merge_into_applications for clarity
  on which section it targets (review: Manuel)
- Strip comments from clusterGroup.namespaces/subscriptions/
  applications in generated output to avoid confusing placement
  of commented-out blocks near merged content; preserve all
  other comments (top-level headers, spire, sharedValueFiles,
  imperative, etc.)
- Add gen-feature-variants.md with environment setup and usage

Signed-off-by: Min Zhang <minzhang@redhat.com>

* fix: align gen-feature-variants with PR validatedpatterns#99 review refactor

Update feature YAML files and gen-feature-variants script/docs for:
- org -> repository (e.g. "ztvp/qtodo")
- embeddedOCP -> embeddedOpenShift
- Rename option-3-embedded-ocp.yaml -> option-3-embedded-openshift.yaml

Signed-off-by: Min Zhang <minzhang@redhat.com>

* chore: add __pycache__ and *.pyc to .gitignore

Signed-off-by: Min Zhang <minzhang@redhat.com>

* fix: rename embedded-ocp to embedded-openshift in output filenames

Signed-off-by: Min Zhang <minzhang@redhat.com>

* fix: sync supply-chain feature with PR review feedback

- Add empty supply-chain and qtodo override placeholders in
  features/supply-chain.yaml for future enablement
- Pin RHTAS operator channel to stable-v1.3

Signed-off-by: Min Zhang <minzhang@redhat.com>

* chore: remove legacy gen-byo-container-registry-variants.py

The new gen-feature-variants.py covers all registry options
declaratively; no need to maintain two generators.

Signed-off-by: Min Zhang <minzhang@redhat.com>

* Override value job.image in quay-registry application

---------

Signed-off-by: Min Zhang <minzhang@redhat.com>
Co-authored-by: Manuel Lorenzo <mlorenzofr@gmail.com>
mlorenzofr added a commit to mlorenzofr/layered-zero-trust that referenced this pull request Apr 27, 2026
)

* feat: add feature-aware values-hub.yaml generator

Add a declarative, composable YAML generator using ruamel.yaml
for producing values-hub.yaml overrides per deployment scenario.

Features are defined as small YAML fragment files under
scripts/features/ with automatic dependency resolution.
Supported scenarios: rhtpa, quay, rhtas, pipelines, storage,
and full supply-chain (with registry option 1/2/3).

Usage:
  python3 scripts/gen-feature-variants.py --features rhtpa
  python3 scripts/gen-feature-variants.py --features supply-chain --registry-option all
Signed-off-by: Min Zhang <minzhang@redhat.com>

* fix: address review feedback for gen-feature-variants

- Rename _merge_into to merge_into_applications for clarity
  on which section it targets (review: Manuel)
- Strip comments from clusterGroup.namespaces/subscriptions/
  applications in generated output to avoid confusing placement
  of commented-out blocks near merged content; preserve all
  other comments (top-level headers, spire, sharedValueFiles,
  imperative, etc.)
- Add gen-feature-variants.md with environment setup and usage

Signed-off-by: Min Zhang <minzhang@redhat.com>

* fix: align gen-feature-variants with PR validatedpatterns#99 review refactor

Update feature YAML files and gen-feature-variants script/docs for:
- org -> repository (e.g. "ztvp/qtodo")
- embeddedOCP -> embeddedOpenShift
- Rename option-3-embedded-ocp.yaml -> option-3-embedded-openshift.yaml

Signed-off-by: Min Zhang <minzhang@redhat.com>

* chore: add __pycache__ and *.pyc to .gitignore

Signed-off-by: Min Zhang <minzhang@redhat.com>

* fix: rename embedded-ocp to embedded-openshift in output filenames

Signed-off-by: Min Zhang <minzhang@redhat.com>

* fix: sync supply-chain feature with PR review feedback

- Add empty supply-chain and qtodo override placeholders in
  features/supply-chain.yaml for future enablement
- Pin RHTAS operator channel to stable-v1.3

Signed-off-by: Min Zhang <minzhang@redhat.com>

* chore: remove legacy gen-byo-container-registry-variants.py

The new gen-feature-variants.py covers all registry options
declaratively; no need to maintain two generators.

Signed-off-by: Min Zhang <minzhang@redhat.com>

* Override value job.image in quay-registry application

---------

Signed-off-by: Min Zhang <minzhang@redhat.com>
Co-authored-by: Manuel Lorenzo <mlorenzofr@gmail.com>
@minmzzhang minmzzhang deleted the gen-feature-variants branch May 6, 2026 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants