-
Notifications
You must be signed in to change notification settings - Fork 1
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
CLI: add support for namespace other than flux-system #3532
Conversation
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.
@@ -52,7 +58,7 @@ func Command(opts *config.Options) *cobra.Command { | |||
Example: cmdExamples, | |||
RunE: getBootstrapCmdRun(opts), | |||
} | |||
|
|||
cmd.PersistentFlags().StringVarP(&flags.namespace, "namespace", "n", wgeDefaultNamespace, "The namespace scope for this operation") |
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.
is this flag different to
rootCmd.PersistentFlags().StringP("namespace", "n", defaultNamespace, "The namespace scope for this operation") |
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.
I'm overriding it to be able to pass it to the commands
The root app doesn't refer it to a pointer or variable
@@ -59,6 +60,11 @@ func (c *ConfigBuilder) WithLogWriter(logger logger.Logger) *ConfigBuilder { | |||
return c | |||
} | |||
|
|||
func (c *ConfigBuilder) WithNamespace(namespace string) *ConfigBuilder { |
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.
where is flux-system resolved if no namespace is set?
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.
In the flag itself, if it's not passed, then automatically set to flux system
when testing i get this error where i could see that the namespace has changed but i believe the kusktomization might be require also to change?
using the acceptance test aeb36f8#diff-82c4512096c6663a9b8f6901f0bd9c7e88088210551b054be8fbc3ca2ca0da1c |
Closing as it's not doable to use another namespace as it's hard-coded in flux |
Closes #3473
What changed?
How did you validate the change?
How to test?
test-namespace
)gitops bootstrap -n test-namespace
test-namespace
namespace instead of flux-systemflux-system
by defaultRelease notes
Documentation Changes
Other follow ups