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 new separateKustomizeComponent and skipMembers fields #67

Closed MatousJobanek closed 3 months ago

MatousJobanek commented 3 months ago

add two new fields into kubesaw-admins.yaml file

  1. separateKustomizeComponent can be used in a member cluster config - when set to true, then the manifests for the member cluster is gonna be generated in a separate Kustomize component/folder
  2. selector.skipMembers which can be defined either for a ServiceAccount or for a Users. It's a list of members the generation should be skipped for the given SA or User entity.

These two fields together enable us to generate manifests for a given member cluster (the intel hackathon one) in a separate folder and skip some users/sa there. With this, we can still generate manifests needed to execute ksctl commands in the intel hackathon cluster, but it won't include the manifests for the crtadmin users of the 3rd party components (the components won't be installed there).

NOTE: You may ask why did I use the "selector" as a parent field for the "skipMembers" one. I'd like to move the AllClusters field there as well and manage any other fields related to filtering/selecting the items under this generic one.. (But if it would be too confusing, then I can remove the parent field and store it all at the root level of the entity)

To be done in the next PR:

MatousJobanek commented 3 months ago

that's exactly why I created the other PR so you can see what it looks like: https://github.com/codeready-toolchain/sandbox-sre/pull/1926

and what do you mean by "Kustomize folder", by the way?

a folder that contains the whole structure of the generated manifests with the kustomization.yaml files

Let me improve the comment there

xcoulon commented 3 months ago

I'm a bit confused with the new

that's exactly why I created the other PR so you can see what it looks like: codeready-toolchain/sandbox-sre#1926

yes, I've seen it, but I'm still a bit confused :/ Not by the fact that the generated manifests will be in a separate folder (here, components/auth/devsandbox-production/generated-manifests/member-intel), but rather, how to we specify the path to this particular folder?

and what do you mean by "Kustomize folder", by the way?

a folder that contains the whole structure of the generated manifests with the kustomization.yaml files

Let me improve the comment there

may I suggest "Kustomize output folder"?

MatousJobanek commented 3 months ago

I updated the comment 7719c2a (before seeing your last message) please take a look and feel free to make a suggestion in the GH PR view

MatousJobanek commented 3 months ago

Not by the fact that the generated manifests will be in a separate folder (here, components/auth/devsandbox-production/generated-manifests/member-intel), but rather, how to we specify the path to this particular folder?

I'm confused, what do you want to have different there?

xcoulon commented 3 months ago

I updated the comment 7719c2a (before seeing your last message) please take a look and feel free to make a suggestion in the GH PR view

great, thanks for taking my questions/comments into account!

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 78.26087% with 5 lines in your changes missing coverage. Please review.

Project coverage is 69.59%. Comparing base (ed47159) to head (7719c2a). Report is 1 commits behind head on master.

Files Patch % Lines
pkg/cmd/generate/admin-manifests.go 70.58% 2 Missing and 3 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #67 +/- ## ========================================== + Coverage 69.45% 69.59% +0.13% ========================================== Files 43 43 Lines 2544 2562 +18 ========================================== + Hits 1767 1783 +16 - Misses 587 588 +1 - Partials 190 191 +1 ``` | [Files](https://app.codecov.io/gh/kubesaw/ksctl/pull/67?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/cluster.go](https://app.codecov.io/gh/kubesaw/ksctl/pull/67?src=pr&el=tree&filepath=pkg%2Fcmd%2Fgenerate%2Fcluster.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kubesaw#diff-cGtnL2NtZC9nZW5lcmF0ZS9jbHVzdGVyLmdv) | `80.00% <100.00%> (+3.07%)` | :arrow_up: | | [pkg/cmd/generate/util.go](https://app.codecov.io/gh/kubesaw/ksctl/pull/67?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.53% <100.00%> (+0.33%)` | :arrow_up: | | [pkg/cmd/generate/admin-manifests.go](https://app.codecov.io/gh/kubesaw/ksctl/pull/67?src=pr&el=tree&filepath=pkg%2Fcmd%2Fgenerate%2Fadmin-manifests.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kubesaw#diff-cGtnL2NtZC9nZW5lcmF0ZS9hZG1pbi1tYW5pZmVzdHMuZ28=) | `46.15% <70.58%> (+8.41%)` | :arrow_up: |