-
Notifications
You must be signed in to change notification settings - Fork 695
Allow option to skip tenant namespace creation #5597
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
8e0a123 to
dfe7cbe
Compare
|
Hello, |
cmd/flux/create_tenant.go
Outdated
| createTenantCmd.Flags().StringSliceVar(&tenantArgs.namespaces, "with-namespace", nil, "namespace belonging to this tenant") | ||
| createTenantCmd.Flags().StringVar(&tenantArgs.clusterRole, "cluster-role", "cluster-admin", "cluster role of the tenant role binding") | ||
| createTenantCmd.Flags().StringVar(&tenantArgs.account, "with-service-account", "", "service account belonging to this tenant") | ||
| createTenantCmd.Flags().BoolVar(&tenantArgs.skipNamespace, "skip-namespace-create", false, "skip namespace creation (namespace must exist already)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can just be --skip-namespace same flag we use for uninstall
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The flag is updated now.
a354621 to
6d39708
Compare
|
Please rebase your fork with upstream main and squash the commits into one and force push. This PR should contain a single commit. |
Add --skip-namespace flag to the 'create tenant' command to skip automatic namespace creation when the namespace already exists. Signed-off-by: Anshuman Singh <[email protected]>
6d39708 to
0ba28f3
Compare
stefanprodan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks @anshuishere
|
Successfully created backport PR for |
Issue
When flux onboards tenants in multitenant setup, it always creates manifest for namespace with no option to skip it.
When this is needed?
In a shared cluster, for example in a customer environment, namespaces are managed at infra level by cluster admin.
This means we receive a namespace already created and we don't want flux platform-admin to manage it or delete it in case of tenant removal.
What's in this PR?
This allows a flag to flux create tenant command to optionally skip namespace creation by flux. Default behaviour remains unchanged.