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

Bump k8s.io/kubernetes@v1.20.0 #151

Merged

Conversation

nicolehanjing
Copy link
Member

@nicolehanjing nicolehanjing commented Nov 2, 2020

What type of PR is this?
/kind cleanup

What this PR does / why we need it:
Pull in the latest v1.20.0 tagged release to get any bug fixes/improvements.
Reference: https://github.com/kubernetes/cloud-provider/blob/master/sample/basic_main.go

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:
There is a lot of changes there for v1.20 so pull in the latest branch of k8s.io/kubernetes and compile to make sure everything works
This PR will not merge until there is an official v1.20 branch

Does this PR introduce a user-facing change?:

Bump k8s.io/kubernetes@v1.20.0

@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/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. 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 Nov 2, 2020
@nicolehanjing
Copy link
Member Author

/cc @andrewsykim

@andrewsykim
Copy link
Member

cc @cici37 @cheftako

(testing recent refactors in CCM here)

"k8s.io/component-base/cli/globalflag"
"k8s.io/component-base/logs"
_ "k8s.io/component-base/metrics/prometheus/clientgo" // for client metric registration
_ "k8s.io/component-base/metrics/prometheus/version" // for version metric registration
"k8s.io/klog"
"k8s.io/kubernetes/cmd/cloud-controller-manager/app"
"k8s.io/kubernetes/cmd/cloud-controller-manager/app/options"
"k8s.io/kubernetes/pkg/features" // add the kubernetes feature gates
Copy link
Member

Choose a reason for hiding this comment

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

@cici37 what's the recommended package to use feature gates now?

Copy link

Choose a reason for hiding this comment

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

The cloud related feature gates: "k8s.io/controller-manager/pkg/features/register"

Copy link
Member Author

Choose a reason for hiding this comment

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

"k8s.io/controller-manager/pkg/features/register" does not contain IPv6DualStack feature that we used here, will we add IPv6DualStack in it in the future? Or we keep using "k8s.io/kubernetes/pkg/features"?

Copy link

Choose a reason for hiding this comment

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

IPv6DualStack is used as an local copy in CCM now : https://github.com/kubernetes/kubernetes/blob/d9b7e64b6115dbfc83b844a13a4d1d7a8861a293/staging/src/k8s.io/cloud-provider/app/core.go#L44

Copy link
Member

Choose a reason for hiding this comment

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

The goal should be to use k8s.io/controller-manager/pkg/features/register. If we find anything missing we would move it to an appropriate public place. Fundamentally we should have gotten rid of all "k8s.io/kubernetes/*" imports. In this case I believe Cici has the answer.

go.mod Outdated
k8s.io/klog v1.0.0
k8s.io/klog/v2 v2.2.0
k8s.io/kubernetes v0.0.0-20201023141757-9e8ad8ce9d8a
k8s.io/kubernetes v1.20.0-beta.0.0.20201030204851-4b65f7065284
Copy link
Member

Choose a reason for hiding this comment

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

Hope we can remove this line.

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 6, 2020
Copy link
Member

@andrewsykim andrewsykim 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 bump this to use v1.20.0-beta.2 please?

go.mod Outdated
k8s.io/klog v1.0.0
k8s.io/klog/v2 v2.2.0
k8s.io/kubernetes v0.0.0-20201023141757-9e8ad8ce9d8a
k8s.io/kubernetes v1.20.0-beta.0.0.20201030204851-4b65f7065284
Copy link
Member

Choose a reason for hiding this comment

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

Can we try this again with the latest commit of v1.20.0-beta.2? I think kubernetes/kubernetes#96385 needs to be included for things to work as expected.

Copy link
Member Author

Choose a reason for hiding this comment

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

sure, will update!

@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 20, 2020
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Nov 20, 2020
@nicolehanjing nicolehanjing force-pushed the nicoleh-update-k8s-version branch 2 times, most recently from da0e0ab to 1242132 Compare November 20, 2020 23:28
globalflag.AddGlobalFlags(namedFlagSets.FlagSet("global"), command.Name())

