Update Cilium v1.16 (#277)

The new Cilium already enables our patch
https://github.com/cilium/cilium/pull/32730. It should be better to
update instead of keeping it in-tree

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
This commit is contained in:
Andrei Kvapil
2024-08-12 15:38:40 +02:00
committed by GitHub
parent 40fd96dc3b
commit bbdec9bc84
93 changed files with 8218 additions and 2885 deletions

View File

@@ -10,7 +10,7 @@ update:
rm -rf charts
helm repo add cilium https://helm.cilium.io/
helm repo update cilium
helm pull cilium/cilium --untar --untardir charts --version 1.15
helm pull cilium/cilium --untar --untardir charts --version 1.16
sed -i -e '/Used in iptables/d' -e '/SYS_MODULE/d' charts/cilium/values.yaml
version=$$(awk '$$1 == "version:" {print $$2}' charts/cilium/Chart.yaml) && \
sed -i "s/ARG VERSION=.*/ARG VERSION=v$${version}/" images/cilium/Dockerfile

View File

@@ -79,7 +79,7 @@ annotations:
Pod IP Pool\n description: |\n CiliumPodIPPool defines an IP pool that can
be used for pooled IPAM (i.e. the multi-pool IPAM mode).\n"
apiVersion: v2
appVersion: 1.15.7
appVersion: 1.16.0
description: eBPF-based Networking, Security, and Observability
home: https://cilium.io/
icon: https://cdn.jsdelivr.net/gh/cilium/cilium@main/Documentation/images/logo-solo.svg
@@ -91,8 +91,8 @@ keywords:
- Security
- Observability
- Troubleshooting
kubeVersion: '>= 1.16.0-0'
kubeVersion: '>= 1.21.0-0'
name: cilium
sources:
- https://github.com/cilium/cilium
version: 1.15.7
version: 1.16.0

View File

@@ -1,6 +1,6 @@
# cilium
![Version: 1.15.7](https://img.shields.io/badge/Version-1.15.7-informational?style=flat-square) ![AppVersion: 1.15.7](https://img.shields.io/badge/AppVersion-1.15.7-informational?style=flat-square)
![Version: 1.16.0](https://img.shields.io/badge/Version-1.16.0-informational?style=flat-square) ![AppVersion: 1.16.0](https://img.shields.io/badge/AppVersion-1.16.0-informational?style=flat-square)
Cilium is open source software for providing and transparently securing
network connectivity and loadbalancing between application workloads such as
@@ -18,7 +18,7 @@ efficient and flexible.
## Prerequisites
* Kubernetes: `>= 1.16.0-0`
* Kubernetes: `>= 1.21.0-0`
* Helm: `>= 3.0`
## Getting Started
@@ -53,7 +53,7 @@ contributors across the globe, there is almost always someone available to help.
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| MTU | int | `0` | Configure the underlying network MTU to overwrite auto-detected MTU. |
| MTU | int | `0` | Configure the underlying network MTU to overwrite auto-detected MTU. This value doesn't change the host network interface MTU i.e. eth0 or ens0. It changes the MTU for cilium_net@cilium_host, cilium_host@cilium_net, cilium_vxlan and lxc_health interfaces. |
| affinity | object | `{"podAntiAffinity":{"requiredDuringSchedulingIgnoredDuringExecution":[{"labelSelector":{"matchLabels":{"k8s-app":"cilium"}},"topologyKey":"kubernetes.io/hostname"}]}}` | Affinity for cilium-agent. |
| agent | bool | `true` | Install the cilium agent resources. |
| agentNotReadyTaintKey | string | `"node.cilium.io/agent-not-ready"` | Configure the key of the taint indicating that Cilium is not ready on the node. When set to a value starting with `ignore-taint.cluster-autoscaler.kubernetes.io/`, the Cluster Autoscaler will ignore the taint on its decisions, allowing the cluster to scale up. |
@@ -73,7 +73,7 @@ contributors across the globe, there is almost always someone available to help.
| authentication.mutual.spire.enabled | bool | `false` | Enable SPIRE integration (beta) |
| authentication.mutual.spire.install.agent.affinity | object | `{}` | SPIRE agent affinity configuration |
| authentication.mutual.spire.install.agent.annotations | object | `{}` | SPIRE agent annotations |
| authentication.mutual.spire.install.agent.image | object | `{"digest":"sha256:99405637647968245ff9fe215f8bd2bd0ea9807be9725f8bf19fe1b21471e52b","override":null,"pullPolicy":"IfNotPresent","repository":"ghcr.io/spiffe/spire-agent","tag":"1.8.5","useDigest":true}` | SPIRE agent image |
| authentication.mutual.spire.install.agent.image | object | `{"digest":"sha256:5106ac601272a88684db14daf7f54b9a45f31f77bb16a906bd5e87756ee7b97c","override":null,"pullPolicy":"IfNotPresent","repository":"ghcr.io/spiffe/spire-agent","tag":"1.9.6","useDigest":true}` | SPIRE agent image |
| authentication.mutual.spire.install.agent.labels | object | `{}` | SPIRE agent labels |
| authentication.mutual.spire.install.agent.nodeSelector | object | `{}` | SPIRE agent nodeSelector configuration ref: ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector |
| authentication.mutual.spire.install.agent.podSecurityContext | object | `{}` | Security context to be added to spire agent pods. SecurityContext holds pod-level security attributes and common container settings. ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod |
@@ -93,7 +93,7 @@ contributors across the globe, there is almost always someone available to help.
| authentication.mutual.spire.install.server.dataStorage.enabled | bool | `true` | Enable SPIRE server data storage |
| authentication.mutual.spire.install.server.dataStorage.size | string | `"1Gi"` | Size of the SPIRE server data storage |
| authentication.mutual.spire.install.server.dataStorage.storageClass | string | `nil` | StorageClass of the SPIRE server data storage |
| authentication.mutual.spire.install.server.image | object | `{"digest":"sha256:28269265882048dcf0fed32fe47663cd98613727210b8d1a55618826f9bf5428","override":null,"pullPolicy":"IfNotPresent","repository":"ghcr.io/spiffe/spire-server","tag":"1.8.5","useDigest":true}` | SPIRE server image |
| authentication.mutual.spire.install.server.image | object | `{"digest":"sha256:59a0b92b39773515e25e68a46c40d3b931b9c1860bc445a79ceb45a805cab8b4","override":null,"pullPolicy":"IfNotPresent","repository":"ghcr.io/spiffe/spire-server","tag":"1.9.6","useDigest":true}` | SPIRE server image |
| authentication.mutual.spire.install.server.initContainers | list | `[]` | SPIRE server init containers |
| authentication.mutual.spire.install.server.labels | object | `{}` | SPIRE server labels |
| authentication.mutual.spire.install.server.nodeSelector | object | `{}` | SPIRE server nodeSelector configuration ref: ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector |
@@ -126,6 +126,13 @@ contributors across the globe, there is almost always someone available to help.
| bpf.autoMount.enabled | bool | `true` | Enable automatic mount of BPF filesystem When `autoMount` is enabled, the BPF filesystem is mounted at `bpf.root` path on the underlying host and inside the cilium agent pod. If users disable `autoMount`, it's expected that users have mounted bpffs filesystem at the specified `bpf.root` volume, and then the volume will be mounted inside the cilium agent pod at the same path. |
| bpf.ctAnyMax | int | `262144` | Configure the maximum number of entries for the non-TCP connection tracking table. |
| bpf.ctTcpMax | int | `524288` | Configure the maximum number of entries in the TCP connection tracking table. |
| bpf.datapathMode | string | `veth` | Mode for Pod devices for the core datapath (veth, netkit, netkit-l2, lb-only) |
| bpf.disableExternalIPMitigation | bool | `false` | Disable ExternalIP mitigation (CVE-2020-8554) |
| bpf.enableTCX | bool | `true` | Attach endpoint programs using tcx instead of legacy tc hooks on supported kernels. |
| bpf.events | object | `{"drop":{"enabled":true},"policyVerdict":{"enabled":true},"trace":{"enabled":true}}` | Control events generated by the Cilium datapath exposed to Cilium monitor and Hubble. |
| bpf.events.drop.enabled | bool | `true` | Enable drop events. |
| bpf.events.policyVerdict.enabled | bool | `true` | Enable policy verdict events. |
| bpf.events.trace.enabled | bool | `true` | Enable trace events. |
| bpf.hostLegacyRouting | bool | `false` | Configure whether direct routing mode should route traffic via host stack (true) or directly and more efficiently out of BPF (false) if the kernel supports it. The latter has the implication that it will also bypass netfilter in the host namespace. |
| bpf.lbExternalClusterIP | bool | `false` | Allow cluster external access to ClusterIP services. |
| bpf.lbMapMax | int | `65536` | Configure the maximum number of service entries in the load balancer maps. |
@@ -143,7 +150,7 @@ contributors across the globe, there is almost always someone available to help.
| bpf.tproxy | bool | `false` | Configure the eBPF-based TPROXY to reduce reliance on iptables rules for implementing Layer 7 policy. |
| bpf.vlanBypass | list | `[]` | Configure explicitly allowed VLAN id's for bpf logic bypass. [0] will allow all VLAN id's without any filtering. |
| bpfClockProbe | bool | `false` | Enable BPF clock source probing for more efficient tick retrieval. |
| certgen | object | `{"affinity":{},"annotations":{"cronJob":{},"job":{}},"extraVolumeMounts":[],"extraVolumes":[],"image":{"digest":"sha256:01802e6a153a9473b06ebade7ee5730f8f2c6cc8db8768508161da3cdd778641","override":null,"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/certgen","tag":"v0.1.13","useDigest":true},"podLabels":{},"tolerations":[],"ttlSecondsAfterFinished":1800}` | Configure certificate generation for Hubble integration. If hubble.tls.auto.method=cronJob, these values are used for the Kubernetes CronJob which will be scheduled regularly to (re)generate any certificates not provided manually. |
| certgen | object | `{"affinity":{},"annotations":{"cronJob":{},"job":{}},"extraVolumeMounts":[],"extraVolumes":[],"image":{"digest":"sha256:169d93fd8f2f9009db3b9d5ccd37c2b753d0989e1e7cd8fe79f9160c459eef4f","override":null,"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/certgen","tag":"v0.2.0","useDigest":true},"podLabels":{},"tolerations":[],"ttlSecondsAfterFinished":1800}` | Configure certificate generation for Hubble integration. If hubble.tls.auto.method=cronJob, these values are used for the Kubernetes CronJob which will be scheduled regularly to (re)generate any certificates not provided manually. |
| certgen.affinity | object | `{}` | Affinity for certgen |
| certgen.annotations | object | `{"cronJob":{},"job":{}}` | Annotations to be added to the hubble-certgen initial Job and CronJob |
| certgen.extraVolumeMounts | list | `[]` | Additional certgen volumeMounts. |
@@ -155,28 +162,34 @@ contributors across the globe, there is almost always someone available to help.
| cgroup.autoMount.enabled | bool | `true` | Enable auto mount of cgroup2 filesystem. When `autoMount` is enabled, cgroup2 filesystem is mounted at `cgroup.hostRoot` path on the underlying host and inside the cilium agent pod. If users disable `autoMount`, it's expected that users have mounted cgroup2 filesystem at the specified `cgroup.hostRoot` volume, and then the volume will be mounted inside the cilium agent pod at the same path. |
| cgroup.autoMount.resources | object | `{}` | Init Container Cgroup Automount resource limits & requests |
| cgroup.hostRoot | string | `"/run/cilium/cgroupv2"` | Configure cgroup root where cgroup2 filesystem is mounted on the host (see also: `cgroup.autoMount`) |
| ciliumEndpointSlice.enabled | bool | `false` | Enable Cilium EndpointSlice feature. |
| ciliumEndpointSlice.rateLimits | list | `[{"burst":20,"limit":10,"nodes":0},{"burst":15,"limit":7,"nodes":100},{"burst":10,"limit":5,"nodes":500}]` | List of rate limit options to be used for the CiliumEndpointSlice controller. Each object in the list must have the following fields: nodes: Count of nodes at which to apply the rate limit. limit: The sustained request rate in requests per second. The maximum rate that can be configured is 50. burst: The burst request rate in requests per second. The maximum burst that can be configured is 100. |
| cleanBpfState | bool | `false` | Clean all eBPF datapath state from the initContainer of the cilium-agent DaemonSet. WARNING: Use with care! |
| cleanState | bool | `false` | Clean all local Cilium state from the initContainer of the cilium-agent DaemonSet. Implies cleanBpfState: true. WARNING: Use with care! |
| cluster.id | int | `0` | Unique ID of the cluster. Must be unique across all connected clusters and in the range of 1 to 255. Only required for Cluster Mesh, may be 0 if Cluster Mesh is not used. |
| cluster.name | string | `"default"` | Name of the cluster. Only required for Cluster Mesh and mutual authentication with SPIRE. |
| cluster.name | string | `"default"` | Name of the cluster. Only required for Cluster Mesh and mutual authentication with SPIRE. It must respect the following constraints: * It must contain at most 32 characters; * It must begin and end with a lower case alphanumeric character; * It may contain lower case alphanumeric characters and dashes between. The "default" name cannot be used if the Cluster ID is different from 0. |
| clustermesh.annotations | object | `{}` | Annotations to be added to all top-level clustermesh objects (resources under templates/clustermesh-apiserver and templates/clustermesh-config) |
| clustermesh.apiserver.affinity | object | `{"podAntiAffinity":{"requiredDuringSchedulingIgnoredDuringExecution":[{"labelSelector":{"matchLabels":{"k8s-app":"clustermesh-apiserver"}},"topologyKey":"kubernetes.io/hostname"}]}}` | Affinity for clustermesh.apiserver |
| clustermesh.apiserver.affinity | object | `{"podAntiAffinity":{"preferredDuringSchedulingIgnoredDuringExecution":[{"podAffinityTerm":{"labelSelector":{"matchLabels":{"k8s-app":"clustermesh-apiserver"}},"topologyKey":"kubernetes.io/hostname"},"weight":100}]}}` | Affinity for clustermesh.apiserver |
| clustermesh.apiserver.etcd.init.extraArgs | list | `[]` | Additional arguments to `clustermesh-apiserver etcdinit`. |
| clustermesh.apiserver.etcd.init.extraEnv | list | `[]` | Additional environment variables to `clustermesh-apiserver etcdinit`. |
| clustermesh.apiserver.etcd.init.resources | object | `{}` | Specifies the resources for etcd init container in the apiserver |
| clustermesh.apiserver.etcd.lifecycle | object | `{}` | lifecycle setting for the etcd container |
| clustermesh.apiserver.etcd.resources | object | `{}` | Specifies the resources for etcd container in the apiserver |
| clustermesh.apiserver.etcd.securityContext | object | `{}` | Security context to be added to clustermesh-apiserver etcd containers |
| clustermesh.apiserver.etcd.securityContext | object | `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]}}` | Security context to be added to clustermesh-apiserver etcd containers |
| clustermesh.apiserver.etcd.storageMedium | string | `"Disk"` | Specifies whether etcd data is stored in a temporary volume backed by the node's default medium, such as disk, SSD or network storage (Disk), or RAM (Memory). The Memory option enables improved etcd read and write performance at the cost of additional memory usage, which counts against the memory limits of the container. |
| clustermesh.apiserver.extraArgs | list | `[]` | Additional clustermesh-apiserver arguments. |
| clustermesh.apiserver.extraEnv | list | `[]` | Additional clustermesh-apiserver environment variables. |
| clustermesh.apiserver.extraVolumeMounts | list | `[]` | Additional clustermesh-apiserver volumeMounts. |
| clustermesh.apiserver.extraVolumes | list | `[]` | Additional clustermesh-apiserver volumes. |
| clustermesh.apiserver.image | object | `{"digest":"sha256:f8fc26060e0f0c131200b762667f91788a4499362fc72209ce30b4032e926c68","override":null,"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/clustermesh-apiserver","tag":"v1.15.7","useDigest":true}` | Clustermesh API server image. |
| clustermesh.apiserver.kvstoremesh.enabled | bool | `false` | Enable KVStoreMesh. KVStoreMesh caches the information retrieved from the remote clusters in the local etcd instance. |
| clustermesh.apiserver.healthPort | int | `9880` | TCP port for the clustermesh-apiserver health API. |
| clustermesh.apiserver.image | object | `{"digest":"sha256:a1597b7de97cfa03f1330e6b784df1721eb69494cd9efb0b3a6930680dfe7a8e","override":null,"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/clustermesh-apiserver","tag":"v1.16.0","useDigest":true}` | Clustermesh API server image. |
| clustermesh.apiserver.kvstoremesh.enabled | bool | `true` | Enable KVStoreMesh. KVStoreMesh caches the information retrieved from the remote clusters in the local etcd instance. |
| clustermesh.apiserver.kvstoremesh.extraArgs | list | `[]` | Additional KVStoreMesh arguments. |
| clustermesh.apiserver.kvstoremesh.extraEnv | list | `[]` | Additional KVStoreMesh environment variables. |
| clustermesh.apiserver.kvstoremesh.extraVolumeMounts | list | `[]` | Additional KVStoreMesh volumeMounts. |
| clustermesh.apiserver.kvstoremesh.healthPort | int | `9881` | TCP port for the KVStoreMesh health API. |
| clustermesh.apiserver.kvstoremesh.lifecycle | object | `{}` | lifecycle setting for the KVStoreMesh container |
| clustermesh.apiserver.kvstoremesh.readinessProbe | object | `{}` | Configuration for the KVStoreMesh readiness probe. |
| clustermesh.apiserver.kvstoremesh.resources | object | `{}` | Resource requests and limits for the KVStoreMesh container |
| clustermesh.apiserver.kvstoremesh.securityContext | object | `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]}}` | KVStoreMesh Security context |
| clustermesh.apiserver.lifecycle | object | `{}` | lifecycle setting for the apiserver container |
@@ -205,14 +218,16 @@ contributors across the globe, there is almost always someone available to help.
| clustermesh.apiserver.podDisruptionBudget.maxUnavailable | int | `1` | Maximum number/percentage of pods that may be made unavailable |
| clustermesh.apiserver.podDisruptionBudget.minAvailable | string | `nil` | Minimum number/percentage of pods that should remain scheduled. When it's set, maxUnavailable must be disabled by `maxUnavailable: null` |
| clustermesh.apiserver.podLabels | object | `{}` | Labels to be added to clustermesh-apiserver pods |
| clustermesh.apiserver.podSecurityContext | object | `{}` | Security context to be added to clustermesh-apiserver pods |
| clustermesh.apiserver.podSecurityContext | object | `{"fsGroup":65532,"runAsGroup":65532,"runAsNonRoot":true,"runAsUser":65532}` | Security context to be added to clustermesh-apiserver pods |
| clustermesh.apiserver.priorityClassName | string | `""` | The priority class to use for clustermesh-apiserver |
| clustermesh.apiserver.readinessProbe | object | `{}` | Configuration for the clustermesh-apiserver readiness probe. |
| clustermesh.apiserver.replicas | int | `1` | Number of replicas run for the clustermesh-apiserver deployment. |
| clustermesh.apiserver.resources | object | `{}` | Resource requests and limits for the clustermesh-apiserver |
| clustermesh.apiserver.securityContext | object | `{}` | Security context to be added to clustermesh-apiserver containers |
| clustermesh.apiserver.service.annotations | object | `{}` | Annotations for the clustermesh-apiserver For GKE LoadBalancer, use annotation cloud.google.com/load-balancer-type: "Internal" For EKS LoadBalancer, use annotation service.beta.kubernetes.io/aws-load-balancer-internal: 0.0.0.0/0 |
| clustermesh.apiserver.service.externalTrafficPolicy | string | `nil` | The externalTrafficPolicy of service used for apiserver access. |
| clustermesh.apiserver.service.internalTrafficPolicy | string | `nil` | The internalTrafficPolicy of service used for apiserver access. |
| clustermesh.apiserver.securityContext | object | `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]}}` | Security context to be added to clustermesh-apiserver containers |
| clustermesh.apiserver.service.annotations | object | `{}` | Annotations for the clustermesh-apiserver For GKE LoadBalancer, use annotation cloud.google.com/load-balancer-type: "Internal" For EKS LoadBalancer, use annotation service.beta.kubernetes.io/aws-load-balancer-internal: "true" |
| clustermesh.apiserver.service.enableSessionAffinity | string | `"HAOnly"` | Defines when to enable session affinity. Each replica in a clustermesh-apiserver deployment runs its own discrete etcd cluster. Remote clients connect to one of the replicas through a shared Kubernetes Service. A client reconnecting to a different backend will require a full resync to ensure data integrity. Session affinity can reduce the likelihood of this happening, but may not be supported by all cloud providers. Possible values: - "HAOnly" (default) Only enable session affinity for deployments with more than 1 replica. - "Always" Always enable session affinity. - "Never" Never enable session affinity. Useful in environments where session affinity is not supported, but may lead to slightly degraded performance due to more frequent reconnections. |
| clustermesh.apiserver.service.externalTrafficPolicy | string | `"Cluster"` | The externalTrafficPolicy of service used for apiserver access. |
| clustermesh.apiserver.service.internalTrafficPolicy | string | `"Cluster"` | The internalTrafficPolicy of service used for apiserver access. |
| clustermesh.apiserver.service.loadBalancerClass | string | `nil` | Configure a loadBalancerClass. Allows to configure the loadBalancerClass on the clustermesh-apiserver LB service in case the Service type is set to LoadBalancer (requires Kubernetes 1.24+). |
| clustermesh.apiserver.service.loadBalancerIP | string | `nil` | Configure a specific loadBalancerIP. Allows to configure a specific loadBalancerIP on the clustermesh-apiserver LB service in case the Service type is set to LoadBalancer. |
| clustermesh.apiserver.service.nodePort | int | `32379` | Optional port to use as the node port for apiserver access. WARNING: make sure to configure a different NodePort in each cluster if kube-proxy replacement is enabled, as Cilium is currently affected by a known bug (#24692) when NodePorts are handled by the KPR implementation. If a service with the same NodePort exists both in the local and the remote cluster, all traffic originating from inside the cluster and targeting the corresponding NodePort will be redirected to a local backend, regardless of whether the destination node belongs to the local or the remote cluster. |
@@ -225,17 +240,20 @@ contributors across the globe, there is almost always someone available to help.
| clustermesh.apiserver.tls.auto.certValidityDuration | int | `1095` | Generated certificates validity duration in days. |
| clustermesh.apiserver.tls.auto.enabled | bool | `true` | When set to true, automatically generate a CA and certificates to enable mTLS between clustermesh-apiserver and external workload instances. If set to false, the certs to be provided by setting appropriate values below. |
| clustermesh.apiserver.tls.client | object | `{"cert":"","key":""}` | base64 encoded PEM values for the clustermesh-apiserver client certificate and private key. Used if 'auto' is not enabled. |
| clustermesh.apiserver.tls.enableSecrets | bool | `true` | Allow users to provide their own certificates Users may need to provide their certificates using a mechanism that requires they provide their own secrets. This setting does not apply to any of the auto-generated mechanisms below, it only restricts the creation of secrets via the `tls-provided` templates. |
| clustermesh.apiserver.tls.remote | object | `{"cert":"","key":""}` | base64 encoded PEM values for the clustermesh-apiserver remote cluster certificate and private key. Used if 'auto' is not enabled. |
| clustermesh.apiserver.tls.server | object | `{"cert":"","extraDnsNames":[],"extraIpAddresses":[],"key":""}` | base64 encoded PEM values for the clustermesh-apiserver server certificate and private key. Used if 'auto' is not enabled. |
| clustermesh.apiserver.tls.server.extraDnsNames | list | `[]` | Extra DNS names added to certificate when it's auto generated |
| clustermesh.apiserver.tls.server.extraIpAddresses | list | `[]` | Extra IP addresses added to certificate when it's auto generated |
| clustermesh.apiserver.tolerations | list | `[]` | Node tolerations for pod assignment on nodes with taints ref: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/ |
| clustermesh.apiserver.topologySpreadConstraints | list | `[]` | Pod topology spread constraints for clustermesh-apiserver |
| clustermesh.apiserver.updateStrategy | object | `{"rollingUpdate":{"maxUnavailable":1},"type":"RollingUpdate"}` | clustermesh-apiserver update strategy |
| clustermesh.apiserver.updateStrategy | object | `{"rollingUpdate":{"maxSurge":1,"maxUnavailable":0},"type":"RollingUpdate"}` | clustermesh-apiserver update strategy |
| clustermesh.config | object | `{"clusters":[],"domain":"mesh.cilium.io","enabled":false}` | Clustermesh explicit configuration. |
| clustermesh.config.clusters | list | `[]` | List of clusters to be peered in the mesh. |
| clustermesh.config.domain | string | `"mesh.cilium.io"` | Default dns domain for the Clustermesh API servers This is used in the case cluster addresses are not provided and IPs are used. |
| clustermesh.config.enabled | bool | `false` | Enable the Clustermesh explicit configuration. |
| clustermesh.enableEndpointSliceSynchronization | bool | `false` | Enable the synchronization of Kubernetes EndpointSlices corresponding to the remote endpoints of appropriately-annotated global services through ClusterMesh |
| clustermesh.enableMCSAPISupport | bool | `false` | Enable Multi-Cluster Services API support |
| clustermesh.maxConnectedClusters | int | `255` | The maximum number of clusters to support in a ClusterMesh. This value cannot be changed on running clusters, and all clusters in a ClusterMesh must be configured with the same value. Values > 255 will decrease the maximum allocatable cluster-local identities. Supported values are 255 and 511. |
| clustermesh.useAPIServer | bool | `false` | Deploy clustermesh-apiserver for clustermesh |
| cni.binPath | string | `"/opt/cni/bin"` | Configure the path to the CNI binary directory on the host. |
@@ -245,6 +263,7 @@ contributors across the globe, there is almost always someone available to help.
| cni.confPath | string | `"/etc/cni/net.d"` | Configure the path to the CNI configuration directory on the host. |
| cni.configMapKey | string | `"cni-config"` | Configure the key in the CNI ConfigMap to read the contents of the CNI configuration from. |
| cni.customConf | bool | `false` | Skip writing of the CNI configuration. This can be used if writing of the CNI configuration is performed by external automation. |
| cni.enableRouteMTUForCNIChaining | bool | `false` | Enable route MTU for pod netns when CNI chaining is used |
| cni.exclusive | bool | `true` | Make Cilium take ownership over the `/etc/cni/net.d` directory on the node, renaming all non-Cilium CNI configurations to `*.cilium_bak`. This ensures no Pods can be scheduled using other CNI plugins during Cilium agent downtime. |
| cni.hostConfDirMountPath | string | `"/host/etc/cni/net.d"` | Configure the path to where the CNI configuration directory is mounted inside the agent pod. |
| cni.install | bool | `true` | Install the CNI configuration and binary files into the filesystem. |
@@ -253,8 +272,6 @@ contributors across the globe, there is almost always someone available to help.
| cni.uninstall | bool | `false` | Remove the CNI configuration and binary files on agent shutdown. Enable this if you're removing Cilium from the cluster. Disable this to prevent the CNI configuration file from being removed during agent upgrade, which can cause nodes to go unmanageable. |
| conntrackGCInterval | string | `"0s"` | Configure how frequently garbage collection should occur for the datapath connection tracking table. |
| conntrackGCMaxInterval | string | `""` | Configure the maximum frequency for the garbage collection of the connection tracking table. Only affects the automatic computation for the frequency and has no effect when 'conntrackGCInterval' is set. This can be set to more frequently clean up unused identities created from ToFQDN policies. |
| containerRuntime | object | `{"integration":"none"}` | Configure container runtime specific integration. Deprecated in favor of bpf.autoMount.enabled. To be removed in 1.15. |
| containerRuntime.integration | string | `"none"` | Enables specific integrations for container runtimes. Supported values: - crio - none |
| crdWaitTimeout | string | `"5m"` | Configure timeout in which Cilium will exit if CRDs are not available |
| customCalls | object | `{"enabled":false}` | Tail call hooks for custom eBPF programs. |
| customCalls.enabled | bool | `false` | Enable tail call hooks for custom eBPF programs. |
@@ -265,6 +282,7 @@ contributors across the globe, there is almost always someone available to help.
| dashboards | object | `{"annotations":{},"enabled":false,"label":"grafana_dashboard","labelValue":"1","namespace":null}` | Grafana dashboards for cilium-agent grafana can import dashboards based on the label and value ref: https://github.com/grafana/helm-charts/tree/main/charts/grafana#sidecar-for-dashboards |
| debug.enabled | bool | `false` | Enable debug logging |
| debug.verbose | string | `nil` | Configure verbosity levels for debug logging This option is used to enable debug messages for operations related to such sub-system such as (e.g. kvstore, envoy, datapath or policy), and flow is for enabling debug messages emitted per request, message and connection. Multiple values can be set via a space-separated string (e.g. "datapath envoy"). Applicable values: - flow - kvstore - envoy - datapath - policy |
| directRoutingSkipUnreachable | bool | `false` | Enable skipping of PodCIDR routes between worker nodes if the worker nodes are in a different L2 network segment. |
| disableEndpointCRD | bool | `false` | Disable the usage of CiliumEndpoint CRD. |
| dnsPolicy | string | `""` | DNS policy for Cilium agent pods. Ref: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy |
| dnsProxy.dnsRejectResponseCode | string | `"refused"` | DNS response code for rejecting DNS requests, available options are '[nameError refused]'. |
@@ -276,10 +294,10 @@ contributors across the globe, there is almost always someone available to help.
| dnsProxy.preCache | string | `""` | DNS cache data at this path is preloaded on agent startup. |
| dnsProxy.proxyPort | int | `0` | Global port on which the in-agent DNS proxy should listen. Default 0 is a OS-assigned port. |
| dnsProxy.proxyResponseMaxDelay | string | `"100ms"` | The maximum time the DNS proxy holds an allowed DNS response before sending it along. Responses are sent as soon as the datapath is updated with the new IP information. |
| dnsProxy.socketLingerTimeout | int | `10` | Timeout (in seconds) when closing the connection between the DNS proxy and the upstream server. If set to 0, the connection is closed immediately (with TCP RST). If set to -1, the connection is closed asynchronously in the background. |
| egressGateway.enabled | bool | `false` | Enables egress gateway to redirect and SNAT the traffic that leaves the cluster. |
| egressGateway.installRoutes | bool | `false` | Deprecated without a replacement necessary. |
| egressGateway.reconciliationTriggerInterval | string | `"1s"` | Time between triggers of egress gateway state reconciliations |
| enableCiliumEndpointSlice | bool | `false` | Enable CiliumEndpointSlice feature. |
| enableCiliumEndpointSlice | bool | `false` | Enable CiliumEndpointSlice feature (deprecated, please use `ciliumEndpointSlice.enabled` instead). |
| enableCriticalPriorityClass | bool | `true` | Explicitly enable or disable priority class. .Capabilities.KubeVersion is unsettable in `helm template` calls, it depends on k8s libraries version that Helm was compiled against. This option allows to explicitly disable setting the priority class, which is useful for rendering charts for gke clusters in advance. |
| enableIPv4BIGTCP | bool | `false` | Enables IPv4 BIG TCP support which increases maximum IPv4 GSO/GRO limits for nodes and pods |
| enableIPv4Masquerade | bool | `true` | Enables masquerading of IPv4 traffic leaving the node from endpoints. |
@@ -287,30 +305,26 @@ contributors across the globe, there is almost always someone available to help.
| enableIPv6Masquerade | bool | `true` | Enables masquerading of IPv6 traffic leaving the node from endpoints. |
| enableK8sTerminatingEndpoint | bool | `true` | Configure whether to enable auto detect of terminating state for endpoints in order to support graceful termination. |
| enableMasqueradeRouteSource | bool | `false` | Enables masquerading to the source of the route for traffic leaving the node from endpoints. |
| enableRuntimeDeviceDetection | bool | `false` | Enables experimental support for the detection of new and removed datapath devices. When devices change the eBPF datapath is reloaded and services updated. If "devices" is set then only those devices, or devices matching a wildcard will be considered. |
| enableRuntimeDeviceDetection | bool | `true` | Enables experimental support for the detection of new and removed datapath devices. When devices change the eBPF datapath is reloaded and services updated. If "devices" is set then only those devices, or devices matching a wildcard will be considered. This option has been deprecated and is a no-op. |
| enableXTSocketFallback | bool | `true` | Enables the fallback compatibility solution for when the xt_socket kernel module is missing and it is needed for the datapath L7 redirection to work properly. See documentation for details on when this can be disabled: https://docs.cilium.io/en/stable/operations/system_requirements/#linux-kernel. |
| encryption.enabled | bool | `false` | Enable transparent network encryption. |
| encryption.interface | string | `""` | Deprecated in favor of encryption.ipsec.interface. To be removed in 1.15. The interface to use for encrypted traffic. This option is only effective when encryption.type is set to ipsec. |
| encryption.ipsec.encryptedOverlay | bool | `false` | Enable IPsec encrypted overlay |
| encryption.ipsec.interface | string | `""` | The interface to use for encrypted traffic. |
| encryption.ipsec.keyFile | string | `""` | Name of the key file inside the Kubernetes secret configured via secretName. |
| encryption.ipsec.keyFile | string | `"keys"` | Name of the key file inside the Kubernetes secret configured via secretName. |
| encryption.ipsec.keyRotationDuration | string | `"5m"` | Maximum duration of the IPsec key rotation. The previous key will be removed after that delay. |
| encryption.ipsec.keyWatcher | bool | `true` | Enable the key watcher. If disabled, a restart of the agent will be necessary on key rotations. |
| encryption.ipsec.mountPath | string | `""` | Path to mount the secret inside the Cilium pod. |
| encryption.ipsec.secretName | string | `""` | Name of the Kubernetes secret containing the encryption keys. |
| encryption.keyFile | string | `"keys"` | Deprecated in favor of encryption.ipsec.keyFile. To be removed in 1.15. Name of the key file inside the Kubernetes secret configured via secretName. This option is only effective when encryption.type is set to ipsec. |
| encryption.mountPath | string | `"/etc/ipsec"` | Deprecated in favor of encryption.ipsec.mountPath. To be removed in 1.15. Path to mount the secret inside the Cilium pod. This option is only effective when encryption.type is set to ipsec. |
| encryption.ipsec.mountPath | string | `"/etc/ipsec"` | Path to mount the secret inside the Cilium pod. |
| encryption.ipsec.secretName | string | `"cilium-ipsec-keys"` | Name of the Kubernetes secret containing the encryption keys. |
| encryption.nodeEncryption | bool | `false` | Enable encryption for pure node to node traffic. This option is only effective when encryption.type is set to "wireguard". |
| encryption.secretName | string | `"cilium-ipsec-keys"` | Deprecated in favor of encryption.ipsec.secretName. To be removed in 1.15. Name of the Kubernetes secret containing the encryption keys. This option is only effective when encryption.type is set to ipsec. |
| encryption.strictMode | object | `{"allowRemoteNodeIdentities":false,"cidr":"","enabled":false}` | Configure the WireGuard Pod2Pod strict mode. |
| encryption.strictMode.allowRemoteNodeIdentities | bool | `false` | Allow dynamic lookup of remote node identities. This is required when tunneling is used or direct routing is used and the node CIDR and pod CIDR overlap. |
| encryption.strictMode.cidr | string | `""` | CIDR for the WireGuard Pod2Pod strict mode. |
| encryption.strictMode.enabled | bool | `false` | Enable WireGuard Pod2Pod strict mode. |
| encryption.type | string | `"ipsec"` | Encryption method. Can be either ipsec or wireguard. |
| encryption.wireguard.persistentKeepalive | string | `"0s"` | Controls Wireguard PersistentKeepalive option. Set 0s to disable. |
| encryption.wireguard.userspaceFallback | bool | `false` | Enables the fallback to the user-space implementation. |
| encryption.wireguard.persistentKeepalive | string | `"0s"` | Controls WireGuard PersistentKeepalive option. Set 0s to disable. |
| encryption.wireguard.userspaceFallback | bool | `false` | Enables the fallback to the user-space implementation (deprecated). |
| endpointHealthChecking.enabled | bool | `true` | Enable connectivity health checking between virtual endpoints. |
| endpointRoutes.enabled | bool | `false` | Enable use of per endpoint routes instead of routing via the cilium_host interface. |
| endpointStatus | object | `{"enabled":false,"status":""}` | Enable endpoint status. Status can be: policy, health, controllers, log and / or state. For 2 or more options use a space. |
| eni.awsEnablePrefixDelegation | bool | `false` | Enable ENI prefix delegation |
| eni.awsReleaseExcessIPs | bool | `false` | Release IPs not used from the ENI |
| eni.ec2APIEndpoint | string | `""` | EC2 API endpoint to use |
@@ -325,9 +339,12 @@ contributors across the globe, there is almost always someone available to help.
| eni.updateEC2AdapterLimitViaAPI | bool | `true` | Update ENI Adapter limits from the EC2 API |
| envoy.affinity | object | `{"nodeAffinity":{"requiredDuringSchedulingIgnoredDuringExecution":{"nodeSelectorTerms":[{"matchExpressions":[{"key":"cilium.io/no-schedule","operator":"NotIn","values":["true"]}]}]}},"podAffinity":{"requiredDuringSchedulingIgnoredDuringExecution":[{"labelSelector":{"matchLabels":{"k8s-app":"cilium"}},"topologyKey":"kubernetes.io/hostname"}]},"podAntiAffinity":{"requiredDuringSchedulingIgnoredDuringExecution":[{"labelSelector":{"matchLabels":{"k8s-app":"cilium-envoy"}},"topologyKey":"kubernetes.io/hostname"}]}}` | Affinity for cilium-envoy. |
| envoy.annotations | object | `{}` | Annotations to be added to all top-level cilium-envoy objects (resources under templates/cilium-envoy) |
| envoy.baseID | int | `0` | Set Envoy'--base-id' to use when allocating shared memory regions. Only needs to be changed if multiple Envoy instances will run on the same node and may have conflicts. Supported values: 0 - 4294967295. Defaults to '0' |
| envoy.connectTimeoutSeconds | int | `2` | Time in seconds after which a TCP connection attempt times out |
| envoy.debug.admin.enabled | bool | `false` | Enable admin interface for cilium-envoy. This is useful for debugging and should not be enabled in production. |
| envoy.debug.admin.port | int | `9901` | Port number (bound to loopback interface). kubectl port-forward can be used to access the admin interface. |
| envoy.dnsPolicy | string | `nil` | DNS policy for Cilium envoy pods. Ref: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy |
| envoy.enabled | bool | `false` | Enable Envoy Proxy in standalone DaemonSet. |
| envoy.enabled | string | `true` for new installation | Enable Envoy Proxy in standalone DaemonSet. This field is enabled by default for new installation. |
| envoy.extraArgs | list | `[]` | Additional envoy container arguments. |
| envoy.extraContainers | list | `[]` | Additional containers added to the cilium Envoy DaemonSet. |
| envoy.extraEnv | list | `[]` | Additional envoy container environment variables. |
@@ -362,7 +379,8 @@ contributors across the globe, there is almost always someone available to help.
| envoy.readinessProbe.periodSeconds | int | `30` | interval between checks of the readiness probe |
| envoy.resources | object | `{}` | Envoy resource limits & requests ref: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ |
| envoy.rollOutPods | bool | `false` | Roll out cilium envoy pods automatically when configmap is updated. |
| envoy.securityContext.capabilities.envoy | list | `["NET_ADMIN","SYS_ADMIN"]` | Capabilities for the `cilium-envoy` container |
| envoy.securityContext.capabilities.envoy | list | `["NET_ADMIN","SYS_ADMIN"]` | Capabilities for the `cilium-envoy` container. Even though granted to the container, the cilium-envoy-starter wrapper drops all capabilities after forking the actual Envoy process. `NET_BIND_SERVICE` is the only capability that can be passed to the Envoy process by setting `envoy.securityContext.capabilities.keepNetBindService=true` (in addition to granting the capability to the container). Note: In case of embedded envoy, the capability must be granted to the cilium-agent container. |
| envoy.securityContext.capabilities.keepCapNetBindService | bool | `false` | Keep capability `NET_BIND_SERVICE` for Envoy process. |
| envoy.securityContext.privileged | bool | `false` | Run the pod with elevated privileges |
| envoy.securityContext.seLinuxOptions | object | `{"level":"s0","type":"spc_t"}` | SELinux options for the `cilium-envoy` container |
| envoy.startupProbe.failureThreshold | int | `105` | failure threshold of startup probe. 105 x 2s translates to the old behaviour of the readiness probe (120s delay + 30 x 3s) |
@@ -373,32 +391,13 @@ contributors across the globe, there is almost always someone available to help.
| envoy.xffNumTrustedHopsL7PolicyEgress | int | `0` | Number of trusted hops regarding the x-forwarded-for and related HTTP headers for the egress L7 policy enforcement Envoy listeners. |
| envoy.xffNumTrustedHopsL7PolicyIngress | int | `0` | Number of trusted hops regarding the x-forwarded-for and related HTTP headers for the ingress L7 policy enforcement Envoy listeners. |
| envoyConfig.enabled | bool | `false` | Enable CiliumEnvoyConfig CRD CiliumEnvoyConfig CRD can also be implicitly enabled by other options. |
| envoyConfig.retryInterval | string | `"15s"` | Interval in which an attempt is made to reconcile failed EnvoyConfigs. If the duration is zero, the retry is deactivated. |
| envoyConfig.secretsNamespace | object | `{"create":true,"name":"cilium-secrets"}` | SecretsNamespace is the namespace in which envoy SDS will retrieve secrets from. |
| envoyConfig.secretsNamespace.create | bool | `true` | Create secrets namespace for CiliumEnvoyConfig CRDs. |
| envoyConfig.secretsNamespace.name | string | `"cilium-secrets"` | The name of the secret namespace to which Cilium agents are given read access. |
| etcd.annotations | object | `{}` | Annotations to be added to all top-level etcd-operator objects (resources under templates/etcd-operator) |
| etcd.clusterDomain | string | `"cluster.local"` | Cluster domain for cilium-etcd-operator. |
| etcd.enabled | bool | `false` | Enable etcd mode for the agent. |
| etcd.endpoints | list | `["https://CHANGE-ME:2379"]` | List of etcd endpoints (not needed when using managed=true). |
| etcd.extraArgs | list | `[]` | Additional cilium-etcd-operator container arguments. |
| etcd.extraVolumeMounts | list | `[]` | Additional cilium-etcd-operator volumeMounts. |
| etcd.extraVolumes | list | `[]` | Additional cilium-etcd-operator volumes. |
| etcd.image | object | `{"digest":"sha256:04b8327f7f992693c2cb483b999041ed8f92efc8e14f2a5f3ab95574a65ea2dc","override":null,"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/cilium-etcd-operator","tag":"v2.0.7","useDigest":true}` | cilium-etcd-operator image. |
| etcd.k8sService | bool | `false` | If etcd is behind a k8s service set this option to true so that Cilium does the service translation automatically without requiring a DNS to be running. |
| etcd.nodeSelector | object | `{"kubernetes.io/os":"linux"}` | Node labels for cilium-etcd-operator pod assignment ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector |
| etcd.podAnnotations | object | `{}` | Annotations to be added to cilium-etcd-operator pods |
| etcd.podDisruptionBudget.enabled | bool | `false` | enable PodDisruptionBudget ref: https://kubernetes.io/docs/concepts/workloads/pods/disruptions/ |
| etcd.podDisruptionBudget.maxUnavailable | int | `1` | Maximum number/percentage of pods that may be made unavailable |
| etcd.podDisruptionBudget.minAvailable | string | `nil` | Minimum number/percentage of pods that should remain scheduled. When it's set, maxUnavailable must be disabled by `maxUnavailable: null` |
| etcd.podLabels | object | `{}` | Labels to be added to cilium-etcd-operator pods |
| etcd.podSecurityContext | object | `{}` | Security context to be added to cilium-etcd-operator pods |
| etcd.priorityClassName | string | `""` | The priority class to use for cilium-etcd-operator |
| etcd.resources | object | `{}` | cilium-etcd-operator resource limits & requests ref: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ |
| etcd.securityContext | object | `{}` | Security context to be added to cilium-etcd-operator pods |
| etcd.ssl | bool | `false` | Enable use of TLS/SSL for connectivity to etcd. (auto-enabled if managed=true) |
| etcd.tolerations | list | `[{"operator":"Exists"}]` | Node tolerations for cilium-etcd-operator scheduling to nodes with taints ref: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/ |
| etcd.topologySpreadConstraints | list | `[]` | Pod topology spread constraints for cilium-etcd-operator |
| etcd.updateStrategy | object | `{"rollingUpdate":{"maxSurge":1,"maxUnavailable":1},"type":"RollingUpdate"}` | cilium-etcd-operator update strategy |
| etcd.endpoints | list | `["https://CHANGE-ME:2379"]` | List of etcd endpoints |
| etcd.ssl | bool | `false` | Enable use of TLS/SSL for connectivity to etcd. |
| externalIPs.enabled | bool | `false` | Enable ExternalIPs service support. |
| externalWorkloads | object | `{"enabled":false}` | Configure external workloads support |
| externalWorkloads.enabled | bool | `false` | Enable support for external workloads, such as VMs (false by default). |
@@ -407,13 +406,23 @@ contributors across the globe, there is almost always someone available to help.
| extraContainers | list | `[]` | Additional containers added to the cilium DaemonSet. |
| extraEnv | list | `[]` | Additional agent container environment variables. |
| extraHostPathMounts | list | `[]` | Additional agent hostPath mounts. |
| extraInitContainers | list | `[]` | Additional initContainers added to the cilium Daemonset. |
| extraVolumeMounts | list | `[]` | Additional agent volumeMounts. |
| extraVolumes | list | `[]` | Additional agent volumes. |
| forceDeviceDetection | bool | `false` | Forces the auto-detection of devices, even if specific devices are explicitly listed |
| gatewayAPI.enableAlpn | bool | `false` | Enable ALPN for all listeners configured with Gateway API. ALPN will attempt HTTP/2, then HTTP 1.1. Note that this will also enable `appProtocol` support, and services that wish to use HTTP/2 will need to indicate that via their `appProtocol`. |
| gatewayAPI.enableAppProtocol | bool | `false` | Enable Backend Protocol selection support (GEP-1911) for Gateway API via appProtocol. |
| gatewayAPI.enableProxyProtocol | bool | `false` | Enable proxy protocol for all GatewayAPI listeners. Note that _only_ Proxy protocol traffic will be accepted once this is enabled. |
| gatewayAPI.enabled | bool | `false` | Enable support for Gateway API in cilium This will automatically set enable-envoy-config as well. |
| gatewayAPI.externalTrafficPolicy | string | `"Cluster"` | Control how traffic from external sources is routed to the LoadBalancer Kubernetes Service for all Cilium GatewayAPI Gateway instances. Valid values are "Cluster" and "Local". Note that this value will be ignored when `hostNetwork.enabled == true`. ref: https://kubernetes.io/docs/reference/networking/virtual-ips/#external-traffic-policy |
| gatewayAPI.gatewayClass.create | string | `"auto"` | Enable creation of GatewayClass resource The default value is 'auto' which decides according to presence of gateway.networking.k8s.io/v1/GatewayClass in the cluster. Other possible values are 'true' and 'false', which will either always or never create the GatewayClass, respectively. |
| gatewayAPI.hostNetwork.enabled | bool | `false` | Configure whether the Envoy listeners should be exposed on the host network. |
| gatewayAPI.hostNetwork.nodes.matchLabels | object | `{}` | Specify the labels of the nodes where the Ingress listeners should be exposed matchLabels: kubernetes.io/os: linux kubernetes.io/hostname: kind-worker |
| gatewayAPI.secretsNamespace | object | `{"create":true,"name":"cilium-secrets","sync":true}` | SecretsNamespace is the namespace in which envoy SDS will retrieve TLS secrets from. |
| gatewayAPI.secretsNamespace.create | bool | `true` | Create secrets namespace for Gateway API. |
| gatewayAPI.secretsNamespace.name | string | `"cilium-secrets"` | Name of Gateway API secret namespace. |
| gatewayAPI.secretsNamespace.sync | bool | `true` | Enable secret sync, which will make sure all TLS secrets used by Ingress are synced to secretsNamespace.name. If disabled, TLS secrets must be maintained externally. |
| gatewayAPI.xffNumTrustedHops | int | `0` | The number of additional GatewayAPI proxy hops from the right side of the HTTP header to trust when determining the origin client's IP address. |
| gke.enabled | bool | `false` | Enable Google Kubernetes Engine integration |
| healthChecking | bool | `true` | Enable connectivity health checking. |
| healthPort | int | `9879` | TCP port for the agent health API. This is not the port for cilium-health. |
@@ -423,6 +432,9 @@ contributors across the globe, there is almost always someone available to help.
| hostFirewall.enabled | bool | `false` | Enables the enforcement of host policies in the eBPF datapath. |
| hostPort.enabled | bool | `false` | Enable hostPort service support. |
| hubble.annotations | object | `{}` | Annotations to be added to all top-level hubble objects (resources under templates/hubble) |
| hubble.dropEventEmitter | object | `{"enabled":false,"interval":"2m","reasons":["auth_required","policy_denied"]}` | Emit v1.Events related to pods on detection of packet drops. This feature is alpha, please provide feedback at https://github.com/cilium/cilium/issues/33975. |
| hubble.dropEventEmitter.interval | string | `"2m"` | - Minimum time between emitting same events. |
| hubble.dropEventEmitter.reasons | list | `["auth_required","policy_denied"]` | - Drop reasons to emit events for. ref: https://docs.cilium.io/en/stable/_api/v1/flow/README/#dropreason |
| hubble.enabled | bool | `true` | Enable Hubble (true by default). |
| hubble.export | object | `{"dynamic":{"config":{"configMapName":"cilium-flowlog-config","content":[{"excludeFilters":[],"fieldMask":[],"filePath":"/var/run/cilium/hubble/events.log","includeFilters":[],"name":"all"}],"createConfigMap":true},"enabled":false},"fileMaxBackups":5,"fileMaxSizeMb":10,"static":{"allowList":[],"denyList":[],"enabled":false,"fieldMask":[],"filePath":"/var/run/cilium/hubble/events.log"}}` | Hubble flows export. |
| hubble.export.dynamic | object | `{"config":{"configMapName":"cilium-flowlog-config","content":[{"excludeFilters":[],"fieldMask":[],"filePath":"/var/run/cilium/hubble/events.log","includeFilters":[],"name":"all"}],"createConfigMap":true},"enabled":false}` | - Dynamic exporters configuration. Dynamic exporters may be reconfigured without a need of agent restarts. |
@@ -433,7 +445,7 @@ contributors across the globe, there is almost always someone available to help.
| hubble.export.fileMaxSizeMb | int | `10` | - Defines max file size of output file before it gets rotated. |
| hubble.export.static | object | `{"allowList":[],"denyList":[],"enabled":false,"fieldMask":[],"filePath":"/var/run/cilium/hubble/events.log"}` | - Static exporter configuration. Static exporter is bound to agent lifecycle. |
| hubble.listenAddress | string | `":4244"` | An additional address for Hubble to listen to. Set this field ":4244" if you are enabling Hubble Relay, as it assumes that Hubble is listening on port 4244. |
| hubble.metrics | object | `{"dashboards":{"annotations":{},"enabled":false,"label":"grafana_dashboard","labelValue":"1","namespace":null},"enableOpenMetrics":false,"enabled":null,"port":9965,"serviceAnnotations":{},"serviceMonitor":{"annotations":{},"enabled":false,"interval":"10s","jobLabel":"","labels":{},"metricRelabelings":null,"relabelings":[{"replacement":"${1}","sourceLabels":["__meta_kubernetes_pod_node_name"],"targetLabel":"node"}]}}` | Hubble metrics configuration. See https://docs.cilium.io/en/stable/observability/metrics/#hubble-metrics for more comprehensive documentation about Hubble metrics. |
| hubble.metrics | object | `{"dashboards":{"annotations":{},"enabled":false,"label":"grafana_dashboard","labelValue":"1","namespace":null},"enableOpenMetrics":false,"enabled":null,"port":9965,"serviceAnnotations":{},"serviceMonitor":{"annotations":{},"enabled":false,"interval":"10s","jobLabel":"","labels":{},"metricRelabelings":null,"relabelings":[{"replacement":"${1}","sourceLabels":["__meta_kubernetes_pod_node_name"],"targetLabel":"node"}],"tlsConfig":{}},"tls":{"enabled":false,"server":{"cert":"","extraDnsNames":[],"extraIpAddresses":[],"key":"","mtls":{"enabled":false,"key":"ca.crt","name":null,"useSecret":false}}}}` | Hubble metrics configuration. See https://docs.cilium.io/en/stable/observability/metrics/#hubble-metrics for more comprehensive documentation about Hubble metrics. |
| hubble.metrics.dashboards | object | `{"annotations":{},"enabled":false,"label":"grafana_dashboard","labelValue":"1","namespace":null}` | Grafana dashboards for hubble grafana can import dashboards based on the label and value ref: https://github.com/grafana/helm-charts/tree/main/charts/grafana#sidecar-for-dashboards |
| hubble.metrics.enableOpenMetrics | bool | `false` | Enables exporting hubble metrics in OpenMetrics format. |
| hubble.metrics.enabled | string | `nil` | Configures the list of metrics to collect. If empty or null, metrics are disabled. Example: enabled: - dns:query;ignoreAAAA - drop - tcp - flow - icmp - http You can specify the list of metrics from the helm CLI: --set hubble.metrics.enabled="{dns:query;ignoreAAAA,drop,tcp,flow,icmp,http}" |
@@ -446,6 +458,13 @@ contributors across the globe, there is almost always someone available to help.
| hubble.metrics.serviceMonitor.labels | object | `{}` | Labels to add to ServiceMonitor hubble |
| hubble.metrics.serviceMonitor.metricRelabelings | string | `nil` | Metrics relabeling configs for the ServiceMonitor hubble |
| hubble.metrics.serviceMonitor.relabelings | list | `[{"replacement":"${1}","sourceLabels":["__meta_kubernetes_pod_node_name"],"targetLabel":"node"}]` | Relabeling configs for the ServiceMonitor hubble |
| hubble.metrics.tls.server.cert | string | `""` | base64 encoded PEM values for the Hubble metrics server certificate. |
| hubble.metrics.tls.server.extraDnsNames | list | `[]` | Extra DNS names added to certificate when it's auto generated |
| hubble.metrics.tls.server.extraIpAddresses | list | `[]` | Extra IP addresses added to certificate when it's auto generated |
| hubble.metrics.tls.server.key | string | `""` | base64 encoded PEM values for the Hubble metrics server key. |
| hubble.metrics.tls.server.mtls | object | `{"enabled":false,"key":"ca.crt","name":null,"useSecret":false}` | Configure mTLS for the Hubble metrics server. |
| hubble.metrics.tls.server.mtls.key | string | `"ca.crt"` | Entry of the ConfigMap containing the CA. |
| hubble.metrics.tls.server.mtls.name | string | `nil` | Name of the ConfigMap containing the CA to validate client certificates against. If mTLS is enabled and this is unspecified, it will default to the same CA used for Hubble metrics server certificates. |
| hubble.peerService.clusterDomain | string | `"cluster.local"` | The cluster domain to use to query the Hubble Peer service. It should be the local cluster. |
| hubble.peerService.targetPort | int | `4244` | Target Port for the Peer service, must match the hubble.listenAddress' port. |
| hubble.preferIpv6 | bool | `false` | Whether Hubble should prefer to announce IPv6 or IPv4 addresses if both are available. |
@@ -464,7 +483,7 @@ contributors across the globe, there is almost always someone available to help.
| hubble.relay.extraVolumes | list | `[]` | Additional hubble-relay volumes. |
| hubble.relay.gops.enabled | bool | `true` | Enable gops for hubble-relay |
| hubble.relay.gops.port | int | `9893` | Configure gops listen port for hubble-relay |
| hubble.relay.image | object | `{"digest":"sha256:12870e87ec6c105ca86885c4ee7c184ece6b706cc0f22f63d2a62a9a818fd68f","override":null,"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/hubble-relay","tag":"v1.15.7","useDigest":true}` | Hubble-relay container image. |
| hubble.relay.image | object | `{"digest":"sha256:33fca7776fc3d7b2abe08873319353806dc1c5e07e12011d7da4da05f836ce8d","override":null,"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/hubble-relay","tag":"v1.16.0","useDigest":true}` | Hubble-relay container image. |
| hubble.relay.listenHost | string | `""` | Host to listen to. Specify an empty string to bind to all the interfaces. |
| hubble.relay.listenPort | string | `"4245"` | Port to listen to. |
| hubble.relay.nodeSelector | object | `{"kubernetes.io/os":"linux"}` | Node labels for pod assignment ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector |
@@ -494,7 +513,7 @@ contributors across the globe, there is almost always someone available to help.
| hubble.relay.service.nodePort | int | `31234` | - The port to use when the service type is set to NodePort. |
| hubble.relay.service.type | string | `"ClusterIP"` | - The type of service used for Hubble Relay access, either ClusterIP or NodePort. |
| hubble.relay.sortBufferDrainTimeout | string | `nil` | When the per-request flows sort buffer is not full, a flow is drained every time this timeout is reached (only affects requests in follow-mode) (e.g. "1s"). |
| hubble.relay.sortBufferLenMax | string | `nil` | Max number of flows that can be buffered for sorting before being sent to the client (per request) (e.g. 100). |
| hubble.relay.sortBufferLenMax | int | `nil` | Max number of flows that can be buffered for sorting before being sent to the client (per request) (e.g. 100). |
| hubble.relay.terminationGracePeriodSeconds | int | `1` | Configure termination grace period for hubble relay Deployment. |
| hubble.relay.tls | object | `{"client":{"cert":"","key":""},"server":{"cert":"","enabled":false,"extraDnsNames":[],"extraIpAddresses":[],"key":"","mtls":false,"relayName":"ui.hubble-relay.cilium.io"}}` | TLS configuration for Hubble Relay |
| hubble.relay.tls.client | object | `{"cert":"","key":""}` | base64 encoded PEM values for the hubble-relay client certificate and private key This keypair is presented to Hubble server instances for mTLS authentication and is required when hubble.tls.enabled is true. These values need to be set manually if hubble.tls.auto.enabled is false. |
@@ -559,23 +578,27 @@ contributors across the globe, there is almost always someone available to help.
| hubble.ui.updateStrategy | object | `{"rollingUpdate":{"maxUnavailable":1},"type":"RollingUpdate"}` | hubble-ui update strategy. |
| identityAllocationMode | string | `"crd"` | Method to use for identity allocation (`crd` or `kvstore`). |
| identityChangeGracePeriod | string | `"5s"` | Time to wait before using new identity on endpoint identity change. |
| image | object | `{"digest":"sha256:2e432bf6879feb8b891c497d6fd784b13e53456017d2b8e4ea734145f0282ef0","override":null,"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/cilium","tag":"v1.15.7","useDigest":true}` | Agent container image. |
| imagePullSecrets | string | `nil` | Configure image pull secrets for pulling container images |
| image | object | `{"digest":"sha256:46ffa4ef3cf6d8885dcc4af5963b0683f7d59daa90d49ed9fb68d3b1627fe058","override":null,"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/cilium","tag":"v1.16.0","useDigest":true}` | Agent container image. |
| imagePullSecrets | list | `[]` | Configure image pull secrets for pulling container images |
| ingressController.default | bool | `false` | Set cilium ingress controller to be the default ingress controller This will let cilium ingress controller route entries without ingress class set |
| ingressController.defaultSecretName | string | `nil` | Default secret name for ingresses without .spec.tls[].secretName set. |
| ingressController.defaultSecretNamespace | string | `nil` | Default secret namespace for ingresses without .spec.tls[].secretName set. |
| ingressController.enableProxyProtocol | bool | `false` | Enable proxy protocol for all Ingress listeners. Note that _only_ Proxy protocol traffic will be accepted once this is enabled. |
| ingressController.enabled | bool | `false` | Enable cilium ingress controller This will automatically set enable-envoy-config as well. |
| ingressController.enforceHttps | bool | `true` | Enforce https for host having matching TLS host in Ingress. Incoming traffic to http listener will return 308 http error code with respective location in header. |
| ingressController.ingressLBAnnotationPrefixes | list | `["service.beta.kubernetes.io","service.kubernetes.io","cloud.google.com"]` | IngressLBAnnotations are the annotation and label prefixes, which are used to filter annotations and/or labels to propagate from Ingress to the Load Balancer service |
| ingressController.loadbalancerMode | string | `"dedicated"` | Default ingress load balancer mode Supported values: shared, dedicated For granular control, use the following annotations on the ingress resource ingress.cilium.io/loadbalancer-mode: shared|dedicated, |
| ingressController.hostNetwork.enabled | bool | `false` | Configure whether the Envoy listeners should be exposed on the host network. |
| ingressController.hostNetwork.nodes.matchLabels | object | `{}` | Specify the labels of the nodes where the Ingress listeners should be exposed matchLabels: kubernetes.io/os: linux kubernetes.io/hostname: kind-worker |
| ingressController.hostNetwork.sharedListenerPort | int | `8080` | Configure a specific port on the host network that gets used for the shared listener. |
| ingressController.ingressLBAnnotationPrefixes | list | `["lbipam.cilium.io","nodeipam.cilium.io","service.beta.kubernetes.io","service.kubernetes.io","cloud.google.com"]` | IngressLBAnnotations are the annotation and label prefixes, which are used to filter annotations and/or labels to propagate from Ingress to the Load Balancer service |
| ingressController.loadbalancerMode | string | `"dedicated"` | Default ingress load balancer mode Supported values: shared, dedicated For granular control, use the following annotations on the ingress resource: "ingress.cilium.io/loadbalancer-mode: dedicated" (or "shared"). |
| ingressController.secretsNamespace | object | `{"create":true,"name":"cilium-secrets","sync":true}` | SecretsNamespace is the namespace in which envoy SDS will retrieve TLS secrets from. |
| ingressController.secretsNamespace.create | bool | `true` | Create secrets namespace for Ingress. |
| ingressController.secretsNamespace.name | string | `"cilium-secrets"` | Name of Ingress secret namespace. |
| ingressController.secretsNamespace.sync | bool | `true` | Enable secret sync, which will make sure all TLS secrets used by Ingress are synced to secretsNamespace.name. If disabled, TLS secrets must be maintained externally. |
| ingressController.service | object | `{"allocateLoadBalancerNodePorts":null,"annotations":{},"insecureNodePort":null,"labels":{},"loadBalancerClass":null,"loadBalancerIP":null,"name":"cilium-ingress","secureNodePort":null,"type":"LoadBalancer"}` | Load-balancer service in shared mode. This is a single load-balancer service for all Ingress resources. |
| ingressController.service | object | `{"allocateLoadBalancerNodePorts":null,"annotations":{},"externalTrafficPolicy":"Cluster","insecureNodePort":null,"labels":{},"loadBalancerClass":null,"loadBalancerIP":null,"name":"cilium-ingress","secureNodePort":null,"type":"LoadBalancer"}` | Load-balancer service in shared mode. This is a single load-balancer service for all Ingress resources. |
| ingressController.service.allocateLoadBalancerNodePorts | string | `nil` | Configure if node port allocation is required for LB service ref: https://kubernetes.io/docs/concepts/services-networking/service/#load-balancer-nodeport-allocation |
| ingressController.service.annotations | object | `{}` | Annotations to be added for the shared LB service |
| ingressController.service.externalTrafficPolicy | string | `"Cluster"` | Control how traffic from external sources is routed to the LoadBalancer Kubernetes Service for Cilium Ingress in shared mode. Valid values are "Cluster" and "Local". ref: https://kubernetes.io/docs/reference/networking/virtual-ips/#external-traffic-policy |
| ingressController.service.insecureNodePort | string | `nil` | Configure a specific nodePort for insecure HTTP traffic on the shared LB service |
| ingressController.service.labels | object | `{}` | Labels to be added for the shared LB service |
| ingressController.service.loadBalancerClass | string | `nil` | Configure a specific loadBalancerClass on the shared LB service (requires Kubernetes 1.24+) |
@@ -593,18 +616,20 @@ contributors across the globe, there is almost always someone available to help.
| ipam.operator.clusterPoolIPv4PodCIDRList | list | `["10.0.0.0/8"]` | IPv4 CIDR list range to delegate to individual nodes for IPAM. |
| ipam.operator.clusterPoolIPv6MaskSize | int | `120` | IPv6 CIDR mask size to delegate to individual nodes for IPAM. |
| ipam.operator.clusterPoolIPv6PodCIDRList | list | `["fd00::/104"]` | IPv6 CIDR list range to delegate to individual nodes for IPAM. |
| ipam.operator.externalAPILimitBurstSize | string | `20` | The maximum burst size when rate limiting access to external APIs. Also known as the token bucket capacity. |
| ipam.operator.externalAPILimitQPS | string | `4.0` | The maximum queries per second when rate limiting access to external APIs. Also known as the bucket refill rate, which is used to refill the bucket up to the burst size capacity. |
| ipam.operator.externalAPILimitBurstSize | int | `20` | The maximum burst size when rate limiting access to external APIs. Also known as the token bucket capacity. |
| ipam.operator.externalAPILimitQPS | float | `4.0` | The maximum queries per second when rate limiting access to external APIs. Also known as the bucket refill rate, which is used to refill the bucket up to the burst size capacity. |
| ipv4.enabled | bool | `true` | Enable IPv4 support. |
| ipv4NativeRoutingCIDR | string | `""` | Allows to explicitly specify the IPv4 CIDR for native routing. When specified, Cilium assumes networking for this CIDR is preconfigured and hands traffic destined for that range to the Linux network stack without applying any SNAT. Generally speaking, specifying a native routing CIDR implies that Cilium can depend on the underlying networking stack to route packets to their destination. To offer a concrete example, if Cilium is configured to use direct routing and the Kubernetes CIDR is included in the native routing CIDR, the user must configure the routes to reach pods, either manually or by setting the auto-direct-node-routes flag. |
| ipv6.enabled | bool | `false` | Enable IPv6 support. |
| ipv6NativeRoutingCIDR | string | `""` | Allows to explicitly specify the IPv6 CIDR for native routing. When specified, Cilium assumes networking for this CIDR is preconfigured and hands traffic destined for that range to the Linux network stack without applying any SNAT. Generally speaking, specifying a native routing CIDR implies that Cilium can depend on the underlying networking stack to route packets to their destination. To offer a concrete example, if Cilium is configured to use direct routing and the Kubernetes CIDR is included in the native routing CIDR, the user must configure the routes to reach pods, either manually or by setting the auto-direct-node-routes flag. |
| k8s | object | `{}` | Configure Kubernetes specific configuration |
| k8s | object | `{"requireIPv4PodCIDR":false,"requireIPv6PodCIDR":false}` | Configure Kubernetes specific configuration |
| k8s.requireIPv4PodCIDR | bool | `false` | requireIPv4PodCIDR enables waiting for Kubernetes to provide the PodCIDR range via the Kubernetes node resource |
| k8s.requireIPv6PodCIDR | bool | `false` | requireIPv6PodCIDR enables waiting for Kubernetes to provide the PodCIDR range via the Kubernetes node resource |
| k8sClientRateLimit | object | `{"burst":null,"qps":null}` | Configure the client side rate limit for the agent and operator If the amount of requests to the Kubernetes API server exceeds the configured rate limit, the agent and operator will start to throttle requests by delaying them until there is budget or the request times out. |
| k8sClientRateLimit.burst | int | 10 for k8s up to 1.26. 20 for k8s version 1.27+ | The burst request rate in requests per second. The rate limiter will allow short bursts with a higher rate. |
| k8sClientRateLimit.qps | int | 5 for k8s up to 1.26. 10 for k8s version 1.27+ | The sustained request rate in requests per second. |
| k8sNetworkPolicy.enabled | bool | `true` | Enable support for K8s NetworkPolicy |
| k8sServiceHost | string | `""` | Kubernetes service host |
| k8sServiceHost | string | `""` | Kubernetes service host - use "auto" for automatic lookup from the cluster-info ConfigMap (kubeadm-based clusters only) |
| k8sServicePort | string | `""` | Kubernetes service port |
| keepDeprecatedLabels | bool | `false` | Keep the deprecated selector labels when deploying Cilium DaemonSet. |
| keepDeprecatedProbes | bool | `false` | Keep the deprecated probes when deploying Cilium DaemonSet |
@@ -634,13 +659,16 @@ contributors across the globe, there is almost always someone available to help.
| name | string | `"cilium"` | Agent container name. |
| nat46x64Gateway | object | `{"enabled":false}` | Configure standalone NAT46/NAT64 gateway |
| nat46x64Gateway.enabled | bool | `false` | Enable RFC8215-prefixed translation |
| nodePort | object | `{"autoProtectPortRange":true,"bindProtection":true,"enableHealthCheck":true,"enableHealthCheckLoadBalancerIP":false,"enabled":false}` | Configure N-S k8s service loadbalancing |
| nodeIPAM.enabled | bool | `false` | Configure Node IPAM ref: https://docs.cilium.io/en/stable/network/node-ipam/ |
| nodePort | object | `{"addresses":null,"autoProtectPortRange":true,"bindProtection":true,"enableHealthCheck":true,"enableHealthCheckLoadBalancerIP":false,"enabled":false}` | Configure N-S k8s service loadbalancing |
| nodePort.addresses | string | `nil` | List of CIDRs for choosing which IP addresses assigned to native devices are used for NodePort load-balancing. By default this is empty and the first suitable, preferably private, IPv4 and IPv6 address assigned to each device is used. Example: addresses: ["192.168.1.0/24", "2001::/64"] |
| nodePort.autoProtectPortRange | bool | `true` | Append NodePort range to ip_local_reserved_ports if clash with ephemeral ports is detected. |
| nodePort.bindProtection | bool | `true` | Set to true to prevent applications binding to service ports. |
| nodePort.enableHealthCheck | bool | `true` | Enable healthcheck nodePort server for NodePort services |
| nodePort.enableHealthCheckLoadBalancerIP | bool | `false` | Enable access of the healthcheck nodePort on the LoadBalancerIP. Needs EnableHealthCheck to be enabled |
| nodePort.enabled | bool | `false` | Enable the Cilium NodePort service implementation. |
| nodeSelector | object | `{"kubernetes.io/os":"linux"}` | Node selector for cilium-agent. |
| nodeSelectorLabels | bool | `false` | Enable/Disable use of node label based identity |
| nodeinit.affinity | object | `{}` | Affinity for cilium-nodeinit |
| nodeinit.annotations | object | `{}` | Annotations to be added to all top-level nodeinit objects (resources under templates/cilium-nodeinit) |
| nodeinit.bootstrapFile | string | `"/tmp/cilium-bootstrap.d/cilium-bootstrap-time"` | bootstrapFile is the location of the file where the bootstrap timestamp is written by the node-init DaemonSet |
@@ -672,9 +700,10 @@ contributors across the globe, there is almost always someone available to help.
| operator.extraHostPathMounts | list | `[]` | Additional cilium-operator hostPath mounts. |
| operator.extraVolumeMounts | list | `[]` | Additional cilium-operator volumeMounts. |
| operator.extraVolumes | list | `[]` | Additional cilium-operator volumes. |
| operator.hostNetwork | bool | `true` | HostNetwork setting |
| operator.identityGCInterval | string | `"15m0s"` | Interval for identity garbage collection. |
| operator.identityHeartbeatTimeout | string | `"30m0s"` | Timeout for identity heartbeats. |
| operator.image | object | `{"alibabacloudDigest":"sha256:2dcd7e3305cb47e4b5fbbb9bc2451d6aacb18788a87cab95cf86aec65ec19329","awsDigest":"sha256:bb4085da666a5c7a7c6f8135f0de10f0b6895dbf561e9fccda0e272b51bb936e","azureDigest":"sha256:8e189549bc3c31a44a1171cc970b8e502ae8bf55cd07035735c4b3a24a16f80b","genericDigest":"sha256:6840a6dde703b3e73dd31e03390327a9184fcb888efbad9d9d098d65b9035b54","override":null,"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/operator","suffix":"","tag":"v1.15.7","useDigest":true}` | cilium-operator image. |
| operator.image | object | `{"alibabacloudDigest":"sha256:d2d9f450f2fc650d74d4b3935f4c05736e61145b9c6927520ea52e1ebcf4f3ea","awsDigest":"sha256:8dbe47a77ba8e1a5b111647a43db10c213d1c7dfc9f9aab5ef7279321ad21a2f","azureDigest":"sha256:dd7562e20bc72b55c65e2110eb98dca1dd2bbf6688b7d8cea2bc0453992c121d","genericDigest":"sha256:d6621c11c4e4943bf2998af7febe05be5ed6fdcf812b27ad4388f47022190316","override":null,"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/operator","suffix":"","tag":"v1.16.0","useDigest":true}` | cilium-operator image. |
| operator.nodeGCInterval | string | `"5m0s"` | Interval for cilium node garbage collection. |
| operator.nodeSelector | object | `{"kubernetes.io/os":"linux"}` | Node labels for cilium-operator pod assignment ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector |
| operator.podAnnotations | object | `{}` | Annotations to be added to cilium-operator pods |
@@ -702,7 +731,6 @@ contributors across the globe, there is almost always someone available to help.
| operator.securityContext | object | `{}` | Security context to be added to cilium-operator pods |
| operator.setNodeNetworkStatus | bool | `true` | Set Node condition NetworkUnavailable to 'false' with the reason 'CiliumIsUp' for nodes that have a healthy Cilium pod. |
| operator.setNodeTaints | string | same as removeNodeTaints | Taint nodes where Cilium is scheduled but not running. This prevents pods from being scheduled to nodes where Cilium is not the default CNI provider. |
| operator.skipCNPStatusStartupClean | bool | `false` | Skip CNP node status clean up at operator startup. |
| operator.skipCRDCreation | bool | `false` | Skip CRDs creation for cilium-operator |
| operator.tolerations | list | `[{"operator":"Exists"}]` | Node tolerations for cilium-operator scheduling to nodes with taints ref: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/ |
| operator.topologySpreadConstraints | list | `[]` | Pod topology spread constraints for cilium-operator |
@@ -725,7 +753,7 @@ contributors across the globe, there is almost always someone available to help.
| preflight.extraEnv | list | `[]` | Additional preflight environment variables. |
| preflight.extraVolumeMounts | list | `[]` | Additional preflight volumeMounts. |
| preflight.extraVolumes | list | `[]` | Additional preflight volumes. |
| preflight.image | object | `{"digest":"sha256:2e432bf6879feb8b891c497d6fd784b13e53456017d2b8e4ea734145f0282ef0","override":null,"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/cilium","tag":"v1.15.7","useDigest":true}` | Cilium pre-flight image. |
| preflight.image | object | `{"digest":"sha256:46ffa4ef3cf6d8885dcc4af5963b0683f7d59daa90d49ed9fb68d3b1627fe058","override":null,"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/cilium","tag":"v1.16.0","useDigest":true}` | Cilium pre-flight image. |
| preflight.nodeSelector | object | `{"kubernetes.io/os":"linux"}` | Node labels for preflight pod assignment ref: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector |
| preflight.podAnnotations | object | `{}` | Annotations to be added to preflight pods |
| preflight.podDisruptionBudget.enabled | bool | `false` | enable PodDisruptionBudget ref: https://kubernetes.io/docs/concepts/workloads/pods/disruptions/ |
@@ -734,11 +762,13 @@ contributors across the globe, there is almost always someone available to help.
| preflight.podLabels | object | `{}` | Labels to be added to the preflight pod. |
| preflight.podSecurityContext | object | `{}` | Security context to be added to preflight pods. |
| preflight.priorityClassName | string | `""` | The priority class to use for the preflight pod. |
| preflight.readinessProbe.initialDelaySeconds | int | `5` | For how long kubelet should wait before performing the first probe |
| preflight.readinessProbe.periodSeconds | int | `5` | interval between checks of the readiness probe |
| preflight.resources | object | `{}` | preflight resource limits & requests ref: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ |
| preflight.securityContext | object | `{}` | Security context to be added to preflight pods |
| preflight.terminationGracePeriodSeconds | int | `1` | Configure termination grace period for preflight Deployment and DaemonSet. |
| preflight.tofqdnsPreCache | string | `""` | Path to write the `--tofqdns-pre-cache` file to. |
| preflight.tolerations | list | `[{"effect":"NoSchedule","key":"node.kubernetes.io/not-ready"},{"effect":"NoSchedule","key":"node-role.kubernetes.io/master"},{"effect":"NoSchedule","key":"node-role.kubernetes.io/control-plane"},{"effect":"NoSchedule","key":"node.cloudprovider.kubernetes.io/uninitialized","value":"true"},{"key":"CriticalAddonsOnly","operator":"Exists"}]` | Node tolerations for preflight scheduling to nodes with taints ref: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/ |
| preflight.tolerations | list | `[{"operator":"Exists"}]` | Node tolerations for preflight scheduling to nodes with taints ref: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/ |
| preflight.updateStrategy | object | `{"type":"RollingUpdate"}` | preflight update strategy |
| preflight.validateCNPs | bool | `true` | By default we should always validate the installed CNPs before upgrading Cilium. This will make sure the user will have the policies deployed in the cluster with the right schema. |
| priorityClassName | string | `""` | The priority class to use for cilium-agent. |
@@ -753,14 +783,9 @@ contributors across the globe, there is almost always someone available to help.
| prometheus.serviceMonitor.metricRelabelings | string | `nil` | Metrics relabeling configs for the ServiceMonitor cilium-agent |
| prometheus.serviceMonitor.relabelings | list | `[{"replacement":"${1}","sourceLabels":["__meta_kubernetes_pod_node_name"],"targetLabel":"node"}]` | Relabeling configs for the ServiceMonitor cilium-agent |
| prometheus.serviceMonitor.trustCRDsExist | bool | `false` | Set to `true` and helm will not check for monitoring.coreos.com/v1 CRDs before deploying |
| proxy | object | `{"prometheus":{"enabled":true,"port":null},"sidecarImageRegex":"cilium/istio_proxy"}` | Configure Istio proxy options. |
| proxy.prometheus.enabled | bool | `true` | Deprecated in favor of envoy.prometheus.enabled |
| proxy.prometheus.port | string | `nil` | Deprecated in favor of envoy.prometheus.port |
| proxy.sidecarImageRegex | string | `"cilium/istio_proxy"` | Regular expression matching compatible Istio sidecar istio-proxy container image names |
| rbac.create | bool | `true` | Enable creation of Resource-Based Access Control configuration. |
| readinessProbe.failureThreshold | int | `3` | failure threshold of readiness probe |
| readinessProbe.periodSeconds | int | `30` | interval between checks of the readiness probe |
| remoteNodeIdentity | bool | `true` | Enable use of the remote node identity. ref: https://docs.cilium.io/en/v1.7/install/upgrade/#configmap-remote-node-identity Deprecated without replacement in 1.15. To be removed in 1.16. |
| resourceQuotas | object | `{"cilium":{"hard":{"pods":"10k"}},"enabled":false,"operator":{"hard":{"pods":"15"}}}` | Enable resource quotas for priority classes used in the cluster. |
| resources | object | `{}` | Agent resource limits & requests ref: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ |
| rollOutCiliumPods | bool | `false` | Roll out cilium agent pods automatically when configmap is updated. |
@@ -803,6 +828,7 @@ contributors across the globe, there is almost always someone available to help.
| tunnelPort | int | Port 8472 for VXLAN, Port 6081 for Geneve | Configure VXLAN and Geneve tunnel port. |
| tunnelProtocol | string | `"vxlan"` | Tunneling protocol to use in tunneling mode and for ad-hoc tunnels. Possible values: - "" - vxlan - geneve |
| updateStrategy | object | `{"rollingUpdate":{"maxUnavailable":2},"type":"RollingUpdate"}` | Cilium agent update strategy |
| upgradeCompatibility | string | `nil` | upgradeCompatibility helps users upgrading to ensure that the configMap for Cilium will not change critical values to ensure continued operation This flag is not required for new installations. For example: '1.7', '1.8', '1.9' |
| vtep.cidr | string | `""` | A space separated list of VTEP device CIDRs, for example "1.1.1.0/24 1.1.2.0/24" |
| vtep.enabled | bool | `false` | Enables VXLAN Tunnel Endpoint (VTEP) Integration (beta) to allow Cilium-managed pods to talk to third party VTEP devices over Cilium tunnel. |
| vtep.endpoint | string | `""` | A space separated list of VTEP device endpoint IPs, for example "1.1.1.1 1.1.2.1" |

View File

@@ -4691,21 +4691,21 @@
"steppedLine": false,
"targets": [
{
"expr": "sum(rate(cilium_policy_l7_denied_total{k8s_app=\"cilium\", pod=~\"$pod\"}[1m]))",
"expr": "sum(rate(cilium_policy_l7_total{k8s_app=\"cilium\", pod=~\"$pod\", rule=\"denied\"}[1m]))",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "denied",
"refId": "A"
},
{
"expr": "sum(rate(cilium_policy_l7_forwarded_total{k8s_app=\"cilium\", pod=~\"$pod\"}[1m]))",
"expr": "sum(rate(cilium_policy_l7_total{k8s_app=\"cilium\", pod=~\"$pod\", rule=\"forwarded\"}[1m]))",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "forwarded",
"refId": "B"
},
{
"expr": "sum(rate(cilium_policy_l7_received_total{k8s_app=\"cilium\", pod=~\"$pod\"}[1m]))",
"expr": "sum(rate(cilium_policy_l7_total{k8s_app=\"cilium\", pod=~\"$pod\", rule=\"received\"}[1m]))",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "received",
@@ -4857,7 +4857,7 @@
"aliasColors": {
"Max per node processingTime": "#e24d42",
"Max per node upstreamTime": "#58140c",
"avg(cilium_policy_l7_parse_errors_total{pod=~\"cilium.*\"})": "#bf1b00",
"avg(cilium_policy_l7_total{pod=~\"cilium.*\", rule=\"parse_errors\"})": "#bf1b00",
"parse errors": "#bf1b00"
},
"bars": true,
@@ -4916,7 +4916,7 @@
"yaxis": 2
},
{
"alias": "avg(cilium_policy_l7_parse_errors_total{pod=~\"cilium.*\"})",
"alias": "avg(cilium_policy_l7_total{pod=~\"cilium.*\", rule=\"parse_errors\"})",
"yaxis": 2
},
{
@@ -4937,7 +4937,7 @@
"refId": "A"
},
{
"expr": "avg(cilium_policy_l7_parse_errors_total{k8s_app=\"cilium\", pod=~\"$pod\"}) by (pod)",
"expr": "avg(cilium_policy_l7_total{k8s_app=\"cilium\", pod=~\"$pod\", rule=\"parse_errors\"}) by (pod)",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "parse errors",
@@ -5295,7 +5295,7 @@
"refId": "B"
},
{
"expr": "max(rate(cilium_policy_l7_parse_errors_total{k8s_app=\"cilium\", pod=~\"$pod\"}[1m])) by (pod)",
"expr": "max(rate(cilium_policy_l7_total{k8s_app=\"cilium\", pod=~\"$pod\", rule=\"parse_errors\"}[1m])) by (pod)",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "parse errors",

View File

@@ -5,13 +5,13 @@
},
"staticResources": {
"listeners": [
{{- if and .Values.proxy.prometheus.enabled .Values.envoy.prometheus.enabled }}
{{- if .Values.envoy.prometheus.enabled }}
{
"name": "envoy-prometheus-metrics-listener",
"address": {
"socket_address": {
"address": "0.0.0.0",
"port_value": {{ .Values.proxy.prometheus.port | default .Values.envoy.prometheus.port }}
"port_value": {{ .Values.envoy.prometheus.port }}
}
},
"filter_chains": [
@@ -60,6 +60,73 @@
]
},
{{- end }}
{{- if and .Values.envoy.debug.admin.enabled }}
{
"name": "envoy-admin-listener",
"address": {
"socket_address": {
"address": {{ .Values.ipv4.enabled | ternary "127.0.0.1" "::1" | quote }},
"port_value": {{ .Values.envoy.debug.admin.port }}
}
},
{{- if and .Values.ipv4.enabled .Values.ipv6.enabled }}
"additional_addresses": [
{
"address": {
"socket_address": {
"address": "::1",
"port_value": {{ .Values.envoy.debug.admin.port }}
}
}
}
],
{{- end }}
"filter_chains": [
{
"filters": [
{
"name": "envoy.filters.network.http_connection_manager",
"typed_config": {
"@type": "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager",
"stat_prefix": "envoy-admin-listener",
"route_config": {
"virtual_hosts": [
{
"name": "admin_route",
"domains": [
"*"
],
"routes": [
{
"name": "admin_route",
"match": {
"prefix": "/"
},
"route": {
"cluster": "/envoy-admin",
"prefix_rewrite": "/"
}
}
]
}
]
},
"http_filters": [
{
"name": "envoy.filters.http.router",
"typed_config": {
"@type": "type.googleapis.com/envoy.extensions.filters.http.router.v3.Router"
}
}
],
"stream_idle_timeout": "0s"
}
}
]
}
]
},
{{- end }}
{
"name": "envoy-health-listener",
"address": {

View File

@@ -1,9 +1,22 @@
{
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
],
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
@@ -25,7 +38,10 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
"custom": {}
@@ -151,7 +167,10 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
"custom": {}
@@ -281,7 +300,10 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
"custom": {}
@@ -378,7 +400,10 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
"custom": {}
@@ -475,7 +500,10 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
"custom": {}
@@ -572,7 +600,10 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
"custom": {}
@@ -669,7 +700,10 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
"custom": {}
@@ -766,7 +800,10 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
"custom": {}
@@ -863,7 +900,10 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fieldConfig": {
"defaults": {
"custom": {}

View File

@@ -1,4 +1,14 @@
{
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
],
"annotations": {
"list": [
{
@@ -36,7 +46,10 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fill": 1,
"gridPos": {
"h": 5,
@@ -151,7 +164,10 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fill": 1,
"gridPos": {
"h": 5,
@@ -237,7 +253,10 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fill": 1,
"gridPos": {
"h": 5,
@@ -323,7 +342,10 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fill": 1,
"gridPos": {
"h": 5,
@@ -422,7 +444,10 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fill": 1,
"gridPos": {
"h": 5,
@@ -508,7 +533,10 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fill": 1,
"gridPos": {
"h": 5,
@@ -594,7 +622,10 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fill": 1,
"gridPos": {
"h": 5,
@@ -681,7 +712,10 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fill": 1,
"gridPos": {
"h": 5,
@@ -773,7 +807,10 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fill": 1,
"gridPos": {
"h": 5,
@@ -906,7 +943,10 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fill": 1,
"gridPos": {
"h": 5,
@@ -1014,7 +1054,10 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fill": 1,
"gridPos": {
"h": 5,
@@ -1139,7 +1182,10 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fill": 1,
"gridPos": {
"h": 5,
@@ -1247,7 +1293,10 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fill": 1,
"gridPos": {
"h": 5,
@@ -1367,7 +1416,10 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fill": 1,
"gridPos": {
"h": 5,
@@ -1462,7 +1514,10 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fill": 1,
"gridPos": {
"h": 5,
@@ -1548,7 +1603,10 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fill": 1,
"gridPos": {
"h": 5,
@@ -1648,7 +1706,10 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fill": 1,
"gridPos": {
"h": 4,
@@ -1734,7 +1795,10 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fill": 1,
"gridPos": {
"h": 4,
@@ -1820,7 +1884,10 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fill": 1,
"gridPos": {
"h": 5,
@@ -1906,7 +1973,10 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fill": 1,
"gridPos": {
"h": 5,
@@ -2005,7 +2075,10 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fill": 1,
"gridPos": {
"h": 6,
@@ -2092,7 +2165,10 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fill": 1,
"gridPos": {
"h": 6,
@@ -2179,7 +2255,10 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fill": 1,
"gridPos": {
"h": 5,
@@ -2265,7 +2344,10 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fill": 1,
"gridPos": {
"h": 5,
@@ -2351,7 +2433,10 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fill": 1,
"gridPos": {
"h": 5,
@@ -2451,7 +2536,10 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fill": 1,
"gridPos": {
"h": 5,
@@ -2537,7 +2625,10 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fill": 1,
"gridPos": {
"h": 5,
@@ -2658,7 +2749,10 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fill": 1,
"gridPos": {
"h": 5,
@@ -2752,7 +2846,10 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fill": 1,
"gridPos": {
"h": 5,
@@ -2839,7 +2936,10 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fill": 1,
"gridPos": {
"h": 5,
@@ -2926,7 +3026,10 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fill": 1,
"gridPos": {
"h": 5,
@@ -3013,7 +3116,10 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fill": 1,
"gridPos": {
"h": 5,
@@ -3103,7 +3209,10 @@
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "prometheus",
"datasource": {
"type": "prometheus",
"uid": "${DS_PROMETHEUS}"
},
"fill": 1,
"gridPos": {
"h": 6,

View File

@@ -1,5 +1,14 @@
{
"__inputs": [],
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
],
"__elements": {},
"__requires": [
{

View File

@@ -0,0 +1,50 @@
{{/*
_extensions.tpl contains template blocks that are intended to allow packagers
to modify or extend the default chart behaviors.
*/}}
{{/*
Intentionally empty to allow downstream chart packagers to add extra
containers to hubble-relay without having to modify the deployment manifest
directly.
*/}}
{{- define "hubble-relay.containers.extra" }}
{{- end }}
{{/*
Allow packagers to add extra volumes to relay.
*/}}
{{- define "hubble-relay.volumes.extra" }}
{{- end }}
{{/*
Allow packagers to modify how hubble-relay TLS is configured.
A packager may want to change when TLS is enabled or prevent users from
disabling TLS. This means the template needs to allow overriding, not just
adding, which is why this template is not empty by default, like the ones
above.
*/}}
{{- define "hubble-relay.config.tls" }}
{{- if and .Values.hubble.tls.enabled .Values.hubble.relay.tls.server.enabled }}
tls-relay-server-cert-file: /var/lib/hubble-relay/tls/server.crt
tls-relay-server-key-file: /var/lib/hubble-relay/tls/server.key
{{- if .Values.hubble.relay.tls.server.mtls }}
tls-relay-client-ca-files: /var/lib/hubble-relay/tls/hubble-server-ca.crt
{{- end }}
{{- else }}
disable-server-tls: true
{{- end }}
{{- end }}
{{- define "hubble-relay.config.listenAddress" -}}
{{- .Values.hubble.relay.listenHost }}:{{- include "hubble-relay.config.listenPort" . -}}
{{- end }}
{{- define "hubble-relay.config.listenPort" -}}
{{- .Values.hubble.relay.listenPort }}
{{- end }}
{{- define "hubble-relay.service.targetPort" -}}
grpc
{{- end }}

View File

@@ -43,62 +43,7 @@ where:
{{- if $priorityClass }}
{{- $priorityClass }}
{{- else if and $root.Values.enableCriticalPriorityClass $criticalPriorityClass -}}
{{- if and (eq $root.Release.Namespace "kube-system") (semverCompare ">=1.10-0" $root.Capabilities.KubeVersion.Version) -}}
{{- $criticalPriorityClass }}
{{- else if semverCompare ">=1.17-0" $root.Capabilities.KubeVersion.Version -}}
{{- $criticalPriorityClass }}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Return the appropriate apiVersion for ingress.
*/}}
{{- define "ingress.apiVersion" -}}
{{- if semverCompare ">=1.16-0, <1.19-0" .Capabilities.KubeVersion.Version -}}
{{- print "networking.k8s.io/v1beta1" -}}
{{- else if semverCompare "^1.19-0" .Capabilities.KubeVersion.Version -}}
{{- print "networking.k8s.io/v1" -}}
{{- end -}}
{{- end -}}
{{/*
Return the appropriate backend for Hubble UI ingress.
*/}}
{{- define "ingress.paths" -}}
{{ if semverCompare ">=1.4-0, <1.19-0" .Capabilities.KubeVersion.Version -}}
backend:
serviceName: hubble-ui
servicePort: http
{{- else if semverCompare "^1.19-0" .Capabilities.KubeVersion.Version -}}
pathType: Prefix
backend:
service:
name: hubble-ui
port:
name: http
{{- end -}}
{{- end -}}
{{/*
Return the appropriate apiVersion for cronjob.
*/}}
{{- define "cronjob.apiVersion" -}}
{{- if semverCompare ">=1.21-0" .Capabilities.KubeVersion.Version -}}
{{- print "batch/v1" -}}
{{- else -}}
{{- print "batch/v1beta1" -}}
{{- end -}}
{{- end -}}
{{/*
Return the appropriate apiVersion for podDisruptionBudget.
*/}}
{{- define "podDisruptionBudget.apiVersion" -}}
{{- if semverCompare ">=1.21-0" .Capabilities.KubeVersion.Version -}}
{{- print "policy/v1" -}}
{{- else -}}
{{- print "policy/v1beta1" -}}
{{- $criticalPriorityClass }}
{{- end -}}
{{- end -}}
@@ -154,3 +99,61 @@ Validate duration field, return validated duration, 0s when provided duration is
0s
{{- end }}
{{- end }}
{{/*
Convert a map to a comma-separated string: key1=value1,key2=value2
*/}}
{{- define "mapToString" -}}
{{- $list := list -}}
{{- range $k, $v := . -}}
{{- $list = append $list (printf "%s=%s" $k $v) -}}
{{- end -}}
{{ join "," $list }}
{{- end -}}
{{/*
Enable automatic lookup of k8sServiceHost from the cluster-info ConfigMap (kubeadm-based clusters only)
*/}}
{{- define "k8sServiceHost" }}
{{- if eq .Values.k8sServiceHost "auto" }}
{{- $configmap := (lookup "v1" "ConfigMap" "kube-public" "cluster-info") }}
{{- $kubeconfig := get $configmap.data "kubeconfig" }}
{{- $k8sServer := get ($kubeconfig | fromYaml) "clusters" | mustFirst | dig "cluster" "server" "" }}
{{- $uri := (split "https://" $k8sServer)._1 | trim }}
{{- (split ":" $uri)._0 | quote }}
{{- else }}
{{- .Values.k8sServiceHost | quote }}
{{- end }}
{{- end }}
{{/*
Enable automatic lookup of k8sServicePort from the cluster-info ConfigMap (kubeadm-based clusters only)
*/}}
{{- define "k8sServicePort" }}
{{- if eq .Values.k8sServiceHost "auto" }}
{{- $configmap := (lookup "v1" "ConfigMap" "kube-public" "cluster-info") }}
{{- $kubeconfig := get $configmap.data "kubeconfig" }}
{{- $k8sServer := get ($kubeconfig | fromYaml) "clusters" | mustFirst | dig "cluster" "server" "" }}
{{- $uri := (split "https://" $k8sServer)._1 | trim }}
{{- (split ":" $uri)._1 | quote }}
{{- else }}
{{- .Values.k8sServicePort | quote }}
{{- end }}
{{- end }}
{{/*
Return user specify envoy.enabled or default value based on the upgradeCompatibility
*/}}
{{- define "envoyDaemonSetEnabled" }}
{{- if not .Values.l7Proxy }}
{{- false }}
{{- else if (not (kindIs "invalid" .Values.envoy.enabled)) }}
{{- .Values.envoy.enabled }}
{{- else }}
{{- if semverCompare ">=1.16" (default "1.16" .Values.upgradeCompatibility) }}
{{- true }}
{{- else }}
{{- false }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -1,4 +1,4 @@
{{- if and .Values.agent (not .Values.preflight.enabled) }}
{{- if and .Values.agent (not .Values.preflight.enabled) .Values.rbac.create }}
{{- /*
Keep file in sync with cilium-preflight/clusterrole.yaml
*/ -}}
@@ -41,6 +41,15 @@ rules:
- get
- list
- watch
{{- if and .Values.hubble.enabled .Values.hubble.dropEventEmitter.enabled }}
- apiGroups:
- ""
resources:
- events
verbs:
- create
- patch
{{- end }}
{{- if .Values.annotateK8sNode }}
- apiGroups:
- ""
@@ -139,8 +148,6 @@ rules:
- apiGroups:
- cilium.io
resources:
- ciliumnetworkpolicies/status
- ciliumclusterwidenetworkpolicies/status
- ciliumendpoints/status
- ciliumendpoints
- ciliuml2announcementpolicies/status

View File

@@ -1,4 +1,4 @@
{{- if and .Values.agent (not .Values.preflight.enabled) .Values.serviceAccounts.cilium.create }}
{{- if and .Values.agent (not .Values.preflight.enabled) .Values.serviceAccounts.cilium.create .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:

View File

@@ -9,6 +9,7 @@
{{- end -}}
{{- $kubeProxyReplacement := (coalesce .Values.kubeProxyReplacement "false") -}}
{{- $envoyDS := eq (include "envoyDaemonSetEnabled" .) "true" -}}
---
apiVersion: apps/v1
@@ -122,7 +123,6 @@ spec:
{{- with .Values.extraArgs }}
{{- toYaml . | trim | nindent 8 }}
{{- end }}
{{- if semverCompare ">=1.20-0" .Capabilities.KubeVersion.Version }}
startupProbe:
httpGet:
host: {{ .Values.ipv4.enabled | ternary "127.0.0.1" "::1" | quote }}
@@ -136,7 +136,6 @@ spec:
periodSeconds: {{ .Values.startupProbe.periodSeconds }}
successThreshold: 1
initialDelaySeconds: 5
{{- end }}
livenessProbe:
{{- if or .Values.keepDeprecatedProbes $defaultKeepDeprecatedProbes }}
exec:
@@ -154,14 +153,6 @@ spec:
- name: "brief"
value: "true"
{{- end }}
{{- if semverCompare "<1.20-0" .Capabilities.KubeVersion.Version }}
# The initial delay for the liveness probe is intentionally large to
# avoid an endless kill & restart cycle if in the event that the initial
# bootstrapping takes longer than expected.
# Starting from Kubernetes 1.20, we are using startupProbe instead
# of this field.
initialDelaySeconds: 120
{{- end }}
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
successThreshold: 1
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
@@ -183,9 +174,6 @@ spec:
- name: "brief"
value: "true"
{{- end }}
{{- if semverCompare "<1.20-0" .Capabilities.KubeVersion.Version }}
initialDelaySeconds: 5
{{- end }}
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
successThreshold: 1
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
@@ -211,11 +199,9 @@ spec:
divisor: '1'
{{- if .Values.k8sServiceHost }}
- name: KUBERNETES_SERVICE_HOST
value: {{ .Values.k8sServiceHost | quote }}
{{- end }}
{{- if .Values.k8sServicePort }}
value: {{ include "k8sServiceHost" . }}
- name: KUBERNETES_SERVICE_PORT
value: {{ .Values.k8sServicePort | quote }}
value: {{ include "k8sServicePort" . }}
{{- end }}
{{- with .Values.extraEnv }}
{{- toYaml . | trim | nindent 8 }}
@@ -251,10 +237,16 @@ spec:
containerPort: {{ .Values.prometheus.port }}
hostPort: {{ .Values.prometheus.port }}
protocol: TCP
{{- if and .Values.proxy.prometheus.enabled .Values.envoy.prometheus.enabled (not .Values.envoy.enabled) }}
{{- if and .Values.envoy.prometheus.enabled (not $envoyDS) }}
- name: envoy-metrics
containerPort: {{ .Values.proxy.prometheus.port | default .Values.envoy.prometheus.port }}
hostPort: {{ .Values.proxy.prometheus.port | default .Values.envoy.prometheus.port }}
containerPort: {{ .Values.envoy.prometheus.port }}
hostPort: {{ .Values.envoy.prometheus.port }}
protocol: TCP
{{- end }}
{{- if and .Values.envoy.debug.admin.port (not $envoyDS) }}
- name: envoy-admin
containerPort: {{ .Values.envoy.debug.admin.port }}
hostPort: {{ .Values.envoy.debug.admin.port }}
protocol: TCP
{{- end }}
{{- end }}
@@ -288,7 +280,7 @@ spec:
mountPath: {{ dir .Values.authentication.mutual.spire.adminSocketPath }}
readOnly: false
{{- end }}
{{- if .Values.envoy.enabled }}
{{- if $envoyDS }}
- name: envoy-sockets
mountPath: /var/run/cilium/envoy/sockets
readOnly: false
@@ -303,8 +295,7 @@ spec:
- mountPath: /host/proc/sys/kernel
name: host-proc-sys-kernel
{{- end}}
{{- /* CRI-O already mounts the BPF filesystem */ -}}
{{- if and .Values.bpf.autoMount.enabled (not (eq .Values.containerRuntime.integration "crio")) }}
{{- if .Values.bpf.autoMount.enabled }}
- name: bpf-maps
mountPath: /sys/fs/bpf
{{- if .Values.securityContext.privileged }}
@@ -324,13 +315,20 @@ spec:
{{- end}}
- name: cilium-run
mountPath: /var/run/cilium
{{- /* mount the directory if socketLB.enabled is true and socketLB.terminatePodConnections is not explicitly set to false */ -}}
{{- if or (and (kindIs "invalid" .Values.socketLB.terminatePodConnections) .Values.socketLB.enabled)
(and .Values.socketLB.enabled .Values.socketLB.terminatePodConnections) }}
- name: cilium-netns
mountPath: /var/run/cilium/netns
mountPropagation: HostToContainer
{{- end}}
- name: etc-cni-netd
mountPath: {{ .Values.cni.hostConfDirMountPath }}
{{- if .Values.etcd.enabled }}
- name: etcd-config-path
mountPath: /var/lib/etcd-config
readOnly: true
{{- if or .Values.etcd.ssl .Values.etcd.managed }}
{{- if .Values.etcd.ssl }}
- name: etcd-secrets
mountPath: /var/lib/etcd-secrets
readOnly: true
@@ -357,7 +355,7 @@ spec:
mountPath: /run/xtables.lock
{{- if and .Values.encryption.enabled (eq .Values.encryption.type "ipsec") }}
- name: cilium-ipsec-secrets
mountPath: {{ .Values.encryption.ipsec.mountPath | default .Values.encryption.mountPath }}
mountPath: {{ .Values.encryption.ipsec.mountPath }}
{{- end }}
{{- if .Values.kubeConfigPath }}
- name: kube-config
@@ -369,6 +367,11 @@ spec:
mountPath: /var/lib/cilium/bgp
readOnly: true
{{- end }}
{{- if and .Values.hubble.enabled .Values.hubble.metrics.enabled .Values.hubble.metrics.tls.enabled }}
- name: hubble-metrics-tls
mountPath: /var/lib/cilium/tls/hubble-metrics
readOnly: true
{{- end }}
{{- if and .Values.hubble.enabled .Values.hubble.tls.enabled (hasKey .Values.hubble "listenAddress") }}
- name: hubble-tls
mountPath: /var/lib/cilium/tls/hubble
@@ -456,11 +459,9 @@ spec:
fieldPath: metadata.namespace
{{- if .Values.k8sServiceHost }}
- name: KUBERNETES_SERVICE_HOST
value: {{ .Values.k8sServiceHost | quote }}
{{- end }}
{{- if .Values.k8sServicePort }}
value: {{ include "k8sServiceHost" . }}
- name: KUBERNETES_SERVICE_PORT
value: {{ .Values.k8sServicePort | quote }}
value: {{ include "k8sServicePort" . }}
{{- end }}
{{- with .Values.extraEnv }}
{{- toYaml . | nindent 8 }}
@@ -593,8 +594,7 @@ spec:
terminationMessagePolicy: FallbackToLogsOnError
securityContext:
privileged: true
{{- /* CRI-O already mounts the BPF filesystem */ -}}
{{- if and .Values.bpf.autoMount.enabled (not (eq .Values.containerRuntime.integration "crio")) }}
{{- if and .Values.bpf.autoMount.enabled }}
volumeMounts:
- name: bpf-maps
mountPath: /sys/fs/bpf
@@ -648,11 +648,9 @@ spec:
optional: true
{{- if .Values.k8sServiceHost }}
- name: KUBERNETES_SERVICE_HOST
value: {{ .Values.k8sServiceHost | quote }}
{{- end }}
{{- if .Values.k8sServicePort }}
value: {{ include "k8sServiceHost" . }}
- name: KUBERNETES_SERVICE_PORT
value: {{ .Values.k8sServicePort | quote }}
value: {{ include "k8sServicePort" . }}
{{- end }}
{{- with .Values.extraEnv }}
{{- toYaml . | nindent 8 }}
@@ -675,8 +673,7 @@ spec:
- ALL
{{- end}}
volumeMounts:
{{- /* CRI-O already mounts the BPF filesystem */ -}}
{{- if and .Values.bpf.autoMount.enabled (not (eq .Values.containerRuntime.integration "crio")) }}
{{- if .Values.bpf.autoMount.enabled}}
- name: bpf-maps
mountPath: /sys/fs/bpf
{{- end }}
@@ -758,18 +755,16 @@ spec:
- name: cni-path
mountPath: /host/opt/cni/bin
{{- end }} # .Values.cni.install
{{- if .Values.extraInitContainers }}
{{- toYaml .Values.extraInitContainers | nindent 6 }}
{{- end }}
restartPolicy: Always
priorityClassName: {{ include "cilium.priorityClass" (list $ .Values.priorityClassName "system-node-critical") }}
serviceAccount: {{ .Values.serviceAccounts.cilium.name | quote }}
serviceAccountName: {{ .Values.serviceAccounts.cilium.name | quote }}
automountServiceAccountToken: {{ .Values.serviceAccounts.cilium.automount }}
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
hostNetwork: true
{{- if and .Values.etcd.managed (not .Values.etcd.k8sService) }}
# In managed etcd mode, Cilium must be able to resolve the DNS name of
# the etcd service
dnsPolicy: ClusterFirstWithHostNet
{{- else if .Values.dnsPolicy }}
{{- if .Values.dnsPolicy }}
dnsPolicy: {{ .Values.dnsPolicy }}
{{- end }}
{{- with .Values.affinity }}
@@ -802,8 +797,15 @@ spec:
hostPath:
path: {{ .Values.daemon.runPath }}
type: DirectoryOrCreate
{{- /* CRI-O already mounts the BPF filesystem */ -}}
{{- if and .Values.bpf.autoMount.enabled (not (eq .Values.containerRuntime.integration "crio")) }}
{{- if or (and (kindIs "invalid" .Values.socketLB.terminatePodConnections) .Values.socketLB.enabled)
(and .Values.socketLB.enabled .Values.socketLB.terminatePodConnections) }}
# To exec into pod network namespaces
- name: cilium-netns
hostPath:
path: /var/run/netns
type: DirectoryOrCreate
{{- end }}
{{- if .Values.bpf.autoMount.enabled }}
# To keep state between restarts / upgrades for bpf maps
- name: bpf-maps
hostPath:
@@ -847,7 +849,7 @@ spec:
path: {{ dir .Values.authentication.mutual.spire.adminSocketPath }}
type: DirectoryOrCreate
{{- end }}
{{- if .Values.envoy.enabled }}
{{- if $envoyDS }}
# Sharing socket with Cilium Envoy on the same node by using a host path
- name: envoy-sockets
hostPath:
@@ -877,7 +879,7 @@ spec:
- key: etcd-config
path: etcd.config
# To read the k8s etcd secrets in case the user might want to use TLS
{{- if or .Values.etcd.ssl .Values.etcd.managed }}
{{- if .Values.etcd.ssl }}
- name: etcd-secrets
secret:
secretName: cilium-etcd-secrets
@@ -918,6 +920,29 @@ spec:
- key: {{ .Values.tls.caBundle.key }}
path: common-etcd-client-ca.crt
{{- end }}
# note: we configure the volume for the kvstoremesh-specific certificate
# regardless of whether KVStoreMesh is enabled or not, so that it can be
# automatically mounted in case KVStoreMesh gets subsequently enabled,
# without requiring an agent restart.
- secret:
name: clustermesh-apiserver-local-cert
optional: true
items:
- key: tls.key
path: local-etcd-client.key
- key: tls.crt
path: local-etcd-client.crt
{{- if not .Values.tls.caBundle.enabled }}
- key: ca.crt
path: local-etcd-client-ca.crt
{{- else }}
- {{ .Values.tls.caBundle.useSecret | ternary "secret" "configMap" }}:
name: {{ .Values.tls.caBundle.name }}
optional: true
items:
- key: {{ .Values.tls.caBundle.key }}
path: local-etcd-client-ca.crt
{{- end }}
{{- if and .Values.ipMasqAgent .Values.ipMasqAgent.enabled }}
- name: ip-masq-agent
configMap:
@@ -930,7 +955,7 @@ spec:
{{- if and .Values.encryption.enabled (eq .Values.encryption.type "ipsec") }}
- name: cilium-ipsec-secrets
secret:
secretName: {{ .Values.encryption.ipsec.secretName | default .Values.encryption.secretName }}
secretName: {{ .Values.encryption.ipsec.secretName }}
{{- end }}
{{- if .Values.cni.configMap }}
- name: cni-configuration
@@ -978,6 +1003,45 @@ spec:
path: client-ca.crt
{{- end }}
{{- end }}
{{- if and .Values.hubble.enabled .Values.hubble.metrics.enabled .Values.hubble.metrics.tls.enabled }}
- name: hubble-metrics-tls
projected:
# note: the leading zero means this number is in octal representation: do not remove it
defaultMode: 0400
sources:
- secret:
name: hubble-metrics-server-certs
optional: true
items:
- key: tls.crt
path: server.crt
- key: tls.key
path: server.key
{{- if .Values.hubble.metrics.tls.server.mtls.enabled }}
{{- if .Values.hubble.metrics.tls.server.mtls.name }}
{{/* Use the client CA specified by the user if they configured one */}}
- {{ .Values.hubble.metrics.tls.server.mtls.useSecret | ternary "secret" "configMap" }}:
name: {{ .Values.hubble.metrics.tls.server.mtls.name }}
optional: false
items:
- key: {{ .Values.hubble.metrics.tls.server.mtls.key }}
path: client-ca.crt
{{/* If the CA bundle isn't configured use the server CA as the client CA */}}
{{- else if not .Values.tls.caBundle.enabled }}
- key: ca.crt
path: client-ca.crt
{{/* Fall back to the caBundle CA if it's been configured */}}
{{- else }}
- {{ .Values.tls.caBundle.useSecret | ternary "secret" "configMap" }}:
name: {{ .Values.tls.caBundle.name }}
optional: true
items:
- key: {{ .Values.tls.caBundle.key }}
path: client-ca.crt
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.hubble.export.dynamic.enabled }}
- name: hubble-flowlog-config
configMap:

View File

@@ -1,3 +1,4 @@
{{- $envoyDS := eq (include "envoyDaemonSetEnabled" .) "true" -}}
{{- if and .Values.agent (not .Values.preflight.enabled) .Values.prometheus.enabled }}
{{- if .Values.prometheus.serviceMonitor.enabled }}
apiVersion: v1
@@ -23,13 +24,13 @@ spec:
port: {{ .Values.prometheus.port }}
protocol: TCP
targetPort: prometheus
{{- if not .Values.envoy.enabled }}
{{- if not $envoyDS }}
- name: envoy-metrics
port: {{ .Values.proxy.prometheus.port | default .Values.envoy.prometheus.port }}
port: {{ .Values.envoy.prometheus.port }}
protocol: TCP
targetPort: envoy-metrics
{{- end }}
{{- else if and .Values.proxy.prometheus.enabled .Values.envoy.prometheus.enabled (not .Values.envoy.enabled) }}
{{- else if and .Values.envoy.prometheus.enabled (not $envoyDS) }}
apiVersion: v1
kind: Service
metadata:
@@ -37,7 +38,7 @@ metadata:
namespace: {{ .Release.Namespace }}
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: {{ .Values.proxy.prometheus.port | default .Values.envoy.prometheus.port | quote }}
prometheus.io/port: {{ .Values.envoy.prometheus.port | quote }}
labels:
k8s-app: cilium
app.kubernetes.io/name: cilium-agent
@@ -49,7 +50,7 @@ spec:
k8s-app: cilium
ports:
- name: envoy-metrics
port: {{ .Values.proxy.prometheus.port | default .Values.envoy.prometheus.port }}
port: {{ .Values.envoy.prometheus.port }}
protocol: TCP
targetPort: envoy-metrics
{{- end }}

View File

@@ -1,4 +1,4 @@
{{- if and (.Values.agent) (not .Values.preflight.enabled) }}
{{- if and ( or (.Values.agent) (.Values.operator.enabled) .Values.externalWorkloads.enabled .Values.clustermesh.useAPIServer) (not .Values.preflight.enabled) }}
{{- /* Default values with backwards compatibility */ -}}
{{- $defaultBpfMapDynamicSizeRatio := 0.0 -}}
{{- $defaultBpfMasquerade := "false" -}}
@@ -15,6 +15,7 @@
{{- $defaultK8sClientQPS := 5 -}}
{{- $defaultK8sClientBurst := 10 -}}
{{- $defaultDNSProxyEnableTransparentMode := "false" -}}
{{- $envoyDS := eq (include "envoyDaemonSetEnabled" .) "true" -}}
{{- /* Default values when 1.8 was initially deployed */ -}}
{{- if semverCompare ">=1.8" (default "1.8" .Values.upgradeCompatibility) -}}
@@ -66,8 +67,8 @@
{{- $stringValueKPR = "" -}}
{{- end}}
{{- $kubeProxyReplacement := (coalesce $stringValueKPR $defaultKubeProxyReplacement) -}}
{{- if and (ne $kubeProxyReplacement "disabled") (ne $kubeProxyReplacement "partial") (ne $kubeProxyReplacement "strict") (ne $kubeProxyReplacement "true") (ne $kubeProxyReplacement "false") }}
{{ fail "kubeProxyReplacement must be explicitly set to a valid value (true, false, disabled (deprecated), partial (deprecated), or strict (deprecated)) to continue." }}
{{- if and (ne $kubeProxyReplacement "true") (ne $kubeProxyReplacement "false") }}
{{ fail "kubeProxyReplacement must be explicitly set to a valid value (true or false) to continue." }}
{{- end }}
{{- $azureUsePrimaryAddress = (coalesce .Values.azure.usePrimaryAddress $azureUsePrimaryAddress) -}}
{{- $socketLB := (coalesce .Values.socketLB .Values.hostServices) -}}
@@ -92,28 +93,19 @@ metadata:
data:
{{- if .Values.etcd.enabled }}
# The kvstore configuration is used to enable use of a kvstore for state
# storage. This can either be provided with an external kvstore or with the
# help of cilium-etcd-operator which operates an etcd cluster automatically.
# storage. This can be provided with an external kvstore.
kvstore: etcd
{{- if .Values.etcd.k8sService }}
kvstore-opt: '{"etcd.config": "/var/lib/etcd-config/etcd.config", "etcd.operator": "true"}'
{{- else }}
kvstore-opt: '{"etcd.config": "/var/lib/etcd-config/etcd.config"}'
{{- end }}
# This etcd-config contains the etcd endpoints of your cluster. If you use
# TLS please make sure you follow the tutorial in https://cilium.link/etcd-config
etcd-config: |-
---
endpoints:
{{- if .Values.etcd.managed }}
- https://cilium-etcd-client.{{ .Release.Namespace }}.svc:2379
{{- else }}
{{- range .Values.etcd.endpoints }}
- {{ . }}
{{- end }}
{{- end }}
{{- if or .Values.etcd.ssl .Values.etcd.managed }}
{{- if .Values.etcd.ssl }}
trusted-ca-file: '/var/lib/etcd-secrets/etcd-client-ca.crt'
key-file: '/var/lib/etcd-secrets/etcd-client.key'
cert-file: '/var/lib/etcd-secrets/etcd-client.crt'
@@ -148,10 +140,6 @@ data:
cilium-endpoint-gc-interval: {{ include "validateDuration" .Values.operator.endpointGCInterval | quote }}
nodes-gc-interval: {{ include "validateDuration" .Values.operator.nodeGCInterval | quote }}
{{- if hasKey .Values.operator "skipCNPStatusStartupClean" }}
skip-cnp-status-startup-clean: "{{ .Values.operator.skipCNPStatusStartupClean }}"
{{- end }}
{{- if eq .Values.disableEndpointCRD true }}
# Disable the usage of CiliumEndpoint CRD
disable-endpoint-crd: "true"
@@ -226,11 +214,15 @@ data:
{{- end }}
{{- end }}
{{- if not .Values.envoy.enabled }}
{{- if not $envoyDS }}
# Port to expose Envoy metrics (e.g. "9964"). Envoy metrics listener will be disabled if this
# field is not set.
{{- if and .Values.proxy.prometheus.enabled .Values.envoy.prometheus.enabled }}
proxy-prometheus-port: "{{ .Values.proxy.prometheus.port | default .Values.envoy.prometheus.port }}"
{{- if .Values.envoy.prometheus.enabled }}
proxy-prometheus-port: "{{ .Values.envoy.prometheus.port }}"
{{- end }}
{{- if and .Values.envoy.debug.admin.enabled .Values.envoy.debug.admin.port }}
proxy-admin-port: "{{ .Values.envoy.debug.admin.port }}"
{{- end }}
{{- end }}
@@ -249,6 +241,7 @@ data:
{{- if or .Values.envoyConfig.enabled .Values.ingressController.enabled .Values.gatewayAPI.enabled (and (hasKey .Values "loadBalancer") (eq .Values.loadBalancer.l7.backend "envoy")) }}
enable-envoy-config: "true"
envoy-config-retry-interval: {{ include "validateDuration" .Values.envoyConfig.retryInterval | quote }}
{{- if .Values.envoyConfig.enabled }}
envoy-secrets-namespace: {{ .Values.envoyConfig.secretsNamespace.name | quote }}
{{- end }}
@@ -267,12 +260,22 @@ data:
ingress-default-secret-namespace: {{ .Values.ingressController.defaultSecretNamespace | quote }}
ingress-default-secret-name: {{ .Values.ingressController.defaultSecretName | quote }}
{{- end }}
ingress-hostnetwork-enabled: {{ .Values.ingressController.hostNetwork.enabled | quote }}
ingress-hostnetwork-shared-listener-port: {{ .Values.ingressController.hostNetwork.sharedListenerPort | quote }}
ingress-hostnetwork-nodelabelselector: {{ include "mapToString" .Values.ingressController.hostNetwork.nodes.matchLabels | quote }}
{{- end }}
{{- if .Values.gatewayAPI.enabled }}
enable-gateway-api: "true"
enable-gateway-api-secrets-sync: {{ .Values.gatewayAPI.secretsNamespace.sync | quote }}
enable-gateway-api-proxy-protocol: {{ .Values.gatewayAPI.enableProxyProtocol | quote }}
enable-gateway-api-app-protocol: {{ or .Values.gatewayAPI.enableAppProtocol .Values.gatewayAPI.enableAlpn | quote }}
enable-gateway-api-alpn: {{ .Values.gatewayAPI.enableAlpn | quote }}
gateway-api-xff-num-trusted-hops: {{ .Values.gatewayAPI.xffNumTrustedHops | quote }}
gateway-api-service-externaltrafficpolicy: {{ .Values.gatewayAPI.externalTrafficPolicy | quote }}
gateway-api-secrets-namespace: {{ .Values.gatewayAPI.secretsNamespace.name | quote }}
gateway-api-hostnetwork-enabled: {{ .Values.gatewayAPI.hostNetwork.enabled | quote }}
gateway-api-hostnetwork-nodelabelselector: {{ include "mapToString" .Values.gatewayAPI.hostNetwork.nodes.matchLabels | quote }}
{{- end }}
{{- if hasKey .Values "loadBalancer" }}
@@ -419,6 +422,10 @@ data:
bpf-lb-external-clusterip: {{ .Values.bpf.lbExternalClusterIP | quote }}
{{- end }}
bpf-events-drop-enabled: {{ .Values.bpf.events.drop.enabled | quote }}
bpf-events-policy-verdict-enabled: {{ .Values.bpf.events.policyVerdict.enabled | quote }}
bpf-events-trace-enabled: {{ .Values.bpf.events.trace.enabled | quote }}
# Pre-allocation of map entries allows per-packet latency to be reduced, at
# the expense of up-front memory allocation for the entries in the maps. The
# default value below will minimize memory usage in the default installation;
@@ -436,10 +443,6 @@ data:
# 1.4 or later, then it may cause one-time disruptions during the upgrade.
preallocate-bpf-maps: "{{ .Values.bpf.preallocateMaps }}"
# Regular expression matching compatible Istio sidecar istio-proxy
# container image names
sidecar-istio-proxy-image: "{{ .Values.proxy.sidecarImageRegex }}"
# Name of the cluster. Only relevant when building a mesh of clusters.
cluster-name: {{ .Values.cluster.name }}
@@ -491,7 +494,9 @@ data:
{{- end }}
{{- if .Values.eni.enabled }}
{{- if not .Values.endpointRoutes.enabled }}
enable-endpoint-routes: "true"
{{- end }}
auto-create-cilium-node-resource: "true"
{{- if .Values.eni.updateEC2AdapterLimitViaAPI }}
update-ec2-adapter-limit-via-api: "true"
@@ -569,6 +574,14 @@ data:
enable-ipv6-big-tcp: {{ .Values.enableIPv6BIGTCP | quote }}
enable-ipv6-masquerade: {{ .Values.enableIPv6Masquerade | quote }}
{{- if hasKey .Values.bpf "enableTCX" }}
enable-tcx: {{ .Values.bpf.enableTCX | quote }}
{{- end }}
{{- if hasKey .Values.bpf "datapathMode" }}
datapath-mode: {{ .Values.bpf.datapathMode | quote }}
{{- end }}
{{- if (not (kindIs "invalid" .Values.bpf.masquerade)) }}
enable-bpf-masquerade: {{ .Values.bpf.masquerade | quote }}
{{- else if eq $defaultBpfMasquerade "true" }}
@@ -588,13 +601,9 @@ data:
{{- if and .Values.encryption.ipsec.mountPath .Values.encryption.ipsec.keyFile }}
ipsec-key-file: {{ .Values.encryption.ipsec.mountPath }}/{{ .Values.encryption.ipsec.keyFile }}
{{- else }}
ipsec-key-file: {{ .Values.encryption.mountPath }}/{{ .Values.encryption.keyFile }}
{{- end }}
{{- if .Values.encryption.ipsec.interface }}
encrypt-interface: {{ .Values.encryption.ipsec.interface }}
{{- else if .Values.encryption.interface }}
encrypt-interface: {{ .Values.encryption.interface }}
{{- end }}
{{- if hasKey .Values.encryption.ipsec "keyWatcher" }}
enable-ipsec-key-watcher: {{ .Values.encryption.ipsec.keyWatcher | quote }}
@@ -602,6 +611,7 @@ data:
{{- if .Values.encryption.ipsec.keyRotationDuration }}
ipsec-key-rotation-duration: {{ include "validateDuration" .Values.encryption.ipsec.keyRotationDuration | quote }}
{{- end }}
enable-ipsec-encrypted-overlay: {{ .Values.encryption.ipsec.encryptedOverlay | quote }}
{{- else if eq .Values.encryption.type "wireguard" }}
enable-wireguard: {{ .Values.encryption.enabled | quote }}
{{- if .Values.encryption.wireguard.userspaceFallback }}
@@ -640,6 +650,7 @@ data:
{{- end }}
auto-direct-node-routes: {{ .Values.autoDirectNodeRoutes | quote }}
direct-routing-skip-unreachable: {{ .Values.directRoutingSkipUnreachable | quote }}
{{- if hasKey .Values "bandwidthManager" }}
{{- if .Values.bandwidthManager.enabled }}
@@ -688,6 +699,10 @@ data:
enable-runtime-device-detection: "true"
{{- end }}
{{- if .Values.forceDeviceDetection }}
force-device-detection: "true"
{{- end }}
kube-proxy-replacement: {{ $kubeProxyReplacement | quote }}
{{- if ne $kubeProxyReplacement "disabled" }}
@@ -697,10 +712,14 @@ data:
{{- if $socketLB }}
{{- if hasKey $socketLB "enabled" }}
bpf-lb-sock: {{ $socketLB.enabled | quote }}
bpf-lb-sock-terminate-pod-connections: {{ $socketLB.enabled | quote }}
{{- end }}
{{- if hasKey $socketLB "hostNamespaceOnly" }}
bpf-lb-sock-hostns-only: {{ $socketLB.hostNamespaceOnly | quote }}
{{- end }}
{{- if hasKey $socketLB "terminatePodConnections" }}
bpf-lb-sock-terminate-pod-connections: {{ $socketLB.terminatePodConnections | quote }}
{{- end }}
{{- end }}
{{- if hasKey .Values "hostPort" }}
@@ -720,6 +739,9 @@ data:
{{- if hasKey .Values.nodePort "range" }}
node-port-range: {{ get .Values.nodePort "range" | quote }}
{{- end }}
{{- if hasKey .Values.nodePort "addresses" }}
nodeport-addresses: {{ get .Values.nodePort "addresses" | join "," | quote }}
{{- end }}
{{- if hasKey .Values.nodePort "directRoutingDevice" }}
direct-routing-device: {{ .Values.nodePort.directRoutingDevice | quote }}
{{- end }}
@@ -799,13 +821,10 @@ data:
{{- if hasKey .Values.k8s "requireIPv6PodCIDR" }}
k8s-require-ipv6-pod-cidr: {{ .Values.k8s.requireIPv6PodCIDR | quote }}
{{- end }}
{{- if .Values.endpointStatus.enabled }}
endpoint-status: {{ required "endpointStatus.status required: policy, health, controllers, log and / or state. For 2 or more options use a space: \"policy health\"" .Values.endpointStatus.status | quote }}
{{- end }}
{{- if and .Values.endpointRoutes .Values.endpointRoutes.enabled }}
enable-endpoint-routes: {{ .Values.endpointRoutes.enabled | quote }}
{{- end }}
{{- if and .Values.k8sNetworkPolicy .Values.k8sNetworkPolicy.enabled }}
{{- if hasKey .Values.k8sNetworkPolicy "enabled" }}
enable-k8s-networkpolicy: {{ .Values.k8sNetworkPolicy.enabled | quote }}
{{- end }}
{{- if .Values.cni.configMap }}
@@ -832,6 +851,9 @@ data:
{{- if (not (kindIs "invalid" .Values.cni.externalRouting)) }}
cni-external-routing: {{ .Values.cni.externalRouting | quote }}
{{- end}}
{{- if .Values.cni.enableRouteMTUForCNIChaining }}
enable-route-mtu-for-cni-chaining: {{ .Values.cni.enableRouteMTUForCNIChaining | quote }}
{{- end }}
{{- if .Values.kubeConfigPath }}
k8s-kubeconfig-path: {{ .Values.kubeConfigPath | quote }}
{{- end }}
@@ -844,12 +866,12 @@ data:
{{- if hasKey .Values "healthChecking" }}
enable-health-checking: {{ .Values.healthChecking | quote }}
{{- end }}
{{- if or .Values.wellKnownIdentities.enabled .Values.etcd.managed }}
{{- if .Values.wellKnownIdentities.enabled }}
enable-well-known-identities: "true"
{{- else }}
enable-well-known-identities: "false"
{{- end }}
enable-remote-node-identity: {{ .Values.remoteNodeIdentity | quote }}
enable-node-selector-labels: {{ .Values.nodeSelectorLabels | quote }}
{{- if hasKey .Values "synchronizeK8sNodes" }}
synchronize-k8s-nodes: {{ .Values.synchronizeK8sNodes | quote }}
@@ -881,6 +903,14 @@ data:
# Address to expose Hubble metrics (e.g. ":7070"). Metrics server will be disabled if this
# field is not set.
hubble-metrics-server: ":{{ .Values.hubble.metrics.port }}"
hubble-metrics-server-enable-tls: "{{ .Values.hubble.metrics.tls.enabled }}"
{{- if .Values.hubble.metrics.tls.enabled }}
hubble-metrics-server-tls-cert-file: /var/lib/cilium/tls/hubble-metrics/server.crt
hubble-metrics-server-tls-key-file: /var/lib/cilium/tls/hubble-metrics/server.key
{{- if .Values.hubble.metrics.tls.server.mtls.enabled }}
hubble-metrics-server-tls-client-ca-files: /var/lib/cilium/tls/hubble-metrics/client-ca.crt
{{- end }}
{{- end }}
# A space separated list of metrics to enable. See [0] for available metrics.
#
# https://github.com/cilium/hubble/blob/master/Documentation/metrics.md
@@ -944,6 +974,11 @@ data:
hubble-disable-tls: "true"
{{- end }}
{{- end }}
{{- if .Values.hubble.dropEventEmitter.enabled }}
hubble-drop-events: "true"
hubble-drop-events-interval: {{ .Values.hubble.dropEventEmitter.interval | quote }}
hubble-drop-events-reasons: {{ .Values.hubble.dropEventEmitter.reasons | join " " | quote }}
{{- end }}
{{- if .Values.hubble.preferIpv6 }}
hubble-prefer-ipv6: "true"
{{- end }}
@@ -1007,6 +1042,10 @@ data:
limit-ipam-api-qps: {{ .Values.ipam.operator.externalAPILimitQPS | quote }}
{{- end }}
{{- if .Values.nodeIPAM.enabled }}
enable-node-ipam: "true"
{{- end }}
{{- if .Values.apiRateLimit }}
api-rate-limit: {{ .Values.apiRateLimit | quote }}
{{- end }}
@@ -1014,9 +1053,6 @@ data:
{{- if .Values.egressGateway.enabled }}
enable-ipv4-egress-gateway: "true"
{{- end }}
{{- if .Values.egressGateway.installRoutes }}
install-egress-gateway-routes: "true"
{{- end }}
{{- if hasKey .Values.egressGateway "reconciliationTriggerInterval" }}
egress-gateway-reconciliation-trigger-interval: {{ .Values.egressGateway.reconciliationTriggerInterval | quote }}
{{- end }}
@@ -1092,8 +1128,6 @@ data:
{{- if .Values.bgpControlPlane.enabled }}
enable-bgp-control-plane: "true"
bgp-secrets-namespace: {{ .Values.bgpControlPlane.secretsNamespace.name | quote }}
{{- else }}
enable-bgp-control-plane: "false"
{{- end }}
{{- if .Values.pmtuDiscovery.enabled }}
@@ -1117,8 +1151,15 @@ data:
vlan-bpf-bypass: {{ .Values.bpf.vlanBypass | join " " | quote }}
{{- end }}
{{- if .Values.enableCiliumEndpointSlice }}
{{- if .Values.bpf.disableExternalIPMitigation }}
disable-external-ip-mitigation: {{ .Values.bpf.disableExternalIPMitigation | quote }}
{{- end }}
{{- if or .Values.ciliumEndpointSlice.enabled .Values.enableCiliumEndpointSlice }}
enable-cilium-endpoint-slice: "true"
{{- if .Values.ciliumEndpointSlice.rateLimits }}
ces-rate-limits: {{ .Values.ciliumEndpointSlice.rateLimits | toJson | quote }}
{{- end }}
{{- end }}
{{- if hasKey .Values "enableK8sTerminatingEndpoint" }}
@@ -1171,6 +1212,9 @@ data:
# default DNS proxy to transparent mode in non-chaining modes
dnsproxy-enable-transparent-mode: {{ $defaultDNSProxyEnableTransparentMode | quote }}
{{- end }}
{{- if (not (kindIs "invalid" .Values.dnsProxy.socketLingerTimeout)) }}
dnsproxy-socket-linger-timeout: {{ .Values.dnsProxy.socketLingerTimeout | quote }}
{{- end }}
{{- if .Values.dnsProxy.dnsRejectResponseCode }}
tofqdns-dns-reject-response-code: {{ .Values.dnsProxy.dnsRejectResponseCode | quote }}
{{- end }}
@@ -1231,15 +1275,20 @@ data:
proxy-max-connection-duration-seconds: {{ .Values.envoy.maxConnectionDurationSeconds | quote }}
proxy-idle-timeout-seconds: {{ .Values.envoy.idleTimeoutDurationSeconds | quote }}
external-envoy-proxy: {{ .Values.envoy.enabled | quote }}
external-envoy-proxy: {{ include "envoyDaemonSetEnabled" . | quote }}
envoy-base-id: {{ .Values.envoy.baseID | quote }}
{{- if .Values.envoy.log.path }}
envoy-log: {{ .Values.envoy.log.path | quote }}
{{- end }}
envoy-keep-cap-netbindservice: {{ .Values.envoy.securityContext.capabilities.keepCapNetBindService | quote }}
{{- if hasKey .Values.clustermesh "maxConnectedClusters" }}
max-connected-clusters: {{ .Values.clustermesh.maxConnectedClusters | quote }}
{{- end }}
clustermesh-enable-endpoint-sync: {{ .Values.clustermesh.enableEndpointSliceSynchronization | quote }}
clustermesh-enable-mcs-api: {{ .Values.clustermesh.enableMCSAPISupport | quote }}
# Extra config allows adding arbitrary properties to the cilium config.
# By putting it at the end of the ConfigMap, it's also possible to override existing properties.

View File

@@ -1,4 +1,5 @@
{{- if and .Values.envoy.enabled (not .Values.preflight.enabled) }}
{{- $envoyDS := eq (include "envoyDaemonSetEnabled" .) "true" -}}
{{- if and $envoyDS (not .Values.preflight.enabled) }}
---
apiVersion: v1

View File

@@ -1,5 +1,5 @@
{{- if and .Values.envoy.enabled (not .Values.preflight.enabled) }}
{{- $envoyDS := eq (include "envoyDaemonSetEnabled" .) "true" -}}
{{- if (and $envoyDS (not .Values.preflight.enabled)) }}
---
apiVersion: apps/v1
kind: DaemonSet
@@ -26,8 +26,8 @@ spec:
template:
metadata:
annotations:
{{- if and .Values.proxy.prometheus.enabled .Values.envoy.prometheus.enabled (not .Values.envoy.prometheus.serviceMonitor.enabled) }}
prometheus.io/port: "{{ .Values.proxy.prometheus.port | default .Values.envoy.prometheus.port }}"
{{- if and .Values.envoy.prometheus.enabled (not .Values.envoy.prometheus.serviceMonitor.enabled) }}
prometheus.io/port: "{{ .Values.envoy.prometheus.port }}"
prometheus.io/scrape: "true"
{{- end }}
{{- if .Values.envoy.rollOutPods }}
@@ -74,8 +74,12 @@ spec:
command:
- /usr/bin/cilium-envoy-starter
args:
{{- if .Values.envoy.securityContext.capabilities.keepCapNetBindService }}
- '--keep-cap-net-bind-service'
{{- end }}
- '--'
- '-c /var/run/cilium/envoy/bootstrap-config.json'
- '--base-id 0'
- '--base-id {{ int .Values.envoy.baseID }}'
{{- if and (.Values.debug.enabled) (hasKey .Values.debug "verbose") (.Values.debug.verbose) (has "envoy" ( splitList " " .Values.debug.verbose )) }}
- '--log-level trace'
{{- else if and (.Values.debug.enabled) (hasKey .Values.debug "verbose") (.Values.debug.verbose) (has "flow" ( splitList " " .Values.debug.verbose )) }}
@@ -90,7 +94,6 @@ spec:
{{- with .Values.envoy.extraArgs }}
{{- toYaml . | trim | nindent 8 }}
{{- end }}
{{- if semverCompare ">=1.20-0" .Capabilities.KubeVersion.Version }}
startupProbe:
httpGet:
host: {{ .Values.ipv4.enabled | ternary "127.0.0.1" "::1" | quote }}
@@ -101,21 +104,12 @@ spec:
periodSeconds: {{ .Values.envoy.startupProbe.periodSeconds }}
successThreshold: 1
initialDelaySeconds: 5
{{- end }}
livenessProbe:
httpGet:
host: {{ .Values.ipv4.enabled | ternary "127.0.0.1" "::1" | quote }}
path: /healthz
port: {{ .Values.envoy.healthPort }}
scheme: HTTP
{{- if semverCompare "<1.20-0" .Capabilities.KubeVersion.Version }}
# The initial delay for the liveness probe is intentionally large to
# avoid an endless kill & restart cycle if in the event that the initial
# bootstrapping takes longer than expected.
# Starting from Kubernetes 1.20, we are using startupProbe instead
# of this field.
initialDelaySeconds: 120
{{- end }}
periodSeconds: {{ .Values.envoy.livenessProbe.periodSeconds }}
successThreshold: 1
failureThreshold: {{ .Values.envoy.livenessProbe.failureThreshold }}
@@ -126,9 +120,6 @@ spec:
path: /healthz
port: {{ .Values.envoy.healthPort }}
scheme: HTTP
{{- if semverCompare "<1.20-0" .Capabilities.KubeVersion.Version }}
initialDelaySeconds: 5
{{- end }}
periodSeconds: {{ .Values.envoy.readinessProbe.periodSeconds }}
successThreshold: 1
failureThreshold: {{ .Values.envoy.readinessProbe.failureThreshold }}
@@ -146,11 +137,9 @@ spec:
fieldPath: metadata.namespace
{{- if .Values.k8sServiceHost }}
- name: KUBERNETES_SERVICE_HOST
value: {{ .Values.k8sServiceHost | quote }}
{{- end }}
{{- if .Values.k8sServicePort }}
value: {{ include "k8sServiceHost" . }}
- name: KUBERNETES_SERVICE_PORT
value: {{ .Values.k8sServicePort | quote }}
value: {{ include "k8sServicePort" . }}
{{- end }}
{{- with .Values.envoy.extraEnv }}
{{- toYaml . | trim | nindent 8 }}
@@ -159,12 +148,18 @@ spec:
resources:
{{- toYaml . | trim | nindent 10 }}
{{- end }}
{{- if and .Values.proxy.prometheus.enabled .Values.envoy.prometheus.enabled }}
{{- if .Values.envoy.prometheus.enabled }}
ports:
- name: envoy-metrics
containerPort: {{ .Values.proxy.prometheus.port | default .Values.envoy.prometheus.port }}
hostPort: {{ .Values.proxy.prometheus.port | default .Values.envoy.prometheus.port }}
containerPort: {{ .Values.envoy.prometheus.port }}
hostPort: {{ .Values.envoy.prometheus.port }}
protocol: TCP
{{- if and .Values.envoy.debug.admin.enabled .Values.envoy.debug.admin.port }}
- name: envoy-admin
containerPort: {{ .Values.envoy.debug.admin.port }}
hostPort: {{ .Values.envoy.debug.admin.port }}
protocol: TCP
{{- end }}
{{- end }}
securityContext:
{{- if .Values.envoy.securityContext.privileged }}
@@ -214,7 +209,6 @@ spec:
{{- end }}
restartPolicy: Always
priorityClassName: {{ include "cilium.priorityClass" (list $ .Values.envoy.priorityClassName "system-node-critical") }}
serviceAccount: {{ .Values.serviceAccounts.envoy.name | quote }}
serviceAccountName: {{ .Values.serviceAccounts.envoy.name | quote }}
automountServiceAccountToken: {{ .Values.serviceAccounts.envoy.automount }}
terminationGracePeriodSeconds: {{ .Values.envoy.terminationGracePeriodSeconds }}

View File

@@ -1,32 +0,0 @@
{{- if and .Values.envoy.enabled (not .Values.preflight.enabled) .Values.proxy.prometheus.enabled .Values.envoy.prometheus.enabled }}
apiVersion: v1
kind: Service
metadata:
name: cilium-envoy
namespace: {{ .Release.Namespace }}
{{- if or (not .Values.envoy.prometheus.serviceMonitor.enabled) .Values.envoy.annotations }}
annotations:
{{- if not .Values.envoy.prometheus.serviceMonitor.enabled }}
prometheus.io/scrape: "true"
prometheus.io/port: {{ .Values.proxy.prometheus.port | default .Values.envoy.prometheus.port | quote }}
{{- end }}
{{- with .Values.envoy.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
labels:
k8s-app: cilium-envoy
app.kubernetes.io/name: cilium-envoy
app.kubernetes.io/part-of: cilium
io.cilium/app: proxy
spec:
clusterIP: None
type: ClusterIP
selector:
k8s-app: cilium-envoy
ports:
- name: envoy-metrics
port: {{ .Values.proxy.prometheus.port | default .Values.envoy.prometheus.port }}
protocol: TCP
targetPort: envoy-metrics
{{- end }}

View File

@@ -1,4 +1,5 @@
{{- if and .Values.envoy.enabled (not .Values.preflight.enabled) .Values.serviceAccounts.envoy.create }}
{{- $envoyDS := eq (include "envoyDaemonSetEnabled" .) "true" -}}
{{- if and $envoyDS (not .Values.preflight.enabled) .Values.serviceAccounts.envoy.create }}
apiVersion: v1
kind: ServiceAccount
metadata:

View File

@@ -1,4 +1,5 @@
{{- if and .Values.envoy.enabled (not .Values.preflight.enabled) .Values.proxy.prometheus.enabled .Values.envoy.prometheus.enabled .Values.envoy.prometheus.serviceMonitor.enabled }}
{{- $envoyDS := eq (include "envoyDaemonSetEnabled" .) "true" -}}
{{- if and $envoyDS (not .Values.preflight.enabled) .Values.envoy.prometheus.enabled .Values.envoy.prometheus.serviceMonitor.enabled }}
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor

View File

@@ -1,10 +1,11 @@
{{- if .Values.gatewayAPI.enabled -}}
{{- if .Capabilities.APIVersions.Has "gateway.networking.k8s.io/v1/GatewayClass" }}
{{- if ( or (eq (.Values.gatewayAPI.gatewayClass.create | toString) "true") (and (.Capabilities.APIVersions.Has "gateway.networking.k8s.io/v1/GatewayClass") (eq (.Values.gatewayAPI.gatewayClass.create | toString) "auto"))) }}
apiVersion: gateway.networking.k8s.io/v1
kind: GatewayClass
metadata:
name: cilium
spec:
controllerName: io.cilium/gateway-controller
description: The default Cilium GatewayClass
{{- end}}
{{- end}}

View File

@@ -23,18 +23,23 @@ spec:
port: 443
protocol: TCP
nodePort: {{ .Values.ingressController.service.secureNodePort }}
{{- if .Values.ingressController.hostNetwork.enabled }}
type: ClusterIP
{{- else }}
type: {{ .Values.ingressController.service.type }}
{{- if semverCompare ">=1.24-0" .Capabilities.KubeVersion.Version -}}
{{- end }}
{{- if .Values.ingressController.service.loadBalancerClass }}
loadBalancerClass: {{ .Values.ingressController.service.loadBalancerClass }}
{{- end }}
{{- if (not (kindIs "invalid" .Values.ingressController.service.allocateLoadBalancerNodePorts)) }}
allocateLoadBalancerNodePorts: {{ .Values.ingressController.service.allocateLoadBalancerNodePorts }}
{{- end }}
{{- end -}}
{{- if .Values.ingressController.service.loadBalancerIP }}
loadBalancerIP: {{ .Values.ingressController.service.loadBalancerIP }}
{{- end }}
{{- if .Values.ingressController.service.externalTrafficPolicy }}
externalTrafficPolicy: {{ .Values.ingressController.service.externalTrafficPolicy }}
{{- end }}
---
apiVersion: v1
kind: Endpoints

View File

@@ -114,7 +114,6 @@ spec:
hostNetwork: true
priorityClassName: {{ include "cilium.priorityClass" (list $ .Values.nodeinit.priorityClassName "system-node-critical") }}
{{- if .Values.serviceAccounts.nodeinit.enabled }}
serviceAccount: {{ .Values.serviceAccounts.nodeinit.name | quote }}
serviceAccountName: {{ .Values.serviceAccounts.nodeinit.name | quote }}
automountServiceAccountToken: {{ .Values.serviceAccounts.nodeinit.automount }}
{{- end }}

View File

@@ -1,4 +1,4 @@
{{- if and .Values.operator.enabled .Values.serviceAccounts.operator.create }}
{{- if and .Values.operator.enabled .Values.serviceAccounts.operator.create .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
@@ -56,6 +56,12 @@ rules:
resources:
- endpointslices
verbs:
{{- if .Values.clustermesh.enableEndpointSliceSynchronization }}
- create
- update
- delete
- deletecollection
{{- end }}
- get
- list
- watch
@@ -95,6 +101,15 @@ rules:
- delete
- patch
{{- end }}
{{- if .Values.clustermesh.enableEndpointSliceSynchronization }}
- apiGroups:
- ""
resources:
- events
verbs:
- patch
- create
{{- end }}
- apiGroups:
- cilium.io
resources:
@@ -215,6 +230,7 @@ rules:
resources:
- ciliumloadbalancerippools
- ciliumpodippools
- ciliumbgppeeringpolicies
- ciliumbgpclusterconfigs
- ciliumbgpnodeconfigoverrides
verbs:
@@ -291,4 +307,39 @@ rules:
- update
- patch
{{- end }}
{{- if or .Values.gatewayAPI.enabled .Values.clustermesh.enableMCSAPISupport }}
- apiGroups:
- multicluster.x-k8s.io
resources:
- serviceimports
verbs:
- get
- list
- watch
{{- if .Values.clustermesh.enableMCSAPISupport }}
- create
- update
- patch
- delete
{{- end }}
{{- end }}
{{- if .Values.clustermesh.enableMCSAPISupport }}
- apiGroups:
- multicluster.x-k8s.io
resources:
- serviceexports
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- services
verbs:
- create
- update
- patch
- delete
{{- end }}
{{- end }}

View File

@@ -1,4 +1,4 @@
{{- if and .Values.operator.enabled .Values.serviceAccounts.operator.create }}
{{- if and .Values.operator.enabled .Values.serviceAccounts.operator.create .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:

View File

@@ -92,6 +92,10 @@ spec:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
{{- if .Values.clustermesh.enableEndpointSliceSynchronization }}
- name: CILIUM_CLUSTERMESH_CONFIG
value: /var/lib/cilium/clustermesh/
{{- end }}
- name: CILIUM_DEBUG
valueFrom:
configMapKeyRef:
@@ -134,11 +138,9 @@ spec:
{{- end }}
{{- if .Values.k8sServiceHost }}
- name: KUBERNETES_SERVICE_HOST
value: {{ .Values.k8sServiceHost | quote }}
{{- end }}
{{- if .Values.k8sServicePort }}
value: {{ include "k8sServiceHost" . }}
- name: KUBERNETES_SERVICE_PORT
value: {{ .Values.k8sServicePort | quote }}
value: {{ include "k8sServicePort" . }}
{{- end }}
{{- if .Values.azure.enabled }}
{{- if .Values.azure.subscriptionID }}
@@ -171,12 +173,16 @@ spec:
ports:
- name: prometheus
containerPort: {{ .Values.operator.prometheus.port }}
{{- if .Values.operator.hostNetwork }}
hostPort: {{ .Values.operator.prometheus.port }}
{{- end }}
protocol: TCP
{{- end }}
livenessProbe:
httpGet:
{{- if .Values.operator.hostNetwork }}
host: {{ .Values.ipv4.enabled | ternary "127.0.0.1" "::1" | quote }}
{{- end }}
path: /healthz
port: 9234
scheme: HTTP
@@ -185,7 +191,9 @@ spec:
timeoutSeconds: 3
readinessProbe:
httpGet:
{{- if .Values.operator.hostNetwork }}
host: {{ .Values.ipv4.enabled | ternary "127.0.0.1" "::1" | quote }}
{{- end }}
path: /healthz
port: 9234
scheme: HTTP
@@ -201,12 +209,17 @@ spec:
- name: etcd-config-path
mountPath: /var/lib/etcd-config
readOnly: true
{{- if or .Values.etcd.ssl .Values.etcd.managed }}
{{- if .Values.etcd.ssl }}
- name: etcd-secrets
mountPath: /var/lib/etcd-secrets
readOnly: true
{{- end }}
{{- end }}
{{- if .Values.clustermesh.enableEndpointSliceSynchronization }}
- name: clustermesh-secrets
mountPath: /var/lib/cilium/clustermesh
readOnly: true
{{- end }}
{{- if .Values.kubeConfigPath }}
- name: kube-config
mountPath: {{ .Values.kubeConfigPath }}
@@ -242,17 +255,12 @@ spec:
{{- toYaml . | trim | nindent 10 }}
{{- end }}
terminationMessagePolicy: FallbackToLogsOnError
hostNetwork: true
{{- if and .Values.etcd.managed (not .Values.etcd.k8sService) }}
# In managed etcd mode, Cilium must be able to resolve the DNS name of
# the etcd service
dnsPolicy: ClusterFirstWithHostNet
{{- else if .Values.operator.dnsPolicy }}
hostNetwork: {{ .Values.operator.hostNetwork }}
{{- if .Values.operator.dnsPolicy }}
dnsPolicy: {{ .Values.operator.dnsPolicy }}
{{- end }}
restartPolicy: Always
priorityClassName: {{ include "cilium.priorityClass" (list $ .Values.operator.priorityClassName "system-cluster-critical") }}
serviceAccount: {{ .Values.serviceAccounts.operator.name | quote }}
serviceAccountName: {{ .Values.serviceAccounts.operator.name | quote }}
automountServiceAccountToken: {{ .Values.serviceAccounts.operator.automount }}
{{- with .Values.operator.affinity }}
@@ -277,6 +285,15 @@ spec:
nodeSelector:
{{- toYaml . | trim | nindent 8 }}
{{- end }}
{{- if and .Values.clustermesh.enableEndpointSliceSynchronization .Values.clustermesh.config.enabled (not (and .Values.clustermesh.useAPIServer .Values.clustermesh.apiserver.kvstoremesh.enabled )) }}
hostAliases:
{{- range $cluster := .Values.clustermesh.config.clusters }}
{{- range $ip := $cluster.ips }}
- ip: {{ $ip }}
hostnames: [ "{{ $cluster.name }}.{{ $.Values.clustermesh.config.domain }}" ]
{{- end }}
{{- end }}
{{- end }}
{{- with .Values.operator.tolerations }}
tolerations:
{{- toYaml . | trim | nindent 8 }}
@@ -296,7 +313,7 @@ spec:
items:
- key: etcd-config
path: etcd.config
{{- if or .Values.etcd.ssl .Values.etcd.managed }}
{{- if .Values.etcd.ssl }}
# To read the k8s etcd secrets in case the user might want to use TLS
- name: etcd-secrets
secret:
@@ -334,4 +351,38 @@ spec:
{{- with .Values.operator.extraVolumes }}
{{- toYaml . | nindent 6 }}
{{- end }}
{{- if .Values.clustermesh.enableEndpointSliceSynchronization }}
# To read the clustermesh configuration
- name: clustermesh-secrets
projected:
# note: the leading zero means this number is in octal representation: do not remove it
defaultMode: 0400
sources:
- secret:
name: cilium-clustermesh
optional: true
# note: items are not explicitly listed here, since the entries of this secret
# depend on the peers configured, and that would cause a restart of all agents
# at every addition/removal. Leaving the field empty makes each secret entry
# to be automatically projected into the volume as a file whose name is the key.
- secret:
name: clustermesh-apiserver-remote-cert
optional: true
items:
- key: tls.key
path: common-etcd-client.key
- key: tls.crt
path: common-etcd-client.crt
{{- if not .Values.tls.caBundle.enabled }}
- key: ca.crt
path: common-etcd-client-ca.crt
{{- else }}
- {{ .Values.tls.caBundle.useSecret | ternary "secret" "configMap" }}:
name: {{ .Values.tls.caBundle.name }}
optional: true
items:
- key: {{ .Values.tls.caBundle.key }}
path: common-etcd-client-ca.crt
{{- end }}
{{- end }}
{{- end }}

View File

@@ -1,6 +1,6 @@
{{- if and .Values.operator.enabled .Values.operator.podDisruptionBudget.enabled }}
{{- $component := .Values.operator.podDisruptionBudget }}
apiVersion: {{ include "podDisruptionBudget.apiVersion" . }}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: cilium-operator

View File

@@ -1,4 +1,4 @@
{{- if .Values.preflight.enabled }}
{{- if and .Values.preflight.enabled .Values.rbac.create }}
{{- /*
Keep file in sync with cilium-agent/clusterrole.yaml
*/ -}}
@@ -41,6 +41,15 @@ rules:
- get
- list
- watch
{{- if and .Values.hubble.enabled .Values.hubble.dropEventEmitter.enabled }}
- apiGroups:
- ""
resources:
- events
verbs:
- create
- patch
{{- end }}
{{- if .Values.annotateK8sNode }}
- apiGroups:
- ""
@@ -139,8 +148,6 @@ rules:
- apiGroups:
- cilium.io
resources:
- ciliumnetworkpolicies/status
- ciliumclusterwidenetworkpolicies/status
- ciliumendpoints/status
- ciliumendpoints
- ciliuml2announcementpolicies/status

View File

@@ -1,4 +1,4 @@
{{- if and .Values.preflight.enabled .Values.serviceAccounts.preflight.create }}
{{- if and .Values.preflight.enabled .Values.serviceAccounts.preflight.create .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:

View File

@@ -86,7 +86,7 @@ spec:
- name: etcd-config-path
mountPath: /var/lib/etcd-config
readOnly: true
{{- if or .Values.etcd.ssl .Values.etcd.managed }}
{{- if .Values.etcd.ssl }}
- name: etcd-secrets
mountPath: /var/lib/etcd-secrets
readOnly: true
@@ -132,11 +132,9 @@ spec:
env:
{{- if .Values.k8sServiceHost }}
- name: KUBERNETES_SERVICE_HOST
value: {{ .Values.k8sServiceHost | quote }}
{{- end }}
{{- if .Values.k8sServicePort }}
value: {{ include "k8sServiceHost" . }}
- name: KUBERNETES_SERVICE_PORT
value: {{ .Values.k8sServicePort | quote }}
value: {{ include "k8sServicePort" . }}
{{- end }}
volumeMounts:
- name: cilium-run
@@ -145,7 +143,7 @@ spec:
- name: etcd-config-path
mountPath: /var/lib/etcd-config
readOnly: true
{{- if or .Values.etcd.ssl .Values.etcd.managed }}
{{- if .Values.etcd.ssl }}
- name: etcd-secrets
mountPath: /var/lib/etcd-secrets
readOnly: true
@@ -168,15 +166,9 @@ spec:
terminationMessagePolicy: FallbackToLogsOnError
{{- end }}
hostNetwork: true
# This is here to seamlessly allow migrate-identity to work with
# etcd-operator setups. The assumption is that other cases would also
# work since the cluster DNS would forward the request on.
# This differs from the cilium-agent daemonset, where this is only
# enabled when etcd.managed=true
dnsPolicy: ClusterFirstWithHostNet
restartPolicy: Always
priorityClassName: {{ include "cilium.priorityClass" (list $ .Values.preflight.priorityClassName "system-node-critical") }}
serviceAccount: {{ .Values.serviceAccounts.preflight.name | quote }}
serviceAccountName: {{ .Values.serviceAccounts.preflight.name | quote }}
automountServiceAccountToken: {{ .Values.serviceAccounts.preflight.automount }}
terminationGracePeriodSeconds: {{ .Values.preflight.terminationGracePeriodSeconds }}
@@ -209,7 +201,7 @@ spec:
- key: etcd-config
path: etcd.config
# To read the k8s etcd secrets in case the user might want to use TLS
{{- if or .Values.etcd.ssl .Values.etcd.managed }}
{{- if .Values.etcd.ssl }}
- name: etcd-secrets
secret:
secretName: cilium-etcd-secrets

View File

@@ -46,20 +46,13 @@ spec:
cilium-dbg preflight validate-cnp;
touch /tmp/ready-validate-cnp;
sleep 1h;
livenessProbe:
exec:
command:
- cat
- /tmp/ready-validate-cnp
initialDelaySeconds: 5
periodSeconds: 5
readinessProbe:
exec:
command:
- cat
- /tmp/ready-validate-cnp
initialDelaySeconds: 5
periodSeconds: 5
initialDelaySeconds: {{ .Values.preflight.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.preflight.readinessProbe.periodSeconds }}
{{- with .Values.preflight.extraVolumeMounts }}
volumeMounts:
{{- toYaml . | nindent 10 }}
@@ -67,11 +60,9 @@ spec:
env:
{{- if .Values.k8sServiceHost }}
- name: KUBERNETES_SERVICE_HOST
value: {{ .Values.k8sServiceHost | quote }}
{{- end }}
{{- if .Values.k8sServicePort }}
value: {{ include "k8sServiceHost" . }}
- name: KUBERNETES_SERVICE_PORT
value: {{ .Values.k8sServicePort | quote }}
value: {{ include "k8sServicePort" . }}
{{- end }}
{{- with .Values.preflight.extraEnv }}
{{- toYaml . | trim | nindent 10 }}
@@ -88,7 +79,6 @@ spec:
hostNetwork: true
restartPolicy: Always
priorityClassName: {{ include "cilium.priorityClass" (list $ .Values.preflight.priorityClassName "system-cluster-critical") }}
serviceAccount: {{ .Values.serviceAccounts.preflight.name | quote }}
serviceAccountName: {{ .Values.serviceAccounts.preflight.name | quote }}
automountServiceAccountToken: {{ .Values.serviceAccounts.preflight.automount }}
terminationGracePeriodSeconds: {{ .Values.preflight.terminationGracePeriodSeconds }}

View File

@@ -1,6 +1,6 @@
{{- if and .Values.preflight.enabled .Values.preflight.validateCNPs .Values.preflight.podDisruptionBudget.enabled }}
{{- $component := .Values.preflight.podDisruptionBudget }}
apiVersion: {{ include "podDisruptionBudget.apiVersion" . }}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: cilium-pre-flight-check

View File

@@ -2,6 +2,10 @@
admin-{{ .Values.cluster.name }}
{{- end -}}
{{- define "clustermesh-apiserver-generate-certs.local-common-name" -}}
local-{{ .Values.cluster.name }}
{{- end -}}
{{- define "clustermesh-apiserver-generate-certs.remote-common-name" -}}
{{- if eq .Values.clustermesh.apiserver.tls.authMode "cluster" -}}
remote-{{ .Values.cluster.name }}

View File

@@ -1,4 +1,4 @@
{{- if and (or .Values.externalWorkloads.enabled .Values.clustermesh.useAPIServer) .Values.serviceAccounts.clustermeshApiserver.create }}
{{- if and (or .Values.externalWorkloads.enabled .Values.clustermesh.useAPIServer) .Values.serviceAccounts.clustermeshApiserver.create .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
@@ -10,6 +10,7 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
rules:
{{- if .Values.externalWorkloads.enabled }}
- apiGroups:
- cilium.io
resources:
@@ -33,11 +34,14 @@ rules:
- ciliumendpoints/status
verbs:
- patch
{{- end }}
- apiGroups:
- cilium.io
resources:
- ciliumidentities
{{- if .Values.externalWorkloads.enabled }}
- ciliumexternalworkloads
{{- end }}
- ciliumendpoints
- ciliumnodes
verbs:

View File

@@ -1,4 +1,4 @@
{{- if and (or .Values.externalWorkloads.enabled .Values.clustermesh.useAPIServer) .Values.serviceAccounts.clustermeshApiserver.create }}
{{- if and (or .Values.externalWorkloads.enabled .Values.clustermesh.useAPIServer) .Values.serviceAccounts.clustermeshApiserver.create .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:

View File

@@ -176,11 +176,13 @@ spec:
{{- end }}
- --cluster-name=$(CLUSTER_NAME)
- --cluster-id=$(CLUSTER_ID)
- --kvstore-opt
- etcd.config=/var/lib/cilium/etcd-config.yaml
- --kvstore-opt=etcd.config=/var/lib/cilium/etcd-config.yaml
- --kvstore-opt=etcd.qps=20
- --kvstore-opt=etcd.bootstrapQps=10000
{{- if hasKey .Values.clustermesh "maxConnectedClusters" }}
- --max-connected-clusters={{ .Values.clustermesh.maxConnectedClusters }}
{{- end }}
- --health-port={{ .Values.clustermesh.apiserver.healthPort }}
{{- if ne .Values.clustermesh.apiserver.tls.authMode "legacy" }}
- --cluster-users-enabled
- --cluster-users-config-path=/var/lib/cilium/etcd-config/users.yaml
@@ -205,22 +207,27 @@ spec:
name: cilium-config
key: cluster-id
optional: true
- name: IDENTITY_ALLOCATION_MODE
valueFrom:
configMapKeyRef:
name: cilium-config
key: identity-allocation-mode
- name: ENABLE_K8S_ENDPOINT_SLICE
valueFrom:
configMapKeyRef:
name: cilium-config
key: enable-k8s-endpoint-slice
optional: true
readinessProbe:
httpGet:
path: /readyz
port: apiserv-health
{{- with .Values.clustermesh.apiserver.readinessProbe }}
{{- toYaml . | trim | nindent 10 }}
{{- end }}
{{- with .Values.clustermesh.apiserver.extraEnv }}
{{- toYaml . | trim | nindent 8 }}
{{- end }}
{{- if .Values.clustermesh.apiserver.metrics.enabled }}
ports:
- name: apiserv-health
containerPort: {{ .Values.clustermesh.apiserver.healthPort }}
protocol: TCP
{{- if .Values.clustermesh.apiserver.metrics.enabled }}
- name: apiserv-metrics
containerPort: {{ .Values.clustermesh.apiserver.metrics.port }}
protocol: TCP
@@ -265,11 +272,13 @@ spec:
- --cluster-id=$(CLUSTER_ID)
- --kvstore-opt=etcd.config=/var/lib/cilium/etcd-config.yaml
- --kvstore-opt=etcd.qps=100
- --kvstore-opt=etcd.bootstrapQps=10000
- --kvstore-opt=etcd.maxInflight=10
- --clustermesh-config=/var/lib/cilium/clustermesh
{{- if hasKey .Values.clustermesh "maxConnectedClusters" }}
- --max-connected-clusters={{ .Values.clustermesh.maxConnectedClusters }}
{{- end }}
- --health-port={{ .Values.clustermesh.apiserver.kvstoremesh.healthPort }}
{{- if .Values.clustermesh.apiserver.metrics.kvstoremesh.enabled }}
- --prometheus-serve-addr=:{{ .Values.clustermesh.apiserver.metrics.kvstoremesh.port }}
- --controller-group-metrics=all
@@ -277,6 +286,13 @@ spec:
{{- with .Values.clustermesh.apiserver.kvstoremesh.extraArgs }}
{{- toYaml . | trim | nindent 8 }}
{{- end }}
readinessProbe:
httpGet:
path: /readyz
port: kvmesh-health
{{- with .Values.clustermesh.apiserver.kvstoremesh.readinessProbe }}
{{- toYaml . | trim | nindent 10 }}
{{- end }}
env:
- name: CLUSTER_NAME
valueFrom:
@@ -291,8 +307,11 @@ spec:
{{- with .Values.clustermesh.apiserver.kvstoremesh.extraEnv }}
{{- toYaml . | trim | nindent 8 }}
{{- end }}
{{- if .Values.clustermesh.apiserver.metrics.kvstoremesh.enabled }}
ports:
- name: kvmesh-health
containerPort: {{ .Values.clustermesh.apiserver.kvstoremesh.healthPort }}
protocol: TCP
{{- if .Values.clustermesh.apiserver.metrics.kvstoremesh.enabled }}
- name: kvmesh-metrics
containerPort: {{ .Values.clustermesh.apiserver.metrics.kvstoremesh.port }}
protocol: TCP
@@ -374,7 +393,8 @@ spec:
defaultMode: 0400
{{- end }}
- name: etcd-data-dir
emptyDir: {}
emptyDir:
medium: {{ ternary "Memory" "" (eq .Values.clustermesh.apiserver.etcd.storageMedium "Memory") | quote }}
{{- if .Values.clustermesh.apiserver.kvstoremesh.enabled }}
- name: kvstoremesh-secrets
projected:
@@ -404,7 +424,6 @@ spec:
{{- end }}
restartPolicy: Always
priorityClassName: {{ include "cilium.priorityClass" (list $ .Values.clustermesh.apiserver.priorityClassName "system-cluster-critical") }}
serviceAccount: {{ .Values.serviceAccounts.clustermeshApiserver.name | quote }}
serviceAccountName: {{ .Values.serviceAccounts.clustermeshApiserver.name | quote }}
terminationGracePeriodSeconds: {{ .Values.clustermesh.apiserver.terminationGracePeriodSeconds }}
automountServiceAccountToken: {{ .Values.serviceAccounts.clustermeshApiserver.automount }}

View File

@@ -1,6 +1,6 @@
{{- if and (or .Values.externalWorkloads.enabled .Values.clustermesh.useAPIServer) .Values.clustermesh.apiserver.podDisruptionBudget.enabled }}
{{- $component := .Values.clustermesh.apiserver.podDisruptionBudget }}
apiVersion: {{ include "podDisruptionBudget.apiVersion" . }}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: clustermesh-apiserver

View File

@@ -38,4 +38,7 @@ spec:
{{- if .Values.clustermesh.apiserver.service.internalTrafficPolicy }}
internalTrafficPolicy: {{ .Values.clustermesh.apiserver.service.internalTrafficPolicy }}
{{- end }}
{{- if or (eq .Values.clustermesh.apiserver.service.enableSessionAffinity "Always") (and (eq .Values.clustermesh.apiserver.service.enableSessionAffinity "HAOnly") (gt (int .Values.clustermesh.apiserver.replicas) 1)) }}
sessionAffinity: ClientIP
{{- end }}
{{- end }}

View File

@@ -14,7 +14,5 @@ spec:
{{- toYaml .Values.clustermesh.apiserver.tls.auto.certManagerIssuerRef | nindent 4 }}
secretName: clustermesh-apiserver-admin-cert
commonName: {{ include "clustermesh-apiserver-generate-certs.admin-common-name" . }}
dnsNames:
- localhost
duration: {{ printf "%dh0m0s" (mul .Values.clustermesh.apiserver.tls.auto.certValidityDuration 24) }}
{{- end }}

View File

@@ -0,0 +1,18 @@
{{- if and .Values.clustermesh.useAPIServer .Values.clustermesh.apiserver.kvstoremesh.enabled .Values.clustermesh.apiserver.tls.auto.enabled (eq .Values.clustermesh.apiserver.tls.auto.method "certmanager") }}
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: clustermesh-apiserver-local-cert
namespace: {{ .Release.Namespace }}
{{- with .Values.clustermesh.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
issuerRef:
{{- toYaml .Values.clustermesh.apiserver.tls.auto.certManagerIssuerRef | nindent 4 }}
secretName: clustermesh-apiserver-local-cert
commonName: {{ include "clustermesh-apiserver-generate-certs.local-common-name" . }}
duration: {{ printf "%dh0m0s" (mul .Values.clustermesh.apiserver.tls.auto.certValidityDuration 24) }}
{{- end }}

View File

@@ -1,9 +1,5 @@
{{- define "clustermesh-apiserver-generate-certs.job.spec" }}
{{- $certValiditySecondsStr := printf "%ds" (mul .Values.clustermesh.apiserver.tls.auto.certValidityDuration 24 60 60) -}}
{{- $clustermeshServerSANs := concat (list "*.mesh.cilium.io" (printf "clustermesh-apiserver.%s.svc" .Release.Namespace))
.Values.clustermesh.apiserver.tls.server.extraDnsNames
.Values.clustermesh.apiserver.tls.server.extraIpAddresses
-}}
{{- $certValidityStr := printf "%dh" (mul .Values.clustermesh.apiserver.tls.auto.certValidityDuration 24) -}}
spec:
template:
metadata:
@@ -20,30 +16,76 @@ spec:
command:
- "/usr/bin/cilium-certgen"
args:
- "--cilium-namespace={{ .Release.Namespace }}"
{{- if .Values.debug.enabled }}
- "--debug"
{{- end }}
- "--ca-generate"
- "--ca-reuse-secret"
{{- if and .Values.tls.ca.cert .Values.tls.ca.key }}
- "--ca-secret-namespace={{ .Release.Namespace }}"
- "--ca-secret-name=cilium-ca"
{{- end }}
- "--clustermesh-apiserver-server-cert-generate"
- "--clustermesh-apiserver-server-cert-validity-duration={{ $certValiditySecondsStr }}"
- "--clustermesh-apiserver-server-cert-sans={{ join "," $clustermeshServerSANs }}"
- "--clustermesh-apiserver-admin-cert-generate"
- "--clustermesh-apiserver-admin-cert-validity-duration={{ $certValiditySecondsStr }}"
- "--clustermesh-apiserver-admin-cert-common-name={{ include "clustermesh-apiserver-generate-certs.admin-common-name" . }}"
{{- if .Values.externalWorkloads.enabled }}
- "--clustermesh-apiserver-client-cert-generate"
- "--clustermesh-apiserver-client-cert-validity-duration={{ $certValiditySecondsStr }}"
{{- end }}
{{- if .Values.clustermesh.useAPIServer }}
- "--clustermesh-apiserver-remote-cert-generate"
- "--clustermesh-apiserver-remote-cert-validity-duration={{ $certValiditySecondsStr }}"
- "--clustermesh-apiserver-remote-cert-common-name={{ include "clustermesh-apiserver-generate-certs.remote-common-name" . }}"
{{- end }}
- "--ca-common-name=Cilium CA"
env:
- name: CILIUM_CERTGEN_CONFIG
value: |
certs:
- name: clustermesh-apiserver-server-cert
namespace: {{ .Release.Namespace }}
commonName: "clustermesh-apiserver.cilium.io"
hosts:
- "clustermesh-apiserver.cilium.io"
- "*.mesh.cilium.io"
- "clustermesh-apiserver.{{ .Release.Namespace }}.svc"
{{- range $dns := .Values.clustermesh.apiserver.tls.server.extraDnsNames }}
- {{ $dns | quote }}
{{- end }}
- "127.0.0.1"
- "::1"
{{- range $ip := .Values.clustermesh.apiserver.tls.server.extraIpAddresses }}
- {{ $ip | quote }}
{{- end }}
usage:
- signing
- key encipherment
- server auth
validity: {{ $certValidityStr }}
- name: clustermesh-apiserver-admin-cert
namespace: {{ .Release.Namespace }}
commonName: {{ include "clustermesh-apiserver-generate-certs.admin-common-name" . | quote }}
usage:
- signing
- key encipherment
- client auth
validity: {{ $certValidityStr }}
{{- if .Values.clustermesh.useAPIServer }}
- name: clustermesh-apiserver-remote-cert
namespace: {{ .Release.Namespace }}
commonName: {{ include "clustermesh-apiserver-generate-certs.remote-common-name" . | quote }}
usage:
- signing
- key encipherment
- client auth
validity: {{ $certValidityStr }}
{{- end }}
{{- if and .Values.clustermesh.useAPIServer .Values.clustermesh.apiserver.kvstoremesh.enabled }}
- name: clustermesh-apiserver-local-cert
namespace: {{ .Release.Namespace }}
commonName: {{ include "clustermesh-apiserver-generate-certs.local-common-name" . | quote }}
usage:
- signing
- key encipherment
- client auth
validity: {{ $certValidityStr }}
{{- end }}
{{- if .Values.externalWorkloads.enabled }}
- name: clustermesh-apiserver-client-cert
namespace: {{ .Release.Namespace }}
commonName: "externalworkload"
usage:
- signing
- key encipherment
- client auth
validity: {{ $certValidityStr }}
{{- end }}
{{- with .Values.certgen.extraVolumeMounts }}
volumeMounts:
{{- toYaml . | nindent 10 }}

View File

@@ -1,5 +1,5 @@
{{- if and (or .Values.externalWorkloads.enabled .Values.clustermesh.useAPIServer) .Values.clustermesh.apiserver.tls.auto.enabled (eq .Values.clustermesh.apiserver.tls.auto.method "cronJob") .Values.clustermesh.apiserver.tls.auto.schedule }}
apiVersion: {{ include "cronjob.apiVersion" . }}
apiVersion: batch/v1
kind: CronJob
metadata:
name: clustermesh-apiserver-generate-certs

View File

@@ -34,6 +34,7 @@ rules:
- clustermesh-apiserver-server-cert
- clustermesh-apiserver-admin-cert
- clustermesh-apiserver-remote-cert
- clustermesh-apiserver-local-cert
- clustermesh-apiserver-client-cert
verbs:
- update

View File

@@ -1,8 +1,7 @@
{{- if and (or .Values.externalWorkloads.enabled .Values.clustermesh.useAPIServer) .Values.clustermesh.apiserver.tls.auto.enabled (eq .Values.clustermesh.apiserver.tls.auto.method "helm") }}
{{- $_ := include "cilium.ca.setup" . -}}
{{- $cn := include "clustermesh-apiserver-generate-certs.admin-common-name" . -}}
{{- $dns := list "localhost" }}
{{- $cert := genSignedCert $cn nil $dns (.Values.clustermesh.apiserver.tls.auto.certValidityDuration | int) .commonCA -}}
{{- $cert := genSignedCert $cn nil nil (.Values.clustermesh.apiserver.tls.auto.certValidityDuration | int) .commonCA -}}
---
apiVersion: v1
kind: Secret

View File

@@ -0,0 +1,20 @@
{{- if and .Values.clustermesh.useAPIServer .Values.clustermesh.apiserver.kvstoremesh.enabled .Values.clustermesh.apiserver.tls.auto.enabled (eq .Values.clustermesh.apiserver.tls.auto.method "helm") }}
{{- $_ := include "cilium.ca.setup" . -}}
{{- $cn := include "clustermesh-apiserver-generate-certs.local-common-name" . -}}
{{- $cert := genSignedCert $cn nil nil (.Values.clustermesh.apiserver.tls.auto.certValidityDuration | int) .commonCA -}}
---
apiVersion: v1
kind: Secret
metadata:
name: clustermesh-apiserver-local-cert
namespace: {{ .Release.Namespace }}
{{- with .Values.clustermesh.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
type: kubernetes.io/tls
data:
ca.crt: {{ .commonCA.Cert | b64enc }}
tls.crt: {{ $cert.Cert | b64enc }}
tls.key: {{ $cert.Key | b64enc }}
{{- end }}

View File

@@ -1,4 +1,5 @@
{{- if and (or .Values.externalWorkloads.enabled .Values.clustermesh.useAPIServer) (not .Values.clustermesh.apiserver.tls.auto.enabled) }}
{{- if .Values.clustermesh.apiserver.tls.enableSecrets }}
apiVersion: v1
kind: Secret
metadata:
@@ -14,3 +15,4 @@ data:
tls.crt: {{ .Values.clustermesh.apiserver.tls.admin.cert | required "missing clustermesh.apiserver.tls.admin.cert" }}
tls.key: {{ .Values.clustermesh.apiserver.tls.admin.key | required "missing clustermesh.apiserver.tls.admin.key" }}
{{- end }}
{{- end }}

View File

@@ -1,4 +1,5 @@
{{- if and .Values.externalWorkloads.enabled (not .Values.clustermesh.apiserver.tls.auto.enabled) }}
{{- if .Values.clustermesh.apiserver.tls.enableSecrets }}
apiVersion: v1
kind: Secret
metadata:
@@ -14,3 +15,4 @@ data:
tls.crt: {{ .Values.clustermesh.apiserver.tls.client.cert | required "missing clustermesh.apiserver.tls.client.cert" }}
tls.key: {{ .Values.clustermesh.apiserver.tls.client.key | required "missing clustermesh.apiserver.tls.client.key" }}
{{- end }}
{{- end }}

View File

@@ -1,4 +1,5 @@
{{- if and .Values.clustermesh.useAPIServer (not .Values.clustermesh.apiserver.tls.auto.enabled) }}
{{- if .Values.clustermesh.apiserver.tls.enableSecrets }}
apiVersion: v1
kind: Secret
metadata:
@@ -14,3 +15,4 @@ data:
tls.crt: {{ .Values.clustermesh.apiserver.tls.remote.cert | required "missing clustermesh.apiserver.tls.remote.cert" }}
tls.key: {{ .Values.clustermesh.apiserver.tls.remote.key | required "missing clustermesh.apiserver.tls.remote.key" }}
{{- end }}
{{- end }}

View File

@@ -1,4 +1,5 @@
{{- if and (or .Values.externalWorkloads.enabled .Values.clustermesh.useAPIServer) (not .Values.clustermesh.apiserver.tls.auto.enabled) }}
{{- if .Values.clustermesh.apiserver.tls.enableSecrets }}
apiVersion: v1
kind: Secret
metadata:
@@ -14,3 +15,4 @@ data:
tls.crt: {{ .Values.clustermesh.apiserver.tls.server.cert | required "missing clustermesh.apiserver.tls.server.cert" }}
tls.key: {{ .Values.clustermesh.apiserver.tls.server.key | required "missing clustermesh.apiserver.tls.server.key" }}
{{- end }}
{{- end }}

View File

@@ -1,4 +1,7 @@
{{- if ne .Values.clustermesh.apiserver.tls.authMode "legacy" }}
{{- if and
(or .Values.externalWorkloads.enabled .Values.clustermesh.useAPIServer)
(ne .Values.clustermesh.apiserver.tls.authMode "legacy")
}}
---
apiVersion: v1
kind: ConfigMap

View File

@@ -1,79 +0,0 @@
{{- if .Values.etcd.managed }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: cilium-etcd-operator
{{- with .Values.etcd.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
app.kubernetes.io/part-of: cilium
rules:
- apiGroups:
- etcd.database.coreos.com
resources:
- etcdclusters
verbs:
- get
- delete
- create
- update
- apiGroups:
- apiextensions.k8s.io
resources:
- customresourcedefinitions
verbs:
- delete
- get
- create
- apiGroups:
- ""
resources:
- deployments
verbs:
- delete
- create
- get
- update
- apiGroups:
- ""
resources:
- pods
verbs:
- list
- get
- delete
- apiGroups:
- apps
resources:
- deployments
verbs:
- delete
- create
- get
- update
- apiGroups:
- ""
resources:
- componentstatuses
verbs:
- get
- apiGroups:
- extensions
resources:
- deployments
verbs:
- delete
- create
- get
- update
- apiGroups:
- ""
resources:
- secrets
verbs:
- get
- create
- delete
{{- end }}

View File

@@ -1,20 +0,0 @@
{{- if and .Values.etcd.managed .Values.serviceAccounts.etcd.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: cilium-etcd-operator
{{- with .Values.etcd.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
app.kubernetes.io/part-of: cilium
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cilium-etcd-operator
subjects:
- kind: ServiceAccount
name: {{ .Values.serviceAccounts.etcd.name | quote }}
namespace: {{ .Release.Namespace }}
{{- end }}

View File

@@ -1,128 +0,0 @@
{{- if .Values.etcd.managed }}
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
io.cilium/app: etcd-operator
name: cilium-etcd-operator
app.kubernetes.io/name: cilium-etcd-operator
app.kubernetes.io/part-of: cilium
name: cilium-etcd-operator
namespace: {{ .Release.Namespace }}
{{- with .Values.etcd.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
replicas: 1
selector:
matchLabels:
io.cilium/app: etcd-operator
name: cilium-etcd-operator
{{- with .Values.etcd.updateStrategy }}
strategy:
{{- toYaml . | trim | nindent 4 }}
{{- end }}
template:
metadata:
{{- with .Values.etcd.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
io.cilium/app: etcd-operator
app.kubernetes.io/part-of: cilium
app.kubernetes.io/name: cilium-etcd-operator
name: cilium-etcd-operator
{{- with .Values.etcd.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- if .Values.etcd.affinity }}
affinity:
{{ toYaml .Values.etcd.affinity | indent 8 }}
{{- end }}
{{- with .Values.etcd.topologySpreadConstraints }}
topologySpreadConstraints:
{{- range $constraint := . }}
- {{ toYaml $constraint | nindent 8 | trim }}
{{- if not $constraint.labelSelector }}
labelSelector:
matchLabels:
io.cilium/app: etcd-operator
name: cilium-etcd-operator
{{- end }}
{{- end }}
{{- end }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{ toYaml .Values.imagePullSecrets | indent 8 }}
{{- end }}
{{- with .Values.etcd.podSecurityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- args:
{{- with .Values.etcd.extraArgs }}
{{- toYaml . | trim | nindent 8 }}
{{- end }}
#- --etcd-node-selector=disktype=ssd,cputype=high
command:
- /usr/bin/cilium-etcd-operator
env:
- name: CILIUM_ETCD_OPERATOR_CLUSTER_DOMAIN
value: "{{ .Values.etcd.clusterDomain }}"
- name: CILIUM_ETCD_OPERATOR_ETCD_CLUSTER_SIZE
value: "{{ .Values.etcd.clusterSize }}"
- name: CILIUM_ETCD_OPERATOR_NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
- name: CILIUM_ETCD_OPERATOR_POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
- name: CILIUM_ETCD_OPERATOR_POD_UID
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.uid
- name: CILIUM_ETCD_META_ETCD_AUTO_COMPACTION_MODE
value: "revision"
- name: CILIUM_ETCD_META_ETCD_AUTO_COMPACTION_RETENTION
value: "25000"
image: {{ include "cilium.image" .Values.etcd.image | quote }}
imagePullPolicy: {{ .Values.etcd.image.pullPolicy }}
name: cilium-etcd-operator
terminationMessagePolicy: FallbackToLogsOnError
{{- with .Values.etcd.securityContext }}
securityContext:
{{- toYaml . | trim | nindent 8 }}
{{- end }}
{{- with .Values.etcd.extraVolumeMounts }}
volumeMounts:
{{- toYaml . | nindent 8 }}
{{- end }}
dnsPolicy: ClusterFirst
hostNetwork: true
priorityClassName: {{ include "cilium.priorityClass" (list $ .Values.clustermesh.apiserver.priorityClassName "system-cluster-critical") }}
restartPolicy: Always
serviceAccount: {{ .Values.serviceAccounts.etcd.name | quote }}
serviceAccountName: {{ .Values.serviceAccounts.etcd.name | quote }}
automountServiceAccountToken: {{ .Values.serviceAccounts.etcd.automount }}
{{- with .Values.etcd.nodeSelector }}
nodeSelector:
{{- toYaml . | trim | nindent 8 }}
{{- end }}
{{- with .Values.etcd.tolerations }}
tolerations:
{{- toYaml . | trim | nindent 6 }}
{{- end }}
{{- with .Values.etcd.extraVolumes }}
volumes:
{{- toYaml . | nindent 6 }}
{{- end }}
{{- end }}

View File

@@ -1,16 +0,0 @@
{{- if and .Values.etcd.managed .Values.serviceAccounts.etcd.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ .Values.serviceAccounts.etcd.name | quote }}
namespace: {{ .Release.Namespace }}
{{- if or .Values.serviceAccounts.etcd.annotations .Values.etcd.annotations }}
annotations:
{{- with .Values.etcd.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.serviceAccounts.etcd.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -1,60 +0,0 @@
{{- if .Values.etcd.managed }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: etcd-operator
{{- with .Values.etcd.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
app.kubernetes.io/part-of: cilium
rules:
- apiGroups:
- etcd.database.coreos.com
resources:
- etcdclusters
- etcdbackups
- etcdrestores
verbs:
- '*'
- apiGroups:
- apiextensions.k8s.io
resources:
- customresourcedefinitions
verbs:
- '*'
- apiGroups:
- ""
resources:
- pods
- services
- endpoints
- persistentvolumeclaims
- events
- deployments
verbs:
- '*'
- apiGroups:
- apps
resources:
- deployments
verbs:
- '*'
- apiGroups:
- extensions
resources:
- deployments
verbs:
- create
- get
- list
- patch
- update
- apiGroups:
- ""
resources:
- secrets
verbs:
- get
{{- end }}

View File

@@ -1,20 +0,0 @@
{{- if .Values.etcd.managed }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: etcd-operator
{{- with .Values.etcd.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
app.kubernetes.io/part-of: cilium
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: etcd-operator
subjects:
- kind: ServiceAccount
name: cilium-etcd-sa
namespace: {{ .Release.Namespace }}
{{- end }}

View File

@@ -1,16 +0,0 @@
{{- if .Values.etcd.managed }}
apiVersion: v1
kind: ServiceAccount
metadata:
name: cilium-etcd-sa
namespace: {{ .Release.Namespace }}
{{- if or .Values.serviceAccounts.etcd.annotations .Values.etcd.annotations }}
annotations:
{{- with .Values.etcd.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.serviceAccounts.etcd.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -1,28 +0,0 @@
{{- if and .Values.etcd.managed .Values.etcd.podDisruptionBudget.enabled }}
{{- $component := .Values.etcd.podDisruptionBudget }}
apiVersion: {{ include "podDisruptionBudget.apiVersion" . }}
kind: PodDisruptionBudget
metadata:
name: cilium-etcd-operator
namespace: {{ .Release.Namespace }}
{{- with .Values.etcd.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
io.cilium/app: etcd-operator
name: cilium-etcd-operator
app.kubernetes.io/name: cilium-etcd-operator
app.kubernetes.io/part-of: cilium
spec:
{{- with $component.maxUnavailable }}
maxUnavailable: {{ . }}
{{- end }}
{{- with $component.minAvailable }}
minAvailable: {{ . }}
{{- end }}
selector:
matchLabels:
io.cilium/app: etcd-operator
name: cilium-etcd-operator
{{- end }}

View File

@@ -17,7 +17,7 @@ data:
config.yaml: |
cluster-name: {{ .Values.cluster.name }}
peer-service: "hubble-peer.{{ .Release.Namespace }}.svc.{{ .Values.hubble.peerService.clusterDomain }}:{{ $peerSvcPort }}"
listen-address: {{ .Values.hubble.relay.listenHost }}:{{ .Values.hubble.relay.listenPort }}
listen-address: {{ include "hubble-relay.config.listenAddress" . }}
gops: {{ .Values.hubble.relay.gops.enabled }}
gops-port: {{ .Values.hubble.relay.gops.port | quote }}
{{- if .Values.hubble.relay.pprof.enabled }}
@@ -39,13 +39,5 @@ data:
{{- else }}
disable-client-tls: true
{{- end }}
{{- if and .Values.hubble.tls.enabled .Values.hubble.relay.tls.server.enabled }}
tls-relay-server-cert-file: /var/lib/hubble-relay/tls/server.crt
tls-relay-server-key-file: /var/lib/hubble-relay/tls/server.key
{{- if .Values.hubble.relay.tls.server.mtls }}
tls-relay-client-ca-files: /var/lib/hubble-relay/tls/hubble-server-ca.crt
{{- end }}
{{- else }}
disable-server-tls: true
{{- end }}
{{- include "hubble-relay.config.tls" . | nindent 4 }}
{{- end }}

View File

@@ -31,6 +31,10 @@ spec:
{{- with .Values.hubble.relay.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if and .Values.hubble.relay.prometheus.enabled (not .Values.hubble.relay.prometheus.serviceMonitor.enabled) }}
prometheus.io/port: {{ .Values.hubble.relay.prometheus.port | quote }}
prometheus.io/scrape: "true"
{{- end }}
labels:
k8s-app: hubble-relay
app.kubernetes.io/name: hubble-relay
@@ -64,33 +68,44 @@ spec:
{{- end }}
ports:
- name: grpc
containerPort: {{ .Values.hubble.relay.listenPort }}
containerPort: {{ include "hubble-relay.config.listenPort" . }}
{{- if .Values.hubble.relay.prometheus.enabled }}
- name: prometheus
containerPort: {{ .Values.hubble.relay.prometheus.port }}
protocol: TCP
{{- end }}
readinessProbe:
{{- include "hubble-relay.probe" . | nindent 12 }}
{{- if semverCompare "<1.20-0" .Capabilities.KubeVersion.Version }}
# Starting from Kubernetes 1.20, we are using startupProbe instead
# of this field.
initialDelaySeconds: 5
{{- end }}
grpc:
port: 4222
timeoutSeconds: 3
# livenessProbe will kill the pod, we should be very conservative
# here on failures since killing the pod should be a last resort, and
# we should provide enough time for relay to retry before killing it.
livenessProbe:
{{- include "hubble-relay.probe" . | nindent 12 }}
{{- if semverCompare "<1.20-0" .Capabilities.KubeVersion.Version }}
# Starting from Kubernetes 1.20, we are using startupProbe instead
# of this field.
initialDelaySeconds: 60
{{- end }}
{{- if semverCompare ">=1.20-0" .Capabilities.KubeVersion.Version }}
grpc:
port: 4222
timeoutSeconds: 10
# Give relay time to establish connections and make a few retries
# before starting livenessProbes.
initialDelaySeconds: 10
# 10 second * 12 failures = 2 minutes of failure.
# If relay cannot become healthy after 2 minutes, then killing it
# might resolve whatever issue is occurring.
#
# 10 seconds is a reasonable retry period so we can see if it's
# failing regularly or only sporadically.
periodSeconds: 10
failureThreshold: 12
startupProbe:
# give the relay one minute to start up
{{- include "hubble-relay.probe" . | nindent 12 }}
grpc:
port: 4222
# Give relay time to get it's certs and establish connections and
# make a few retries before starting startupProbes.
initialDelaySeconds: 10
# 20 * 3 seconds = 1 minute of failure before we consider startup as failed.
failureThreshold: 20
# Retry more frequently at startup so that it can be considered started more quickly.
periodSeconds: 3
{{- end }}
{{- with .Values.hubble.relay.extraEnv }}
env:
{{- toYaml . | trim | nindent 12 }}
@@ -112,9 +127,9 @@ spec:
{{- toYaml . | nindent 10 }}
{{- end }}
terminationMessagePolicy: FallbackToLogsOnError
{{- include "hubble-relay.containers.extra" . | nindent 8 }}
restartPolicy: Always
priorityClassName: {{ .Values.hubble.relay.priorityClassName }}
serviceAccount: {{ .Values.serviceAccounts.relay.name | quote }}
serviceAccountName: {{ .Values.serviceAccounts.relay.name | quote }}
automountServiceAccountToken: {{ .Values.serviceAccounts.relay.automount }}
terminationGracePeriodSeconds: {{ .Values.hubble.relay.terminationGracePeriodSeconds }}
@@ -182,20 +197,7 @@ spec:
{{- end }}
{{- end }}
{{- with .Values.hubble.relay.extraVolumes }}
{{- toYaml . | nindent 6 }}
{{- toYaml . | nindent 6}}
{{- end }}
{{- end }}
{{- define "hubble-relay.probe" }}
{{- /* This distinction can be removed once we drop support for k8s 1.23 */}}
{{- if semverCompare ">=1.24-0" .Capabilities.KubeVersion.Version -}}
grpc:
port: 4222
{{- else }}
exec:
command:
- grpc_health_probe
- -addr=localhost:4222
{{- end }}
timeoutSeconds: 3
{{- include "hubble-relay.volumes.extra" . | nindent 6 }}
{{- end }}

View File

@@ -1,6 +1,6 @@
{{- if and .Values.hubble.enabled .Values.hubble.relay.enabled .Values.hubble.relay.podDisruptionBudget.enabled }}
{{- $component := .Values.hubble.relay.podDisruptionBudget }}
apiVersion: {{ include "podDisruptionBudget.apiVersion" . }}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: hubble-relay

View File

@@ -4,10 +4,14 @@ apiVersion: v1
metadata:
name: hubble-relay
namespace: {{ .Release.Namespace }}
{{- with .Values.hubble.relay.annotations }}
annotations:
{{- with .Values.hubble.relay.annotations }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
{{- if and .Values.hubble.relay.prometheus.enabled (not .Values.hubble.relay.prometheus.serviceMonitor.enabled) }}
prometheus.io/scrape: "true"
prometheus.io/port: {{ .Values.hubble.relay.prometheus.port | quote }}
{{- end }}
labels:
k8s-app: hubble-relay
app.kubernetes.io/name: hubble-relay
@@ -23,7 +27,7 @@ spec:
{{- else }}
port: {{ .Values.hubble.relay.tls.server.enabled | ternary 443 80 }}
{{- end }}
targetPort: {{ .Values.hubble.relay.listenPort }}
targetPort: {{ include "hubble-relay.service.targetPort" . }}
{{- if and (eq "NodePort" .Values.hubble.relay.service.type) .Values.hubble.relay.service.nodePort }}
nodePort: {{ .Values.hubble.relay.service.nodePort }}
{{- end }}

View File

@@ -1,4 +1,4 @@
{{- if and (or .Values.hubble.enabled .Values.hubble.ui.standalone.enabled) .Values.hubble.ui.enabled .Values.serviceAccounts.ui.create }}
{{- if and (or .Values.hubble.enabled .Values.hubble.ui.standalone.enabled) .Values.hubble.ui.enabled .Values.serviceAccounts.ui.create .Values.rbac.create }}
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:

View File

@@ -1,4 +1,4 @@
{{- if and (or .Values.hubble.enabled .Values.hubble.ui.standalone.enabled) .Values.hubble.ui.enabled .Values.serviceAccounts.ui.create }}
{{- if and (or .Values.hubble.enabled .Values.hubble.ui.standalone.enabled) .Values.hubble.ui.enabled .Values.serviceAccounts.ui.create .Values.rbac.create }}
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:

View File

@@ -44,7 +44,6 @@ spec:
{{- omit . "enabled" | toYaml | nindent 8 }}
{{- end }}
priorityClassName: {{ .Values.hubble.ui.priorityClassName }}
serviceAccount: {{ .Values.serviceAccounts.ui.name | quote }}
serviceAccountName: {{ .Values.serviceAccounts.ui.name | quote }}
automountServiceAccountToken: {{ .Values.serviceAccounts.ui.automount }}
{{- with .Values.imagePullSecrets }}

View File

@@ -1,6 +1,6 @@
{{- if and (or .Values.hubble.enabled .Values.hubble.ui.standalone.enabled) .Values.hubble.ui.enabled .Values.hubble.ui.ingress.enabled }}
{{- $baseUrl := .Values.hubble.ui.baseUrl -}}
apiVersion: {{ template "ingress.apiVersion" . }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: hubble-ui
@@ -35,6 +35,11 @@ spec:
http:
paths:
- path: {{ $baseUrl | quote }}
{{- include "ingress.paths" $ | nindent 12 }}
pathType: Prefix
backend:
service:
name: hubble-ui
port:
name: http
{{- end }}
{{- end }}

View File

@@ -1,6 +1,6 @@
{{- if and (or .Values.hubble.enabled .Values.hubble.ui.standalone.enabled) .Values.hubble.ui.enabled .Values.hubble.ui.podDisruptionBudget.enabled }}
{{- $component := .Values.hubble.ui.podDisruptionBudget }}
apiVersion: {{ include "podDisruptionBudget.apiVersion" . }}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: hubble-ui

View File

@@ -24,7 +24,5 @@ spec:
{{- end }}
protocol: TCP
targetPort: {{ .Values.hubble.peerService.targetPort }}
{{- if semverCompare ">=1.22-0" .Capabilities.KubeVersion.GitVersion }}
internalTrafficPolicy: Local
{{- end }}
{{- end }}

View File

@@ -30,6 +30,14 @@ spec:
interval: {{ .Values.hubble.metrics.serviceMonitor.interval | quote }}
honorLabels: true
path: /metrics
{{- if .Values.hubble.metrics.tls.enabled }}
{{- $cn := list (.Values.cluster.name | replace "." "-") "hubble-metrics.cilium.io" | join "." }}
{{- $tlsConfig := merge .Values.hubble.metrics.serviceMonitor.tlsConfig (dict "serverName" $cn) }}
tlsConfig: {{ $tlsConfig | toYaml | nindent 6 }}
scheme: https
{{- else }}
scheme: http
{{- end }}
{{- with .Values.hubble.metrics.serviceMonitor.relabelings }}
relabelings:
{{- toYaml . | nindent 4 }}

View File

@@ -0,0 +1,32 @@
{{- if and .Values.hubble.enabled .Values.hubble.metrics.tls.enabled .Values.hubble.tls.auto.enabled (eq .Values.hubble.tls.auto.method "certmanager") }}
{{- $cn := list (.Values.cluster.name | replace "." "-") "hubble-metrics.cilium.io" | join "." }}
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: hubble-metrics-server-certs
namespace: {{ .Release.Namespace }}
{{- with .Values.hubble.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
issuerRef:
{{- toYaml .Values.hubble.tls.auto.certManagerIssuerRef | nindent 4 }}
secretName: hubble-metrics-server-certs
commonName: {{ $cn | quote }}
dnsNames:
- {{ $cn | quote }}
{{- range $dns := .Values.hubble.metrics.tls.server.extraDnsNames }}
- {{ $dns | quote }}
{{- end }}
{{- if .Values.hubble.metrics.tls.server.extraIpAddresses }}
ipAddresses:
{{- range $ip := .Values.hubble.metrics.tls.server.extraIpAddresses }}
- {{ $ip | quote }}
{{- end }}
{{- end }}
duration: {{ printf "%dh0m0s" (mul .Values.hubble.tls.auto.certValidityDuration 24) }}
privateKey:
rotationPolicy: Always
{{- end }}

View File

@@ -1,5 +1,5 @@
{{- define "hubble-generate-certs.job.spec" }}
{{- $certValiditySecondsStr := printf "%ds" (mul .Values.hubble.tls.auto.certValidityDuration 24 60 60) -}}
{{- $certValidityStr := printf "%dh" (mul .Values.hubble.tls.auto.certValidityDuration 24) -}}
spec:
template:
metadata:
@@ -9,41 +9,121 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
securityContext:
{{- if semverCompare "<1.30.0" (printf "%d.%d.0" (semver .Capabilities.KubeVersion.Version).Major (semver .Capabilities.KubeVersion.Version).Minor) }}
appArmorProfile:
type: RuntimeDefault
{{- end }}
seccompProfile:
type: RuntimeDefault
containers:
- name: certgen
image: {{ include "cilium.image" .Values.certgen.image | quote }}
imagePullPolicy: {{ .Values.certgen.image.pullPolicy }}
securityContext:
capabilities:
drop:
- ALL
allowPrivilegeEscalation: false
command:
- "/usr/bin/cilium-certgen"
# Because this is executed as a job, we pass the values as command
# line args instead of via config map. This allows users to inspect
# the values used in past runs by inspecting the completed pod.
args:
- "--cilium-namespace={{ .Release.Namespace }}"
{{- if .Values.debug.enabled }}
- "--debug"
{{- end }}
- "--ca-generate"
- "--ca-reuse-secret"
{{- if and .Values.tls.ca.cert .Values.tls.ca.key }}
- "--ca-secret-namespace={{ .Release.Namespace }}"
- "--ca-secret-name=cilium-ca"
{{- end }}
- "--hubble-server-cert-generate"
- "--hubble-server-cert-common-name={{ list "*" (.Values.cluster.name | replace "." "-") "hubble-grpc.cilium.io" | join "." }}"
- "--hubble-server-cert-validity-duration={{ $certValiditySecondsStr }}"
{{- if .Values.hubble.relay.enabled }}
- "--hubble-relay-client-cert-generate"
- "--hubble-relay-client-cert-validity-duration={{ $certValiditySecondsStr }}"
{{- end }}
{{- if and .Values.hubble.relay.enabled .Values.hubble.relay.tls.server.enabled }}
- "--hubble-relay-server-cert-generate"
- "--hubble-relay-server-cert-validity-duration={{ $certValiditySecondsStr }}"
{{- end }}
- "--ca-common-name=Cilium CA"
env:
- name: CILIUM_CERTGEN_CONFIG
value: |
certs:
- name: hubble-server-certs
namespace: {{ .Release.Namespace }}
commonName: {{ list "*" (.Values.cluster.name | replace "." "-") "hubble-grpc.cilium.io" | join "." | quote }}
hosts:
- {{ list "*" (.Values.cluster.name | replace "." "-") "hubble-grpc.cilium.io" | join "." | quote }}
{{- range $dns := .Values.hubble.tls.server.extraDnsNames }}
- {{ $dns | quote }}
{{- end }}
{{- range $ip := .Values.hubble.tls.server.extraIpAddresses }}
- {{ $ip | quote }}
{{- end }}
usage:
- signing
- key encipherment
- server auth
validity: {{ $certValidityStr }}
{{- if .Values.hubble.relay.enabled }}
- name: hubble-relay-client-certs
namespace: {{ .Release.Namespace }}
commonName: "*.hubble-relay.cilium.io"
hosts:
- "*.hubble-relay.cilium.io"
usage:
- signing
- key encipherment
- client auth
validity: {{ $certValidityStr }}
{{- end }}
{{- if and .Values.hubble.relay.enabled .Values.hubble.relay.tls.server.enabled }}
- name: hubble-relay-server-certs
namespace: {{ .Release.Namespace }}
commonName: "*.hubble-relay.cilium.io"
hosts:
- "*.hubble-relay.cilium.io"
{{- range $dns := .Values.hubble.relay.tls.server.extraDnsNames }}
- {{ $dns | quote }}
{{- end }}
{{- range $ip := .Values.hubble.relay.tls.server.extraIpAddresses }}
- {{ $ip | quote }}
{{- end }}
usage:
- signing
- key encipherment
- server auth
validity: {{ $certValidityStr }}
{{- end }}
{{- if and .Values.hubble.metrics.enabled .Values.hubble.metrics.tls.enabled }}
- name: hubble-metrics-server-certs
namespace: {{ .Release.Namespace }}
commonName: {{ list (.Values.cluster.name | replace "." "-") "hubble-metrics.cilium.io" | join "." }} | quote }}
hosts:
- {{ list (.Values.cluster.name | replace "." "-") "hubble-metrics.cilium.io" | join "." }} | quote }}
{{- range $dns := .Values.hubble.metrics.tls.server.extraDnsNames }}
- {{ $dns | quote }}
{{- end }}
{{- range $ip := .Values.hubble.metrics.tls.server.extraIpAddresses }}
- {{ $ip | quote }}
{{- end }}
usage:
- signing
- key encipherment
- server auth
validity: {{ $certValidityStr }}
{{- end }}
{{- if and .Values.hubble.ui.enabled .Values.hubble.relay.enabled .Values.hubble.relay.tls.server.enabled }}
- name: hubble-ui-client-certs
namespace: {{ .Release.Namespace }}
commonName: "*.hubble-ui.cilium.io"
hosts:
- "*.hubble-ui.cilium.io"
usage:
- signing
- key encipherment
- client auth
validity: {{ $certValidityStr }}
{{- end }}
{{- with .Values.certgen.extraVolumeMounts }}
volumeMounts:
{{- toYaml . | nindent 10 }}
{{- end }}
hostNetwork: true
hostNetwork: false
{{- with .Values.certgen.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}

View File

@@ -1,5 +1,5 @@
{{- if and .Values.hubble.enabled .Values.hubble.tls.enabled .Values.hubble.tls.auto.enabled (eq .Values.hubble.tls.auto.method "cronJob") .Values.hubble.tls.auto.schedule }}
apiVersion: {{ include "cronjob.apiVersion" . }}
apiVersion: batch/v1
kind: CronJob
metadata:
name: hubble-generate-certs

View File

@@ -1,8 +1,9 @@
{{- if and .Values.hubble.enabled .Values.hubble.tls.enabled .Values.hubble.tls.auto.enabled (eq .Values.hubble.tls.auto.method "cronJob") .Values.serviceAccounts.hubblecertgen.create }}
{{- if and .Values.hubble.enabled .Values.hubble.tls.enabled .Values.hubble.tls.auto.enabled (eq .Values.hubble.tls.auto.method "cronJob") .Values.serviceAccounts.hubblecertgen.create .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
kind: Role
metadata:
name: hubble-generate-certs
namespace: {{ .Release.Namespace }}
{{- with .Values.hubble.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
@@ -24,6 +25,8 @@ rules:
- hubble-server-certs
- hubble-relay-client-certs
- hubble-relay-server-certs
- hubble-metrics-server-certs
- hubble-ui-client-certs
verbs:
- update
- apiGroups:

View File

@@ -1,8 +1,9 @@
{{- if and .Values.hubble.enabled .Values.hubble.tls.enabled .Values.hubble.tls.auto.enabled (eq .Values.hubble.tls.auto.method "cronJob") .Values.serviceAccounts.hubblecertgen.create }}
{{- if and .Values.hubble.enabled .Values.hubble.tls.enabled .Values.hubble.tls.auto.enabled (eq .Values.hubble.tls.auto.method "cronJob") .Values.serviceAccounts.hubblecertgen.create .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
kind: RoleBinding
metadata:
name: hubble-generate-certs
namespace: {{ .Release.Namespace }}
{{- with .Values.hubble.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
@@ -11,7 +12,7 @@ metadata:
app.kubernetes.io/part-of: cilium
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
kind: Role
name: hubble-generate-certs
subjects:
- kind: ServiceAccount

View File

@@ -1,31 +0,0 @@
{{/*
Generate TLS certificates for Hubble Server and Hubble Relay.
Note: Always use this template as follows:
{{- $_ := include "hubble-generate-certs.helm.setup-ca" . -}}
The assignment to `$_` is required because we store the generated CI in a global `ca` variable.
Please, don't try to "simplify" this, as without this trick, every generated
certificate would be signed by a different CA.
*/}}
{{- define "hubble-generate-certs.helm.setup-ca" }}
{{- if not .ca }}
{{- $ca := "" -}}
{{- $crt := .Values.tls.ca.cert -}}
{{- $key := .Values.tls.ca.key -}}
{{- if and $crt $key }}
{{- $ca = buildCustomCert $crt $key -}}
{{- else }}
{{- $_ := include "cilium.ca.setup" . -}}
{{- with lookup "v1" "Secret" .Release.Namespace .commonCASecretName }}
{{- $crt := index .data "ca.crt" }}
{{- $key := index .data "ca.key" }}
{{- $ca = buildCustomCert $crt $key -}}
{{- else }}
{{- $ca = .commonCA -}}
{{- end }}
{{- end }}
{{- $_ := set . "ca" $ca -}}
{{- end }}
{{- end }}

View File

@@ -0,0 +1,22 @@
{{- if and .Values.agent .Values.hubble.enabled .Values.hubble.metrics.tls.enabled .Values.hubble.tls.auto.enabled (eq .Values.hubble.tls.auto.method "helm") }}
{{- $_ := include "cilium.ca.setup" . -}}
{{- $cn := list (.Values.cluster.name | replace "." "-") "hubble-metrics.cilium.io" | join "." }}
{{- $ip := .Values.hubble.metrics.tls.server.extraIpAddresses }}
{{- $dns := prepend .Values.hubble.metrics.tls.server.extraDnsNames $cn }}
{{- $cert := genSignedCert $cn $ip $dns (.Values.hubble.tls.auto.certValidityDuration | int) .commonCA -}}
---
apiVersion: v1
kind: Secret
metadata:
name: hubble-metrics-server-certs
namespace: {{ .Release.Namespace }}
{{- with .Values.hubble.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
type: kubernetes.io/tls
data:
ca.crt: {{ .commonCA.Cert | b64enc }}
tls.crt: {{ $cert.Cert | b64enc }}
tls.key: {{ $cert.Key | b64enc }}
{{- end }}

View File

@@ -1,8 +1,8 @@
{{- if and .Values.hubble.enabled .Values.hubble.tls.enabled .Values.hubble.tls.auto.enabled (eq .Values.hubble.tls.auto.method "helm") .Values.hubble.relay.enabled }}
{{- $_ := include "hubble-generate-certs.helm.setup-ca" . -}}
{{- $_ := include "cilium.ca.setup" . -}}
{{- $cn := "*.hubble-relay.cilium.io" }}
{{- $dns := list $cn }}
{{- $cert := genSignedCert $cn nil $dns (.Values.hubble.tls.auto.certValidityDuration | int) .ca -}}
{{- $cert := genSignedCert $cn nil $dns (.Values.hubble.tls.auto.certValidityDuration | int) .commonCA -}}
---
apiVersion: v1
kind: Secret
@@ -15,7 +15,7 @@ metadata:
{{- end }}
type: kubernetes.io/tls
data:
ca.crt: {{ .ca.Cert | b64enc }}
ca.crt: {{ .commonCA.Cert | b64enc }}
tls.crt: {{ $cert.Cert | b64enc }}
tls.key: {{ $cert.Key | b64enc }}
{{- end }}

View File

@@ -1,9 +1,9 @@
{{- if and .Values.hubble.enabled .Values.hubble.tls.enabled .Values.hubble.tls.auto.enabled (eq .Values.hubble.tls.auto.method "helm") .Values.hubble.relay.enabled .Values.hubble.relay.tls.server.enabled }}
{{- $_ := include "hubble-generate-certs.helm.setup-ca" . -}}
{{- $_ := include "cilium.ca.setup" . -}}
{{- $cn := "*.hubble-relay.cilium.io" }}
{{- $ip := .Values.hubble.relay.tls.server.extraIpAddresses }}
{{- $dns := prepend .Values.hubble.relay.tls.server.extraDnsNames $cn }}
{{- $cert := genSignedCert $cn $ip $dns (.Values.hubble.tls.auto.certValidityDuration | int) .ca -}}
{{- $cert := genSignedCert $cn $ip $dns (.Values.hubble.tls.auto.certValidityDuration | int) .commonCA -}}
---
apiVersion: v1
kind: Secret
@@ -16,7 +16,7 @@ metadata:
{{- end }}
type: kubernetes.io/tls
data:
ca.crt: {{ .ca.Cert | b64enc }}
ca.crt: {{ .commonCA.Cert | b64enc }}
tls.crt: {{ $cert.Cert | b64enc }}
tls.key: {{ $cert.Key | b64enc }}
{{- end }}

View File

@@ -1,9 +1,9 @@
{{- if and .Values.agent .Values.hubble.enabled .Values.hubble.tls.enabled .Values.hubble.tls.auto.enabled (eq .Values.hubble.tls.auto.method "helm") }}
{{- $_ := include "hubble-generate-certs.helm.setup-ca" . -}}
{{- $_ := include "cilium.ca.setup" . -}}
{{- $cn := list "*" (.Values.cluster.name | replace "." "-") "hubble-grpc.cilium.io" | join "." }}
{{- $ip := .Values.hubble.tls.server.extraIpAddresses }}
{{- $dns := prepend .Values.hubble.tls.server.extraDnsNames $cn }}
{{- $cert := genSignedCert $cn $ip $dns (.Values.hubble.tls.auto.certValidityDuration | int) .ca -}}
{{- $cert := genSignedCert $cn $ip $dns (.Values.hubble.tls.auto.certValidityDuration | int) .commonCA -}}
---
apiVersion: v1
kind: Secret
@@ -16,7 +16,7 @@ metadata:
{{- end }}
type: kubernetes.io/tls
data:
ca.crt: {{ .ca.Cert | b64enc }}
ca.crt: {{ .commonCA.Cert | b64enc }}
tls.crt: {{ $cert.Cert | b64enc }}
tls.key: {{ $cert.Key | b64enc }}
{{- end }}

View File

@@ -1,8 +1,8 @@
{{- if and .Values.hubble.enabled .Values.hubble.tls.enabled .Values.hubble.tls.auto.enabled (eq .Values.hubble.tls.auto.method "helm") .Values.hubble.ui.enabled .Values.hubble.relay.enabled .Values.hubble.relay.tls.server.enabled }}
{{- $_ := include "hubble-generate-certs.helm.setup-ca" . -}}
{{- $_ := include "cilium.ca.setup" . -}}
{{- $cn := "*.hubble-ui.cilium.io" }}
{{- $dns := list $cn }}
{{- $cert := genSignedCert $cn nil $dns (.Values.hubble.tls.auto.certValidityDuration | int) .ca -}}
{{- $cert := genSignedCert $cn nil $dns (.Values.hubble.tls.auto.certValidityDuration | int) .commonCA -}}
---
apiVersion: v1
kind: Secret
@@ -15,7 +15,7 @@ metadata:
{{- end }}
type: kubernetes.io/tls
data:
ca.crt: {{ .ca.Cert | b64enc }}
ca.crt: {{ .commonCA.Cert | b64enc }}
tls.crt: {{ $cert.Cert | b64enc }}
tls.key: {{ $cert.Key | b64enc }}
{{- end }}

View File

@@ -0,0 +1,16 @@
{{- if and .Values.agent .Values.hubble.enabled .Values.hubble.metrics.tls.enabled (not .Values.hubble.tls.auto.enabled) }}
apiVersion: v1
kind: Secret
metadata:
name: hubble-metrics-server-certs
namespace: {{ .Release.Namespace }}
{{- with .Values.hubble.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
type: kubernetes.io/tls
data:
ca.crt: {{ .Values.tls.ca.cert }}
tls.crt: {{ .Values.hubble.metrics.tls.server.cert | required "missing hubble.metrics.tls.server.cert" }}
tls.key: {{ .Values.hubble.metrics.tls.server.key | required "missing hubble.metrics.tls.server.key" }}
{{- end }}

View File

@@ -1,4 +1,4 @@
{{- if and .Values.authentication.mutual.spire.enabled .Values.authentication.mutual.spire.install.enabled .Values.authentication.mutual.spire.install.agent.serviceAccount.create -}}
{{- if and .Values.authentication.mutual.spire.enabled .Values.authentication.mutual.spire.install.enabled .Values.authentication.mutual.spire.install.agent.serviceAccount.create .Values.rbac.create -}}
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:

View File

@@ -1,4 +1,4 @@
{{- if and .Values.authentication.mutual.spire.enabled .Values.authentication.mutual.spire.install.enabled .Values.authentication.mutual.spire.install.agent.serviceAccount.create -}}
{{- if and .Values.authentication.mutual.spire.enabled .Values.authentication.mutual.spire.install.enabled .Values.authentication.mutual.spire.install.agent.serviceAccount.create .Values.rbac.create -}}
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1

View File

@@ -1,4 +1,4 @@
{{- if and .Values.authentication.mutual.spire.enabled .Values.authentication.mutual.spire.install.enabled .Values.authentication.mutual.spire.install.server.serviceAccount.create -}}
{{- if and .Values.authentication.mutual.spire.enabled .Values.authentication.mutual.spire.install.enabled .Values.authentication.mutual.spire.install.server.serviceAccount.create .Values.rbac.create -}}
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1

View File

@@ -1,4 +1,4 @@
{{- if and .Values.authentication.mutual.spire.enabled .Values.authentication.mutual.spire.install.enabled .Values.authentication.mutual.spire.install.server.serviceAccount.create -}}
{{- if and .Values.authentication.mutual.spire.enabled .Values.authentication.mutual.spire.install.enabled .Values.authentication.mutual.spire.install.server.serviceAccount.create .Values.rbac.create -}}
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:

View File

@@ -16,7 +16,7 @@
{{- end }}
{{/* validate service monitoring CRDs */}}
{{- if or (and .Values.prometheus.enabled .Values.prometheus.serviceMonitor.enabled) (and .Values.operator.prometheus.enabled .Values.operator.prometheus.serviceMonitor.enabled) (and .Values.proxy.prometheus.enabled .Values.envoy.prometheus.enabled .Values.envoy.prometheus.serviceMonitor.enabled) (and .Values.proxy.prometheus.enabled .Values.hubble.relay.prometheus.enabled .Values.hubble.relay.prometheus.serviceMonitor.enabled) }}
{{- if or (and .Values.prometheus.enabled .Values.prometheus.serviceMonitor.enabled) (and .Values.operator.prometheus.enabled .Values.operator.prometheus.serviceMonitor.enabled) (and .Values.envoy.prometheus.enabled .Values.envoy.prometheus.serviceMonitor.enabled) (and .Values.hubble.relay.prometheus.enabled .Values.hubble.relay.prometheus.serviceMonitor.enabled) }}
{{- if not (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1") }}
{{- if not .Values.prometheus.serviceMonitor.trustCRDsExist }}
{{ fail "Service Monitor requires monitoring.coreos.com/v1 CRDs. Please refer to https://github.com/prometheus-operator/prometheus-operator/blob/main/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml or set .Values.prometheus.serviceMonitor.trustCRDsExist=true" }}
@@ -60,6 +60,18 @@
{{- end }}
{{- end }}
{{- if and .Values.ingressController.enabled (or (eq .Values.ingressController.service.type "LoadBalancer") (eq .Values.ingressController.service.type "NodePort"))}}
{{- if not (or (eq .Values.ingressController.service.externalTrafficPolicy "Cluster") (eq .Values.ingressController.service.externalTrafficPolicy "Local")) }}
{{ fail "Cilium Ingress services of type 'LoadBalancer' or 'NodePort' need an externalTrafficPolicy set to 'Cluster' or 'Local'." }}
{{- end }}
{{- end }}
{{- if .Values.gatewayAPI.enabled }}
{{- if not (or (eq .Values.gatewayAPI.externalTrafficPolicy "Cluster") (eq .Values.gatewayAPI.externalTrafficPolicy "Local")) }}
{{ fail "Cilium GatewayAPI needs an externalTrafficPolicy set to 'Cluster' or 'Local'." }}
{{- end }}
{{- end }}
{{- if or .Values.envoyConfig.enabled .Values.ingressController.enabled .Values.gatewayAPI.enabled }}
{{- if or (eq (toString .Values.kubeProxyReplacement) "disabled") (and (not (hasKey .Values "kubeProxyReplacement")) (not (semverCompare ">=1.14" (default "1.14" .Values.upgradeCompatibility)))) }}
{{ fail "Ingress/Gateway API controller and EnvoyConfig require .Values.kubeProxyReplacement to be explicitly set to 'false' or 'true'" }}
@@ -73,12 +85,28 @@
{{- end }}
{{/* validate Cilium operator */}}
{{- if eq .Values.enableCiliumEndpointSlice true }}
{{- if or .Values.ciliumEndpointSlice.enabled .Values.enableCiliumEndpointSlice }}
{{- if eq .Values.disableEndpointCRD true }}
{{ fail "if Cilium Endpoint Slice is enabled (.Values.enableCiliumEndpointSlice=true), it requires .Values.disableEndpointCRD=false" }}
{{ fail "if Cilium Endpoint Slice is enabled (.Values.ciliumEndpointSlice.enabled=true), it requires .Values.disableEndpointCRD=false" }}
{{- end }}
{{- end }}
{{/* validate cluster name */}}
{{- if eq .Values.cluster.name "" }}
{{ fail "The cluster name is invalid: cannot be empty" }}
{{- end }}
{{- if semverCompare ">=1.16" (default "1.16" .Values.upgradeCompatibility) }}
{{- if gt (len .Values.cluster.name) 32 }}
{{ fail "The cluster name is invalid: must not be more than 32 characters. Configure 'upgradeCompatibility' to 1.15 or earlier to temporarily skip this check at your own risk" }}
{{- end }}
{{- if not (regexMatch "^([a-z0-9][-a-z0-9]*)?[a-z0-9]$" .Values.cluster.name) }}
{{ fail "The cluster name is invalid: must consist of lower case alphanumeric characters and '-', and must start and end with an alphanumeric character. Configure 'upgradeCompatibility' to 1.15 or earlier to temporarily skip this check at your own risk" }}
{{- end }}
{{- end }}
{{- if and (eq .Values.cluster.name "default") (ne (int .Values.cluster.id) 0) }}
{{ fail "The cluster name is invalid: cannot use default value with cluster.id != 0" }}
{{- end }}
{{/* validate clustermesh-apiserver */}}
{{- if .Values.clustermesh.useAPIServer }}
{{- if ne .Values.identityAllocationMode "crd" }}
@@ -101,3 +129,8 @@
{{- if and (ne (int .Values.clustermesh.maxConnectedClusters) 255) (ne (int .Values.clustermesh.maxConnectedClusters) 511) }}
{{- fail "max-connected-clusters must be set to 255 or 511" }}
{{- end }}
{{/*validate Envoy baseID */}}
{{- if not (and (ge (int .Values.envoy.baseID) 0) (le (int .Values.envoy.baseID) 4294967295)) }}
{{- fail "envoy.baseID must be an int. Supported values 0 - 4294967295" }}
{{- end }}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,16 +1,2 @@
# syntax=docker/dockerfile:experimental
ARG VERSION=v1.15.7
FROM golang:1.22-bookworm as builder
WORKDIR /source
COPY enforce-device-detection.diff /enforce-device-detection.diff
RUN wget -O- https://github.com/cilium/cilium/archive/refs/tags/v1.15.5.tar.gz | tar xzf - --strip-components=1
RUN git apply /enforce-device-detection.diff
RUN make build-agent
ARG VERSION=v1.16.0
FROM quay.io/cilium/cilium:${VERSION}
COPY --from=builder /source/daemon/cilium-agent /usr/bin/cilium-agent

View File

@@ -1,244 +0,0 @@
diff --git a/daemon/cmd/daemon_main.go b/daemon/cmd/daemon_main.go
index 9435b2570b..416c34ed7a 100644
--- a/daemon/cmd/daemon_main.go
+++ b/daemon/cmd/daemon_main.go
@@ -222,6 +222,9 @@ func InitGlobalFlags(cmd *cobra.Command, vp *viper.Viper) {
flags.StringSlice(option.Devices, []string{}, "List of devices facing cluster/external network (used for BPF NodePort, BPF masquerading and host firewall); supports '+' as wildcard in device name, e.g. 'eth+'")
option.BindEnv(vp, option.Devices)
+ flags.Bool(option.EnforceDeviceDetection, false, "Enforces the auto-detection of devices, even if specific devices are explicitly listed")
+ option.BindEnv(vp, option.EnforceDeviceDetection)
+
flags.String(option.DirectRoutingDevice, "", "Device name used to connect nodes in direct routing mode (used by BPF NodePort, BPF host routing; if empty, automatically set to a device with k8s InternalIP/ExternalIP or with a default route)")
option.BindEnv(vp, option.DirectRoutingDevice)
diff --git a/install/kubernetes/cilium/README.md b/install/kubernetes/cilium/README.md
index 6a92a83040..bf728ce32e 100644
--- a/install/kubernetes/cilium/README.md
+++ b/install/kubernetes/cilium/README.md
@@ -309,6 +309,7 @@ contributors across the globe, there is almost always someone available to help.
| endpointHealthChecking.enabled | bool | `true` | Enable connectivity health checking between virtual endpoints. |
| endpointRoutes.enabled | bool | `false` | Enable use of per endpoint routes instead of routing via the cilium_host interface. |
| endpointStatus | object | `{"enabled":false,"status":""}` | Enable endpoint status. Status can be: policy, health, controllers, log and / or state. For 2 or more options use a space. |
+| enforceDeviceDetection | bool | `false` | Enforces the auto-detection of devices, even if specific devices are explicitly listed |
| eni.awsEnablePrefixDelegation | bool | `false` | Enable ENI prefix delegation |
| eni.awsReleaseExcessIPs | bool | `false` | Release IPs not used from the ENI |
| eni.ec2APIEndpoint | string | `""` | EC2 API endpoint to use |
diff --git a/install/kubernetes/cilium/templates/cilium-configmap.yaml b/install/kubernetes/cilium/templates/cilium-configmap.yaml
index 9531ca18a8..1ce677f8ce 100644
--- a/install/kubernetes/cilium/templates/cilium-configmap.yaml
+++ b/install/kubernetes/cilium/templates/cilium-configmap.yaml
@@ -688,6 +688,10 @@ data:
enable-runtime-device-detection: "true"
{{- end }}
+{{- if .Values.enforceDeviceDetection }}
+ enforce-device-detection: "true"
+{{- end }}
+
kube-proxy-replacement: {{ $kubeProxyReplacement | quote }}
{{- if ne $kubeProxyReplacement "disabled" }}
diff --git a/install/kubernetes/cilium/values.yaml b/install/kubernetes/cilium/values.yaml
index e81d3ebffd..2196bbb814 100644
--- a/install/kubernetes/cilium/values.yaml
+++ b/install/kubernetes/cilium/values.yaml
@@ -690,6 +690,9 @@ daemon:
# be considered.
enableRuntimeDeviceDetection: false
+# -- Enforces the auto-detection of devices, even if specific devices are explicitly listed
+enforceDeviceDetection: false
+
# -- Chains to ignore when installing feeder rules.
# disableIptablesFeederRules: ""
diff --git a/install/kubernetes/cilium/values.yaml.tmpl b/install/kubernetes/cilium/values.yaml.tmpl
index 679b4cac07..3ed0b8f88b 100644
--- a/install/kubernetes/cilium/values.yaml.tmpl
+++ b/install/kubernetes/cilium/values.yaml.tmpl
@@ -687,6 +687,9 @@ daemon:
# be considered.
enableRuntimeDeviceDetection: false
+# -- Enforces the auto-detection of devices, even if specific devices are explicitly listed
+enforceDeviceDetection: false
+
# -- Chains to ignore when installing feeder rules.
# disableIptablesFeederRules: ""
diff --git a/pkg/datapath/cells.go b/pkg/datapath/cells.go
index 69d6d71836..c0f4947d73 100644
--- a/pkg/datapath/cells.go
+++ b/pkg/datapath/cells.go
@@ -114,7 +114,8 @@ var Cell = cell.Module(
// This is temporary until DevicesController takes ownership of the
// device-related configuration options.
return linuxdatapath.DevicesConfig{
- Devices: cfg.GetDevices(),
+ Devices: cfg.GetDevices(),
+ EnforceDeviceDetection: option.Config.EnforceDeviceDetection,
}
}),
diff --git a/pkg/datapath/linux/devices_controller.go b/pkg/datapath/linux/devices_controller.go
index fdfde8d4ec..cac3e44a32 100644
--- a/pkg/datapath/linux/devices_controller.go
+++ b/pkg/datapath/linux/devices_controller.go
@@ -84,6 +84,9 @@ type DevicesConfig struct {
// If empty the devices are auto-detected according to rules defined
// by isSelectedDevice().
Devices []string
+ // EnforceDeviceDetection forces the auto-detection of devices,
+ // even if user-specific devices are explicitly listed.
+ EnforceDeviceDetection bool
}
type devicesControllerParams struct {
@@ -103,9 +106,10 @@ type devicesController struct {
params devicesControllerParams
log logrus.FieldLogger
- initialized chan struct{}
- filter deviceFilter
- l3DevSupported bool
+ initialized chan struct{}
+ filter deviceFilter
+ enforceAutoDetection bool
+ l3DevSupported bool
// deadLinkIndexes tracks the set of links that have been deleted. This is needed
// to avoid processing route or address updates after a link delete as they may
@@ -121,11 +125,12 @@ func newDevicesController(lc cell.Lifecycle, p devicesControllerParams) (*device
p.RouteTable,
)
dc := &devicesController{
- params: p,
- initialized: make(chan struct{}),
- filter: deviceFilter(p.Config.Devices),
- log: p.Log,
- deadLinkIndexes: sets.New[int](),
+ params: p,
+ initialized: make(chan struct{}),
+ filter: deviceFilter(p.Config.Devices),
+ enforceAutoDetection: p.Config.EnforceDeviceDetection,
+ log: p.Log,
+ deadLinkIndexes: sets.New[int](),
}
lc.Append(dc)
return dc, p.DeviceTable, p.RouteTable
@@ -529,12 +534,15 @@ func (dc *devicesController) isSelectedDevice(d *tables.Device, txn statedb.Writ
}
// If user specified devices or wildcards, then skip the device if it doesn't match.
- // If the device does match, then skip further checks.
+ // If the device does match and user not requested auto detection, then skip further checks.
+ // If the device does match and user requested auto detection, then continue to further checks.
if dc.filter.nonEmpty() {
if dc.filter.match(d.Name) {
return true, ""
}
- return false, fmt.Sprintf("not matching user filter %v", dc.filter)
+ if !dc.enforceAutoDetection {
+ return false, fmt.Sprintf("not matching user filter %v", dc.filter)
+ }
}
// Skip devices that have an excluded interface flag set.
diff --git a/pkg/datapath/linux/devices_test.go b/pkg/datapath/linux/devices_test.go
index cd9fdcc7ad..031894498f 100644
--- a/pkg/datapath/linux/devices_test.go
+++ b/pkg/datapath/linux/devices_test.go
@@ -254,7 +254,36 @@ func (s *DevicesSuite) TestDetect(c *C) {
c.Assert(devices, checker.DeepEquals, []string{"bond0", "dummy0", "dummy1", "dummy_v6", "veth0"})
option.Config.SetDevices([]string{})
dm.Stop()
+
+ // EnforceDeviceDetection enabled with specific devices
+ option.Config.SetDevices([]string{"dummy1"})
+ option.Config.EnforceDeviceDetection = true
+ c.Assert(createDummy("dummy0", "192.168.0.1/24", false), IsNil)
+ c.Assert(createDummy("dummy1", "192.168.1.1/24", false), IsNil)
+
+ dm, err = newDeviceManagerForTests()
+ c.Assert(err, IsNil)
+ devices, err = dm.Detect(true)
+ c.Assert(err, IsNil)
+ c.Assert(devices, checker.DeepEquals, []string{"dummy0", "dummy1"})
+ option.Config.SetDevices([]string{})
+ option.Config.DirectRoutingDevice = ""
+ dm.Stop()
+
+ // EnforceDeviceDetection disabled with specific devices
+ option.Config.SetDevices([]string{"dummy1"})
+ option.Config.EnforceDeviceDetection = false
+
+ dm, err = newDeviceManagerForTests()
+ c.Assert(err, IsNil)
+ devices, err = dm.Detect(true)
+ c.Assert(err, IsNil)
+ c.Assert(devices, checker.DeepEquals, []string{"dummy1"})
+ option.Config.SetDevices([]string{})
+ option.Config.DirectRoutingDevice = ""
+ dm.Stop()
})
+
}
func (s *DevicesSuite) TestExpandDevices(c *C) {
diff --git a/pkg/defaults/defaults.go b/pkg/defaults/defaults.go
index fe34caa624..f095ff9a42 100644
--- a/pkg/defaults/defaults.go
+++ b/pkg/defaults/defaults.go
@@ -554,6 +554,10 @@ const (
// identity in a numeric identity. Values > 255 will decrease the number of
// allocatable identities.
MaxConnectedClusters = 255
+
+ // EnforceDevicesDetection enforces the auto-detection of devices,
+ // even if specific devices are explicitly listed
+ EnforceDeviceDetection = false
)
var (
diff --git a/pkg/option/config.go b/pkg/option/config.go
index 27c697d9e3..9ba4367b2e 100644
--- a/pkg/option/config.go
+++ b/pkg/option/config.go
@@ -123,6 +123,9 @@ const (
// Devices facing cluster/external network for attaching bpf_host
Devices = "devices"
+ // Enforces the auto-detection of devices, even if specific devices are explicitly listed
+ EnforceDeviceDetection = "enforce-device-detection"
+
// DirectRoutingDevice is the name of a device used to connect nodes in
// direct routing mode (only required by BPF NodePort)
DirectRoutingDevice = "direct-routing-device"
@@ -2447,6 +2450,10 @@ type DaemonConfig struct {
// ServiceNoBackendResponse determines how we handle traffic to a service with no backends.
ServiceNoBackendResponse string
+
+ // EnforceDeviceDetection forces the auto-detection of devices,
+ // even if specific devices are explicitly listed
+ EnforceDeviceDetection bool
}
var (
@@ -2490,6 +2497,7 @@ var (
AllocatorListTimeout: defaults.AllocatorListTimeout,
EnableICMPRules: defaults.EnableICMPRules,
UseCiliumInternalIPForIPsec: defaults.UseCiliumInternalIPForIPsec,
+ EnforceDeviceDetection: defaults.EnforceDeviceDetection,
K8sEnableLeasesFallbackDiscovery: defaults.K8sEnableLeasesFallbackDiscovery,
@@ -3563,6 +3571,7 @@ func (c *DaemonConfig) Populate(vp *viper.Viper) {
c.UseCiliumInternalIPForIPsec = vp.GetBool(UseCiliumInternalIPForIPsec)
c.BypassIPAvailabilityUponRestore = vp.GetBool(BypassIPAvailabilityUponRestore)
c.EnableK8sTerminatingEndpoint = vp.GetBool(EnableK8sTerminatingEndpoint)
+ c.EnforceDeviceDetection = vp.GetBool(EnforceDeviceDetection)
// Disable Envoy version check if L7 proxy is disabled.
c.DisableEnvoyVersionCheck = vp.GetBool(DisableEnvoyVersionCheck)

View File

@@ -1,21 +0,0 @@
diff --git a/apps/cilium/charts/cilium/templates/cilium-agent/daemonset.yaml b/apps/cilium/charts/cilium/templates/cilium-agent/daemonset.yaml
index a608b69..1b5c622 100644
--- a/apps/cilium/charts/cilium/templates/cilium-agent/daemonset.yaml
+++ b/apps/cilium/charts/cilium/templates/cilium-agent/daemonset.yaml
@@ -105,9 +105,13 @@ spec:
- "true"
{{- else }}
command:
- - cilium-agent
- args:
- - --config-dir=/tmp/cilium/config-map
+ # Workaround: https://github.com/cilium/cilium/pull/27561
+ - /bin/sh
+ - -c
+ - |
+ rm -rf /run/cilium/cgroupv2
+ ln -sf /sys/fs/cgroup /run/cilium/cgroupv2
+ exec cilium-agent --config-dir=/tmp/cilium/config-map
{{- with .Values.extraArgs }}
{{- toYaml . | trim | nindent 8 }}
{{- end }}

View File

@@ -4,7 +4,7 @@ cilium:
externalIPs:
enabled: true
autoDirectNodeRoutes: false
kubeProxyReplacement: strict
kubeProxyReplacement: true
bpf:
masquerade: false
loadBalancer:
@@ -26,12 +26,14 @@ cilium:
enableIPv6Masquerade: false
enableIdentityMark: false
enableRuntimeDeviceDetection: true
#enforceDeviceDetection: true
forceDeviceDetection: true
devices: ovn0
extraEnv:
- name: CILIUM_ENFORCE_DEVICE_DETECTION
value: "true"
image:
repository: ghcr.io/aenix-io/cozystack/cilium
tag: latest
digest: "sha256:8110f6b17ec98d87d9aebf3f4b99409f020840a958166e28c74b2d4e1bfb5a51"
tag: 1.16.0
digest: "sha256:6897e67f0ed8c7d5c27c8793a78283d6c1fa7a16e17c961ec3f2d5af7a72f645"
envoy:
enabled: false