Commit Graph

89 Commits

Author SHA1 Message Date
Ole Markus With 11e68308d1 Disable CNP status updates by default 2021-10-20 14:01:48 +02:00
dntosas 7296597a17
[cilium] Add support for bpf-lb-sock-hostns-only field
This is a needed configuration option for users that want to combine
Cilium alongside with a ServiceMesh. Cilium by default will LB requests
at CNI layer meaning that the Sidecars of ServiceMesh Proxy are not able
to apply LB by themselves thus loosing the capability of applying their
features for traffic management.

Ref issue: https://github.com/istio/istio/issues/35531

Signed-off-by: dntosas <ntosas@gmail.com>
2021-10-12 08:33:57 +03:00
Nicolas Sterchele 103a98d060 Add Cilium agent pod annotations support to improve personalization
Annotations is pretty useful when you need third-party tool to add additional behavior
for a k8s resource.
Lots of auto-discovery tools are based on this annotations.
2021-10-04 15:49:51 +02:00
Ole Markus With 39178703c8 Mount cgroupv2 for cilium at a custom location 2021-09-27 19:29:36 +02:00
Kubernetes Prow Robot ef22270b3f
Merge pull request #12394 from ReillyBrogan/reilly/ciliumBidirectionalMount
Add bidirectional BPF mount for Cilium >= 1.9.10 or >= 1.10.4
2021-09-25 09:42:21 -07:00
Anthony Hausman 5e814f465d
Add support to configure Cilium CNI chaining
CNI chaining allows to use Cilium in combination with other CNI plugins.

With Cilium CNI chaining, the base network connectivity and IP address management is managed by the non-Cilium CNI plugin, but Cilium attaches eBPF programs to the network devices created by the non-Cilium plugin to provide L3/L4 network visibility, policy enforcement and other advanced features.

https://docs.cilium.io/en/v1.9/gettingstarted/cni-chaining/#cni-chaining

In our case, to be able to use the `HostPort` feature in our cluster, we need to enable the `portmap` plugin.
2021-09-24 10:39:22 +02:00
Reilly Brogan bce435da1c Add bidirectional BPF mount for Cilium >= 1.9.10 or >= 1.10.4
- Cilium versions 1.10.4 and 1.9.10 now auto-mount the bpf file-system automatically
- Also remove redundant capabilities (these are already automatically granted by virtue of this being a privileged container)
2021-09-23 13:01:58 -05:00
Ole Markus With 1c53e37491 Disable masquerade means disable masquerade if ipv6 too 2021-09-04 08:54:16 +02:00
dntosas 0e8d189aee [cilium] Add support for encryption via WireGuard
In this commit, we enable users to choose WireGuard as their prefered
encryption type, leveraging this new feature from Cilium.

Ref: https://cilium.io/blog/2021/05/20/cilium-110#wireguard

Signed-off-by: dntosas <ntosas@gmail.com>
2021-08-16 14:08:59 +02:00
Ole Markus With 133eb1f7ba Bump cilium to 1.10.3 2021-08-12 21:12:25 +02:00
Ole Markus With 97a41c66f4 Enable k8s event handover when kvstore is used 2021-07-09 15:46:43 +02:00
dntosas 7bf65ff7ef
[cni/cilium] Add support for additional config options
In this commit, we enable users define their setup with following
additional fields:

- DisableEndpointCRD
- EnableEndpointHealthChecking
- IdentityAllocationMode
- IdentityChangeGracePeriod
- BPFLBAlgorithm
- BPFLBMaglevTableSize
- BPFNATGlobalMax
- BPFNeighGlobalMax
- BPFPolicyMapMax
- EnableBPFMasquerade
- EnableL7Proxy

Added also validation tests to prevent conflicting value combinations to
reach actual cluster state.

Signed-off-by: dntosas <ntosas@gmail.com>
Co-authored-by: hwoarang <markos@chandras.me>
Signed-off-by: dntosas <ntosas@gmail.com>
2021-06-16 09:35:42 +03:00
Kubernetes Prow Robot 0347d79a14
Merge pull request #11754 from johngmyers/ipv6-cilium
Enable IPv6 support for Cilium
2021-06-14 07:27:04 -07:00
John Gardiner Myers 3cf8234d01 Cilium: disable masquerade by default when in ENI IPAM mode 2021-06-13 21:36:56 -07:00
John Gardiner Myers c0b54d980d Enable IPv6 support for Cilium 2021-06-13 20:47:44 -07:00
Ole Markus With c162013a3c Use quay images for cilium 2021-06-08 23:01:08 +02:00
Kubernetes Prow Robot c28783c581
Merge pull request #11514 from ulfox/cilium/prometheus-scrape-annotations
[addons/networking.cilium.io] enable prometheus scraping
2021-05-19 10:12:51 -07:00
Christos Kotsis 34ac1ad8d4
[feedback/tests] 2021-05-19 09:59:16 +03:00
Ole Markus With 22f3a4aff8 Add default tags to LB controller and cilium eni resources 2021-05-18 19:02:40 +02:00
Christos Kotsis bb98caeed3
[tests/feedback] fix missing quote function with printf 2021-05-18 19:42:50 +03:00
Christos Kotsis 2ba0843c91
Update upup/models/cloudup/resources/addons/networking.cilium.io/k8s-1.16-v1.10.yaml.template
Co-authored-by: John Gardiner Myers <jgmyers@proofpoint.com>
2021-05-18 19:14:15 +03:00
Christos Kotsis 793115242a
Update upup/models/cloudup/resources/addons/networking.cilium.io/k8s-1.12-v1.9.yaml.template
Co-authored-by: John Gardiner Myers <jgmyers@proofpoint.com>
2021-05-18 19:14:09 +03:00
Christos Kotsis 08162bcc2e
Update upup/models/cloudup/resources/addons/networking.cilium.io/k8s-1.12-v1.8.yaml.template
Co-authored-by: John Gardiner Myers <jgmyers@proofpoint.com>
2021-05-18 19:13:59 +03:00
Christos Kotsis 5ac4569998
[addons/networking.cilium.io] enable prometheus scraping
When EnablePromethesMetrics is enabled the
required metrics endpoints are exposed but
no annotations is included in the agents.

