feat: add feature-aware values-hub.yaml generator#119
Conversation
mlorenzofr
left a comment
There was a problem hiding this comment.
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. |
mlorenzofr
left a comment
There was a problem hiding this comment.
The changes and tests have worked well. I like it a lot.
LGTM
e014582 to
7061d87
Compare
|
@mlorenzofr , I've rebased to the latest main (with #99 merged). Would you please review again? Thank you! |
mlorenzofr
left a comment
There was a problem hiding this comment.
I've encountered a problem using the option 1 (Built-in Quay registry). PTAL
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>
437b9fa to
f1d51dd
Compare
) * 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>
) * 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>
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).