-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
feat: Enhancement for namespace installation mode configuration #1939
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1939 +/- ##
========================================
Coverage ? 10.7%
========================================
Files ? 35
Lines ? 25033
Branches ? 0
========================================
Hits ? 2681
Misses ? 22012
Partials ? 340 Continue to review full report at Codecov.
|
manifests/namespace-install/overlays/workflow-controller-deployment.yaml
Outdated
Show resolved
Hide resolved
@alexec - could you review again? |
cmd/workflow-controller/main.go
Outdated
@@ -96,6 +119,12 @@ func NewRootCommand() *cobra.Command { | |||
command.Flags().IntVar(&glogLevel, "gloglevel", 0, "Set the glog logging level") | |||
command.Flags().IntVar(&workflowWorkers, "workflow-workers", 8, "Number of workflow workers") | |||
command.Flags().IntVar(&podWorkers, "pod-workers", 8, "Number of pod workers") | |||
namespacedMode, err := strconv.ParseBool(os.Getenv("NAMESPACED")) |
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.
os.Getenv("NAMESPACED") == "true"
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.
Conditional approval:
I don't think we should use an environment variable to configure this because:
- env vars it's not self-documenting from the CLI. This magic env var was added, but now it needs to be documented.
- the controller has never used environment variables as a configuration, so we shouldn't start now
- we should avoid two different ways of doing the same thing
- core functionality like this should be promoted as a CLI flag, since an environment variable makes it ambiguous if it took effect or even relevant to the release (e.g. a user might try to set
NAMESPACED=true
in an older release and wonder why it's not working).
Can change this so that we only use CLI flag instead of environment variable?
This is the implementation for proposal #1938, with this change,
workflow-controller
adds 2 optional args--namespaced
and--namespace
.This deprecates the dependency of
namespace
configuration in the configmap for namespace only mode installation.