This commit includes the prometheus.io/scrape
and prometheus.io/port annotations that
prometheus scrappers can use for auto-discovery

Co-authored-by: tchatzig <t.chatzigeorgiou@thebeat.co>
2021-05-18 16:59:56 +03:00
John Gardiner Myers d3469d6ec2 Remove code for no-longer-supported k8s versions 2021-05-07 23:40:03 -07:00
Ole Markus With 2c95c2fe50 Don't try to mount hubble TLS on the agent if we don't use hubble 2021-05-04 11:26:20 +02:00
Ole Markus With aadcd9d448 Add more support for cilium 1.10 2021-05-03 16:10:56 +02:00
Ole Markus With 7c0be997e1 Expose hubble agent when hubble is enabled
Also enables PKI for the addon
2021-04-30 17:52:19 +02:00
bjhaid af1189befd Add `enable-host-reachable-services` to 1.8 and generic cilium.
This completes #11333. I missed these updating these other template
files when I submitted #11333.
2021-04-27 13:57:38 -05:00
bjhaid 88ed9f68bd Add support for configuring Cilium enable-host-reachable-services.
After upgrading Cilium to 1.8 via kops one of our clusters had a total
outage due to cilium reporting errors as below:

```
level=error msg="endpoint regeneration failed" containerID= datapathPolicyRevision=0 desiredPolicyRevision=1 endpointID=592 error="Failed to load tc filter: exit status 1" identity=40147 ipv4= ipv6= k8sPodName=/ subsys=endpoint
```

upon searching Cilium slack we found the below thread:

https://cilium.slack.com/archives/C1MATJ5U5/p1616400216167600

which recommended setting `enable-host-reachable-services` to true will
address the problems. We set the field and it fixed our issues too,
however we observed that kops does not have a means to configure this
hence this PR.

We will like to have this backported after it has been merged.
2021-04-27 12:49:27 -05:00
Ole Markus With 8f1f2446c3 Use the full operator instead of the generic one 2021-04-24 18:01:36 +02:00
Javi Polo 685e856d66 Fix cilium template scoping typo
Fixes https://github.com/kubernetes/kops/issues/11269
2021-04-20 17:44:22 +02:00
dntosas 55524935d7
[cilium] Add support for choosing resources
Cilium as a CNI is a critical component for the cluster so it would be safe
to have some guaranteed resources as well as allowing the users to
define them based on their needs.

In this commit, we init default requested resources and add the
capability of user-defined values.

Signed-off-by: dntosas <ntosas@gmail.com>
2021-04-19 11:30:02 +03:00
Ciprian Hacman b44065c692 Remove manually added labels from addons 2021-03-06 09:31:22 +02:00
Ole Markus With 7d915e60cd Add explicit RBAC permissions for finalizers subresources 2021-03-02 09:10:15 +01:00
Ole Markus With 07eb88145f Remove unset config options 2021-02-07 08:03:07 +01:00
Ole Markus With a6dce2e820 Add support for cilium 1.9
Apply suggestions from code review

Co-authored-by: Ciprian Hacman <ciprianhacman@gmail.com>
2021-02-07 08:00:54 +01:00
Ole Markus With 2659a30280 Make get instances respect needs-update annotation
Make it possible for addons to set needs-update annotation

Use onDelete update strategy for cilium and set needs-update annotation

Rename node roles
2020-11-16 08:26:17 +01:00
John Gardiner Myers 2ac17bee69 Remove code for no-longer-supported k8s releases 2020-10-29 16:45:53 -07:00
AkiraFukushima 541dd7ee14 Fix cilium template by specifying boolean as a string for enable-metrics 2020-10-24 21:03:06 +09:00
Kubernetes Prow Robot 13cbd84886
Merge pull request #9967 from olemarkus/cilium-hubble-pointer
Cilium hubble pointer
2020-09-30 12:36:54 -07:00
Alexander Block 1bd219f790 Add missing permissions for cilium-operator
These became required a few cilium versions ago.
2020-09-22 16:19:07 +02:00
Ole Markus With b9111c78e7 Make hubbleSpec into a pointer 2020-09-18 09:23:52 +02:00
Ole Markus With 263172caac Use new templates for cilium 1.8 2020-07-03 07:56:35 +02:00
Ole Markus With 51235b2edc Deploy cilium etcd credentials if the cilium cluster exists 2020-06-27 07:11:19 +02:00
Ole Markus With e09365b6c2 Validate cilium version 2020-06-11 07:38:14 +02:00
Ole Markus With 39751cfe63 Set cilium defaults in code 2020-06-11 07:38:13 +02:00
Kubernetes Prow Robot c6dcaa8199
Merge pull request #9154 from MoShitrit/issue-9031
Add support for encryption in Cilium
2020-06-04 03:11:15 -07:00
Ole Markus With 972d7a3509 Don't make it possible to toggle ipv4/6. We only support ipv4 anyway 2020-06-03 06:58:13 +02:00
MoShitrit 316a0e2b00 Adding encryption support for Cilium
Adding support for 'secret-name' flag

Adding instructions to enable encryption

Updating docs for cli

Addressing comments

Adding ciliumpassword subcommand to 'kops create secret'

Updating command to generate ciliumpassword secret
2020-05-25 01:54:24 -04:00