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

✨ Introduce some control over controller verbosity #2041

Merged
merged 1 commit into from
Apr 12, 2024

Conversation

MikeSpreitzer
Copy link
Contributor

@MikeSpreitzer MikeSpreitzer commented Apr 10, 2024

Summary

This PR introduces some control over the logging verbosity of the kubestellar controller-manager and the transport controller. The controllers themselves already had command line flags for this, but the higher level constructs passed constant values. This PR generalizes the kubestellar controller-manager Helm chart so that it can be told what verbosity to pass in. This PR generalizes the scripts/deploy-transport-controller.sh script. This PR also generalizes the test/e2e/common/setup-kubestellar.sh and test/e2e/multi-cluster-deployment/run-test.sh scripts.

This PR does NOT change the kubestellar PostCreateHook, even though PostCreateHooks can have user-defined parameters in release 0.5.0 and later of KubeFlex. One reason is that KubeStellar currently only requires release 0.4.2 of KubeFlex. The other reason is that a PostCreateHook parameter can not have a default value; every usage of the PCH has to specify the value to use for that parameter.

Related issue(s)

This addresses part of #2042

@kcp-ci-bot kcp-ci-bot added dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Apr 10, 2024
@MikeSpreitzer
Copy link
Contributor Author

/cc @nirrozenbaum
/cc @francostellari
/cc @waltforme

@@ -2,6 +2,10 @@

This test is an executable variant of the "multi-cluster workload deployment with kubectl" scenario in [the examples doc](../../../docs/content/direct/examples.md). This test has the same prerequisites as the cited one. This test can test either (a) the local copy of the repo or (b) the release identified in the kubestellar PostCreateHook (which will be the last release created, regardless of quality, except for that brief time when it identifies the release about to be made). Testing the local copy is the default behavior; to test the release identified in the PostCreateHook, pass `--released` on the command line of `run-test.sh`.

The kubestellar controller-manager will be invoked with `-v=2` unless otherwise specified on the command line with `--kubestellar-controller-manager-verbosity $number`. This verbosity can not be set to a value other than 2 when using `--released`.

The transport controller will be invoked with `-v=4` unless othewise specified on the command line with `--transport-controller-verbosity $number`.
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like a very high level. Developers usually push a lot of printouts into V4 (@nirrozenbaum ? )

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The defaults are the pre-existing behavior.

Copy link
Contributor

Choose a reason for hiding this comment

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

I know, this is why I pointed to @nirrozenbaum I thought 4 is too high for our release default.

Copy link
Contributor

Choose a reason for hiding this comment

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

@MikeSpreitzer if level 4 seems like a reasonable output , I'm OK with it.

runAsNonRoot: true
serviceAccountName: kubestellar-controller-manager
terminationGracePeriodSeconds: 10
This file is overwritten by `make chart` (whose results are not kept in Git) and ignored by `make local-chart`.
Copy link
Contributor

Choose a reason for hiding this comment

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

So why not deleting the file ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I considered that, and thought that leaving an explanation in place would be more helpful.

Copy link
Contributor

Choose a reason for hiding this comment

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

This seems strange. It's as if we will leave such a place holder for all our generated files that are not in git. I don't see the value in this

Copy link
Contributor Author

@MikeSpreitzer MikeSpreitzer Apr 10, 2024

Choose a reason for hiding this comment

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

I think that this one is a fairly special case. First, note that currently this file is under Git control, so that means that this is a reasonable thing to expect. More importantly, it is part of a suite of files --- the ones that make up the Helm chart definition. The rest of the suite is in the Git-controlled contents, and the reader will would reasonably wonder about it if this were not here. Finally, note that this is not the only Git-controlled place where we have a note saying that it gets replaced.

Copy link
Contributor

Choose a reason for hiding this comment

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

I still strongly believe we should just remove it and instead put the comment that the file is generate in the docs and/or in the helm definition.
However, I will not block the PR because of this. I leave it up to you ...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ezrasilvera: how would we put this comment "in the Helm definition"? This file is part of the Helm definition.

@kcp-ci-bot kcp-ci-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 11, 2024
Signed-off-by: Mike Spreitzer <mspreitz@us.ibm.com>
@kcp-ci-bot kcp-ci-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 12, 2024
@ezrasilvera
Copy link
Contributor

We can delete the file in the future once we agree how to document it
/lgtm

@kcp-ci-bot kcp-ci-bot added the lgtm Indicates that a PR is ready to be merged. label Apr 12, 2024
@kcp-ci-bot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 67fefb768dcb0efed1651f69696a3bc0426aa0d1

@MikeSpreitzer
Copy link
Contributor Author

/approve

@kcp-ci-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: MikeSpreitzer

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kcp-ci-bot kcp-ci-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 12, 2024
@kcp-ci-bot kcp-ci-bot merged commit f849a06 into kubestellar:main Apr 12, 2024
13 checks passed
@MikeSpreitzer MikeSpreitzer deleted the control-verbosity branch April 12, 2024 18:39
effi-ofer pushed a commit to effi-ofer/edge-mc that referenced this pull request Apr 14, 2024
✨ Introduce some control over controller verbosity

Signed-off-by: Effi Ofer <effi.ofer@gmail.com>
effi-ofer pushed a commit to effi-ofer/edge-mc that referenced this pull request Apr 14, 2024
✨ Introduce some control over controller verbosity

Signed-off-by: Effi Ofer <effi.ofer@gmail.com>
effi-ofer pushed a commit to effi-ofer/edge-mc that referenced this pull request Apr 14, 2024
✨ Introduce some control over controller verbosity

Signed-off-by: Effi Ofer <effi.ofer@gmail.com>
effi-ofer pushed a commit to effi-ofer/edge-mc that referenced this pull request Apr 14, 2024
✨ Introduce some control over controller verbosity

Signed-off-by: Effi Ofer <effi.ofer@gmail.com>
effi-ofer pushed a commit to effi-ofer/edge-mc that referenced this pull request Apr 14, 2024
✨ Introduce some control over controller verbosity

Signed-off-by: Effi Ofer <effi.ofer@gmail.com>
effi-ofer pushed a commit to effi-ofer/edge-mc that referenced this pull request Apr 14, 2024
✨ Introduce some control over controller verbosity

Signed-off-by: Effi Ofer <effi.ofer@gmail.com>
effi-ofer pushed a commit to effi-ofer/edge-mc that referenced this pull request Apr 14, 2024
✨ Introduce some control over controller verbosity

Signed-off-by: Effi Ofer <effi.ofer@gmail.com>
effi-ofer pushed a commit to effi-ofer/edge-mc that referenced this pull request Apr 14, 2024
✨ Introduce some control over controller verbosity

Signed-off-by: Effi Ofer <effi.ofer@gmail.com>
effi-ofer pushed a commit to effi-ofer/edge-mc that referenced this pull request Apr 15, 2024
✨ Introduce some control over controller verbosity

Signed-off-by: Effi Ofer <effi.ofer@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has signed the DCO. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants