Skip to content
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

Merged
merged 8 commits into from
Jan 14, 2020

Conversation

whynowy
Copy link
Member

@whynowy whynowy commented Jan 11, 2020

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.

@whynowy whynowy requested a review from jessesuen January 11, 2020 00:36
@codecov
Copy link

codecov bot commented Jan 11, 2020

Codecov Report

❗ No coverage uploaded for pull request base (master@6af100d). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@           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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6af100d...5a3f0a1. Read the comment docs.

cmd/workflow-controller/main.go Outdated Show resolved Hide resolved
cmd/workflow-controller/main.go Outdated Show resolved Hide resolved
@whynowy
Copy link
Member Author

whynowy commented Jan 13, 2020

@alexec - could you review again?

@@ -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"))
Copy link
Contributor

@alexec alexec Jan 13, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

os.Getenv("NAMESPACED") == "true"

@whynowy whynowy requested a review from jessesuen January 13, 2020 23:18
Copy link
Member

@jessesuen jessesuen left a 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:

  1. env vars it's not self-documenting from the CLI. This magic env var was added, but now it needs to be documented.
  2. the controller has never used environment variables as a configuration, so we shouldn't start now
  3. we should avoid two different ways of doing the same thing
  4. 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?

cmd/workflow-controller/main.go Outdated Show resolved Hide resolved
@whynowy whynowy merged commit c51c130 into argoproj:master Jan 14, 2020
@whynowy whynowy deleted the nsonly branch January 14, 2020 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants