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

[Charts] Add logVerbosityLevel variable to all Helm charts #1679

Merged
merged 2 commits into from Nov 9, 2021

Conversation

gman0
Copy link
Member

@gman0 gman0 commented Oct 29, 2021

What this PR does / why we need it:

This PR adds logVerbosityLevel variable to all Helm charts in this repository. Operators can now choose how verbose they want their logs. Default levels are set to 2.

Which issue this PR fixes(if applicable):
fixes #

Special notes for reviewers:

Release note:

[Charts] Added logVerbosityLevel variable to cinder-csi-plugin, manila-csi-plugin and openstack-controller-manager Helm charts

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 29, 2021
@gman0
Copy link
Member Author

gman0 commented Oct 29, 2021

 ✖︎ openstack-cinder-csi => (version: "2.0.0", path: "charts/cinder-csi-plugin") > Chart version not ok. Needs a version bump!
34
 ✖︎ openstack-manila-csi => (version: "1.3.2", path: "charts/manila-csi-plugin") > Chart version not ok. Needs a version bump!
35
 ✖︎ openstack-cloud-controller-manager => (version: "1.1.1", path: "charts/openstack-cloud-controller-manager") > Chart version not ok. Needs a version bump!

#1654 ?

@gman0
Copy link
Member Author

gman0 commented Oct 29, 2021

PTAL @lingxiankong @jichenjc @ramineni

@jichenjc
Copy link
Contributor

jichenjc commented Nov 1, 2021

not sure the lint issue is related?

@gman0
Copy link
Member Author

gman0 commented Nov 1, 2021

@jichenjc it is, no? I haven't incremented chart versions, and it's complaining about it.

@jichenjc
Copy link
Contributor

jichenjc commented Nov 2, 2021

@gman0 yes,so please update the version :)

@gman0
Copy link
Member Author

gman0 commented Nov 2, 2021

@jichenjc ok I thought it was a pipeline bug that it was still asking for version bump.

@gman0
Copy link
Member Author

gman0 commented Nov 2, 2021

Should be ok now. All jobs passed.

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Nov 2, 2021
@gman0
Copy link
Member Author

gman0 commented Nov 2, 2021

I've updated the release note so that it mentions new variable in helm chart values.

@jichenjc
Copy link
Contributor

jichenjc commented Nov 2, 2021

thanks ~
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 2, 2021
@gman0
Copy link
Member Author

gman0 commented Nov 8, 2021

Any updates on this pls? @ramineni ?

# Log verbosity level.
# See https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/logging.md
# for description of individual verbosity levels.
logVerbosityLevel: 0
Copy link
Contributor

Choose a reason for hiding this comment

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

if nothing is passed in argument , isnt default log level would be 2?

Copy link
Member Author

Choose a reason for hiding this comment

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

@ramineni do you have some reference for this where it says it really defaults to 2? If not I'll go check it myself later today or in the coming days.

Copy link
Member Author

Choose a reason for hiding this comment

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

Because AFAIK it indeed defaults to zero:

-v=0
Enable V-leveled logging at the specified level.

https://pkg.go.dev/github.com/kubernetes/klog

Copy link
Member Author

Choose a reason for hiding this comment

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

But that's just what I implied when I saw -v=0. I couldn't find anything explicitly stating what's the default level though, so that's why I'm asking if you saw it somewhere else.

Copy link
Member Author

Choose a reason for hiding this comment

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

Some more references:

Whether an individual call to V generates a log record depends on the setting of the -v and --vmodule flags; both are off by default.

https://pkg.go.dev/github.com/kubernetes/klog#V

Copy link
Contributor

Choose a reason for hiding this comment

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

@gman0 Its there in same link you have mentioned in comment above :)

Copy link
Member Author

Choose a reason for hiding this comment

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

If that's the case, I think it's sensible to set all logVerbosityLevel values to 2. What do you and others think?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, I agree

Copy link
Member Author

@gman0 gman0 Nov 9, 2021

Choose a reason for hiding this comment

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

@ramineni I think https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/logging.md just summarizes the recommendations rather than actual defaults that klog is configured with. Either way I'll set the level to 2 as we just agreed.

@ramineni
Copy link
Contributor

ramineni commented Nov 8, 2021

@gman0 @jichenjc Yes, according to this ,#1654 , we have decided not to bump version as it causes confusion . We need to fix that not to cause error if there is no version bump.
/cc @lingxiankong

@lingxiankong
Copy link
Contributor

@gman0 @jichenjc Yes, according to this ,#1654 , we have decided not to bump version as it causes confusion . We need to fix that not to cause error if there is no version bump. /cc @lingxiankong

This is weird, according to https://github.com/helm/chart-testing/blob/main/doc/ct_lint.md, the job shouldn't check chart version.

@ramineni
Copy link
Contributor

ramineni commented Nov 9, 2021

/override openstack-cloud-keystone-authentication-authorization-test

@k8s-ci-robot
Copy link
Contributor

@ramineni: Overrode contexts on behalf of ramineni: openstack-cloud-keystone-authentication-authorization-test

In response to this:

/override openstack-cloud-keystone-authentication-authorization-test

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@lingxiankong
Copy link
Contributor

Chart version check fix: #1691

@gman0 Please remove the version change.

@gman0
Copy link
Member Author

gman0 commented Nov 9, 2021

Will do, @lingxiankong. Maybe we can get your fix merged and then I'll rebase this PR?

@ramineni
Copy link
Contributor

ramineni commented Nov 9, 2021

Will do, @lingxiankong. Maybe we can get your fix merged and then I'll rebase this PR?

its merged

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 9, 2021
@gman0
Copy link
Member Author

gman0 commented Nov 9, 2021

All CI jobs passed. PTAL again.

@@ -27,6 +27,7 @@ spec:
image: "{{ .Values.csi.attacher.image.repository }}:{{ .Values.csi.attacher.image.tag }}"
imagePullPolicy: {{ .Values.csi.attacher.image.pullPolicy }}
args:
- "-v={{ .Values.logVerbosityLevel }}"
Copy link
Contributor

Choose a reason for hiding this comment

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

it should be --v= .. right? does one dash also work?

Copy link
Member Author

Choose a reason for hiding this comment

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

@ramineni both forms are allowed.

$ ./openstack-cloud-controller-manager --help
...
  -v, --v Level                                                                                                                                                                       
                number for the log level verbosity

$ ./cinder-csi-plugin --help
...
  -v, --v Level                          number for the log level verbosity

$ ./manila-csi-plugin --help
...
  -v, --v Level                          number for the log level verbosity

Copy link
Member Author

Choose a reason for hiding this comment

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

Usually single-character flags are denoted with a single dash.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok thanks, then should be ok

Copy link
Contributor

@ramineni ramineni left a comment

Choose a reason for hiding this comment

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

one comment inline, else looks good

@ramineni
Copy link
Contributor

ramineni commented Nov 9, 2021

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 9, 2021
@lingxiankong
Copy link
Contributor

/approve

Thanks!

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lingxiankong

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 9, 2021
@k8s-ci-robot k8s-ci-robot merged commit 8fb469b into kubernetes:master Nov 9, 2021
powellchristoph pushed a commit to powellchristoph/cloud-provider-openstack that referenced this pull request Jan 19, 2022
…s#1679)

* added logVerbosityLevel variable to all Helm charts

* set logVerbosityLevel to 2
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants