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: Make the kubeadm config kinds mutually exclusive #65952

Merged

Conversation

@luxas
Copy link
Member

luxas commented Jul 8, 2018

What this PR does / why we need it:
Right now it would be possible to feed kubeadm with a YAML document with all the four different Config kinds kubeadm at HEAD supports, MasterConfiguration, InitConfiguration, JoinConfiguration and NodeConfiguration. This PR makes them mutually exclusive so that kubeadm can know how to handle the config file properly.

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

Special notes for your reviewer:
Please only review the last commit

Release note:

NONE

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

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Jul 14, 2018

@luxas: PR needs rebase.

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.

@fabriziopandini fabriziopandini force-pushed the luxas:kubeadm_init_join_exclusive branch from d229b83 to 75d9481 Jul 15, 2018

@k8s-ci-robot k8s-ci-robot added size/M and removed size/XXL labels Jul 15, 2018

@fabriziopandini fabriziopandini force-pushed the luxas:kubeadm_init_join_exclusive branch from 75d9481 to 728b30b Jul 15, 2018

@fabriziopandini

This comment has been minimized.

Copy link
Contributor

fabriziopandini commented Jul 15, 2018

/retest

@luxas

This comment has been minimized.

Copy link
Member Author

luxas commented Jul 15, 2018

The bot seem to not have noticed the rebase, removing the label manually

@luxas luxas removed the needs-rebase label Jul 15, 2018

@luxas

This comment has been minimized.

Copy link
Member Author

luxas commented Jul 15, 2018

@timothysc please LGTM this when you're ready

knownKinds[gvk.Kind] = true
}
// InitConfiguration, MasterConfiguration and NodeConfiguration are mutually exclusive, error if more than one are specified
mutuallyExclusive := []string{constants.InitConfigurationKind, constants.MasterConfigurationKind, constants.JoinConfigurationKind, constants.NodeConfigurationKind}

This comment has been minimized.

Copy link
@timothysc

timothysc Jul 16, 2018

Member

Can't we make this more restrictive based on version? e.g. for 1.12 they can only call is join, etc.

/approve

This comment has been minimized.

Copy link
@timothysc

timothysc Jul 16, 2018

Member

I don't feel very strong about this so self-apply lgtm is ok imo.

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Jul 16, 2018

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: luxas, 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

@luxas

This comment has been minimized.

Copy link
Member Author

luxas commented Jul 16, 2018

Adding the LGTM based on #65952 (comment)

self-apply lgtm is ok imo.

@luxas luxas added the lgtm label Jul 16, 2018

@k8s-github-robot

This comment has been minimized.

Copy link
Contributor

k8s-github-robot commented Jul 16, 2018

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

@fejta-bot

This comment has been minimized.

Copy link

fejta-bot commented Jul 16, 2018

/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 comment for consistent failures.

@k8s-github-robot

This comment has been minimized.

Copy link
Contributor

k8s-github-robot commented Jul 17, 2018

Automatic merge from submit-queue (batch tested with PRs 63877, 64559, 65952). If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-github-robot k8s-github-robot merged commit 0e097af into kubernetes:master Jul 17, 2018

17 checks passed

Submit Queue Queued to run github e2e tests a second time.
Details
cla/linuxfoundation luxas authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-cross Skipped
pull-kubernetes-e2e-gce Job succeeded.
Details
pull-kubernetes-e2e-gce-100-performance Job succeeded.
Details
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-e2e-gke Skipped
pull-kubernetes-e2e-kops-aws Job succeeded.
Details
pull-kubernetes-integration Job succeeded.
Details
pull-kubernetes-kubemark-e2e-gce-big Job succeeded.
Details
pull-kubernetes-local-e2e Skipped
pull-kubernetes-local-e2e-containerized Skipped
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-typecheck Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details

k8s-github-robot pushed a commit that referenced this pull request Aug 22, 2018

Kubernetes Submit Queue
Merge pull request #67441 from rosti/kubeadm_clusterconfig
Automatic merge from submit-queue. 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>.

[reissue] kubeadm: Split out ClusterConfiguration from InitConfiguration

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 #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
ref: kubernetes/kubeadm#911
Depends on:

- [X] #65776
- [X] #65628
- [X] #65629
- [X] #65631
- [X] #65940
- [X] #65787
- [X] #65945
- [X] #65951
- [X] #65952

**Special notes for your reviewer:**

**Release note**:
```release-note
kubeadm: InitConfiguration now consists of two structs: InitConfiguration and ClusterConfiguration
```

@kubernetes/sig-cluster-lifecycle-pr-reviews
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.