for _, f := range namedFlagSets.FlagSets {
fs.AddFlagSet(f)
}
usageFmt := "Usage:\n %s\n"
cols, _, _ := term.TerminalSize(command.OutOrStdout())
command.SetUsageFunc(func(cmd *cobra.Command) error {
Copy link
Member Author

Choose a reason for hiding this comment

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

@andrewsykim I referred to https://github.com/kubernetes/cloud-provider/blob/master/sample/basic_main.go but I'm not sure if we need this for now 🤔

@nicolehanjing nicolehanjing force-pushed the nicoleh-update-k8s-version branch 2 times, most recently from 92fddb3 to e83a4c4 Compare November 21, 2020 00:14

"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/apimachinery/pkg/util/wait"
utilfeature "k8s.io/apiserver/pkg/util/feature"
"k8s.io/cloud-provider/app"
Copy link
Member

Choose a reason for hiding this comment

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

Great to see the k8s.io/kubernetes dependencies broken 👍

go.mod Outdated
k8s.io/klog/v2 v2.2.0
k8s.io/kubernetes v0.0.0-20201023141757-9e8ad8ce9d8a
k8s.io/klog/v2 v2.4.0
k8s.io/kubernetes v1.20.0-beta.2.0.20201120053651-7d72ddca6e9a
Copy link
Member

Choose a reason for hiding this comment

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

Are we only having this because you're pulling in k8s.io/kubernetes/staging ? Seems like we could fix that by using the public versions of the staging repo. Thats would allow you to add a rule preventing any attempt to depend on K8s.io private APIs.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah agreed, I think we can remove this module by bumping all the other k8s.io/* modules to v0.20.0-beta.2 (e.g. https://github.com/kubernetes/cloud-provider/releases/tag/v0.20.0-beta.2)

@nicolehanjing nicolehanjing force-pushed the nicoleh-update-k8s-version branch 2 times, most recently from 238d94e to b6c5f1e Compare November 25, 2020 08:06
Copy link
Member

@andrewsykim andrewsykim left a comment

Choose a reason for hiding this comment

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

@cici37 can you help review some of the changes here and make sure it's aligned with what is expected for v1.20?

/assign @cici37

k8s.io/klog v1.0.0
k8s.io/klog/v2 v2.2.0
k8s.io/kubernetes v0.0.0-20201023141757-9e8ad8ce9d8a
Copy link
Member

Choose a reason for hiding this comment

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

Nice 💯


c, err := s.Config(KnownControllers(), ControllersDisabledByDefault.List())
c, err := s.Config(KnownControllers(), app.ControllersDisabledByDefault.List())
Copy link
Member Author

Choose a reason for hiding this comment

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

@cici37 most of the change here is referring to sample main, can you help to review it and see if it is expected? Thanks!

Copy link

Choose a reason for hiding this comment

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

Looks good to me :)

@ayberk ayberk mentioned this pull request Dec 2, 2020
@nckturner nckturner mentioned this pull request Dec 3, 2020
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 10, 2020
@nicolehanjing nicolehanjing changed the title [WIP] Bump k8s.io/kubernetes@v1.20.0 Bump k8s.io/kubernetes@v1.20.0 Dec 10, 2020
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 10, 2020
github.com/spf13/cobra v1.1.1
github.com/stretchr/testify v1.6.1
k8s.io/api v0.20.0
k8s.io/apimachinery v0.20.0
Copy link
Member Author

Choose a reason for hiding this comment

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

@andrewsykim updated the dependencies, PTAL :)

go.mod Outdated Show resolved Hide resolved
@nckturner
Copy link
Contributor

This is great @nicolehanjing, 1.20 here we come 🚀
/lgtm
/approve

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nckturner, nicolehanjing

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 Dec 11, 2020
@k8s-ci-robot k8s-ci-robot merged commit cef7ce7 into kubernetes:master Dec 11, 2020
if err != nil {
fmt.Fprintf(os.Stderr, "%v\n", err)
os.Exit(1)
}

if err := app.Run(c.Complete(), wait.NeverStop); err != nil {
// initialize cloud provider with the cloud provider name and config file provided
cloud, err := cloudprovider.InitCloudProvider(cloudProvider, "")
Copy link
Member

Choose a reason for hiding this comment

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

@nicolehanjing can you open a follow-up PR to pass the value from --cloud-config here? I think we need that for reading the clusterName value from the config eventually.

Copy link
Member Author

Choose a reason for hiding this comment

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

gotcha, will update!

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/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. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants