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

Add '--logging-format' flag to kube-scheduler #91522

Merged

Conversation

SataQiu
Copy link
Member

@SataQiu SataQiu commented May 28, 2020

What type of PR is this?
/kind feature

What this PR does / why we need it:
Add --logging-format flag to kube-scheduler

Which issue(s) this PR fixes:

Ref kubernetes/enhancements#1602

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

kube-scheduler: add '--logging-format' flag to support structured logging

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

NONE

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. labels May 28, 2020
@k8s-ci-robot k8s-ci-robot added sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels May 28, 2020
@SataQiu
Copy link
Member Author

SataQiu commented May 28, 2020

/cc @serathius

@SataQiu SataQiu force-pushed the add-logging-format-flag-20200528 branch from 911d322 to 40fa3ae Compare May 28, 2020 10:20
@serathius
Copy link
Contributor

/lgtm
/approve
/assign @ahg-g

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 28, 2020
@serathius
Copy link
Contributor

/retest

@ahg-g
Copy link
Member

ahg-g commented May 28, 2020

did you manually test that the flag now exist and takes an effect when set?

@cheftako
Copy link
Member

/assign @lavalamp

@lavalamp
Copy link
Member

Like I said in the apiserver PR, I think we should wait on installing the flags until they have more than one option.

@serathius
Copy link
Contributor

/retest

@serathius
Copy link
Contributor

Json format was added. #91490
PR to update help listing available options is in flight. #92177

I think we can proceed with this PR. @lavalamp PTAL

@serathius
Copy link
Contributor

PR updating flag was merged. Can go move forward with this one? @lavalamp

@SataQiu Please fix conflict

@liggitt
Copy link
Member

liggitt commented Jun 22, 2020

I mostly want to make sure we don't open ourselves up to confused use of --log-file=foo.log --logging-format=json in a way which 1) doesn't work and 2) will change behavior in the future

@serathius
Copy link
Contributor

serathius commented Jul 1, 2020

@liggitt Flag validation was implemented, I tested it manually #92394 (comment)

kubernetes $ bazel run //cmd/kube-scheduler:kube-scheduler -- --logging-format=json --logtostderr=false
INFO: Analyzed target //cmd/kube-scheduler:kube-scheduler (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
Target //cmd/kube-scheduler:kube-scheduler up-to-date:
  bazel-bin/cmd/kube-scheduler/linux_amd64_pure_stripped/kube-scheduler
INFO: Elapsed time: 0.440s, Critical Path: 0.21s
INFO: 0 processes.
INFO: Build completed successfully, 1 total action
INFO: Build completed successfully, 1 total action
I0701 09:22:18.180872 2515079 registry.go:173] Registering SelectorSpread plugin
I0701 09:22:18.180918 2515079 registry.go:173] Registering SelectorSpread plugin
non-default logging format doesn't honor flag: logtostderr

@lavalamp are we ok to move forward?

@serathius
Copy link
Contributor

@lavalamp is OOO till Jul 6, this is to close to code freeze (Jul 9).
@liggitt could you approve?

@serathius
Copy link
Contributor

/milestone v1.19

@k8s-ci-robot k8s-ci-robot added this to the v1.19 milestone Jul 1, 2020
@SataQiu SataQiu force-pushed the add-logging-format-flag-20200528 branch from 31b12e1 to 770706c Compare July 1, 2020 15:23
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jul 1, 2020
@serathius
Copy link
Contributor

/lgtm
ping @ahg-g for approval of options_test.go

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 1, 2020
@serathius
Copy link
Contributor

serathius commented Jul 1, 2020

/unhold
As validation was implemented

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 1, 2020
@serathius
Copy link
Contributor

/retest

@SataQiu
Copy link
Member Author

SataQiu commented Jul 2, 2020

Could you have a look here? thx~ @ahg-g

@ahg-g
Copy link
Member

ahg-g commented Jul 2, 2020

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahg-g, SataQiu, serathius

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 Jul 2, 2020
@serathius
Copy link
Contributor

/retest

2 similar comments
@serathius
Copy link
Contributor

/retest

@serathius
Copy link
Contributor

/retest

@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

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. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. 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

8 participants