kubesaw / ksctl

ksctl is a command-line tool to manage your installation of KubeSaw
Apache License 2.0
4 stars 11 forks source link

add 'ksctl generate nstemplatetiers' command #31

Closed MatousJobanek closed 7 months ago

MatousJobanek commented 7 months ago

based on the changes in host-operator repo and toolchain-common - see https://github.com/codeready-toolchain/toolchain-common/pull/381

this PR adds a new command ksctl generate nstemplatetiers that takes a folder with tier templates (in the same format as we have in host-operator here: https://github.com/codeready-toolchain/host-operator/tree/master/deploy/templates/nstemplatetiers) and generates resulting TierTemplates and NSTemplateTiers in the out directory together with kustomization.yaml files. In this way, Konflux team can move the definition of their tiers out of host-operator and manage them in infra-deployments via ArgoCD.

KUBESAW-60

For testing purposes, I copied the content of the appstudio tiers into test-resources folder

MatousJobanek commented 7 months ago

@mfrancisc Good question - the command groups the manifests in folders by tier name and it doesn't care if it's one tier or more of them. For the simplicity, I would keep it as it is.

codecov[bot] commented 7 months ago

Codecov Report

Merging #31 (d1ecc69) into master (cfee5c4) will decrease coverage by 0.16%. The diff coverage is 62.35%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #31 +/- ## ========================================== - Coverage 65.72% 65.57% -0.16% ========================================== Files 40 41 +1 Lines 2028 2100 +72 ========================================== + Hits 1333 1377 +44 - Misses 537 560 +23 - Partials 158 163 +5 ``` | [Files](https://app.codecov.io/gh/kubesaw/ksctl/pull/31?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kubesaw) | Coverage Δ | | |---|---|---| | [pkg/cmd/generate/generate.go](https://app.codecov.io/gh/kubesaw/ksctl/pull/31?src=pr&el=tree&filepath=pkg%2Fcmd%2Fgenerate%2Fgenerate.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kubesaw#diff-cGtnL2NtZC9nZW5lcmF0ZS9nZW5lcmF0ZS5nbw==) | `0.00% <0.00%> (ø)` | | | [pkg/cmd/generate/util.go](https://app.codecov.io/gh/kubesaw/ksctl/pull/31?src=pr&el=tree&filepath=pkg%2Fcmd%2Fgenerate%2Futil.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kubesaw#diff-cGtnL2NtZC9nZW5lcmF0ZS91dGlsLmdv) | `77.03% <78.57%> (+1.20%)` | :arrow_up: | | [pkg/cmd/generate/nstemplatetiers.go](https://app.codecov.io/gh/kubesaw/ksctl/pull/31?src=pr&el=tree&filepath=pkg%2Fcmd%2Fgenerate%2Fnstemplatetiers.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kubesaw#diff-cGtnL2NtZC9nZW5lcmF0ZS9uc3RlbXBsYXRldGllcnMuZ28=) | `55.35% <55.35%> (ø)` | |