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

Add support for Cilium CNI #1560

Merged
merged 18 commits into from
Oct 12, 2021
Merged

Add support for Cilium CNI #1560

merged 18 commits into from
Oct 12, 2021

Conversation

mate4st
Copy link
Contributor

@mate4st mate4st commented Oct 4, 2021

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #462

Special notes for your reviewer:
Support for hubble and kube-proxy free deployments

Does this PR introduce a user-facing change?:

Support Cilium CNI

@kubermatic-bot kubermatic-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Oct 4, 2021
Copy link
Member

@xmudrii xmudrii left a comment

Choose a reason for hiding this comment

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

Overall looks great to me, but I have a couple of comments.

pkg/apis/kubeone/types.go Outdated Show resolved Hide resolved
pkg/apis/kubeone/types.go Outdated Show resolved Hide resolved
pkg/apis/kubeone/types.go Outdated Show resolved Hide resolved
pkg/scripts/kubeadm.go Outdated Show resolved Hide resolved
@@ -90,7 +90,7 @@ variable "control_plane_volume_size" {
}

variable "control_plane_image_family" {
default = "ubuntu-1804-lts"
default = "ubuntu-2004-lts"
Copy link
Member

Choose a reason for hiding this comment

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

This is a breaking change because it might cause all instances to be recreated for those who don't bind the image in terraform.tfvars. If this is required, I suggest putting a warning in the release note.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay i put this into another PR than.

Copy link
Member

Choose a reason for hiding this comment

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

It's okay to leave the change in this PR, just make sure the release note reflects the change.

@xmudrii
Copy link
Member

xmudrii commented Oct 5, 2021

/retitle Add support for Cilium CNI

@kubermatic-bot kubermatic-bot changed the title Cilium Add support for Cilium CNI Oct 5, 2021
@xmudrii
Copy link
Member

xmudrii commented Oct 8, 2021

/test pull-kubeone-test

1 similar comment
@xmudrii
Copy link
Member

xmudrii commented Oct 8, 2021

/test pull-kubeone-test

pkg/apis/kubeone/types.go Outdated Show resolved Hide resolved
pkg/apis/kubeone/types.go Outdated Show resolved Hide resolved
pkg/apis/kubeone/v1beta1/types.go Outdated Show resolved Hide resolved
pkg/apis/kubeone/types.go Outdated Show resolved Hide resolved
Comment on lines +555 to +557
# # kubeProxyReplacement defines weather cilium relies on underlying Kernel support to replace kube-proxy functionality by eBPF (strict),
# # or disables a subset of those features so cilium does not bail out if the kernel support is missing (disabled).
# kubeProxyReplacement: "disabled"
Copy link
Member

Choose a reason for hiding this comment

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

I prefer splitting long comments to 80 or 120 characters.

Suggested change
# # kubeProxyReplacement defines weather cilium relies on underlying Kernel support to replace kube-proxy functionality by eBPF (strict),
# # or disables a subset of those features so cilium does not bail out if the kernel support is missing (disabled).
# kubeProxyReplacement: "disabled"
# # kubeProxyReplacement defines weather cilium relies on underlying Kernel support
# # to replace kube-proxy functionality by eBPF (strict), or disables a subset of those
# # features so cilium does not bail out if the kernel support is missing (disabled).
# kubeProxyReplacement: "disabled"

pkg/tasks/controlplane.go Outdated Show resolved Hide resolved
// validated cilium kube-proxy replacement
if c.CNI.Cilium != nil && c.CNI.Cilium.KubeProxyReplacement != kubeone.KubeProxyReplacementDisabled && (c.KubeProxy == nil || !c.KubeProxy.SkipInstallation) {
allErrs = append(allErrs, field.Invalid(fldPath.Child("cni"), c.CNI.Cilium.KubeProxyReplacement, ".cilium.kubeProxyReplacement cannot be set with kube-proxy enabled"))
}
}
if c.KubeProxy != nil {
Copy link
Member

Choose a reason for hiding this comment

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

Does it make sense to add a rule that if kube-proxy installation is skipped, you can't have .kubeProxy.iptables or .kubeProxy.ipvs defined because those settings are no-op in that case?

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 its okay not to validate it, maybe a warning would be good.

Copy link
Member

Choose a reason for hiding this comment

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

Let's leave it as it is right now and eventually revisit it later.

Copy link
Member

@xmudrii xmudrii left a comment

Choose a reason for hiding this comment

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

Great job, @weirdmachine! 🎉 💯

/lgtm
/approve

@kubermatic-bot kubermatic-bot added the lgtm Indicates that a PR is ready to be merged. label Oct 12, 2021
@kubermatic-bot
Copy link
Contributor

LGTM label has been added.

Git tree hash: ee94d1c29a3d7c61bdf492ba4910b68f0fd86c79

@kubermatic-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: WeirdMachine, xmudrii

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:
  • OWNERS [WeirdMachine,xmudrii]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubermatic-bot kubermatic-bot merged commit 427c4d8 into kubermatic:master Oct 12, 2021
@kubermatic-bot kubermatic-bot added this to the KubeOne 1.4 milestone Oct 12, 2021
@mate4st mate4st deleted the cilium branch October 21, 2022 21:38
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. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. lgtm 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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Cilium as a Overlay Network
3 participants