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

Remove controller from preset values file #1755

Merged
merged 2 commits into from
Dec 6, 2022

Conversation

Ranjandas
Copy link
Contributor

Changes proposed in this PR:

  • Removed controller: true from the preset values file as the controller is now part of connectInject 1697

How I've tested this PR:
I built a binary and tried installing using the modified presets.

How I expect reviewers to test this PR:

Checklist:

  • Tests added
  • CHANGELOG entry added

    HashiCorp engineers only, community PRs should not add a changelog entry.
    Entries should use present tense (e.g. Add support for...)

Copy link
Contributor

@kschoche kschoche left a comment

Choose a reason for hiding this comment

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

Awesome thanks for this, I'd had this fix in the back of my mind and didn't circle back to it yet!
Since your PR didn't run any of the unit tests (because it's a fork PR I'm guessing) it'd be great to confirm that all the tests still pass manually if you have a chance!

@Ranjandas
Copy link
Contributor Author

@kschoche, thank you for reviewing. Should we also get rid of server.replicas: 1 (considering we have one as the default). I left it there so that it is evident to the users that the server is installed. Also, which target in the Makefile should I run to run the entire test? Alternatively, should I raise PRs from the source repo than a fork? Having a contribution guideline documented in the repo would have been great.

@kschoche
Copy link
Contributor

@Ranjandas - Thanks!
I believe that CI only runs the full set of tests against source repo based pull requests (some credential stuff iirc) so its nothing you did incorrectly.
As for also setting server.replicas:1 I'm on the fence for that, so maybe best to include that in a different PR, simply because I kinda agree that leaving it is somewhat informative for the end user?

To run the tests, I believe you should be okay running cd cli && go test ./... to ensure the tests still pass :)

demo $ go test ./...
?       github.com/hashicorp/consul-k8s/cli     [no test files]
ok      github.com/hashicorp/consul-k8s/cli/cmd/install 2.084s
?       github.com/hashicorp/consul-k8s/cli/cmd/proxy   [no test files]
ok      github.com/hashicorp/consul-k8s/cli/cmd/proxy/list      0.921s
ok      github.com/hashicorp/consul-k8s/cli/cmd/proxy/read      1.205s
ok      github.com/hashicorp/consul-k8s/cli/cmd/status  1.103s
ok      github.com/hashicorp/consul-k8s/cli/cmd/uninstall       2.024s
ok      github.com/hashicorp/consul-k8s/cli/cmd/upgrade 1.594s
?       github.com/hashicorp/consul-k8s/cli/cmd/version [no test files]
ok      github.com/hashicorp/consul-k8s/cli/common      10.997s
ok      github.com/hashicorp/consul-k8s/cli/common/flag 1.417s
?       github.com/hashicorp/consul-k8s/cli/common/terminal     [no test files]
?       github.com/hashicorp/consul-k8s/cli/config      [no test files]
ok      github.com/hashicorp/consul-k8s/cli/helm        0.910s
ok      github.com/hashicorp/consul-k8s/cli/preset      1.919s
ok      github.com/hashicorp/consul-k8s/cli/release     0.923s
ok      github.com/hashicorp/consul-k8s/cli/validation  1.491s
?       github.com/hashicorp/consul-k8s/cli/version     [no test files]

But you definitely have a valid point about the CONTRIBUTING.md file not having instructions for running our unit tests, we should update that guide as its fairly out of date right now in multiple places.

@Ranjandas
Copy link
Contributor Author

Ranjandas commented Dec 1, 2022

Thank you so much @kschoche. I have updated the tests and fixed all failures.

ubuntu@dev:~/github.com/ranjandas/consul-k8s/cli$ git rev-parse HEAD
4b39f17d6236fdf094533be1af7997a2eb0acd8d

ubuntu@dev:~/github.com/ranjandas/consul-k8s/cli$ go clean -testcache
ubuntu@dev:~/github.com/ranjandas/consul-k8s/cli$ go test ./...
?       github.com/hashicorp/consul-k8s/cli     [no test files]
ok      github.com/hashicorp/consul-k8s/cli/cmd/install 0.140s
?       github.com/hashicorp/consul-k8s/cli/cmd/proxy   [no test files]
ok      github.com/hashicorp/consul-k8s/cli/cmd/proxy/list      0.060s
ok      github.com/hashicorp/consul-k8s/cli/cmd/proxy/read      0.191s
ok      github.com/hashicorp/consul-k8s/cli/cmd/status  0.072s
ok      github.com/hashicorp/consul-k8s/cli/cmd/uninstall       0.106s
ok      github.com/hashicorp/consul-k8s/cli/cmd/upgrade 0.182s
?       github.com/hashicorp/consul-k8s/cli/cmd/version [no test files]
ok      github.com/hashicorp/consul-k8s/cli/common      10.070s
ok      github.com/hashicorp/consul-k8s/cli/common/flag 0.010s
?       github.com/hashicorp/consul-k8s/cli/common/terminal     [no test files]
?       github.com/hashicorp/consul-k8s/cli/config      [no test files]
ok      github.com/hashicorp/consul-k8s/cli/helm        0.077s
ok      github.com/hashicorp/consul-k8s/cli/preset      0.127s
ok      github.com/hashicorp/consul-k8s/cli/release     0.070s
ok      github.com/hashicorp/consul-k8s/cli/validation  0.048s
?       github.com/hashicorp/consul-k8s/cli/version     [no test files]
ubuntu@dev:~/github.com/ranjandas/consul-k8s/cli$

Copy link
Contributor

@kschoche kschoche left a comment

Choose a reason for hiding this comment

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

Most excellent work, thank you!
I noticed we also have some docs cleanup on this front as well to remove the controller references, if you have time. Otherwise it's definitely not blocking this PR from going in!
website/content/docs/k8s/installation/install-cli.mdx

@Ranjandas
Copy link
Contributor Author

@kschoche I have updated the doc. Could you please review and help get both PRs merged?

@kschoche kschoche merged commit 1788b54 into hashicorp:main Dec 6, 2022
david-yu pushed a commit that referenced this pull request Feb 14, 2023
* Remove controller from preset values file in CLI
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