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

[reissue] kubeadm: Split out ClusterConfiguration from InitConfiguration #67441

Merged
merged 2 commits into from
Aug 22, 2018

Conversation

rosti
Copy link
Contributor

@rosti rosti commented Aug 15, 2018

As @luxas is not able to take care of #66219, I am reissuing the same change here. There are a few minor things added by me:

  • The original PR is rebased on latest master.
  • Some broken tests were fixed.
  • Some TODOs were added.
  • Run update-bazel and update-gofmt

Below is the text of the original PR by Lucas.


What this PR does / why we need it:

Splits MasterConfiguration to InitConfiguration and ClusterConfiguration as outlined in the kubeadm Config KEP. InitConfiguration holds init-only information, and ClusterConfiguration holds cluster-wide information. In the internal representation InitConfiguration wraps ClusterConfiguration as a field, but in serialized format they're different YAML documents.

Which issue(s) this PR fixes (optional, in fixes #(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
ref: kubernetes/kubeadm#911
Depends on:

Special notes for your reviewer:

Release note:

kubeadm: InitConfiguration now consists of two structs: InitConfiguration and ClusterConfiguration

@kubernetes/sig-cluster-lifecycle-pr-reviews

@k8s-ci-robot k8s-ci-robot added sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Aug 15, 2018
@k8s-ci-robot k8s-ci-robot added area/kubeadm release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Aug 15, 2018
@rosti
Copy link
Contributor Author

rosti commented Aug 15, 2018

/assign @timothysc @fabriziopandini

@rosti
Copy link
Contributor Author

rosti commented Aug 15, 2018

/assign @luxas

@neolit123
Copy link
Member

neolit123 commented Aug 15, 2018

thanks for doing this PR!
edit: we should probably close the original.

it needs a:

./hack/update-gofmt.sh
./hack/update-bazel.sh

but other than that i think we should merge ASAP and apply changes on top if needed.

Copy link
Member

@fabriziopandini fabriziopandini left a comment

Choose a reason for hiding this comment

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

@rosti +100 for jumping in and helping on @luxas work!

/approve

Being this so big, I kindly ask @timothysc or @liztio (or *) to give a second pass + final lgtm

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 17, 2018
@chuckha
Copy link
Contributor

chuckha commented Aug 17, 2018

this code looks good to me. I'd rather get this merged ASAP as @neolit123 points out and fix anything that breaks before the release

Copy link
Member

@timothysc timothysc left a comment

Choose a reason for hiding this comment

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

What's with all the TODOs? are we going to follow on or address here?

@fabriziopandini - I've been out for too long so I've lost state.

@@ -16,7 +16,12 @@ limitations under the License.

package fuzzer

import (
// TODO: Fuzzing rouudtrip tests are currently disabled in the v1.12 cycle due to the
// v1alpha2 -> v1alpha3 migration. As the ComponentConfigs were embedded in the structs
Copy link
Member

Choose a reason for hiding this comment

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

Can you open an issue here?

API: kubeadmapiv1alpha3.API{AdvertiseAddress: "1.2.3.4"},
BootstrapTokens: []kubeadmapiv1alpha3.BootstrapToken{sillyToken},
KubernetesVersion: fmt.Sprintf("v1.%d.0", constants.MinimumControlPlaneVersion.Minor()+1),
// TODO: Probably move to getDefaultedClusterConfig?
Copy link
Member

Choose a reason for hiding this comment

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

?

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 think, this one was a comment in the old PR. We decided to mark all unaddressed comments in the original PR as TODOs in the new one.

@fabriziopandini
Copy link
Member

fabriziopandini commented Aug 21, 2018

@timothysc this PR is already too big + it blocking other changes, so better to follow up on TODOs with separated PRs.
@rosti already created two of them, but IMO it is better to focus on completing users facing changes now while tackling TODOs only afterwards

@timothysc
Copy link
Member

@rosti - needs a rebase

/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 21, 2018
Trivial rebasement, fixed some broken tests,
and inserted some TODOs: Rostislav M. Georgiev <rostislavg@vmware.com>
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 22, 2018
@rosti
Copy link
Contributor Author

rosti commented Aug 22, 2018

Rebased the PR.

@fabriziopandini
Copy link
Member

/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 22, 2018
@k8s-github-robot
Copy link

/test all [submit-queue is verifying that this PR is safe to merge]

@timothysc
Copy link
Member

/lgtm

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fabriziopandini, rosti, timothysc

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-github-robot
Copy link

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-github-robot k8s-github-robot merged commit 51605c3 into kubernetes:master Aug 22, 2018
hh pushed a commit to ii/kubernetes that referenced this pull request Aug 24, 2018
…images

Automatic merge from submit-queue (batch tested with PRs 67776, 67503, 67679, 67786, 67830). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

 kubeadm: use ClusterConfiguration in images.go

**What this PR does / why we need it**:

This PR is the first in a series, targeting the replacement of InitConfiguration with ClusterConfiguration, when the former is not needed. Please, review only the last commit.

Replace the unnecessary use of InitConfiguration in images.go with ClusterConfiguration. This changes the interfaces of the following functions:

- GetKubeControlPlaneImage
- GetEtcdImage
- GetAllImages

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
refs kubernetes/kubeadm#963

**Special notes for your reviewer**:

/cc @kubernetes/sig-cluster-lifecycle-pr-reviews
/area kubeadm
/kind enhancement
/assign @luxas
/assign @timothysc
/assign @fabriziopandini

Depends on:
- [X] kubernetes#67441

**Release note**:

```release-note
NONE
```
@rosti rosti deleted the kubeadm_clusterconfig branch November 22, 2018 15:27
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. 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. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants