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

Refactor controllers to separate package, shift cli-runtime to wrangler-cli, introduce pprof options #157

Merged

Conversation

aiyengar2
Copy link
Contributor

@aiyengar2 aiyengar2 commented Sep 7, 2022

Part 5 of #141

@aiyengar2
Copy link
Contributor Author

aiyengar2 commented Sep 7, 2022

First two commits will be removed on merging #154

@aiyengar2 aiyengar2 force-pushed the refactor_controllers_logic_and_cli_runtime branch from 8b7ea58 to 6ef8ac5 Compare September 7, 2022 23:18
@aiyengar2
Copy link
Contributor Author

arvindiyengar: ~/Rancher/helm-controller/src/github.com/k3s-io/helm-controller 
$ ./scripts/validate
/usr/local/bin/golangci-lint
Running validation
Running: golangci-lint
Running: go fmt

@aiyengar2 aiyengar2 force-pushed the refactor_controllers_logic_and_cli_runtime branch from e5cfb4e to c1ed8a0 Compare September 7, 2022 23:33
main.go Outdated Show resolved Hide resolved
@aiyengar2 aiyengar2 force-pushed the refactor_controllers_logic_and_cli_runtime branch 3 times, most recently from a1df6b4 to 0954cd8 Compare September 8, 2022 00:02
@aiyengar2
Copy link
Contributor Author

aiyengar2 commented Sep 8, 2022

arvindiyengar: ~/Rancher/helm-controller/src/github.com/k3s-io/helm-controller 
$ ./helm-controller --help
Usage:
  helm-controller [flags]

Flags:
      --debug               Turn on debug logging
      --debug-level int     If debugging is enabled, set klog -v=X
  -h, --help                help for helm-controller
  -k, --kubeconfig string   Kubernetes config files, e.g. $HOME/.kube/config
  -m, --master-url string   Kubernetes cluster master URL
  -n, --namespace string    Namespace to watch, empty means it will watch CRDs in all namespaces.
      --pprof-port int      Port to publish HTTP server runtime profiling data in the format expected by the pprof visualization tool. Only enabled if in debug mode (default 6060)
  -t, --threads int         Threadiness level to set, defaults to 2. (default 2)
  -v, --version             version for helm-controller

pprof stuff has been added and moved to be entirely self-contained in a single commit.

@aiyengar2 aiyengar2 changed the title Refactor controllers to separate package and cli-runtime to wrangler-cli Refactor controllers to separate package, shift cli-runtime to wrangler-cli, introduce pprof options Sep 8, 2022
Arvind Iyengar added 2 commits September 7, 2022 17:05
Signed-off-by: Arvind Iyengar <arvind.iyengar@rancher.com>
Signed-off-by: Arvind Iyengar <arvind.iyengar@rancher.com>
@aiyengar2 aiyengar2 force-pushed the refactor_controllers_logic_and_cli_runtime branch from 0954cd8 to db191fc Compare September 8, 2022 00:06
pkg/controllers/controllers.go Outdated Show resolved Hide resolved
Signed-off-by: Arvind Iyengar <arvind.iyengar@rancher.com>
(cherry picked from commit e8b0e5a)
Comment on lines 52 to 54
if len(systemNamespace) == 0 {
return errors.New("cannot start controllers on system namespace: system namespace not provided")
}
Copy link
Member

Choose a reason for hiding this comment

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

We throw an error here if systemNamespace is empty, but down below at https://github.com/k3s-io/helm-controller/pull/157/files#diff-b32dd54d2bd7ecc467b19203287df80c4c1e3934ea80602aadd6658306b5cca6R73 it looks like the intent was to allow for watching all namespaces if the string is empty. Is this an error, or should that subsequent check be removed?

@aiyengar2 aiyengar2 force-pushed the refactor_controllers_logic_and_cli_runtime branch from 28433d3 to dd785ff Compare September 8, 2022 00:28
Arvind Iyengar added 2 commits September 7, 2022 17:47
Signed-off-by: Arvind Iyengar <arvind.iyengar@rancher.com>
(cherry picked from commit db20eff)
Signed-off-by: Arvind Iyengar <arvind.iyengar@rancher.com>
Signed-off-by: Arvind Iyengar <arvind.iyengar@rancher.com>
@aiyengar2 aiyengar2 force-pushed the refactor_controllers_logic_and_cli_runtime branch from 8ecacf6 to 233b031 Compare September 8, 2022 00:48
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.

2 participants