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

kubeadm: Remove the usage to print the default component configs for reset and join #119346

Merged
merged 1 commit into from Aug 30, 2023

Conversation

chendave
Copy link
Member

@chendave chendave commented Jul 15, 2023

component configs is only needed for kubeadm init, the join and reset doesn't need to provid the config with component configs.

/kind bug

What type of PR is this?

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

kubeadm: print the default component configs for `reset` and `join` is now not supported

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


@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jul 15, 2023
@k8s-ci-robot
Copy link
Contributor

This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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.

@k8s-ci-robot k8s-ci-robot added the needs-priority Indicates a PR lacks a `priority/foo` label and requires one. label Jul 15, 2023
@k8s-ci-robot k8s-ci-robot added area/kubeadm sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jul 15, 2023
@SataQiu
Copy link
Member

SataQiu commented Jul 16, 2023

Even it's possible by the CLI, but it shouldn't be guaranteed by any testcases.

I'm wondering if we should disable the --component-configs flag for reset.
What do you think? @neolit123 @pacoxu

@neolit123
Copy link
Member

Even it's possible by the CLI, but it shouldn't be guaranteed by any testcases.

I'm wondering if we should disable the --component-configs flag for reset. What do you think? @neolit123 @pacoxu

print for join also doesn’t need it?
if we already have it for join, it needs deprecation.

instead...we can keep it enabled everywhere but a No-op for reset, join. i might be missing some context.

@SataQiu
Copy link
Member

SataQiu commented Jul 16, 2023

we can keep it enabled everywhere but a No-op for reset, join.

Yes, these default configurations are only printed when the --component-configs flag is specified, it seems harmless.

Copy link
Member

@neolit123 neolit123 left a comment

Choose a reason for hiding this comment

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

/approve
seems ok to clean these

@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 17, 2023
@pacoxu
Copy link
Member

pacoxu commented Jul 17, 2023

print for join also doesn’t need it? if we already have it for join, it needs deprecation.

I prefer to deprecate it as it is not needed(harmless as well).

instead...we can keep it enabled everywhere but a No-op for reset, join. i might be missing some context.

It will make users confused like the below.

kubeadm config print reset-defaults --component-configs=KubeProxyConfiguration

I'm wondering if we should disable the --component-configs flag for reset.

+1

However, all can be a follow-up. This PR lgtm.

@chendave
Copy link
Member Author

/hold

this needs to be polished, we can do more instead of just remove those testcases.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 17, 2023
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 7, 2023
@chendave
Copy link
Member Author

chendave commented Aug 7, 2023

/retitle kubeadm: Deprecate the default values of component config for reset and join

/unhold

@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 Aug 7, 2023
@k8s-ci-robot k8s-ci-robot changed the title kubeadm: Cleanup testcases for ResetConfiguration defaults kubeadm: Deprecate the default values of component config for reset and join Aug 7, 2023
@chendave
Copy link
Member Author

chendave commented Aug 7, 2023

/test pull-kubernetes-e2e-gce

@@ -115,6 +115,7 @@ func newCmdConfigPrintResetDefaults(out io.Writer) *cobra.Command {

func newCmdConfigPrintActionDefaults(out io.Writer, action string, configBytesProc func() ([]byte, error)) *cobra.Command {
kinds := []string{}
deprecatedMsg := fmt.Sprintf("Print the default value of component config API objects is deprecated for action: %s, it will be ingored if set and will be removed in a future release.", action)
Copy link
Member

@pacoxu pacoxu Aug 28, 2023

Choose a reason for hiding this comment

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

typo: ignore.

a newline at the end? Or the first line of the configuration will be print just after this line.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

print it to stdout use fmt.Fprintln instead.

@dims
Copy link
Member

dims commented Aug 29, 2023

/assign @neolit123

@@ -115,6 +115,7 @@ func newCmdConfigPrintResetDefaults(out io.Writer) *cobra.Command {

func newCmdConfigPrintActionDefaults(out io.Writer, action string, configBytesProc func() ([]byte, error)) *cobra.Command {
kinds := []string{}
deprecatedMsg := fmt.Sprintf("Print the default value of component config API objects is deprecated for action: %s, it will be ignored if set and will be removed in a future release.", action)
Copy link
Member

@neolit123 neolit123 Aug 29, 2023

Choose a reason for hiding this comment

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

i may have misunderstood something around our discussion for UpgradeConfiguration?
we should continue printing the kubeadm's understanding of default component config, but we can stop managing component config via --config on upgrade.

EDIT: never mind. i'm losing context on what these changes are about.

Copy link
Member

@neolit123 neolit123 left a comment

Choose a reason for hiding this comment

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

can we go without deprecation here and just remove the usage of component-configs for anything but init?

it feels like a bug to allow join, reset...etc to use these.

@chendave
Copy link
Member Author

can we go without deprecation here and just remove the usage of component-configs for anything but init?

this is following the suggestion from @pacoxu , your input here? are you okay if we go without deprecation?

From @pacoxu

I prefer to deprecate it as it is not needed(harmless as well).

@chendave
Copy link
Member Author

chendave commented Aug 30, 2023

also, this needs a release note, will add it in the next iteration.

@pacoxu
Copy link
Member

pacoxu commented Aug 30, 2023

/kind bug

it feels like a bug to allow join, reset...etc to use these.

Just remove it if this is a bug 😄.

@chendave chendave changed the title kubeadm: Deprecate the default values of component config for reset and join kubeadm: Remove the usage to print the default component configs for reset and join Aug 30, 2023
@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 Aug 30, 2023
@chendave
Copy link
Member Author

can we go without deprecation here and just remove the usage of component-configs for anything but init?

Done

@chendave
Copy link
Member Author

/kind bug

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Aug 30, 2023
Copy link
Member

@neolit123 neolit123 left a comment

Choose a reason for hiding this comment

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

/approve
SGTM

please always prefix kubeadm release notes with kubeadm:

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chendave, neolit123

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

@chendave
Copy link
Member Author

please always prefix kubeadm release notes with kubeadm:

Done.

@chendave
Copy link
Member Author

/hold

testcase need to be updated as well.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 30, 2023
…`reset` and `join`

component configs is only needed for `kubeadm init`, the `join` and `reset` doesn't
need to provid the config with component configs.

Signed-off-by: Dave Chen <dave.chen@arm.com>
@chendave
Copy link
Member Author

/unhold

updated testcases since the component-configs flags is now not available for reset and join.

@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 Aug 30, 2023
@pacoxu
Copy link
Member

pacoxu commented Aug 30, 2023

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 30, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: fd8fc23c0895bd03e652d01fa44e9953367235b5

@chendave
Copy link
Member Author

/test pull-kubernetes-e2e-gce

@k8s-ci-robot k8s-ci-robot merged commit 3cf3702 into kubernetes:master Aug 30, 2023
14 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.29 milestone Aug 30, 2023
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. area/kubeadm cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. 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

6 participants