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

Eliminate half-baked multi-architecture support #35124

Merged
merged 1 commit into from
Oct 21, 2016

Conversation

errordeveloper
Copy link
Member

@errordeveloper errordeveloper commented Oct 19, 2016

What this PR does / why we need it:

We have release kubeadm with half-baked support for clusters with nodes of different CPU architectures. The problem with the code as it stand is that user will notice pending daemonsets of kube-proxy for machines with architectures that they don't have. At the same time, the code as it stand did not pick up correct images for architectures it wanted to allow. Additionally, it only treated kube-proxy in such a way, but didn't do anything about kube-dns. This removes multiple daemonesets, but ensures that whichever resources we deploy have node affinity set to the architecture native to the master. Users wishing to use mixed architectures can still create extra daemonsets via the API.

Which issue this PR fixes: fixes #33916

Release note:

Remove support for multi-architecture code in `kubeadm`, which was released untested.

This change is Reviewable

@k8s-github-robot k8s-github-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. release-note-label-needed labels Oct 19, 2016
@pires
Copy link
Contributor

pires commented Oct 19, 2016

@luxas you're the ARM ninja around, care to test?

@k8s-ci-robot
Copy link
Contributor

Jenkins GCI GKE smoke e2e failed for commit 4e121e6. Full PR test history.

The magic incantation to run this job again is @k8s-bot gci gke e2e test this. Please help us cut down flakes by linking to an open flake issue when you hit one in your PR.

@jbeda jbeda added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-label-needed labels Oct 19, 2016
Copy link
Contributor

@jbeda jbeda left a comment

Choose a reason for hiding this comment

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

Looks reasonable to me with some small nits. Would love to get @luxas's take.

}
}

func MonoArchitectureNodeAffinity() api.NodeSelectorRequirement {
Copy link
Contributor

Choose a reason for hiding this comment

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

The term "Mono" here makes me think of Mono and windows and such. Perhaps just "ArchitectureNodeAffinity"? If we add multi-arch support in the future we can rename/rework this.

Copy link
Member Author

Choose a reason for hiding this comment

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

Haha, happy to rename. What about NativeArchitectureNodeAffinity()?

Copy link
Contributor

Choose a reason for hiding this comment

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

NativeArchitectureNodeAffinity SGTM

@@ -206,14 +207,10 @@ func SetMasterTaintTolerations(meta *api.ObjectMeta) {
meta.Annotations[api.TolerationsAnnotationKey] = string(tolerationsAnnotation)
}

func SetMasterNodeAffinity(meta *api.ObjectMeta) {
func SetNodeAffinity(meta *api.ObjectMeta, expr ...api.NodeSelectorRequirement) {
Copy link
Contributor

Choose a reason for hiding this comment

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

We don't have documentation on public functions here and we should probably start. Can you start documenting some of this stuff as you touch it?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ack.

@@ -223,6 +220,18 @@ func SetMasterNodeAffinity(meta *api.ObjectMeta) {
meta.Annotations[api.AffinityAnnotationKey] = string(affinityAnnotation)
}

func MasterNodeAffinity() api.NodeSelectorRequirement {
Copy link
Contributor

Choose a reason for hiding this comment

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

Doc?

}
}

func MonoArchitectureNodeAffinity() api.NodeSelectorRequirement {
Copy link
Contributor

Choose a reason for hiding this comment

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

Doc?

@errordeveloper
Copy link
Member Author

@jbeda I've addressed your comments and rebased.

@jbeda
Copy link
Contributor

jbeda commented Oct 21, 2016

Thanks! LGTM

@jbeda jbeda added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 21, 2016
@k8s-github-robot
Copy link

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

1 similar comment
@k8s-github-robot
Copy link

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@k8s-github-robot
Copy link

Automatic merge from submit-queue

@k8s-github-robot k8s-github-robot merged commit 73e89ba into kubernetes:master Oct 21, 2016
@errordeveloper errordeveloper deleted the fix-33916 branch January 9, 2018 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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/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.

kubeadm deploys kube-proxy daemonsets for different architectures, but it doesn't work
6 participants