diff --git a/assets/rke2-cilium/rke2-cilium-1.9.603.tgz b/assets/rke2-cilium/rke2-cilium-1.9.603.tgz new file mode 100755 index 0000000..0978f3a Binary files /dev/null and b/assets/rke2-cilium/rke2-cilium-1.9.603.tgz differ diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/Chart.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/Chart.yaml new file mode 100755 index 0000000..b92771d --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/Chart.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +description: eBPF-based Networking, Security, and Observability +home: https://cilium.io/ +keywords: +- cilium +kubeVersion: '>= 1.12.0-0' +maintainers: +- email: charts@rancher.com + name: Rancher Labs +name: rke2-cilium +sources: +- https://github.com/rancher/rke2-charts +version: 1.9.603 diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/.helmignore b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/.helmignore new file mode 100755 index 0000000..0e8a0eb --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/Chart.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/Chart.yaml new file mode 100755 index 0000000..9c76fd1 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/Chart.yaml @@ -0,0 +1,73 @@ +annotations: + artifacthub.io/crds: | + - kind: CiliumNetworkPolicy + version: v2 + name: ciliumnetworkpolicy + displayName: Cilium Network Policy + description: | + Cilium Network Policies provide additional functionality beyond what + is provided by standard Kubernetes NetworkPolicy such as the ability + to allow traffic based on FQDNs, or to filter at Layer 7. + - kind: CiliumClusterwideNetworkPolicy + version: v2 + name: ciliumclusterwidenetworkpolicy + displayName: Cilium Clusterwide Network Policy + description: | + Cilium Clusterwide Network Policies support configuring network traffic + policiies across the entire cluster, including applying node firewalls. + - kind: CiliumExternalWorkload + version: v2 + name: ciliumnetworkpolicy + displayName: Cilium External Workload + description: | + Cilium External Workload supports configuring the ability for external + non-Kubernetes workloads to join the cluster. + - kind: CiliumLocalRedirectPolicy + version: v2 + name: ciliumlocalredirectpolicy + displayName: Cilium Local Redirect Policy + description: | + Cilium Local Redirect Policy allows local redirects to be configured + within a node to support use cases like Node-Local DNS or KIAM. + - kind: CiliumNode + version: v2 + name: ciliumnode + displayName: Cilium Node + description: | + Cilium Node represents a node managed by Cilium. It contains a + specification to control various node specific configuration aspects + and a status section to represent the status of the node. + - kind: CiliumIdentity + version: v2 + name: ciliumidentity + displayName: Cilium Identity + description: | + Cilium Identity allows introspection into security identities that + Cilium allocates which identify sets of labels that are assigned to + individual endpoints in the cluster. + - kind: CiliumEndpoint + version: v2 + name: ciliumendpoint + displayName: Cilium Endpoint + description: | + Cilium Endpoint represents the status of individual pods or nodes in + the cluster which are managed by Cilium, including enforcement status, + IP addressing and whether the networking is succesfully operational. +apiVersion: v2 +appVersion: 1.9.6 +description: eBPF-based Networking, Security, and Observability +home: https://cilium.io/ +icon: https://cdn.jsdelivr.net/gh/cilium/cilium@v1.9.6/Documentation/images/logo-solo.svg +keywords: +- BPF +- eBPF +- Kubernetes +- Networking +- Security +- Observability +- Troubleshooting +kubeVersion: '>= 1.12.0-0' +name: cilium +sources: +- https://github.com/cilium/cilium +version: 1.9.6 diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/LICENSE b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/LICENSE new file mode 100755 index 0000000..a2e486a --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/LICENSE @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} Authors of Cilium + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/README.md b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/README.md new file mode 100755 index 0000000..15b487b --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/README.md @@ -0,0 +1,330 @@ +# cilium + +![Version: 1.9.6](https://img.shields.io/badge/Version-1.9.6-informational?style=flat-square) ![AppVersion: 1.9.6](https://img.shields.io/badge/AppVersion-1.9.6-informational?style=flat-square) + +Cilium is open source software for providing and transparently securing +network connectivity and loadbalancing between application workloads such as +application containers or processes. Cilium operates at Layer 3/4 to provide +traditional networking and security services as well as Layer 7 to protect and +secure use of modern application protocols such as HTTP, gRPC and Kafka. + +A new Linux kernel technology called eBPF is at the foundation of Cilium. +It supports dynamic insertion of eBPF bytecode into the Linux kernel at various +integration points such as: network IO, application sockets, and tracepoints +to implement security, networking and visibility logic. eBPF is highly +efficient and flexible. + +![Cilium feature overview](https://raw.githubusercontent.com/cilium/cilium/master/Documentation/images/cilium_overview.png) + +## Prerequisites + +* Kubernetes: `>= 1.12.0-0` +* Helm: `>= 3.0` + +## Getting Started + +Try Cilium on any Kubernetes distribution in under 15 minutes: + +| Minikube | Self-Managed K8s | Amazon EKS | Google GKE | Microsoft AKS | +|:-:|:-:|:-:|:-:|:-:| +| [![Minikube](https://raw.githubusercontent.com/cilium/charts/master/images/minikube.svg)](https://cilium.readthedocs.io/en/stable/gettingstarted/minikube/) | [![Self-Managed Kubernetes](https://raw.githubusercontent.com/cilium/charts/master/images/k8s.png)](https://cilium.readthedocs.io/en/stable/gettingstarted/k8s-install-self-managed/) | [![Amazon EKS](https://raw.githubusercontent.com/cilium/charts/master/images/aws.svg)](https://cilium.readthedocs.io/en/stable/gettingstarted/k8s-install-eks/) | [![Google GKE](https://raw.githubusercontent.com/cilium/charts/master/images/google-cloud.svg)](https://cilium.readthedocs.io/en/stable/gettingstarted/k8s-install-gke/) | [![Microsoft AKS](https://raw.githubusercontent.com/cilium/charts/master/images/azure.svg)](https://cilium.readthedocs.io/en/stable/gettingstarted/k8s-install-aks/) | + +Or, for a quick install with the default configuration: + +``` +$ helm repo add cilium https://helm.cilium.io/ +$ helm install cilium cilium/cilium --namespace=kube-system +``` + +After Cilium is installed, you can explore the features that Cilium has to +offer from the [Getting Started Guides page](https://docs.cilium.io/en/latest/gettingstarted/). + +## Source Code + +* + +## Getting Help + +The best way to get help if you get stuck is to ask a question on the +[Cilium Slack channel](https://cilium.herokuapp.com/). With Cilium +contributors across the globe, there is almost always someone available to help. + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{"podAntiAffinity":{"requiredDuringSchedulingIgnoredDuringExecution":[{"labelSelector":{"matchExpressions":[{"key":"k8s-app","operator":"In","values":["cilium"]}]},"topologyKey":"kubernetes.io/hostname"}]}}` | Pod affinity for cilium-agent. | +| agent | bool | `true` | Install the cilium agent resources. | +| autoDirectNodeRoutes | bool | `false` | | +| azure.enabled | bool | `false` | Enable Azure integration | +| bandwidthManager | bool | `false` | Optimize TCP and UDP workloads and enable rate-limiting traffic from individual Pods with EDT (Earliest Departure Time) through the "kubernetes.io/egress-bandwidth" Pod annotation. | +| bpf.clockProbe | bool | `false` | | +| bpf.lbMapMax | int | `65536` | Configure the maximum number of entries in the TCP connection tracking table. ctTcpMax: '524288' -- Configure the maximum number of entries for the non-TCP connection tracking table. ctAnyMax: '262144' -- Configure the maximum number of service entries in the load balancer maps. | +| bpf.monitorAggregation | string | `"medium"` | Configure auto-sizing for all BPF maps based on available memory. ref: https://docs.cilium.io/en/v1.9/concepts/ebpf/maps/#ebpf-maps -- Configure the level of aggregation for monitor notifications. Valid options are none, low, medium, maximum | +| bpf.monitorFlags | string | `"all"` | Configure which TCP flags trigger notifications when seen for the first time in a connection. | +| bpf.monitorInterval | string | `"5s"` | Configure the typical time between monitor notifications for active connections. | +| bpf.policyMapMax | int | `16384` | Configure the maximum number of entries for the NAT table. natMax: 524288 -- Configure the maximum number of entries for the neighbor table. neighMax: 524288 -- Configure the maximum number of entries in endpoint policy map. (per endpoint) | +| bpf.preallocateMaps | bool | `false` | Enables pre-allocation of eBPF map values. This increases memory usage but can reduce latency. | +| bpf.waitForMount | bool | `false` | Force the cilium-agent DaemonSet to wait in an initContainer until the eBPF filesystem has been mounted. | +| certgen | object | `{"image":{"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/certgen","tag":"v0.1.3"},"podLabels":{},"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.podLabels | object | `{}` | Labels to be added to hubble-certgen pods | +| certgen.ttlSecondsAfterFinished | int | `1800` | Seconds after which the completed job pod will be deleted | +| 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 | `nil` | 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. | +| cluster.name | string | `"default"` | Name of the cluster. Only required for Cluster Mesh. | +| clustermesh.apiserver.etcd.image | object | `{"pullPolicy":"IfNotPresent","repository":"quay.io/coreos/etcd","tag":"v3.4.13"}` | Clustermesh API server etcd image. | +| clustermesh.apiserver.image | object | `{"digest":"sha256:e4a6d47d0d8e4ef52c44e99a906076e29e8513a35a972e60100df2168b381318","pullPolicy":"IfNotPresent","repository":"quay.io/cilium/clustermesh-apiserver","tag":"v1.9.6","useDigest":false}` | Clustermesh API server image. | +| clustermesh.apiserver.nodeSelector | object | `{}` | Node labels for pod assignment ref: https://kubernetes.io/docs/user-guide/node-selection/ | +| clustermesh.apiserver.podAnnotations | object | `{}` | Annotations to be added to clustermesh-apiserver pods | +| clustermesh.apiserver.podLabels | object | `{}` | Labels to be added to clustermesh-apiserver pods | +| 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 container of the clustermesh-apiserver deployment, such as resources: limits: cpu: 1000m memory: 1024M requests: cpu: 100m memory: 64Mi | +| 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.nodePort | int | `32379` | Optional port to use as the node port for apiserver access. | +| clustermesh.apiserver.service.type | string | `"NodePort"` | | +| clustermesh.apiserver.tls.admin | object | `{"cert":"","key":""}` | base64 encoded PEM values for the clustermesh-apiserver admin certificate and private key Used if 'auto' is not enabled. | +| clustermesh.apiserver.tls.auto | object | `{"certValidityDuration":1095,"enabled":true,"method":"helm"}` | Configure automatic TLS certificates generation. A Kubernetes CronJob is used the generate any certificates not provided by the user at installation time. | +| 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.ca | object | `{"cert":"","key":""}` | base64 encoded PEM values for the ExternalWorkload CA certificate and private key. | +| clustermesh.apiserver.tls.ca.cert | string | `""` | Optional CA cert. If it is provided, it will be used by the 'cronJob' method to generate all other certificates. Otherwise, an ephemeral CA is generated. | +| clustermesh.apiserver.tls.ca.key | string | `""` | Optional CA private key. If it is provided, it will be used by the 'cronJob' method to generate all other certificates. Otherwise, an ephemeral CA is generated. | +| 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.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":"","key":""}` | base64 encoded PEM values for the clustermesh-apiserver server certificate and private key Used if 'auto' is not enabled. | +| clustermesh.apiserver.tolerations | list | `[]` | Node tolerations for pod assignment on nodes with taints ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ | +| clustermesh.apiserver.updateStrategy | object | `{"rollingUpdate":{"maxUnavailable":1},"type":"RollingUpdate"}` | clustermesh-apiserver update strategy | +| 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. | +| cni.chainingMode | string | `"none"` | Configure chaining on top of other CNI plugins. Possible values: - none - generic-veth - aws-cni - portmap | +| cni.confFileMountPath | string | `"/tmp/cni-configuration"` | Configure the path to where to mount the ConfigMap inside the agent pod. | +| cni.confPath | string | `"/etc/cni/net.d"` | Configure the path to the CNI configuration directory on the host. | +| cni.configMapKey | string | `"cni-config"` | Specify the path to a CNI config to read from on agent start. This can be useful if you want to manage your CNI configuration outside of a Kubernetes environment. This parameter is mutually exclusive with the 'cni.configMap' parameter. readCniConf: /host/etc/cni/net.d/05-cilium.conf -- When defined, configMap will mount the provided value as ConfigMap and interpret the cniConf variable as CNI configuration file and write it when the agent starts up configMap: cni-configuration -- 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.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. | +| containerRuntime | object | `{"integration":"none"}` | Configure how frequently garbage collection should occur for the datapath connection tracking table. conntrackGCInterval: "0s" -- Configure container runtime specific integration. | +| containerRuntime.integration | string | `"none"` | Enables specific integrations for container runtimes. Supported values: - containerd - crio - docker - none - auto (automatically detect the container runtime) | +| daemon.runPath | string | `"/var/run/cilium"` | Configure where Cilium runtime state should be stored. | +| datapathMode | string | `"veth"` | | +| debug.enabled | bool | `false` | Enable debug logging | +| enableCnpStatusUpdates | bool | `false` | Specify which network interfaces can run the eBPF datapath. This means that a packet sent from a pod to a destination outside the cluster will be masqueraded (to an output device IPv4 address), if the output device runs the program. When not specified, probing will automatically detect devices. devices: "" TODO: Add documentation disableIptablesFeederRules: "" TODO: Add documentation egressMasqueradeInterfaces: "" | +| enableCriticalPriorityClass | bool | `true` | Explicitly enable or disable priority class. .Capabilities.KubeVersion is unsettable in `helm template` calls, it depends on k8s libriaries 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. | +| enableXTSocketFallback | bool | `true` | | +| encryption.enabled | bool | `false` | Enable transparent network encryption. | +| encryption.keyFile | string | `"keys"` | Name of the key file inside the Kubernetes secret configured via secretName. | +| encryption.mountPath | string | `"/etc/ipsec"` | Path to mount the secret inside the Cilium pod. | +| encryption.nodeEncryption | bool | `false` | Enable encryption for pure node to node traffic. | +| encryption.secretName | string | `"cilium-ipsec-keys"` | Name of the Kubernetes secret containing the encryption keys. | +| endpointHealthChecking.enabled | bool | `true` | | +| endpointRoutes.enabled | bool | `false` | Enable use of per endpoint routes instead of routing via the cilium_host interface. | +| eni | bool | `false` | Enable Elastic Network Interface (ENI) integration. | +| etcd.clusterDomain | string | `"cluster.local"` | Cluster domain for cilium-etcd-operator. | +| etcd.clusterSize | int | `3` | Size of the managed etcd cluster. | +| 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 | object | `{}` | Additional cilium-etcd-operator container arguments | +| etcd.extraConfigmapMounts | list | `[]` | Additional cilium-etcd-operator ConfigMap mounts | +| etcd.extraHostPathMounts | list | `[]` | Additional cilium-etcd-operator hostPath mounts | +| etcd.extraInitContainers | list | `[]` | Additional InitContainers to initialize the pod | +| etcd.image | object | `{"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/cilium-etcd-operator","tag":"v2.0.7"}` | 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.managed | bool | `false` | Enable managed etcd mode based on the cilium-etcd-operator. | +| etcd.nodeSelector | object | `{}` | Node labels for cilium-etcd-operator pod assignment ref: https://kubernetes.io/docs/user-guide/node-selection/ | +| etcd.podAnnotations | object | `{}` | Annotations to be added to cilium-etcd-operator pods | +| etcd.podDisruptionBudget | object | `{"enabled":true,"maxUnavailable":2}` | PodDisruptionBudget settings ref: https://kubernetes.io/docs/concepts/workloads/pods/disruptions/ | +| etcd.podLabels | object | `{}` | Labels to be added to cilium-etcd-operator pods | +| etcd.priorityClassName | string | `""` | cilium-etcd-operator priorityClassName | +| etcd.resources | object | `{}` | cilium-etcd-operator resource limits & requests ref: https://kubernetes.io/docs/user-guide/compute-resources/ | +| 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/configuration/assign-pod-node/ | +| etcd.updateStrategy | object | `{"rollingUpdate":{"maxSurge":1,"maxUnavailable":1},"type":"RollingUpdate"}` | cilium-etcd-operator update strategy | +| 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). | +| extraArgs | object | `{}` | Additional agent container arguments | +| extraConfig | object | `{}` | extraConfig allows you to specify additional configuration parameters to be included in the cilium-config configmap. | +| extraConfigmapMounts | list | `[]` | Additional agent ConfigMap mounts | +| extraEnv | object | `{}` | Additional agent container environment variables | +| extraHostPathMounts | list | `[]` | Additional agent hostPath mounts | +| extraInitContainers | list | `[]` | Additional InitContainers to initialize the pod | +| flannel.enabled | bool | `false` | | +| flannel.masterDevice | string | `"cni0"` | | +| flannel.uninstallOnExit | bool | `false` | | +| gke.enabled | bool | `false` | Enable Google Kubernetes Engine integration | +| healthChecking | bool | `true` | | +| healthPort | int | `9876` | TCP port for the agent health API. This is not the port for cilium-health. | +| hostFirewall | bool | `false` | Enables the enforcement of host policies in the eBPF datapath. | +| hostPort.enabled | bool | `false` | Enable hostPort service support. | +| hostServices | object | `{"enabled":false,"protocols":"tcp,udp"}` | Configure ClusterIP service handling in the host namespace (the node). | +| hostServices.enabled | bool | `false` | Enable host reachable services. | +| hostServices.protocols | string | `"tcp,udp"` | Supported list of protocols to apply ClusterIP translation to. | +| hubble.enabled | bool | `true` | Enable Hubble (true by default). | +| 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 | `{"enabled":null,"port":9091,"serviceMonitor":{"enabled":false}}` | Buffer size of the channel Hubble uses to receive monitor events. If this value is not set, the queue size is set to the default monitor queue size. eventQueueSize: "" -- Number of recent flows for Hubble to cache. Defaults to 4095. Possible values are: 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767, 65535 eventBufferCapacity: "4095" -- Hubble metrics configuration. See https://docs.cilium.io/en/stable/configuration/metrics/#hubble-metrics for more comprehensive documentation about Hubble metrics. | +| 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 metrics.enabled="{dns:query;ignoreAAAA,drop,tcp,flow,icmp,http}" | +| hubble.metrics.port | int | `9091` | Configure the port the hubble metric server listens on. | +| hubble.metrics.serviceMonitor.enabled | bool | `false` | Create ServiceMonitor resources for Prometheus Operator. This requires the prometheus CRDs to be available. ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml) | +| hubble.metricsServer | string | `""` | | +| hubble.relay.dialTimeout | string | `nil` | Dial timeout to connect to the local hubble instance to receive peer information (e.g. "30s"). | +| hubble.relay.enabled | bool | `false` | Enable Hubble Relay (requires hubble.enabled=true) | +| hubble.relay.image | object | `{"digest":"sha256:2ea804c454b660d474feae96c01da1b9193dfce6809b4d3825e7b6efc6ade8c7","pullPolicy":"IfNotPresent","repository":"quay.io/cilium/hubble-relay","tag":"v1.9.6","useDigest":false}` | 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 | `{}` | Node labels for pod assignment ref: https://kubernetes.io/docs/user-guide/node-selection/ | +| hubble.relay.podAnnotations | object | `{}` | Annotations to be added to hubble-relay pods | +| hubble.relay.podLabels | object | `{}` | Labels to be added to hubble-relay pods | +| hubble.relay.replicas | int | `1` | Number of replicas run for the hubble-relay deployment. | +| hubble.relay.resources | object | `{}` | Specifies the resources for the hubble-relay pods | +| hubble.relay.retryTimeout | string | `nil` | Backoff duration to retry connecting to the local hubble instance in case of failure (e.g. "30s"). | +| hubble.relay.rollOutPods | bool | `false` | Roll out Hubble Relay pods automatically when configmap is updated. | +| 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.tls | object | `{"client":{"cert":"","key":""},"server":{"cert":"","enabled":false,"key":""}}` | 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. | +| hubble.relay.tls.server | object | `{"cert":"","enabled":false,"key":""}` | base64 encoded PEM values for the hubble-relay server certificate and private key | +| hubble.relay.tolerations | list | `[]` | Node tolerations for pod assignment on nodes with taints ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ | +| hubble.relay.updateStrategy | object | `{"rollingUpdate":{"maxUnavailable":1},"type":"RollingUpdate"}` | hubble-relay update strategy | +| hubble.socketPath | string | `"/var/run/cilium/hubble.sock"` | Unix domain socket path to listen to when Hubble is enabled. | +| hubble.tls | object | `{"auto":{"certValidityDuration":1095,"enabled":true,"method":"helm","schedule":"0 0 1 */4 *"},"ca":{"cert":"","key":""},"enabled":true,"server":{"cert":"","key":""}}` | TLS configuration for Hubble | +| hubble.tls.auto | object | `{"certValidityDuration":1095,"enabled":true,"method":"helm","schedule":"0 0 1 */4 *"}` | Configure automatic TLS certificates generation. | +| hubble.tls.auto.certValidityDuration | int | `1095` | Generated certificates validity duration in days. | +| hubble.tls.auto.enabled | bool | `true` | Auto-generate certificates. When set to true, automatically generate a CA and certificates to enable mTLS between Hubble server and Hubble Relay instances. If set to false, the certs for Hubble server need to be provided by setting appropriate values below. | +| hubble.tls.auto.method | string | `"helm"` | Set the method to auto-generate certificates. Supported values: - helm: This method uses Helm to generate all certificates. - cronJob: This method uses a Kubernetes CronJob the generate any certificates not provided by the user at installation time. | +| hubble.tls.auto.schedule | string | `"0 0 1 */4 *"` | Schedule for certificates regeneration (regardless of their expiration date). Only used if method is "cronJob". If nil, then no recurring job will be created. Instead, only the one-shot job is deployed to generate the certificates at installation time. Defaults to midnight of the first day of every fourth month. For syntax, see https://kubernetes.io/docs/tasks/job/automated-tasks-with-cron-jobs/#schedule | +| hubble.tls.ca | object | `{"cert":"","key":""}` | base64 encoded PEM values for the Hubble CA certificate and private key. | +| hubble.tls.ca.key | string | `""` | The CA private key (optional). If it is provided, then it will be used by hubble.tls.auto.method=cronJob to generate all other certificates. Otherwise, a ephemeral CA is generated if hubble.tls.auto.enabled=true. | +| hubble.tls.enabled | bool | `true` | Enable mutual TLS for listenAddress. Setting this value to false is highly discouraged as the Hubble API provides access to potentially sensitive network flow metadata and is exposed on the host network. | +| hubble.tls.server | object | `{"cert":"","key":""}` | base64 encoded PEM values for the Hubble server certificate and private key | +| hubble.ui.backend.image | object | `{"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/hubble-ui-backend","tag":"v0.7.3"}` | Hubble-ui backend image. | +| hubble.ui.backend.resources | object | `{}` | | +| hubble.ui.enabled | bool | `false` | | +| hubble.ui.frontend.image | object | `{"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/hubble-ui","tag":"v0.7.3"}` | Hubble-ui frontend image. | +| hubble.ui.frontend.resources | object | `{}` | | +| hubble.ui.ingress | object | `{"annotations":{},"enabled":false,"hosts":["chart-example.local"],"tls":[]}` | hubble-ui ingress configuration. | +| hubble.ui.nodeSelector | object | `{}` | Node labels for pod assignment ref: https://kubernetes.io/docs/user-guide/node-selection/ | +| hubble.ui.podAnnotations | object | `{}` | Annotations to be added to hubble-ui pods | +| hubble.ui.podLabels | object | `{}` | Labels to be added to hubble-ui pods | +| hubble.ui.proxy.image | object | `{"pullPolicy":"IfNotPresent","repository":"docker.io/envoyproxy/envoy","tag":"v1.14.5"}` | Hubble-ui ingress proxy image. | +| hubble.ui.proxy.resources | object | `{}` | | +| hubble.ui.replicas | int | `1` | | +| hubble.ui.rollOutPods | bool | `false` | Roll out Hubble-ui pods automatically when configmap is updated. | +| hubble.ui.securityContext.enabled | bool | `true` | | +| hubble.ui.tolerations | list | `[]` | Node tolerations for pod assignment on nodes with taints ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ | +| hubble.ui.updateStrategy | object | `{"rollingUpdate":{"maxUnavailable":1},"type":"RollingUpdate"}` | hubble-ui update strategy. | +| identityAllocationMode | string | `"crd"` | | +| image | object | `{"digest":"sha256:6e2bc051dd5d942085591ea6150623790a8ffbaaab567007a2707fc7668d8055","pullPolicy":"IfNotPresent","repository":"quay.io/cilium/cilium","tag":"v1.9.6","useDigest":false}` | Agent container image. | +| imagePullSecrets | string | `nil` | Configure image pull secrets for pulling container images | +| installIptablesRules | bool | `true` | | +| ipMasqAgent | object | `{"enabled":false}` | Configure the eBPF-based ip-masq-agent | +| ipam.mode | string | `"cluster-pool"` | Configure IP Address Management mode. ref: https://docs.cilium.io/en/stable/concepts/networking/ipam/ | +| ipam.operator.clusterPoolIPv4MaskSize | int | `24` | IPv4 CIDR mask size to delegate to individual nodes for IPAM. | +| ipam.operator.clusterPoolIPv4PodCIDR | string | `"10.0.0.0/8"` | IPv4 CIDR 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.clusterPoolIPv6PodCIDR | string | `"fd00::/104"` | IPv6 CIDR range to delegate to individual nodes for IPAM. | +| ipv4.enabled | bool | `true` | Enable IPv4 support. | +| ipv6.enabled | bool | `false` | Enable IPv6 support. | +| ipvlan.enabled | bool | `false` | Enable the IPVLAN datapath | +| k8s | object | `{}` | Configure Kubernetes specific configuration | +| keepDeprecatedLabels | bool | `false` | requireIPv6PodCIDR enables waiting for Kubernetes to provide the PodCIDR range via the Kubernetes node resource requireIPv6PodCIDR: false -- Keep the deprecated selector labels when deploying Cilium DaemonSet | +| keepDeprecatedProbes | bool | `false` | Keep the deprecated probes when deploying Cilium DaemonSet | +| kubeProxyReplacement | string | `"probe"` | Configure the kube-proxy replacement in Cilium BPF datapath Valid options are "disabled", "probe", "partial", "strict". ref: https://docs.cilium.io/en/stable/gettingstarted/kubeproxy-free/ | +| kubeProxyReplacementHealthzBindAddr | string | `""` | healthz server bind address for the kube-proxy replacement. To enable set the value to '0.0.0.0:10256' for all ipv4 addresses and this '[::]:10256' for all ipv6 addresses. By default it is disabled. | +| l7Proxy | bool | `true` | Enable Layer 7 network policy. | +| localRedirectPolicy | bool | `false` | | +| logSystemLoad | bool | `false` | | +| maglev | object | `{}` | Configure maglev consistent hashing | +| masquerade | bool | `true` | hashSeed is the cluster-wide base64 encoded seed for the hashing hashSeed: -- Enables masquerading of traffic leaving the node for destinations outside of the cluster. | +| monitor | object | `{"enabled":false}` | Specify the CIDR for native routing (ie to avoid IP masquerade for). This value corresponds to the configured cluster-cidr. nativeRoutingCIDR: -- Configure cilium-monitor sidecar | +| name | string | `"cilium"` | Agent container name. | +| nodePort | object | `{"autoProtectPortRange":true,"bindProtection":true,"enableHealthCheck":true,"enabled":false}` | Configure service load balancing loadBalancer: algorithm is the name of the load balancing algorithm for backend selection e.g. random or maglev algorithm: "random" mode is the operation mode of load balancing for remote backends e.g. snat, dsr, hybrid mode: snat acceleration is the option to accelerate service handling via XDP e.g. native, disabled acceleration: disabled | +| nodePort.autoProtectPortRange | bool | `true` | Append NodePort range to ip_local_reserved_ports if clash with ephemeral ports is detected. | +| nodePort.bindProtection | bool | `true` | Port range to use for NodePort services. range: "30000,32767" -- Set to true to prevent applications binding to service ports. | +| nodePort.enableHealthCheck | bool | `true` | Enable healthcheck nodePort server for NodePort services | +| nodePort.enabled | bool | `false` | Enable the Cilium NodePort service implementation. | +| nodeinit.bootstrapFile | string | `"/tmp/cilium-bootstrap-time"` | bootstrapFile is the location of the file where the bootstrap timestamp is written by the node-init DaemonSet | +| nodeinit.enabled | bool | `false` | Enable the node initialization DaemonSet | +| nodeinit.extraArgs | object | `{}` | | +| nodeinit.extraConfigmapMounts | list | `[]` | | +| nodeinit.extraEnv | object | `{}` | | +| nodeinit.extraHostPathMounts | list | `[]` | | +| nodeinit.extraInitContainers | list | `[]` | | +| nodeinit.image | object | `{"pullPolicy":"IfNotPresent","repository":"quay.io/cilium/startup-script","tag":"62bfbe88c17778aad7bef9fa57ff9e2d4a9ba0d8"}` | node-init image. | +| nodeinit.nodeSelector | object | `{}` | Node labels for nodeinit pod assignment ref: https://kubernetes.io/docs/user-guide/node-selection/ | +| nodeinit.podAnnotations | object | `{}` | Annotations to be added to node-init pods | +| nodeinit.podDisruptionBudget | object | `{"enabled":true,"maxUnavailable":2}` | PodDisruptionBudget settings ref: https://kubernetes.io/docs/concepts/workloads/pods/disruptions/ | +| nodeinit.podLabels | object | `{}` | Labels to be added to node-init pods | +| nodeinit.priorityClassName | string | `""` | | +| nodeinit.resources | object | `{"requests":{"cpu":"100m","memory":"100Mi"}}` | nodeinit resource limits & requests ref: https://kubernetes.io/docs/user-guide/compute-resources/ | +| nodeinit.securityContext | object | `{}` | Security context to be added to nodeinit pods | +| nodeinit.tolerations | list | `[{"operator":"Exists"}]` | Node tolerations for nodeinit scheduling to nodes with taints ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ | +| nodeinit.updateStrategy | object | `{"type":"RollingUpdate"}` | node-init update strategy | +| operator.affinity | object | `{"podAntiAffinity":{"requiredDuringSchedulingIgnoredDuringExecution":[{"labelSelector":{"matchExpressions":[{"key":"io.cilium/app","operator":"In","values":["operator"]}]},"topologyKey":"kubernetes.io/hostname"}]}}` | cilium-operator affinity | +| operator.enabled | bool | `true` | Enable the cilium-operator component (required). | +| operator.endpointGCInterval | string | `"5m0s"` | | +| operator.extraArgs | object | `{}` | Additional cilium-etcd-operator container arguments | +| operator.extraConfigmapMounts | list | `[]` | | +| operator.extraEnv | object | `{}` | | +| operator.extraHostPathMounts | list | `[]` | Additional cilium-operator hostPath mounts | +| operator.extraInitContainers | list | `[]` | Additional InitContainers to initialize the pod | +| operator.identityGCInterval | string | `"15m0s"` | | +| operator.identityHeartbeatTimeout | string | `"30m0s"` | | +| operator.image | object | `{"awsDigest":"sha256:9cc271130849e109608478b5fa695d84ab9542900ceeb7128c1a0c7b29abad3c","azureDigest":"sha256:e70493e05af077501563db990db1165dfcc66b09bfb751065f3d72e504e46ca7","genericDigest":"sha256:29a315472ae0701dbfbfff1e9766f68c2915edd896a011f7e8e409cf4d687453","pullPolicy":"IfNotPresent","repository":"quay.io/cilium/operator","suffix":"","tag":"v1.9.6","useDigest":false}` | cilium-operator image. | +| operator.nodeSelector | object | `{}` | Node labels for cilium-operator pod assignment ref: https://kubernetes.io/docs/user-guide/node-selection/ | +| operator.podAnnotations | object | `{}` | Annotations to be added to cilium-operator pods | +| operator.podDisruptionBudget | object | `{"enabled":false,"maxUnavailable":1}` | PodDisruptionBudget settings ref: https://kubernetes.io/docs/concepts/workloads/pods/disruptions/ | +| operator.podLabels | object | `{}` | Labels to be added to cilium-operator pods | +| operator.priorityClassName | string | `""` | cilium-operator priorityClassName | +| operator.prometheus | object | `{"enabled":false,"port":6942,"serviceMonitor":{"enabled":false}}` | Enable prometheus metrics for cilium-operator on the configured port at /metrics | +| operator.prometheus.serviceMonitor.enabled | bool | `false` | Enable service monitors. This requires the prometheus CRDs to be available (see https://github.com/prometheus-operator/prometheus-operator/blob/master/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml) | +| operator.replicas | int | `2` | Number of replicas to run for the cilium-operator deployment | +| operator.resources | object | `{}` | cilium-operator resource limits & requests ref: https://kubernetes.io/docs/user-guide/compute-resources/ | +| operator.rollOutPods | bool | `false` | Roll out cilium-operator pods automatically when configmap is updated. | +| operator.securityContext | object | `{}` | Security context to be added to cilium-operator pods | +| operator.tolerations | list | `[{"operator":"Exists"}]` | Node tolerations for cilium-operator scheduling to nodes with taints ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ | +| operator.updateStrategy | object | `{"rollingUpdate":{"maxSurge":1,"maxUnavailable":1},"type":"RollingUpdate"}` | cilium-operator update strategy | +| podAnnotations | object | `{}` | Annotations to be added to agent pods | +| podDisruptionBudget | object | `{"enabled":true,"maxUnavailable":2}` | PodDisruptionBudget settings ref: https://kubernetes.io/docs/concepts/workloads/pods/disruptions/ | +| podLabels | object | `{}` | Labels to be added to agent pods | +| policyEnforcementMode | string | `"default"` | | +| pprof.enabled | bool | `false` | Enable Go pprof debugging | +| preflight.enabled | bool | `false` | Enable Cilium pre-flight resources (required for upgrade) | +| preflight.extraArgs | object | `{}` | | +| preflight.extraConfigmapMounts | list | `[]` | | +| preflight.extraEnv | object | `{}` | | +| preflight.extraHostPathMounts | list | `[]` | | +| preflight.extraInitContainers | list | `[]` | | +| preflight.image | object | `{"digest":"sha256:6e2bc051dd5d942085591ea6150623790a8ffbaaab567007a2707fc7668d8055","pullPolicy":"IfNotPresent","repository":"quay.io/cilium/cilium","tag":"v1.9.6","useDigest":false}` | Cilium pre-flight image. | +| preflight.nodeSelector | object | `{}` | Node labels for preflight pod assignment ref: https://kubernetes.io/docs/user-guide/node-selection/ | +| preflight.podAnnotations | object | `{}` | Annotations to be added to preflight pods | +| preflight.podDisruptionBudget | object | `{"enabled":true,"maxUnavailable":2}` | PodDisruptionBudget settings ref: https://kubernetes.io/docs/concepts/workloads/pods/disruptions/ | +| preflight.podLabels | object | `{}` | | +| preflight.priorityClassName | string | `""` | | +| preflight.resources | object | `{}` | preflight resource limits & requests ref: https://kubernetes.io/docs/user-guide/compute-resources/ | +| preflight.securityContext | object | `{}` | Security context to be added to preflight pods | +| preflight.tofqdnsPreCache | string | `""` | | +| preflight.tolerations | list | `[{"effect":"NoSchedule","key":"node.kubernetes.io/not-ready"},{"effect":"NoSchedule","key":"node-role.kubernetes.io/master"},{"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/configuration/assign-pod-node/ | +| 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 | `""` | | +| prometheus | object | `{"enabled":false,"port":9090,"serviceMonitor":{"enabled":false}}` | Configure prometheus metrics on the configured port at /metrics | +| prometheus.serviceMonitor.enabled | bool | `false` | Enable service monitors. This requires the prometheus CRDs to be available (see https://github.com/prometheus-operator/prometheus-operator/blob/master/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml) | +| proxy | object | `{"prometheus":{"port":"9095"},"sidecarImageRegex":"cilium/istio_proxy"}` | Configure Istio proxy options. | +| 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. | +| remoteNodeIdentity | bool | `true` | Enable use of the remote node identity. ref: https://docs.cilium.io/en/v1.7/install/upgrade/#configmap-remote-node-identity | +| 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/user-guide/compute-resources/ | +| rollOutCiliumPods | bool | `false` | Roll out cilium agent pods automatically when configmap is updated. | +| securityContext | object | `{}` | Security context to be added to agent pods | +| serviceAccounts | object | Component's fully qualified name. | Define serviceAccount names for components. | +| serviceAccounts.certgen | object | `{"annotations":{},"create":true}` | Certgen is used if hubble.tls.auto.method=cronJob | +| sleepAfterInit | bool | `false` | | +| sockops | object | `{"enabled":false}` | Configure BPF socket operations configuration | +| tls.enabled | bool | `true` | | +| tls.secretsBackend | string | `"local"` | | +| tolerations | list | `[{"operator":"Exists"}]` | Node tolerations for agent scheduling to nodes with taints ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ | +| tunnel | string | `"vxlan"` | Configure the encapsulation configuration for communication between nodes. Possible values: - disabled - vxlan (default) - geneve | +| updateStrategy | object | `{"rollingUpdate":{"maxUnavailable":2},"type":"RollingUpdate"}` | Cilium agent update strategy | diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/README.md.gotmpl b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/README.md.gotmpl new file mode 100755 index 0000000..689b4b3 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/README.md.gotmpl @@ -0,0 +1,54 @@ +{{ template "chart.header" . }} + +{{ template "chart.deprecationWarning" . }} + +{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }} + +Cilium is open source software for providing and transparently securing +network connectivity and loadbalancing between application workloads such as +application containers or processes. Cilium operates at Layer 3/4 to provide +traditional networking and security services as well as Layer 7 to protect and +secure use of modern application protocols such as HTTP, gRPC and Kafka. + +A new Linux kernel technology called eBPF is at the foundation of Cilium. +It supports dynamic insertion of eBPF bytecode into the Linux kernel at various +integration points such as: network IO, application sockets, and tracepoints +to implement security, networking and visibility logic. eBPF is highly +efficient and flexible. + +![Cilium feature overview](https://raw.githubusercontent.com/cilium/cilium/master/Documentation/images/cilium_overview.png) + +## Prerequisites + +* Kubernetes: `{{ template "chart.kubeVersion" . }}` +* Helm: `>= 3.0` + +## Getting Started + +Try Cilium on any Kubernetes distribution in under 15 minutes: + +| Minikube | Self-Managed K8s | Amazon EKS | Google GKE | Microsoft AKS | +|:-:|:-:|:-:|:-:|:-:| +| [![Minikube](https://raw.githubusercontent.com/cilium/charts/master/images/minikube.svg)](https://cilium.readthedocs.io/en/stable/gettingstarted/minikube/) | [![Self-Managed Kubernetes](https://raw.githubusercontent.com/cilium/charts/master/images/k8s.png)](https://cilium.readthedocs.io/en/stable/gettingstarted/k8s-install-self-managed/) | [![Amazon EKS](https://raw.githubusercontent.com/cilium/charts/master/images/aws.svg)](https://cilium.readthedocs.io/en/stable/gettingstarted/k8s-install-eks/) | [![Google GKE](https://raw.githubusercontent.com/cilium/charts/master/images/google-cloud.svg)](https://cilium.readthedocs.io/en/stable/gettingstarted/k8s-install-gke/) | [![Microsoft AKS](https://raw.githubusercontent.com/cilium/charts/master/images/azure.svg)](https://cilium.readthedocs.io/en/stable/gettingstarted/k8s-install-aks/) | + +Or, for a quick install with the default configuration: + +``` +$ helm repo add cilium https://helm.cilium.io/ +$ helm install cilium cilium/cilium --namespace=kube-system +``` + +After Cilium is installed, you can explore the features that Cilium has to +offer from the [Getting Started Guides page](https://docs.cilium.io/en/latest/gettingstarted/). + +{{ template "chart.maintainersSection" . }} + +{{ template "chart.sourcesSection" . }} + +## Getting Help + +The best way to get help if you get stuck is to ask a question on the +[Cilium Slack channel](https://cilium.herokuapp.com/). With Cilium +contributors across the globe, there is almost always someone available to help. + +{{ template "chart.valuesSection" . }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/files/envoy/envoy.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/files/envoy/envoy.yaml new file mode 100755 index 0000000..31c778b --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/files/envoy/envoy.yaml @@ -0,0 +1,58 @@ +static_resources: + listeners: + - name: listener_hubble_ui + address: + socket_address: + address: 0.0.0.0 + port_value: 8081 + filter_chains: + - filters: + - name: envoy.filters.network.http_connection_manager + config: + codec_type: auto + stat_prefix: ingress_http + route_config: + name: local_route + virtual_hosts: + - name: local_service + domains: ['*'] + routes: + - match: + prefix: '/api/' + route: + cluster: backend + max_grpc_timeout: 0s + prefix_rewrite: '/' + - match: + prefix: '/' + route: + cluster: frontend + cors: + allow_origin_string_match: + - prefix: '*' + allow_methods: GET, PUT, DELETE, POST, OPTIONS + allow_headers: keep-alive,user-agent,cache-control,content-type,content-transfer-encoding,x-accept-content-transfer-encoding,x-accept-response-streaming,x-user-agent,x-grpc-web,grpc-timeout + max_age: '1728000' + expose_headers: grpc-status,grpc-message + http_filters: + - name: envoy.filters.http.grpc_web + - name: envoy.filters.http.cors + - name: envoy.filters.http.router + clusters: + - name: frontend + connect_timeout: 0.25s + type: strict_dns + lb_policy: round_robin + hosts: + - socket_address: + address: 127.0.0.1 + port_value: 8080 + - name: backend + connect_timeout: 0.25s + type: logical_dns + lb_policy: round_robin + http2_protocol_options: {} + hosts: + - socket_address: + address: 127.0.0.1 + port_value: 8090 diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/NOTES.txt b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/NOTES.txt new file mode 100755 index 0000000..3024efa --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/NOTES.txt @@ -0,0 +1,20 @@ +{{- if (and (.Values.preflight.enabled) (not (.Values.agent)) (not (.Values.operator.enabled))) }} + You have successfully ran the preflight check. + Now make sure to check the number of READY pods is the same as the number of running cilium pods. + Then make sure the cilium preflight deployment is also marked READY 1/1. + If you have an issues please refer to the CNP Validation section in the upgrade guide. +{{- else if (and (.Values.hubble.enabled) (.Values.hubble.relay.enabled)) }} + {{- if (.Values.hubble.ui.enabled) }} + You have successfully installed {{ title .Chart.Name }} with Hubble Relay and Hubble UI. + {{- else }} + You have successfully installed {{ title .Chart.Name }} with Hubble Relay. + {{- end }} +{{- else if .Values.hubble.enabled }} + You have successfully installed {{ title .Chart.Name }} with Hubble. +{{- else }} + You have successfully installed {{ title .Chart.Name }}. +{{- end }} + +Your release version is {{ .Chart.Version }}. + +For any further help, visit https://docs.cilium.io/en/v{{ (semver .Chart.Version).Major }}.{{ (semver .Chart.Version).Minor }}/gettinghelp diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/_clustermesh-apiserver-generate-certs-job-spec.tpl b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/_clustermesh-apiserver-generate-certs-job-spec.tpl new file mode 100755 index 0000000..389556c --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/_clustermesh-apiserver-generate-certs-job-spec.tpl @@ -0,0 +1,45 @@ +{{- define "clustermesh-apiserver-generate-certs.job.spec" }} +{{- $certValiditySecondsStr := printf "%ds" (mul .Values.clustermesh.apiserver.tls.auto.certValidityDuration 24 60 60) -}} +spec: + template: + metadata: + labels: + k8s-app: clustermesh-apiserver-generate-certs + spec: + serviceAccount: clustermesh-apiserver-generate-certs + serviceAccountName: clustermesh-apiserver-generate-certs + containers: + - name: certgen + image: {{ template "system_default_registry" . }}{{ .Values.certgen.image.repository }}:{{ .Values.certgen.image.tag }} + imagePullPolicy: {{ .Values.certgen.image.pullPolicy }} + command: + - "/usr/bin/cilium-certgen" + args: + - "--cilium-namespace={{ .Release.Namespace }}" + - "--clustermesh-apiserver-ca-cert-reuse-secret" + {{- if .Values.debug.enabled }} + - "--debug" + {{- end }} + {{- if not (and .Values.clustermesh.apiserver.tls.ca.cert .Values.clustermesh.apiserver.tls.ca.key) }} + - "--clustermesh-apiserver-ca-cert-generate" + {{- end }} + {{- if not (and .Values.clustermesh.apiserver.tls.server.cert .Values.clustermesh.apiserver.tls.server.key) }} + - "--clustermesh-apiserver-server-cert-generate" + {{- end }} + {{- if not (and .Values.clustermesh.apiserver.tls.admin.cert .Values.clustermesh.apiserver.tls.admin.key) }} + - "--clustermesh-apiserver-admin-cert-generate" + {{- end }} + {{- if not (and .Values.clustermesh.apiserver.tls.client.cert .Values.clustermesh.apiserver.tls.client.key) }} + - "--clustermesh-apiserver-client-cert-generate" + {{- end }} + {{- if not (and .Values.clustermesh.apiserver.tls.remote.cert .Values.clustermesh.apiserver.tls.remote.key) }} + - "--clustermesh-apiserver-remote-cert-generate" + {{- end }} + hostNetwork: true + {{- if .Values.imagePullSecrets }} + imagePullSecrets: + {{ toYaml .Values.imagePullSecrets | indent 6 }} + {{- end }} + restartPolicy: OnFailure + ttlSecondsAfterFinished: {{ .Values.certgen.ttlSecondsAfterFinished }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/_helpers.tpl b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/_helpers.tpl new file mode 100755 index 0000000..e68afa0 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/_helpers.tpl @@ -0,0 +1,132 @@ +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "cilium.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Return the appropriate apiVersion for ingress. +*/}} +{{- define "ingress.apiVersion" -}} +{{- if semverCompare ">=1.4-0, <1.14-0" .Capabilities.KubeVersion.Version -}} +{{- print "extensions/v1beta1" -}} +{{- else if semverCompare ">=1.14-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 -}} + + +{{/* +Generate TLS certificates for Hubble Server and Hubble Relay. + +Note: these 2 lines, that are repeated several times below, are a trick to +ensure the CA certs are generated only once: + + $ca := .ca | default (genCA "hubble-ca.cilium.io" (.Values.hubble.tls.auto.certValidityDuration | int)) + $_ := set . "ca" $ca + +Please, don't try to "simplify" them as without this trick, every generated +certificate would be signed by a different CA. +*/}} +{{- define "hubble.ca.gen-cert-only" }} +{{- $ca := .ca | default (genCA "hubble-ca.cilium.io" (.Values.hubble.tls.auto.certValidityDuration | int)) -}} +{{- $_ := set . "ca" $ca -}} +ca.crt: |- +{{ $ca.Cert | indent 2 -}} +{{- end }} +{{- define "hubble.server.gen-certs" }} +{{- $ca := .ca | default (genCA "hubble-ca.cilium.io" (.Values.hubble.tls.auto.certValidityDuration | int)) -}} +{{- $_ := set . "ca" $ca -}} +{{- $cn := list "*" (.Values.cluster.name | replace "." "-") "hubble-grpc.cilium.io" | join "." }} +{{- $cert := genSignedCert $cn nil (list $cn) (.Values.hubble.tls.auto.certValidityDuration | int) $ca -}} +tls.crt: {{ $cert.Cert | b64enc }} +tls.key: {{ $cert.Key | b64enc }} +{{- end }} +{{- define "hubble.relay.gen-certs" }} +{{- $ca := .ca | default (genCA "hubble-ca.cilium.io" (.Values.hubble.tls.auto.certValidityDuration | int)) -}} +{{- $_ := set . "ca" $ca -}} +{{- $cert := genSignedCert "*.hubble-relay.cilium.io" nil (list "*.hubble-relay.cilium.io") (.Values.hubble.tls.auto.certValidityDuration | int) $ca -}} +tls.crt: {{ $cert.Cert | b64enc }} +tls.key: {{ $cert.Key | b64enc }} +{{- end }} + +{{/* Generate CA "vmca" for clustermesh-apiserver in the global dict. */}} +{{- define "clustermesh.apiserver.generate.ca" }} +{{- $ca := .cmca | default (genCA "clustermesh-apiserver-ca.cilium.io" (.Values.clustermesh.apiserver.tls.auto.certValidityDuration | int)) -}} +{{- $_ := set . "cmca" $ca -}} +{{- end }} + +{{/* Generate CA certificate clustermesh-apiserver. */}} +{{- define "clustermesh.apiserver.ca.gen-cert" }} +{{- template "clustermesh.apiserver.generate.ca" . -}} +ca.crt: {{ .cmca.Cert | b64enc }} +ca.key: {{ .cmca.Key | b64enc }} +{{- end }} + +{{/* Generate server certificate clustermesh-apiserver. */}} +{{- define "clustermesh.apiserver.server.gen-cert" }} +{{- template "clustermesh.apiserver.generate.ca" . }} +{{- $CN := "clustermesh-apiserver.cilium.io" }} +{{- $IPs := (list "127.0.0.1") }} +{{- $SANs := (list $CN) }} +{{- $cert := genSignedCert $CN $IPs $SANs (.Values.clustermesh.apiserver.tls.auto.certValidityDuration | int) .cmca -}} +tls.crt: {{ $cert.Cert | b64enc }} +tls.key: {{ $cert.Key | b64enc }} +{{- end }} + +{{/* Generate admin certificate clustermesh-apiserver. */}} +{{- define "clustermesh.apiserver.admin.gen-cert" }} +{{- template "clustermesh.apiserver.generate.ca" . }} +{{- $CN := "root" }} +{{- $SANs := (list "localhost") }} +{{- $cert := genSignedCert $CN nil $SANs (.Values.clustermesh.apiserver.tls.auto.certValidityDuration | int) .cmca -}} +tls.crt: {{ $cert.Cert | b64enc }} +tls.key: {{ $cert.Key | b64enc }} +{{- end }} + +{{/* Generate client certificate clustermesh-apiserver. */}} +{{- define "clustermesh.apiserver.client.gen-cert" }} +{{- template "clustermesh.apiserver.generate.ca" . }} +{{- $CN := "externalworkload" }} +{{- $cert := genSignedCert $CN nil nil (.Values.clustermesh.apiserver.tls.auto.certValidityDuration | int) .cmca -}} +tls.crt: {{ $cert.Cert | b64enc }} +tls.key: {{ $cert.Key | b64enc }} +{{- end }} + +{{/* Generate remote certificate clustermesh-apiserver. */}} +{{- define "clustermesh.apiserver.remote.gen-cert" }} +{{- template "clustermesh.apiserver.generate.ca" . }} +{{- $CN := "remote" }} +{{- $cert := genSignedCert $CN nil nil (.Values.clustermesh.apiserver.tls.auto.certValidityDuration | int) .cmca -}} +tls.crt: {{ $cert.Cert | b64enc }} +tls.key: {{ $cert.Key | b64enc }} +{{- end }} + +{{- define "system_default_registry" -}} +{{- if .Values.global.systemDefaultRegistry -}} +{{- printf "%s/" .Values.global.systemDefaultRegistry -}} +{{- else -}} +{{- "" -}} +{{- end }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/_hubble-generate-certs-job-spec.tpl b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/_hubble-generate-certs-job-spec.tpl new file mode 100755 index 0000000..15b3f15 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/_hubble-generate-certs-job-spec.tpl @@ -0,0 +1,65 @@ +{{- define "hubble-generate-certs.job.spec" }} +{{- $certValiditySecondsStr := printf "%ds" (mul .Values.hubble.tls.auto.certValidityDuration 24 60 60) -}} +spec: + template: + metadata: + labels: + k8s-app: hubble-generate-certs + spec: + serviceAccount: hubble-generate-certs + serviceAccountName: hubble-generate-certs + containers: + - name: certgen + image: {{ template "system_default_registry" . }}{{ .Values.certgen.image.repository }}:{{ .Values.certgen.image.tag }} + imagePullPolicy: {{ .Values.certgen.image.pullPolicy }} + 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 }}" + - "--hubble-ca-reuse-secret=true" + - "--hubble-ca-secret-name=hubble-ca-secret" + {{- if .Values.debug.enabled }} + - "--debug" + {{- end }} + {{- $hubbleCAProvided := and .Values.hubble.tls.ca.cert .Values.hubble.tls.ca.key -}} + {{- if $hubbleCAProvided }} + - "--hubble-ca-generate=false" + {{- else }} + - "--hubble-ca-generate=true" + - "--hubble-ca-validity-duration={{ $certValiditySecondsStr }}" + - "--hubble-ca-config-map-create=true" + - "--hubble-ca-config-map-name=hubble-ca-cert" + {{- end }} + {{- if and .Values.hubble.tls.server.cert .Values.hubble.tls.server.key $hubbleCAProvided }} + - "--hubble-server-cert-generate=false" + {{- else }} + - "--hubble-server-cert-generate=true" + - "--hubble-server-cert-common-name={{ list "*" (.Values.cluster.name | replace "." "-") "hubble-grpc.cilium.io" | join "." }}" + - "--hubble-server-cert-validity-duration={{ $certValiditySecondsStr }}" + - "--hubble-server-cert-secret-name=hubble-server-certs" + {{- end }} + {{- if and .Values.hubble.relay.tls.client.cert .Values.hubble.relay.tls.client.key $hubbleCAProvided }} + - "--hubble-relay-client-cert-generate=false" + {{- else }} + - "--hubble-relay-client-cert-generate=true" + - "--hubble-relay-client-cert-validity-duration={{ $certValiditySecondsStr }}" + - "--hubble-relay-client-cert-secret-name=hubble-relay-client-certs" + {{- end }} + {{- if or (and .Values.hubble.relay.tls.server.cert .Values.hubble.relay.tls.server.key) (not .Values.hubble.relay.tls.server.enabled) }} + - "--hubble-relay-server-cert-generate=false" + {{- else if .Values.hubble.relay.tls.server.enabled }} + - "--hubble-relay-server-cert-generate=true" + - "--hubble-relay-server-cert-validity-duration={{ $certValiditySecondsStr }}" + - "--hubble-relay-server-cert-secret-name=hubble-relay-server-certs" + {{- end }} + hostNetwork: true + {{- if .Values.imagePullSecrets }} + imagePullSecrets: + {{ toYaml .Values.imagePullSecrets | indent 6 }} + {{- end }} + restartPolicy: OnFailure + ttlSecondsAfterFinished: {{ .Values.certgen.ttlSecondsAfterFinished }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-agent-clusterrole.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-agent-clusterrole.yaml new file mode 100755 index 0000000..0856754 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-agent-clusterrole.yaml @@ -0,0 +1,109 @@ +{{- if and (.Values.agent) (not .Values.preflight.enabled) }} +{{- /* +Keep file in synced with cilium-preflight-clusterrole.yaml +*/ -}} +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: cilium +rules: +- apiGroups: + - networking.k8s.io + resources: + - networkpolicies + verbs: + - get + - list + - watch +- apiGroups: + - discovery.k8s.io + resources: + - endpointslices + verbs: + - get + - list + - watch +- apiGroups: + - "" + resources: + - namespaces + - services + - nodes + - endpoints + verbs: + - get + - list + - watch +- apiGroups: + - "" + resources: + - pods + - pods/finalizers + verbs: + - get + - list + - watch + - update + - delete +- apiGroups: + - "" + resources: + - nodes + verbs: + - get + - list + - watch + - update +- apiGroups: + - "" + resources: + - nodes + - nodes/status + verbs: + - patch +- apiGroups: + - apiextensions.k8s.io + resources: + - customresourcedefinitions + verbs: + # Deprecated for removal in v1.10 + - create + - list + - watch + - update + + # This is used when validating policies in preflight. This will need to stay + # until we figure out how to avoid "get" inside the preflight, and then + # should be removed ideally. + - get +{{- if eq "k8s" .Values.tls.secretsBackend }} +- apiGroups: + - "" + resources: + - secrets + verbs: + - get +{{- end }} +- apiGroups: + - cilium.io + resources: + - ciliumnetworkpolicies + - ciliumnetworkpolicies/status + - ciliumnetworkpolicies/finalizers + - ciliumclusterwidenetworkpolicies + - ciliumclusterwidenetworkpolicies/status + - ciliumclusterwidenetworkpolicies/finalizers + - ciliumendpoints + - ciliumendpoints/status + - ciliumendpoints/finalizers + - ciliumnodes + - ciliumnodes/status + - ciliumnodes/finalizers + - ciliumidentities + - ciliumidentities/finalizers + - ciliumlocalredirectpolicies + - ciliumlocalredirectpolicies/status + - ciliumlocalredirectpolicies/finalizers + verbs: + - '*' +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-agent-clusterrolebinding.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-agent-clusterrolebinding.yaml new file mode 100755 index 0000000..307aabb --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-agent-clusterrolebinding.yaml @@ -0,0 +1,14 @@ +{{- if and (.Values.agent) (not .Values.preflight.enabled) }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: cilium +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: cilium +subjects: +- kind: ServiceAccount + name: cilium + namespace: {{ .Release.Namespace }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-agent-daemonset.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-agent-daemonset.yaml new file mode 100755 index 0000000..d27d45e --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-agent-daemonset.yaml @@ -0,0 +1,524 @@ +{{- if and (.Values.agent) (not .Values.preflight.enabled) }} + +{{- /* Default values with backwards compatibility */ -}} +{{- $defaultKeepDeprecatedProbes := "true" -}} + +{{- /* Default values when 1.8 was initially deployed */ -}} +{{- if semverCompare ">=1.8" (default "1.8" .Values.upgradeCompatibility) -}} +{{- $defaultKeepDeprecatedProbes = "false" -}} +{{- end -}} + +apiVersion: apps/v1 +kind: DaemonSet +metadata: + labels: + k8s-app: cilium +{{- if .Values.keepDeprecatedLabels }} + kubernetes.io/cluster-service: "true" +{{- if and (eq .Release.Namespace "kube-system" ) .Values.gke.enabled }} +{{- fail "Invalid configuration: Installing Cilium on GKE with 'kubernetes.io/cluster-service' labels on 'kube-system' namespace causes Cilium DaemonSet to be removed by GKE. Either install Cilium on a different Namespace or install with '--set keepDeprecatedLabels=false'"}} +{{- end }} +{{- end }} + name: cilium + namespace: {{ .Release.Namespace }} +spec: + selector: + matchLabels: + k8s-app: cilium +{{- if .Values.keepDeprecatedLabels }} + kubernetes.io/cluster-service: "true" +{{- end }} +{{- with .Values.updateStrategy }} + updateStrategy: + {{- toYaml . | trim | nindent 4 }} +{{- end }} + template: + metadata: + annotations: +{{- if and .Values.prometheus.enabled (not .Values.prometheus.serviceMonitor.enabled) }} + prometheus.io/port: "{{ .Values.prometheus.port }}" + prometheus.io/scrape: "true" +{{- end }} +{{- if .Values.rollOutCiliumPods }} + # ensure pods roll when configmap updates + cilium.io/cilium-configmap-checksum: {{ include (print $.Template.BasePath "/cilium-configmap.yaml") . | sha256sum | quote }} +{{- end }} + # This annotation plus the CriticalAddonsOnly toleration makes + # cilium to be a critical pod in the cluster, which ensures cilium + # gets priority scheduling. + # https://kubernetes.io/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/ + scheduler.alpha.kubernetes.io/critical-pod: "" +{{- with .Values.podAnnotations }} + {{- toYaml . | nindent 8 }} +{{- end }} + labels: + k8s-app: cilium +{{- if .Values.keepDeprecatedLabels }} + kubernetes.io/cluster-service: "true" +{{- end }} + spec: +{{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 8 }} +{{- end }} +{{- if .Values.imagePullSecrets }} + imagePullSecrets: +{{ toYaml .Values.imagePullSecrets | indent 6 }} +{{- end }} + containers: +{{- if .Values.sleepAfterInit }} + - command: [ "/bin/bash", "-c", "--" ] + args: [ "while true; do sleep 30; done;" ] + livenessProbe: + exec: + command: + - "true" + readinessProbe: + exec: + command: + - "true" +{{- else }} + - args: + - --config-dir=/tmp/cilium/config-map +{{- range $key, $value := .Values.extraArgs }} +{{- if $value }} + - --{{ $key }}={{ $value }} +{{- else }} + - --{{ $key }} +{{- end }} +{{- end }} + command: + - cilium-agent + livenessProbe: +{{- if or .Values.keepDeprecatedProbes (eq $defaultKeepDeprecatedProbes "true") }} + exec: + command: + - cilium + - status + - --brief +{{- else }} + httpGet: +{{- if .Values.ipv4.enabled }} + host: '127.0.0.1' +{{- else }} + host: '::1' +{{- end }} + path: /healthz + port: {{ .Values.healthPort }} + scheme: HTTP + httpHeaders: + - name: "brief" + value: "true" +{{- end }} + failureThreshold: 10 + # 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. + initialDelaySeconds: 120 + periodSeconds: 30 + successThreshold: 1 + timeoutSeconds: 5 + readinessProbe: +{{- if or .Values.keepDeprecatedProbes (eq $defaultKeepDeprecatedProbes "true") }} + exec: + command: + - cilium + - status + - --brief +{{- else }} + httpGet: +{{- if .Values.ipv4.enabled }} + host: '127.0.0.1' +{{- else }} + host: '::1' +{{- end }} + path: /healthz + port: {{ .Values.healthPort }} + scheme: HTTP + httpHeaders: + - name: "brief" + value: "true" +{{- end }} + failureThreshold: 3 + initialDelaySeconds: 5 + periodSeconds: 30 + successThreshold: 1 + timeoutSeconds: 5 +{{- end }} + env: + - name: K8S_NODE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: spec.nodeName + - name: CILIUM_K8S_NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + - name: CILIUM_FLANNEL_MASTER_DEVICE + valueFrom: + configMapKeyRef: + key: flannel-master-device + name: cilium-config + optional: true + - name: CILIUM_FLANNEL_UNINSTALL_ON_EXIT + valueFrom: + configMapKeyRef: + key: flannel-uninstall-on-exit + name: cilium-config + optional: true + - name: CILIUM_CLUSTERMESH_CONFIG + value: /var/lib/cilium/clustermesh/ + - name: CILIUM_CNI_CHAINING_MODE + valueFrom: + configMapKeyRef: + key: cni-chaining-mode + name: cilium-config + optional: true + - name: CILIUM_CUSTOM_CNI_CONF + valueFrom: + configMapKeyRef: + key: custom-cni-conf + name: cilium-config + optional: true +{{- if .Values.k8sServiceHost }} + - name: KUBERNETES_SERVICE_HOST + value: {{ .Values.k8sServiceHost | quote }} +{{- end }} +{{- if .Values.k8sServicePort }} + - name: KUBERNETES_SERVICE_PORT + value: {{ .Values.k8sServicePort | quote }} +{{- end }} +{{- with .Values.extraEnv }} +{{ toYaml . | trim | indent 8 }} +{{- end }} + image: {{ template "system_default_registry" . }}{{ .Values.image.repository }}:{{ .Values.image.tag }} + imagePullPolicy: {{ .Values.image.pullPolicy }} +{{- if .Values.cni.install }} + lifecycle: + postStart: + exec: + command: + - "/cni-install.sh" + -{{- if .Values.debug.enabled }} "--enable-debug=true"{{- else }} "--enable-debug=false"{{- end }} + preStop: + exec: + command: + - /cni-uninstall.sh +{{- end }} +{{- if .Values.resources }} + resources: + {{- toYaml .Values.resources | trim | nindent 10 }} +{{- end }} + name: cilium-agent +{{- if or .Values.prometheus.enabled .Values.hubble.metrics.enabled }} + ports: +{{- if .Values.prometheus.enabled }} + - containerPort: {{ .Values.prometheus.port }} + hostPort: {{ .Values.prometheus.port }} + name: prometheus + protocol: TCP + - containerPort: {{ .Values.proxy.prometheus.port }} + hostPort: {{ .Values.proxy.prometheus.port }} + name: envoy-metrics + protocol: TCP +{{- end }} +{{- if .Values.hubble.metrics.enabled }} + - containerPort: {{ .Values.hubble.metrics.port }} + hostPort: {{ .Values.hubble.metrics.port }} + name: hubble-metrics + protocol: TCP +{{- end }} +{{- end }} + securityContext: + capabilities: + add: + - NET_ADMIN + - SYS_MODULE + privileged: true + volumeMounts: +{{- /* CRI-O already mounts the BPF filesystem */ -}} +{{- if not (eq .Values.containerRuntime.integration "crio") }} + - mountPath: /sys/fs/bpf + name: bpf-maps +{{- end }} + - mountPath: /var/run/cilium + name: cilium-run + - mountPath: /host/opt/cni/bin + name: cni-path + - mountPath: {{ .Values.cni.hostConfDirMountPath }} + name: etc-cni-netd +{{- if .Values.etcd.enabled }} + - mountPath: /var/lib/etcd-config + name: etcd-config-path + readOnly: true +{{- if or .Values.etcd.ssl .Values.etcd.managed }} + - mountPath: /var/lib/etcd-secrets + name: etcd-secrets + readOnly: true +{{- end }} +{{- end }} + - mountPath: /var/lib/cilium/clustermesh + name: clustermesh-secrets + readOnly: true + - mountPath: /tmp/cilium/config-map + name: cilium-config-path + readOnly: true +{{- if .Values.ipMasqAgent.enabled }} + - mountPath: /etc/config + name: ip-masq-agent + readOnly: true +{{- end }} +{{- if .Values.cni.configMap }} + - mountPath: {{ .Values.cni.confFileMountPath }} + name: cni-configuration + readOnly: true +{{- end }} + # Needed to be able to load kernel modules + - mountPath: /lib/modules + name: lib-modules + readOnly: true + - mountPath: /run/xtables.lock + name: xtables-lock +{{- if .Values.encryption.enabled }} + - mountPath: {{ .Values.encryption.mountPath }} + name: cilium-ipsec-secrets +{{- end }} +{{- if .Values.kubeConfigPath }} + - mountPath: {{ .Values.kubeConfigPath }} + name: kube-config + readOnly: true +{{- end }} +{{- if and (.Values.hubble.enabled) (hasKey .Values.hubble "listenAddress") (.Values.hubble.tls.enabled) }} + - mountPath: /var/lib/cilium/tls/hubble + name: hubble-tls + readOnly: true +{{- end }} +{{- range .Values.extraHostPathMounts }} + - mountPath: {{ .mountPath }} + name: {{ .name }} + readOnly: {{ .readOnly }} +{{- if .mountPropagation }} + mountPropagation: {{ .mountPropagation }} +{{- end }} +{{- end }} +{{- if .Values.monitor.enabled }} + - name: cilium-monitor + command: ["cilium"] + args: + - monitor +{{- range $type := .Values.monitor.eventTypes }} + - --type={{ $type }} +{{- end }} + image: {{ template "system_default_registry" . }}{{ .Values.image.repository }}:{{ .Values.image.tag }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + volumeMounts: + - mountPath: /var/run/cilium + name: cilium-run +{{- if .Values.monitor.resources }} + resources: + {{- toYaml .Values.monitor.resources | trim | nindent 10 }} +{{- end }} +{{- end }} +{{- 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 +{{- end }} + hostNetwork: true + initContainers: +{{- if and .Values.nodeinit.enabled (not (eq .Values.nodeinit.bootstrapFile "")) }} + - name: wait-for-node-init + command: ['sh', '-c', 'until stat {{ .Values.nodeinit.bootstrapFile }} > /dev/null 2>&1; do echo "Waiting on node-init to run..."; sleep 1; done'] + image: {{ template "system_default_registry" . }}{{ .Values.image.repository }}:{{ .Values.image.tag }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + volumeMounts: + - mountPath: {{ .Values.nodeinit.bootstrapFile }} + name: cilium-bootstrap-file +{{- end }} + - command: + - /init-container.sh + env: + - name: CILIUM_ALL_STATE + valueFrom: + configMapKeyRef: + key: clean-cilium-state + name: cilium-config + optional: true + - name: CILIUM_BPF_STATE + valueFrom: + configMapKeyRef: + key: clean-cilium-bpf-state + name: cilium-config + optional: true + - name: CILIUM_WAIT_BPF_MOUNT + valueFrom: + configMapKeyRef: + key: wait-bpf-mount + name: cilium-config + optional: true +{{- if .Values.k8sServiceHost }} + - name: KUBERNETES_SERVICE_HOST + value: {{ .Values.k8sServiceHost | quote }} +{{- end }} +{{- if .Values.k8sServicePort }} + - name: KUBERNETES_SERVICE_PORT + value: {{ .Values.k8sServicePort | quote }} +{{- end }} +{{- if .Values.extraEnv }} +{{ toYaml .Values.extraEnv | indent 8 }} +{{- end }} + image: {{ template "system_default_registry" . }}{{ .Values.image.repository }}:{{ .Values.image.tag }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + name: clean-cilium-state + securityContext: + capabilities: + add: + - NET_ADMIN + privileged: true + volumeMounts: +{{- /* CRI-O already mounts the BPF filesystem */ -}} +{{- if not (eq .Values.containerRuntime.integration "crio") }} + - mountPath: /sys/fs/bpf + name: bpf-maps +{{- /* Required for wait-bpf-mount to work */}} + mountPropagation: HostToContainer +{{- end }} + - mountPath: /var/run/cilium + name: cilium-run +{{- if .Values.nodeinit.resources }} + resources: + {{- toYaml .Values.nodeinit.resources | trim | nindent 10 }} +{{- end }} + restartPolicy: Always +{{- if and (or (and (eq .Release.Namespace "kube-system") (gt .Capabilities.KubeVersion.Minor "10")) (ge .Capabilities.KubeVersion.Minor "17") (gt .Capabilities.KubeVersion.Major "1")) .Values.enableCriticalPriorityClass }} + priorityClassName: system-node-critical +{{- end }} + serviceAccount: cilium + serviceAccountName: cilium + terminationGracePeriodSeconds: 1 +{{- with .Values.tolerations }} + tolerations: + {{- toYaml . | trim | nindent 6 }} +{{- end }} + volumes: + # To keep state between restarts / upgrades + - hostPath: + path: {{ .Values.daemon.runPath }} + type: DirectoryOrCreate + name: cilium-run +{{- /* CRI-O already mounts the BPF filesystem */ -}} +{{- if not (eq .Values.containerRuntime.integration "crio") }} + # To keep state between restarts / upgrades for bpf maps + - hostPath: + path: /sys/fs/bpf + type: DirectoryOrCreate + name: bpf-maps +{{- end }} + # To install cilium cni plugin in the host + - hostPath: + path: {{ .Values.cni.binPath }} + type: DirectoryOrCreate + name: cni-path + # To install cilium cni configuration in the host + - hostPath: + path: {{ .Values.cni.confPath }} + type: DirectoryOrCreate + name: etc-cni-netd + # To be able to load kernel modules + - hostPath: + path: /lib/modules + name: lib-modules + # To access iptables concurrently with other processes (e.g. kube-proxy) + - hostPath: + path: /run/xtables.lock + type: FileOrCreate + name: xtables-lock +{{- if .Values.kubeConfigPath }} + - hostPath: + path: {{ .Values.kubeConfigPath }} + type: FileOrCreate + name: kube-config +{{- end }} +{{- if and .Values.nodeinit.enabled (not (eq .Values.nodeinit.bootstrapFile "")) }} + - hostPath: + path: {{ .Values.nodeinit.bootstrapFile }} + type: FileOrCreate + name: cilium-bootstrap-file +{{- end }} +{{- range .Values.extraHostPathMounts }} + - name: {{ .name }} + hostPath: + path: {{ .hostPath }} +{{- if .hostPathType }} + type: {{ .hostPathType }} +{{- end }} +{{- end }} +{{- if .Values.etcd.enabled }} + # To read the etcd config stored in config maps + - configMap: + defaultMode: 420 + items: + - key: etcd-config + path: etcd.config + name: cilium-config + name: etcd-config-path + # To read the k8s etcd secrets in case the user might want to use TLS +{{- if or .Values.etcd.ssl .Values.etcd.managed }} + - name: etcd-secrets + secret: + defaultMode: 420 + optional: true + secretName: cilium-etcd-secrets +{{- end }} +{{- end }} + # To read the clustermesh configuration + - name: clustermesh-secrets + secret: + defaultMode: 420 + optional: true + secretName: cilium-clustermesh + # To read the configuration from the config map + - configMap: + name: cilium-config + name: cilium-config-path +{{- if and .Values.ipMasqAgent .Values.ipMasqAgent.enabled }} + - configMap: + name: ip-masq-agent + optional: true + items: + - key: config + path: ip-masq-agent + name: ip-masq-agent +{{- end }} +{{- if .Values.encryption.enabled }} + - name: cilium-ipsec-secrets + secret: + secretName: {{ .Values.encryption.secretName }} +{{- end }} +{{- if .Values.cni.configMap }} + - name: cni-configuration + configMap: + name: {{ .Values.cni.configMap }} +{{- end }} +{{- if and .Values.hubble.enabled .Values.hubble.tls.enabled (hasKey .Values.hubble "listenAddress") }} + - name: hubble-tls + projected: + sources: + - secret: + name: hubble-server-certs + items: + - key: tls.crt + path: server.crt + - key: tls.key + path: server.key + optional: true + - configMap: + name: hubble-ca-cert + items: + - key: ca.crt + path: client-ca.crt + optional: true +{{- end }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-agent-service.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-agent-service.yaml new file mode 100755 index 0000000..bd7c61f --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-agent-service.yaml @@ -0,0 +1,67 @@ +{{- if and (.Values.agent) (not .Values.preflight.enabled) (.Values.prometheus.enabled) (.Values.prometheus.serviceMonitor.enabled) }} +kind: Service +apiVersion: v1 +metadata: + name: cilium-agent + namespace: {{ .Release.Namespace }} + labels: + k8s-app: cilium +spec: + clusterIP: None + type: ClusterIP + ports: + - name: metrics + port: {{ .Values.prometheus.port }} + protocol: TCP + targetPort: prometheus + - name: envoy-metrics + port: {{ .Values.proxy.prometheus.port }} + protocol: TCP + targetPort: envoy-metrics + selector: + k8s-app: cilium +{{- else if .Values.prometheus.enabled }} +kind: Service +apiVersion: v1 +metadata: + name: cilium-agent + namespace: {{ .Release.Namespace }} + annotations: + prometheus.io/scrape: 'true' + prometheus.io/port: {{ .Values.proxy.prometheus.port | quote }} + labels: + k8s-app: cilium +spec: + clusterIP: None + type: ClusterIP + ports: + - name: envoy-metrics + port: {{ .Values.proxy.prometheus.port }} + protocol: TCP + targetPort: envoy-metrics + selector: + k8s-app: cilium +{{- end }} +{{- if and .Values.hubble.metrics.enabled }} +--- +kind: Service +apiVersion: v1 +metadata: + name: hubble-metrics + namespace: {{ .Release.Namespace }} + annotations: + prometheus.io/scrape: 'true' + prometheus.io/port: {{ .Values.hubble.metrics.port | quote }} + labels: + k8s-app: hubble +spec: + clusterIP: None + type: ClusterIP + ports: + - name: hubble-metrics + port: {{ .Values.hubble.metrics.port }} + protocol: TCP + targetPort: hubble-metrics + selector: + k8s-app: cilium +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-agent-serviceaccount.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-agent-serviceaccount.yaml new file mode 100755 index 0000000..7af4f3d --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-agent-serviceaccount.yaml @@ -0,0 +1,11 @@ +{{- if and (.Values.agent) (not .Values.preflight.enabled) }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: cilium + namespace: {{ .Release.Namespace }} + {{- if .Values.serviceAccounts.cilium.annotations }} + annotations: +{{ toYaml .Values.serviceAccounts.cilium.annotations | indent 4 }} + {{- end }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-agent-servicemonitor.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-agent-servicemonitor.yaml new file mode 100755 index 0000000..a072a18 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-agent-servicemonitor.yaml @@ -0,0 +1,55 @@ +{{- if and (.Values.agent) (not .Values.preflight.enabled) (.Values.prometheus.enabled) (.Values.prometheus.serviceMonitor.enabled) }} +--- +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: cilium-agent + {{- if .Values.prometheus.serviceMonitor.namespace }} + namespace: {{ .Values.prometheus.serviceMonitor.namespace }} + {{- else }} + namespace: {{ .Release.Namespace }} + {{- end }} +spec: + selector: + matchLabels: + k8s-app: cilium + namespaceSelector: + matchNames: + - {{ .Release.Namespace }} + endpoints: + - port: metrics + interval: 10s + honorLabels: true + path: /metrics + targetLabels: + - k8s-app +{{- end }} +{{- if and .Values.hubble.metrics.enabled (.Values.hubble.metrics.serviceMonitor.enabled) }} +--- +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: hubble + {{- if .Values.prometheus.serviceMonitor.namespace }} + namespace: {{ .Values.prometheus.serviceMonitor.namespace }} + {{- else }} + namespace: {{ .Release.Namespace }} + {{- end }} +spec: + selector: + matchLabels: + k8s-app: hubble + namespaceSelector: + matchNames: + - {{ .Release.Namespace }} + endpoints: + - port: hubble-metrics + interval: 10s + honorLabels: true + path: /metrics + relabelings: + - replacement: ${1} + sourceLabels: + - __meta_kubernetes_pod_node_name + targetLabel: node +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-configmap.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-configmap.yaml new file mode 100755 index 0000000..082ac81 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-configmap.yaml @@ -0,0 +1,649 @@ +{{- if and (.Values.agent) (not .Values.preflight.enabled) }} +{{- /* Default values with backwards compatibility */ -}} +{{- $defaultEnableCnpStatusUpdates := "true" -}} +{{- $defaultBpfMapDynamicSizeRatio := 0.0 -}} +{{- $defaultBpfMasquerade := "false" -}} +{{- $defaultBpfClockProbe := "false" -}} +{{- $defaultBpfTProxy := "false" -}} +{{- $defaultIPAM := "cluster-pool" -}} +{{- $defaultSessionAffinity := "false" -}} +{{- $defaultOperatorApiServeAddr := "localhost:9234" -}} +{{- $defaultBpfCtTcpMax := 524288 -}} +{{- $defaultBpfCtAnyMax := 262144 -}} +{{- $enableIdentityMark := "true" -}} +{{- $fragmentTracking := "true" -}} +{{- $crdWaitTimeout := "5m" -}} + +{{- /* Default values when 1.8 was initially deployed */ -}} +{{- if semverCompare ">=1.8" (default "1.8" .Values.upgradeCompatibility) -}} +{{- $defaultEnableCnpStatusUpdates = "false" -}} +{{- $defaultBpfMapDynamicSizeRatio = 0.0025 -}} +{{- $defaultBpfMasquerade = "true" -}} +{{- $defaultBpfClockProbe = "true" -}} +{{- $defaultIPAM = "cluster-pool" -}} +{{- $defaultSessionAffinity = "true" -}} +{{- if .Values.ipv4.enabled }} +{{- $defaultOperatorApiServeAddr = "127.0.0.1:9234" -}} +{{- else -}} +{{- $defaultOperatorApiServeAddr = "[::1]:9234" -}} +{{- end }} +{{- $defaultBpfCtTcpMax = 0 -}} +{{- $defaultBpfCtAnyMax = 0 -}} +{{- end -}} + +{{- $ipam := (coalesce .Values.ipam.mode $defaultIPAM) -}} +{{- $bpfCtTcpMax := (coalesce .Values.bpf.ctTcpMax $defaultBpfCtTcpMax) -}} +{{- $bpfCtAnyMax := (coalesce .Values.bpf.ctAnyMax $defaultBpfCtAnyMax) -}} + +apiVersion: v1 +kind: ConfigMap +metadata: + name: cilium-config + namespace: {{ .Release.Namespace }} +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. + 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 }} + 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' +{{- end }} +{{- end }} + +{{- if hasKey .Values "conntrackGCInterval" }} + conntrack-gc-interval: {{ .Values.conntrackGCInterval | quote }} +{{- end }} + +{{- if hasKey .Values "disableEnvoyVersionCheck" }} + disable-envoy-version-check: {{ .Values.disableEnvoyVersionCheck | quote }} +{{- end }} + + # Identity allocation mode selects how identities are shared between cilium + # nodes by setting how they are stored. The options are "crd" or "kvstore". + # - "crd" stores identities in kubernetes as CRDs (custom resource definition). + # These can be queried with: + # kubectl get ciliumid + # - "kvstore" stores identities in a kvstore, etcd or consul, that is + # configured below. Cilium versions before 1.6 supported only the kvstore + # backend. Upgrades from these older cilium versions should continue using + # the kvstore by commenting out the identity-allocation-mode below, or + # setting it to "kvstore". + identity-allocation-mode: {{ .Values.identityAllocationMode }} +{{- if hasKey .Values "identityHeartbeatTimeout" }} + identity-heartbeat-timeout: "{{ .Values.identityHeartbeatTimeout }}" +{{- end }} +{{- if hasKey .Values "identityGCInterval" }} + identity-gc-interval: "{{ .Values.identityGCInterval }}" +{{- end }} +{{- if hasKey .Values.operator "endpointGCInterval" }} + cilium-endpoint-gc-interval: "{{ .Values.operator.endpointGCInterval }}" +{{- end }} + +{{- if hasKey .Values "identityChangeGracePeriod" }} + # identity-change-grace-period is the grace period that needs to pass + # before an endpoint that has changed its identity will start using + # that new identity. During the grace period, the new identity has + # already been allocated and other nodes in the cluster have a chance + # to whitelist the new upcoming identity of the endpoint. + identity-change-grace-period: {{ default "5s" .Values.identityChangeGracePeriod | quote }} +{{- end }} + +{{- if hasKey .Values "labels" }} + # To include or exclude matched resources from cilium identity evaluation + labels: {{ .Values.labels | quote }} +{{- end }} + + # If you want to run cilium in debug mode change this value to true + debug: {{ .Values.debug.enabled | quote }} + +{{- if hasKey .Values.debug "verbose" }} + debug-verbose: "{{ .Values.debug.verbose }}" +{{- end }} + +{{- if ne (int .Values.healthPort) 9876 }} + # Set the TCP port for the agent health status API. This is not the port used + # for cilium-health. + agent-health-port: "{{ .Values.healthPort }}" +{{- end }} +{{- if hasKey .Values "policyEnforcementMode" }} + # The agent can be put into the following three policy enforcement modes + # default, always and never. + # https://docs.cilium.io/en/latest/policy/intro/#policy-enforcement-modes + enable-policy: "{{ lower .Values.policyEnforcementMode }}" +{{- end }} + +{{- if .Values.prometheus.enabled }} + # If you want metrics enabled in all of your Cilium agents, set the port for + # which the Cilium agents will have their metrics exposed. + # This option deprecates the "prometheus-serve-addr" in the + # "cilium-metrics-config" ConfigMap + # NOTE that this will open the port on ALL nodes where Cilium pods are + # scheduled. + prometheus-serve-addr: ":{{ .Values.prometheus.port }}" + # Port to expose Envoy metrics (e.g. "9095"). Envoy metrics listener will be disabled if this + # field is not set. + proxy-prometheus-port: "{{ .Values.proxy.prometheus.port }}" +{{- end }} + +{{- if .Values.operator.prometheus.enabled }} + # If you want metrics enabled in cilium-operator, set the port for + # which the Cilium Operator will have their metrics exposed. + # NOTE that this will open the port on the nodes where Cilium operator pod + # is scheduled. + operator-prometheus-serve-addr: ":{{ .Values.operator.prometheus.port }}" + enable-metrics: "true" +{{- end }} + + # Enable IPv4 addressing. If enabled, all endpoints are allocated an IPv4 + # address. + enable-ipv4: {{ .Values.ipv4.enabled | quote }} + + # Enable IPv6 addressing. If enabled, all endpoints are allocated an IPv6 + # address. + enable-ipv6: {{ .Values.ipv6.enabled | quote }} + +{{- if .Values.cleanState }} + # If a serious issue occurs during Cilium startup, this + # invasive option may be set to true to remove all persistent + # state. Endpoints will not be restored using knowledge from a + # prior Cilium run, so they may receive new IP addresses upon + # restart. This also triggers clean-cilium-bpf-state. + clean-cilium-state: "true" +{{- end }} + +{{- if .Values.cleanBpfState }} + # If you want to clean cilium BPF state, set this to true; + # Removes all BPF maps from the filesystem. Upon restart, + # endpoints are restored with the same IP addresses, however + # any ongoing connections may be disrupted briefly. + # Loadbalancing decisions will be reset, so any ongoing + # connections via a service may be loadbalanced to a different + # backend after restart. + clean-cilium-bpf-state: "true" +{{- end }} + +{{- if hasKey .Values.cni "customConf" }} + # Users who wish to specify their own custom CNI configuration file must set + # custom-cni-conf to "true", otherwise Cilium may overwrite the configuration. + custom-cni-conf: "{{ .Values.cni.customConf }}" +{{- end }} + +{{- if hasKey .Values "bpfClockProbe" }} + enable-bpf-clock-probe: {{ .Values.bpfClockProbe | quote }} +{{- else if eq $defaultBpfClockProbe "true" }} + enable-bpf-clock-probe: {{ $defaultBpfClockProbe | quote }} +{{- end }} + +{{- if hasKey .Values.bpf "tproxy" }} + enable-bpf-tproxy: {{ .Values.bpf.tproxy | quote }} +{{- else if eq $defaultBpfTProxy "true" }} + enable-bpf-tproxy: {{ $defaultBpfTProxy | quote }} +{{- end }} + # If you want cilium monitor to aggregate tracing for packets, set this level + # to "low", "medium", or "maximum". The higher the level, the less packets + # that will be seen in monitor output. + monitor-aggregation: {{ .Values.bpf.monitorAggregation }} + + # The monitor aggregation interval governs the typical time between monitor + # notification events for each allowed connection. + # + # Only effective when monitor aggregation is set to "medium" or higher. + monitor-aggregation-interval: {{ .Values.bpf.monitorInterval }} + + # The monitor aggregation flags determine which TCP flags which, upon the + # first observation, cause monitor notifications to be generated. + # + # Only effective when monitor aggregation is set to "medium" or higher. + monitor-aggregation-flags: {{ .Values.bpf.monitorFlags }} + + + + +{{- if hasKey .Values.bpf "mapDynamicSizeRatio" }} + # Specifies the ratio (0.0-1.0) of total system memory to use for dynamic + # sizing of the TCP CT, non-TCP CT, NAT and policy BPF maps. + bpf-map-dynamic-size-ratio: {{ .Values.bpf.mapDynamicSizeRatio | quote }} +{{- else if ne $defaultBpfMapDynamicSizeRatio 0.0 }} + # Specifies the ratio (0.0-1.0) of total system memory to use for dynamic + # sizing of the TCP CT, non-TCP CT, NAT and policy BPF maps. + bpf-map-dynamic-size-ratio: {{ $defaultBpfMapDynamicSizeRatio | quote }} +{{- end }} + +{{- if hasKey .Values.bpf "hostRouting" }} + enable-host-legacy-routing: {{ .Values.bpf.hostRouting | quote }} +{{- end }} + +{{- if or $bpfCtTcpMax $bpfCtAnyMax }} + # bpf-ct-global-*-max specifies the maximum number of connections + # supported across all endpoints, split by protocol: tcp or other. One pair + # of maps uses these values for IPv4 connections, and another pair of maps + # use these values for IPv6 connections. + # + # If these values are modified, then during the next Cilium startup the + # tracking of ongoing connections may be disrupted. As a result, reply + # packets may be dropped and the load-balancing decisions for established + # connections may change. + # + # For users upgrading from Cilium 1.2 or earlier, to minimize disruption + # during the upgrade process, set bpf-ct-global-tcp-max to 1000000. +{{- if $bpfCtTcpMax }} + bpf-ct-global-tcp-max: {{ $bpfCtTcpMax | quote }} +{{- end }} +{{- if $bpfCtAnyMax }} + bpf-ct-global-any-max: {{ $bpfCtAnyMax | quote }} +{{- end }} +{{- end }} +{{- if hasKey .Values.bpf "natMax" }} + # bpf-nat-global-max specified the maximum number of entries in the + # BPF NAT table. + bpf-nat-global-max: "{{ .Values.bpf.natMax }}" +{{- end }} +{{- if hasKey .Values.bpf "neighMax" }} + # bpf-neigh-global-max specified the maximum number of entries in the + # BPF neighbor table. + bpf-neigh-global-max: "{{ .Values.bpf.neighMax }}" +{{- end }} +{{- if hasKey .Values.bpf "policyMapMax" }} + # bpf-policy-map-max specifies the maximum number of entries in endpoint + # policy map (per endpoint) + bpf-policy-map-max: "{{ .Values.bpf.policyMapMax }}" +{{- end }} +{{- if hasKey .Values.bpf "lbMapMax" }} + # bpf-lb-map-max specifies the maximum number of entries in bpf lb service, + # backend and affinity maps. + bpf-lb-map-max: "{{ .Values.bpf.lbMapMax }}" +{{- end }} + # 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; + # users who are sensitive to latency may consider setting this to "true". + # + # This option was introduced in Cilium 1.4. Cilium 1.3 and earlier ignore + # this option and behave as though it is set to "true". + # + # If this value is modified, then during the next Cilium startup the restore + # of existing endpoints and tracking of ongoing connections may be disrupted. + # As a result, reply packets may be dropped and the load-balancing decisions + # for established connections may change. + # + # If this option is set to "false" during an upgrade from 1.3 or earlier to + # 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 }} + +{{- if hasKey .Values.cluster "id" }} + # Unique ID of the cluster. Must be unique across all conneted clusters and + # in the range of 1 and 255. Only relevant when building a mesh of clusters. + cluster-id: "{{ .Values.cluster.id }}" +{{- end }} + + # Encapsulation mode for communication between nodes + # Possible values: + # - disabled + # - vxlan (default) + # - geneve +{{- if .Values.gke.enabled }} + tunnel: "disabled" + enable-endpoint-routes: "true" + enable-local-node-route: "false" +{{- else }} + tunnel: {{ .Values.tunnel }} +{{- end }} + +{{- if .Values.eni }} + enable-endpoint-routes: "true" + auto-create-cilium-node-resource: "true" +{{- end }} + +{{- if .Values.azure.enabled }} + enable-endpoint-routes: "true" + auto-create-cilium-node-resource: "true" + enable-local-node-route: "false" +{{- if .Values.azure.userAssignedIdentityID }} + azure-user-assigned-identity-id: {{ .Values.azure.userAssignedIdentityID | quote }} +{{- end }} +{{- end }} + +{{- if .Values.flannel.enabled }} + # Interface to be used when running Cilium on top of a CNI plugin. + # For flannel, use "cni0" + flannel-master-device: {{ .Values.flannel.masterDevice }} + + # When running Cilium with policy enforcement enabled on top of a CNI plugin + # the BPF programs will be installed on the network interface specified in + # 'flannel-master-device' and on all network interfaces belonging to + # a container. When the Cilium DaemonSet is removed, the BPF programs will + # be kept in the interfaces unless this option is set to "true". + flannel-uninstall-on-exit: "{{ .Values.flannel.uninstallOnExit}}" +{{- end }} + +{{- if hasKey .Values "l7Proxy" }} + # Enables L7 proxy for L7 policy enforcement and visibility + enable-l7-proxy: {{ .Values.l7Proxy | quote }} +{{- end }} + + # wait-bpf-mount makes init container wait until bpf filesystem is mounted + wait-bpf-mount: "{{ .Values.bpf.waitForMount }}" + +{{- if ne .Values.cni.chainingMode "none" }} + # Enable chaining with another CNI plugin + # + # Supported modes: + # - none + # - aws-cni + # - flannel + # - portmap (Enables HostPort support for Cilium) + cni-chaining-mode: {{ .Values.cni.chainingMode }} + +{{- if hasKey .Values "enableIdentityMark" }} + enable-identity-mark: {{ .Values.enableIdentityMark | quote }} +{{- else if (ne $enableIdentityMark "true") }} + enable-identity-mark: "false" +{{- end }} +{{- if ne .Values.cni.chainingMode "portmap" }} + # Disable the PodCIDR route to the cilium_host interface as it is not + # required. While chaining, it is the responsibility of the underlying plugin + # to enable routing. + enable-local-node-route: "false" +{{- end }} +{{- end }} + + masquerade: {{ .Values.masquerade | quote }} +{{- if hasKey .Values.bpf "masquerade" }} + enable-bpf-masquerade: {{ .Values.bpf.masquerade | quote }} +{{- else if eq $defaultBpfMasquerade "true" }} + enable-bpf-masquerade: {{ $defaultBpfMasquerade | quote }} +{{- end }} +{{- if hasKey .Values "egressMasqueradeInterfaces" }} + egress-masquerade-interfaces: {{ .Values.egressMasqueradeInterfaces }} +{{- end }} +{{- if and .Values.ipMasqAgent .Values.ipMasqAgent.enabled }} + enable-ip-masq-agent: "true" +{{- end }} + +{{- if .Values.encryption.enabled }} + enable-ipsec: {{ .Values.encryption.enabled | quote }} + ipsec-key-file: {{ .Values.encryption.mountPath }}/{{ .Values.encryption.keyFile }} +{{- if hasKey .Values.encryption "interface" }} + encrypt-interface: {{ .Values.encryption.interface }} +{{- end }} +{{- if .Values.encryption.nodeEncryption }} + encrypt-node: {{ .Values.encryption.nodeEncryption | quote }} +{{- end }} +{{- end }} +{{- if hasKey .Values "datapathMode" }} +{{- if eq .Values.datapathMode "ipvlan" }} + datapath-mode: ipvlan + ipvlan-master-device: {{ .Values.ipvlan.masterDevice }} +{{- end }} +{{- end }} + + enable-xt-socket-fallback: {{ .Values.enableXTSocketFallback | quote }} + install-iptables-rules: {{ .Values.installIptablesRules | quote }} + +{{- if hasKey .Values "iptablesRandomFully" }} + iptables-random-fully: {{ .Values.iptablesRandomFully | quote }} +{{- end }} + +{{- if hasKey .Values "iptablesLockTimeout" }} + iptables-lock-timeout: {{ .Values.iptablesLockTimeout | quote }} +{{- end }} + + auto-direct-node-routes: {{ .Values.autoDirectNodeRoutes | quote }} + enable-bandwidth-manager: {{ .Values.bandwidthManager | quote }} + +{{- if hasKey .Values "localRedirectPolicy" }} + enable-local-redirect-policy: {{ .Values.localRedirectPolicy | quote }} +{{- end }} + +{{- if hasKey .Values "nativeRoutingCIDR" }} + native-routing-cidr: {{ .Values.nativeRoutingCIDR }} +{{- end }} + +{{- if hasKey .Values "fragmentTracking" }} + enable-ipv4-fragment-tracking: {{ .Values.fragmentTracking | quote }} +{{- else if (ne $fragmentTracking "true") }} + enable-ipv4-fragment-tracking: "false" +{{- end }} + +{{- if .Values.hostFirewall }} + enable-host-firewall: {{ .Values.hostFirewall | quote }} +{{- end}} + +{{- if hasKey .Values "devices" }} + # List of devices used to attach bpf_host.o (implements BPF NodePort, + # host-firewall and BPF masquerading) + devices: {{ join " " .Values.devices | quote }} +{{- end }} + +{{- if hasKey .Values "kubeProxyReplacement" }} + kube-proxy-replacement: {{ .Values.kubeProxyReplacement | quote }} +{{- if ne .Values.kubeProxyReplacement "disabled" }} + kube-proxy-replacement-healthz-bind-address: {{ default "" .Values.kubeProxyReplacementHealthzBindAddr | quote}} +{{- end }} +{{- end }} +{{- if hasKey .Values "hostServices" }} +{{- if .Values.hostServices.enabled }} + enable-host-reachable-services: {{ .Values.hostServices.enabled | quote }} +{{- end }} +{{- if ne .Values.hostServices.protocols "tcp,udp" }} + host-reachable-services-protos: {{ .Values.hostServices.protocols }} +{{- end }} +{{- end }} +{{- if hasKey .Values "hostPort" }} +{{- if eq .Values.kubeProxyReplacement "partial" }} + enable-host-port: {{ .Values.hostPort.enabled | quote }} +{{- end }} +{{- end }} +{{- if hasKey .Values "externalIPs" }} +{{- if eq .Values.kubeProxyReplacement "partial" }} + enable-external-ips: {{ .Values.externalIPs.enabled | quote }} +{{- end }} +{{- end }} +{{- if hasKey .Values "nodePort" }} +{{- if eq .Values.kubeProxyReplacement "partial" }} + enable-node-port: {{ .Values.nodePort.enabled | quote }} +{{- end }} +{{- if hasKey .Values.nodePort "range" }} + node-port-range: {{ .Values.nodePort.range | quote }} +{{- end }} +{{- if hasKey .Values.nodePort "directRoutingDevice" }} + direct-routing-device: {{ .Values.nodePort.directRoutingDevice | quote }} +{{- end }} +{{- if .Values.nodePort.enableHealthCheck }} + enable-health-check-nodeport: {{ .Values.nodePort.enableHealthCheck | quote}} +{{- end }} + node-port-bind-protection: {{ .Values.nodePort.bindProtection | quote }} + enable-auto-protect-node-port-range: {{ .Values.nodePort.autoProtectPortRange | quote }} +{{- end }} +{{- if hasKey .Values "loadBalancer" }} +{{- if hasKey .Values.loadBalancer "mode" }} + node-port-mode: {{ .Values.loadBalancer.mode | quote }} +{{- end }} +{{- if hasKey .Values.loadBalancer "algorithm" }} + bpf-lb-algorithm: {{ .Values.loadBalancer.algorithm | quote }} +{{- end }} +{{- if hasKey .Values.loadBalancer "acceleration" }} + node-port-acceleration: {{ .Values.loadBalancer.acceleration | quote }} +{{- end }} +{{- end }} +{{- if hasKey .Values.maglev "tableSize" }} + bpf-lb-maglev-table-size: {{ .Values.maglev.tableSize | quote}} +{{- end }} +{{- if hasKey .Values.maglev "hashSeed" }} + bpf-lb-maglev-hash-seed: {{ .Values.maglev.hashSeed | quote}} +{{- end }} +{{- if .Values.sessionAffinity }} + enable-session-affinity: {{ .Values.sessionAffinity | quote }} +{{- else if eq $defaultSessionAffinity "true" }} + enable-session-affinity: {{ $defaultSessionAffinity | quote }} +{{- end }} +{{- if .Values.svcSourceRangeCheck }} + enable-svc-source-range-check: {{ .Values.svcSourceRangeCheck | quote }} +{{- end }} + +{{- if and .Values.pprof .Values.pprof.enabled }} + pprof: {{ .Values.pprof.enabled | quote }} +{{- end }} +{{- if .Values.logSystemLoad }} + log-system-load: {{ .Values.logSystemLoad | quote }} +{{- end }} +{{- if .Values.logOptions }} + log-opt: {{ .Values.logOptions | toJson | quote }} +{{- end }} +{{- if and .Values.sockops .Values.sockops.enabled }} + sockops-enable: {{ .Values.sockops.enabled | quote }} +{{- end }} +{{- if hasKey .Values.k8s "requireIPv4PodCIDR" }} + k8s-require-ipv4-pod-cidr: {{ .Values.k8s.requireIPv4PodCIDR | quote }} +{{- end }} +{{- if hasKey .Values.k8s "requireIPv6PodCIDR" }} + k8s-require-ipv6-pod-cidr: {{ .Values.k8s.requireIPv6PodCIDR | quote }} +{{- end }} +{{- if and .Values.endpointRoutes .Values.endpointRoutes.enabled }} + enable-endpoint-routes: {{ .Values.endpointRoutes.enabled | quote }} +{{- end }} +{{- if .Values.cni.configMap }} + read-cni-conf: {{ .Values.cni.confFileMountPath }}/{{ .Values.cni.configMapKey }} + write-cni-conf-when-ready: {{ .Values.cni.hostConfDirMountPath }}/05-cilium.conflist +{{- else if .Values.cni.readCniConf }} + read-cni-conf: {{ .Values.cni.readCniConf }} +{{- end }} +{{- if .Values.kubeConfigPath }} + k8s-kubeconfig-path: {{ .Values.kubeConfigPath | quote }} +{{- end }} +{{- if and ( .Values.endpointHealthChecking.enabled ) (or (eq .Values.cni.chainingMode "portmap") (eq .Values.cni.chainingMode "none")) }} + enable-endpoint-health-checking: "true" +{{- else}} + # Disable health checking, when chaining mode is not set to portmap or none + enable-endpoint-health-checking: "false" +{{- end }} +{{- if hasKey .Values "healthChecking" }} + enable-health-checking: {{ .Values.healthChecking | quote }} +{{- end }} +{{- if .Values.etcd.managed }} + enable-well-known-identities: "true" +{{- else }} + enable-well-known-identities: "false" +{{- end }} + enable-remote-node-identity: {{ .Values.remoteNodeIdentity | quote }} + +{{- if hasKey .Values "synchronizeK8sNodes" }} + synchronize-k8s-nodes: {{ .Values.synchronizeK8sNodes | quote }} +{{- end }} + +{{- if hasKey .Values "policyAuditMode" }} + policy-audit-mode: {{ .Values.policyAuditMode | quote }} +{{- end }} + +{{- if ne $defaultOperatorApiServeAddr "localhost:9234" }} + operator-api-serve-addr: {{ $defaultOperatorApiServeAddr | quote }} +{{- end }} + +{{- if .Values.hubble.enabled }} + # Enable Hubble gRPC service. + enable-hubble: {{ .Values.hubble.enabled | quote }} + # UNIX domain socket for Hubble server to listen to. + hubble-socket-path: {{ .Values.hubble.socketPath | quote }} +{{- if hasKey .Values.hubble "eventQueueSize" }} + # Buffer size of the channel for Hubble to receive monitor events. If this field is not set, + # the buffer size is set to the default monitor queue size. + hubble-event-queue-size: {{ .Values.hubble.eventQueueSize | quote }} +{{- end }} +{{- if hasKey .Values.hubble "flowBufferSize" }} + # Size of the buffer to store recent flows. + hubble-flow-buffer-size: {{ .Values.hubble.flowBufferSize | quote }} +{{- end }} +{{- if .Values.hubble.metrics.enabled }} + # 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 }}" + # A space separated list of metrics to enable. See [0] for available metrics. + # + # https://github.com/cilium/hubble/blob/master/Documentation/metrics.md + hubble-metrics: {{- range .Values.hubble.metrics.enabled }} + {{.}} +{{- end }} +{{- end }} +{{- if hasKey .Values.hubble "listenAddress" }} + # An additional address for Hubble server to listen to (e.g. ":4244"). + hubble-listen-address: {{ .Values.hubble.listenAddress | quote }} +{{- if .Values.hubble.tls.enabled }} + hubble-disable-tls: "false" + hubble-tls-cert-file: /var/lib/cilium/tls/hubble/server.crt + hubble-tls-key-file: /var/lib/cilium/tls/hubble/server.key + hubble-tls-client-ca-files: /var/lib/cilium/tls/hubble/client-ca.crt +{{- else }} + hubble-disable-tls: "true" +{{- end }} +{{- end }} +{{- end }} +{{- if hasKey .Values "disableIptablesFeederRules" }} + # A space separated list of iptables chains to disable when installing feeder rules. + disable-iptables-feeder-rules: {{ .Values.disableIptablesFeederRules | join " " | quote }} +{{- end }} + ipam: {{ $ipam | quote }} + +{{- if eq $ipam "cluster-pool" }} +{{- if .Values.ipv4.enabled }} + cluster-pool-ipv4-cidr: {{ .Values.ipam.operator.clusterPoolIPv4PodCIDR | quote }} + cluster-pool-ipv4-mask-size: {{ .Values.ipam.operator.clusterPoolIPv4MaskSize | quote }} +{{- end }} +{{- if .Values.ipv6.enabled }} + cluster-pool-ipv6-cidr: {{ .Values.ipam.operator.clusterPoolIPv6PodCIDR | quote }} + cluster-pool-ipv6-mask-size: {{ .Values.ipam.operator.clusterPoolIPv6MaskSize | quote }} +{{- end }} +{{- end }} + +{{- if .Values.enableCnpStatusUpdates }} + disable-cnp-status-updates: {{ (not .Values.enableCnpStatusUpdates) | quote }} +{{- else if (eq $defaultEnableCnpStatusUpdates "false") }} + disable-cnp-status-updates: "true" +{{- end }} + +{{- if hasKey .Values "crdWaitTimeout" }} + crd-wait-timeout: {{ .Values.crdWaitTimeout | quote }} +{{- else if ( ne $crdWaitTimeout "5m" ) }} + crd-wait-timeout: {{ $crdWaitTimeout | quote }} +{{- end }} + +{{- if .Values.enableK8sEndpointSlice }} + enable-k8s-endpoint-slice: {{ .Values.enableK8sEndpointSlice | quote }} +{{- end }} + +{{- if hasKey .Values.k8s "serviceProxyName" }} + # Configure service proxy name for Cilium. + k8s-service-proxy-name: {{ .Values.k8s.serviceProxyName | quote }} +{{- end }} + +{{- if .Values.extraConfig }} +{{ toYaml .Values.extraConfig | indent 2 }} +{{- end }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-etcd-operator-clusterrole.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-etcd-operator-clusterrole.yaml new file mode 100755 index 0000000..d702793 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-etcd-operator-clusterrole.yaml @@ -0,0 +1,73 @@ +{{- if .Values.etcd.managed }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: cilium-etcd-operator +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 }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-etcd-operator-clusterrolebinding.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-etcd-operator-clusterrolebinding.yaml new file mode 100755 index 0000000..a3fa723 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-etcd-operator-clusterrolebinding.yaml @@ -0,0 +1,14 @@ +{{- if .Values.etcd.managed }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: cilium-etcd-operator +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: cilium-etcd-operator +subjects: +- kind: ServiceAccount + name: cilium-etcd-operator + namespace: {{ .Release.Namespace }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-etcd-operator-deployment.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-etcd-operator-deployment.yaml new file mode 100755 index 0000000..3a816d0 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-etcd-operator-deployment.yaml @@ -0,0 +1,86 @@ +{{- if .Values.etcd.managed }} +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + io.cilium/app: etcd-operator + name: cilium-etcd-operator + name: cilium-etcd-operator + namespace: {{ .Release.Namespace }} +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 + name: cilium-etcd-operator + spec: +{{- if .Values.etcd.affinity }} + affinity: +{{ toYaml .Values.etcd.affinity | indent 8 }} +{{- end }} +{{- if .Values.imagePullSecrets }} + imagePullSecrets: + {{ toYaml .Values.imagePullSecrets | indent 8 }} +{{- end }} + containers: + - args: + #- --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: {{ template "system_default_registry" . }}{{ .Values.etcd.image.repository }}:{{ .Values.etcd.image.tag }} + imagePullPolicy: {{ .Values.etcd.image.pullPolicy }} + name: cilium-etcd-operator + dnsPolicy: ClusterFirst + hostNetwork: true +{{- if and (or (and (eq .Release.Namespace "kube-system") (gt .Capabilities.KubeVersion.Minor "10")) (ge .Capabilities.KubeVersion.Minor "17") (gt .Capabilities.KubeVersion.Major "1")) .Values.enableCriticalPriorityClass }} + priorityClassName: system-cluster-critical +{{- end }} + restartPolicy: Always + serviceAccount: cilium-etcd-operator + serviceAccountName: cilium-etcd-operator +{{- with .Values.etcd.nodeSelector }} + nodeSelector: + {{- toYaml . | trim | nindent 8 }} +{{- end }} +{{- with .Values.tolerations }} + tolerations: + {{- toYaml . | trim | nindent 6 }} +{{- end }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-etcd-operator-serviceaccount.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-etcd-operator-serviceaccount.yaml new file mode 100755 index 0000000..fb454b3 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-etcd-operator-serviceaccount.yaml @@ -0,0 +1,13 @@ +{{- if .Values.etcd.managed }} +{{- if .Values.serviceAccounts.etcd.create }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: cilium-etcd-operator + namespace: {{ .Release.Namespace }} + {{- if .Values.serviceAccounts.etcd.annotations }} + annotations: +{{ toYaml .Values.serviceAccounts.etcd.annotations | indent 4 }} + {{- end }} +{{- end }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-nodeinit-daemonset.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-nodeinit-daemonset.yaml new file mode 100755 index 0000000..9d79604 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-nodeinit-daemonset.yaml @@ -0,0 +1,269 @@ +{{- if .Values.nodeinit.enabled }} +kind: DaemonSet +apiVersion: apps/v1 +metadata: + name: cilium-node-init + namespace: {{ .Release.Namespace }} + labels: + app: cilium-node-init +spec: + selector: + matchLabels: + app: cilium-node-init + template: + metadata: + annotations: +{{- with .Values.nodeinit.podAnnotations }} + {{- toYaml . | nindent 8 }} +{{- end }} + labels: + app: cilium-node-init + spec: +{{- with .Values.tolerations }} + tolerations: + {{- toYaml . | trim | nindent 6 }} +{{- end }} + hostPID: true + hostNetwork: true +{{- if and (or (and (eq .Release.Namespace "kube-system") (gt .Capabilities.KubeVersion.Minor "10")) (ge .Capabilities.KubeVersion.Minor "17") (gt .Capabilities.KubeVersion.Major "1")) .Values.enableCriticalPriorityClass }} + priorityClassName: system-node-critical +{{- end }} +{{- if .Values.imagePullSecrets }} + imagePullSecrets: + {{ toYaml .Values.imagePullSecrets | indent 6 }} +{{- end }} + containers: + - name: node-init + image: {{ template "system_default_registry" . }}{{ .Values.nodeinit.image.repository }}:{{ .Values.nodeinit.image.tag }} + imagePullPolicy: {{ .Values.nodeinit.image.pullPolicy }} + securityContext: + privileged: true +{{- if .Values.nodeinit.revertReconfigureKubelet }} + lifecycle: + preStop: + exec: + command: + - "nsenter" + - "-t" + - "1" + - "-m" + - "--" + - "/bin/sh" + - "-c" + - | + #!/bin/bash + + set -o errexit + set -o pipefail + set -o nounset + + if stat /tmp/node-deinit.cilium.io > /dev/null 2>&1; then + exit 0 + fi + + echo "Waiting on pods to stop..." + if [ ! -f /etc/crictl.yaml ] || grep -q 'docker' /etc/crictl.yaml; then + # Works for COS, ubuntu + while docker ps | grep -v "node-init" | grep -q "POD_cilium"; do sleep 1; done + else + # COS-beta (with containerd) + while crictl ps | grep -v "node-init" | grep -q "POD_cilium"; do sleep 1; done + fi + + systemctl disable sys-fs-bpf.mount || true + systemctl stop sys-fs-bpf.mount || true + + if ip link show cilium_host; then + echo "Deleting cilium_host interface..." + ip link del cilium_host + fi + +{{- if not (eq .Values.nodeinit.bootstrapFile "") }} + rm -f {{ .Values.nodeinit.bootstrapFile }} +{{- end }} + + rm -f /tmp/node-init.cilium.io + touch /tmp/node-deinit.cilium.io + +{{- if .Values.nodeinit.reconfigureKubelet }} + echo "Changing kubelet configuration to --network-plugin=kubenet" + sed -i "s:--network-plugin=cni\ --cni-bin-dir={{ .Values.cni.binPath }}:--network-plugin=kubenet:g" /etc/default/kubelet + echo "Restarting kubelet..." + systemctl restart kubelet +{{- end }} + +{{- if (and .Values.gke.enabled (or .Values.masquerade .Values.gke.disableDefaultSnat))}} + # If the IP-MASQ chain exists, add back default jump rule from the GKE instance configure script + if iptables -w -t nat -L IP-MASQ > /dev/null; then + iptables -w -t nat -A POSTROUTING -m comment --comment "ip-masq: ensure nat POSTROUTING directs all non-LOCAL destination traffic to our custom IP-MASQ chain" -m addrtype ! --dst-type LOCAL -j IP-MASQ + fi +{{- end }} + + echo "Node de-initialization complete" +{{- end }} + env: + - name: CHECKPOINT_PATH + value: /tmp/node-init.cilium.io + # STARTUP_SCRIPT is the script run on node bootstrap. Node + # bootstrapping can be customized in this script. This script is invoked + # using nsenter, so it runs in the host's network and mount namespace using + # the host's userland tools! + - name: STARTUP_SCRIPT + value: | + #!/bin/bash + + set -o errexit + set -o pipefail + set -o nounset + + mount | grep "/sys/fs/bpf type bpf" || { + # Mount the filesystem until next reboot + echo "Mounting BPF filesystem..." + mount bpffs /sys/fs/bpf -t bpf + + # Configure systemd to mount after next boot + echo "Installing BPF filesystem mount" + cat >/tmp/sys-fs-bpf.mount < {{ .Values.nodeinit.bootstrapFile }} +{{- end }} + +{{- if .Values.nodeinit.restartPods }} + echo "Restarting kubenet managed pods" + if [ ! -f /etc/crictl.yaml ] || grep -q 'docker' /etc/crictl.yaml; then + # Works for COS, ubuntu + # Note the first line is the containerID with a trailing \r + for f in `find /var/lib/cni/networks/ -type f ! -name lock ! -name last_reserved_ip.0`; do docker rm -f "$(sed 's/\r//;1q' $f)" || true; done + elif [ -n "$(docker ps --format '{{ "{{" }}.Image{{ "}}" }}' | grep ^[0-9]*\.dkr\.ecr\.[a-z]*-[a-z]*-[0-9]*\.amazonaws\.com/amazon-k8s-cni)" ]; then + timeout=1 + for i in $(seq 1 7); do + echo "Checking introspection API" + curl localhost:61679 && retry=false || retry=true + if [ $retry == false ]; then break ; fi + sleep "$timeout" + timeout=$(($timeout * 2)) + done + + for pod in $(curl "localhost:61679/v1/pods" 2> /dev/null | jq -r '. | keys[]'); do + container_id=$(echo "$pod" | awk -F_ ' { print $3 } ' | cut -c1-12) + echo "Restarting ${container_id}" + docker kill "${container_id}" || true + done + else + # COS-beta (with containerd) + for f in `find /var/lib/cni/networks/ -type f ! -name lock ! -name last_reserved_ip.0`; do crictl stopp $(cat $f) || true; done + fi +{{- end }} + + # AKS: If azure-vnet is installed on the node, and (still) configured in bridge mode, + # configure it as 'transparent' to be consistent with Cilium's CNI chaining config. + # If the azure-vnet CNI config is not removed, kubelet will execute CNI CHECK commands + # against it every 5 seconds and write 'bridge' to its state file, causing inconsistent + # behaviour when Pods are removed. + if [ -f /etc/cni/net.d/10-azure.conflist ]; then + echo "Ensuring azure-vnet is configured in 'transparent' mode..." + sed -i 's/"mode":\s*"bridge"/"mode":"transparent"/g' /etc/cni/net.d/10-azure.conflist + fi + +{{- if .Values.azure.enabled }} + # The azure0 interface being present means the node was booted with azure-vnet configured + # in bridge mode. This means there might be ebtables rules and neight entries interfering + # with pod connectivity if we deploy with Azure IPAM. + if ip l show dev azure0 >/dev/null 2>&1; then + + # In Azure IPAM mode, also remove the azure-vnet state file, otherwise ebtables rules get + # restored by the azure-vnet CNI plugin on every CNI CHECK, which can cause connectivity + # issues in Cilium-managed Pods. Since azure-vnet is no longer called on scheduling events, + # this file can be removed. + rm -f /var/run/azure-vnet.json + + # This breaks connectivity for existing workload Pods when Cilium is scheduled, but we need + # to flush these to prevent Cilium-managed Pod IPs conflicting with Pod IPs previously allocated + # by azure-vnet. These ebtables DNAT rules contain fixed MACs that are no longer bound on the node, + # causing packets for these Pods to be redirected back out to the gateway, where they are dropped. + echo 'Flushing ebtables pre/postrouting rules in nat table.. (disconnecting non-Cilium Pods!)' + ebtables -t nat -F PREROUTING || true + ebtables -t nat -F POSTROUTING || true + + # ip-masq-agent periodically injects PERM neigh entries towards the gateway + # for all other k8s nodes in the cluster. These are safe to flush, as ARP can + # resolve these nodes as usual. PERM entries will be automatically restored later. + echo 'Deleting all permanent neighbour entries on azure0...' + ip neigh show dev azure0 nud permanent | cut -d' ' -f1 | xargs -r -n1 ip neigh del dev azure0 to || true + fi +{{- end }} + +{{- if .Values.nodeinit.revertReconfigureKubelet }} + rm -f /tmp/node-deinit.cilium.io +{{- end }} + echo "Node initialization complete" +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-operator-clusterrole.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-operator-clusterrole.yaml new file mode 100755 index 0000000..55252fa --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-operator-clusterrole.yaml @@ -0,0 +1,90 @@ +{{- if .Values.operator.enabled }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: cilium-operator +rules: +- apiGroups: + - "" + resources: + # to automatically delete [core|kube]dns pods so that are starting to being + # managed by Cilium + - pods + verbs: + - get + - list + - watch + - delete +- apiGroups: + - discovery.k8s.io + resources: + - endpointslices + verbs: + - get + - list + - watch +- apiGroups: + - "" + resources: + # to perform the translation of a CNP that contains `ToGroup` to its endpoints + - services + - endpoints + # to check apiserver connectivity + - namespaces + verbs: + - get + - list + - watch +- apiGroups: + - cilium.io + resources: + - ciliumnetworkpolicies + - ciliumnetworkpolicies/status + - ciliumnetworkpolicies/finalizers + - ciliumclusterwidenetworkpolicies + - ciliumclusterwidenetworkpolicies/status + - ciliumclusterwidenetworkpolicies/finalizers + - ciliumendpoints + - ciliumendpoints/status + - ciliumendpoints/finalizers + - ciliumnodes + - ciliumnodes/status + - ciliumnodes/finalizers + - ciliumidentities + - ciliumidentities/status + - ciliumidentities/finalizers + - ciliumlocalredirectpolicies + - ciliumlocalredirectpolicies/status + - ciliumlocalredirectpolicies/finalizers + verbs: + - '*' +- apiGroups: + - apiextensions.k8s.io + resources: + - customresourcedefinitions + verbs: + - create + - get + - list + - update + - watch +# For cilium-operator running in HA mode. +# +# Cilium operator running in HA mode requires the use of ResourceLock for Leader Election +# between mulitple running instances. +# The preferred way of doing this is to use LeasesResourceLock as edits to Leases are less +# common and fewer objects in the cluster watch "all Leases". +# The support for leases was introduced in coordination.k8s.io/v1 during Kubernetes 1.14 release. +# In Cilium we currently don't support HA mode for K8s version < 1.14. This condition make sure +# that we only authorize access to leases resources in supported K8s versions. +{{- if or (ge .Capabilities.KubeVersion.Minor "14") (gt .Capabilities.KubeVersion.Major "1") }} +- apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - create + - get + - update +{{- end }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-operator-clusterrolebinding.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-operator-clusterrolebinding.yaml new file mode 100755 index 0000000..2cc2152 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-operator-clusterrolebinding.yaml @@ -0,0 +1,14 @@ +{{- if .Values.operator.enabled }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: cilium-operator +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: cilium-operator +subjects: +- kind: ServiceAccount + name: cilium-operator + namespace: {{ .Release.Namespace }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-operator-deployment.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-operator-deployment.yaml new file mode 100755 index 0000000..01db6b4 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-operator-deployment.yaml @@ -0,0 +1,255 @@ +{{- if .Values.operator.enabled }} +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + io.cilium/app: operator + name: cilium-operator + name: cilium-operator + namespace: {{ .Release.Namespace }} +spec: + # We support HA mode only for Kubernetes version > 1.14 + # See docs on ServerCapabilities.LeasesResourceLock in file pkg/k8s/version/version.go + # for more details. +{{- if or (ge .Capabilities.KubeVersion.Minor "14") (gt .Capabilities.KubeVersion.Major "1") }} + replicas: {{ .Values.operator.replicas }} +{{- else }} + replicas: 1 +{{- end }} + selector: + matchLabels: + io.cilium/app: operator + name: cilium-operator +{{- with .Values.operator.updateStrategy }} + strategy: + {{- toYaml . | trim | nindent 4 }} +{{- end }} + template: + metadata: + annotations: +{{- if .Values.operator.rollOutPods }} + # ensure pods roll when configmap updates + cilium.io/cilium-configmap-checksum: {{ include (print $.Template.BasePath "/cilium-configmap.yaml") . | sha256sum | quote }} +{{- end }} +{{- if and .Values.operator.prometheus.enabled (not .Values.operator.prometheus.serviceMonitor.enabled) }} + prometheus.io/port: {{ .Values.operator.prometheus.port | quote }} + prometheus.io/scrape: "true" +{{- end }} +{{- with .Values.operator.podAnnotations }} + {{- toYaml . | nindent 8 }} +{{- end }} + labels: + io.cilium/app: operator + name: cilium-operator + spec: +{{- if or (ge .Capabilities.KubeVersion.Minor "14") (gt .Capabilities.KubeVersion.Major "1") }} + # In HA mode, cilium-operator pods must not be scheduled on the same + # node as they will clash with each other. + {{- if .Values.operator.affinity }} + affinity: + {{- toYaml .Values.operator.affinity | trim | nindent 8 }} + {{- end }} +{{- end }} +{{- if .Values.imagePullSecrets }} + imagePullSecrets: +{{ toYaml .Values.imagePullSecrets | indent 6 }} +{{- end }} + containers: + - args: + - --config-dir=/tmp/cilium/config-map + - --debug=$(CILIUM_DEBUG) + command: +{{- if .Values.eni }} + - cilium-operator-aws +{{- else if .Values.azure.enabled }} + - cilium-operator-azure +{{- else }} + - cilium-operator-generic +{{- end }} + env: + - name: K8S_NODE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: spec.nodeName + - name: CILIUM_K8S_NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + - name: CILIUM_DEBUG + valueFrom: + configMapKeyRef: + key: debug + name: cilium-config + optional: true +{{- if .Values.eni }} + - name: AWS_ACCESS_KEY_ID + valueFrom: + secretKeyRef: + key: AWS_ACCESS_KEY_ID + name: cilium-aws + optional: true + - name: AWS_SECRET_ACCESS_KEY + valueFrom: + secretKeyRef: + key: AWS_SECRET_ACCESS_KEY + name: cilium-aws + optional: true + - name: AWS_DEFAULT_REGION + valueFrom: + secretKeyRef: + key: AWS_DEFAULT_REGION + name: cilium-aws + optional: true +{{- end }} +{{- if .Values.k8sServiceHost }} + - name: KUBERNETES_SERVICE_HOST + value: {{ .Values.k8sServiceHost | quote }} +{{- end }} +{{- if .Values.k8sServicePort }} + - name: KUBERNETES_SERVICE_PORT + value: {{ .Values.k8sServicePort | quote }} +{{- end }} +{{- if .Values.azure.subscriptionID }} + - name: AZURE_SUBSCRIPTION_ID + value: {{ .Values.azure.subscriptionID }} +{{- end }} +{{- if .Values.azure.tenantID }} + - name: AZURE_TENANT_ID + value: {{ .Values.azure.tenantID }} +{{- end }} +{{- if .Values.azure.resourceGroup }} + - name: AZURE_RESOURCE_GROUP + value: {{ .Values.azure.resourceGroup }} +{{- end }} +{{- if .Values.azure.clientID }} + - name: AZURE_CLIENT_ID + value: {{ .Values.azure.clientID }} +{{- end }} +{{- if .Values.azure.clientSecret }} + - name: AZURE_CLIENT_SECRET + value: {{ .Values.azure.clientSecret }} +{{- end }} +{{- range $key, $value := .Values.operator.extraEnv }} + - name: {{ $key }} + value: {{ $value }} +{{- end }} +{{- if .Values.eni }} + image: {{ template "system_default_registry" . }}{{ .Values.operator.image.repository }}-aws:{{ .Values.operator.image.tag }} +{{- else if .Values.azure.enabled }} + image: {{ template "system_default_registry" . }}{{ .Values.operator.image.repository }}-azure:{{ .Values.operator.image.tag }} +{{- else }} + image: {{ template "system_default_registry" . }}{{ .Values.operator.image.repository }}-generic:{{ .Values.operator.image.tag }} +{{- end }} + imagePullPolicy: {{ .Values.operator.image.pullPolicy }} + name: cilium-operator +{{- if .Values.operator.prometheus.enabled }} + ports: + - containerPort: {{ .Values.operator.prometheus.port }} + hostPort: {{ .Values.operator.prometheus.port }} + name: prometheus + protocol: TCP +{{- end }} + livenessProbe: + httpGet: +{{- if .Values.ipv4.enabled }} + host: '127.0.0.1' +{{- else }} + host: '::1' +{{- end }} + path: /healthz + port: 9234 + scheme: HTTP + initialDelaySeconds: 60 + periodSeconds: 10 + timeoutSeconds: 3 + volumeMounts: + - mountPath: /tmp/cilium/config-map + name: cilium-config-path + readOnly: true +{{- if .Values.etcd.enabled }} + - mountPath: /var/lib/etcd-config + name: etcd-config-path + readOnly: true +{{- if or .Values.etcd.ssl .Values.etcd.managed }} + - mountPath: /var/lib/etcd-secrets + name: etcd-secrets + readOnly: true +{{- end }} +{{- end }} +{{- if .Values.kubeConfigPath }} + - mountPath: {{ .Values.kubeConfigPath }} + name: kube-config + readOnly: true +{{- end }} +{{- range .Values.operator.extraHostPathMounts }} + - mountPath: {{ .mountPath }} + name: {{ .name }} + readOnly: {{ .readOnly }} +{{- if .mountPropagation }} + mountPropagation: {{ .mountPropagation }} +{{- end }} +{{- end }} +{{- if .Values.operator.resources }} + resources: + {{- toYaml .Values.operator.resources | trim | nindent 10 }} +{{- end }} + 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 +{{- end }} + restartPolicy: Always +{{- if and (or (and (eq .Release.Namespace "kube-system") (gt .Capabilities.KubeVersion.Minor "10")) (ge .Capabilities.KubeVersion.Minor "17") (gt .Capabilities.KubeVersion.Major "1")) .Values.enableCriticalPriorityClass }} + priorityClassName: system-cluster-critical +{{- end }} + serviceAccount: cilium-operator + serviceAccountName: cilium-operator +{{- with .Values.operator.nodeSelector }} + nodeSelector: + {{- toYaml . | trim | nindent 8 }} +{{- end }} +{{- with .Values.tolerations }} + tolerations: + {{- toYaml . | trim | nindent 6 }} +{{- end }} + volumes: + # To read the configuration from the config map + - configMap: + name: cilium-config + name: cilium-config-path +{{- if .Values.etcd.enabled }} + # To read the etcd config stored in config maps + - configMap: + defaultMode: 420 + items: + - key: etcd-config + path: etcd.config + name: cilium-config + name: etcd-config-path +{{- if or .Values.etcd.ssl .Values.etcd.managed }} + # To read the k8s etcd secrets in case the user might want to use TLS + - name: etcd-secrets + secret: + defaultMode: 420 + optional: true + secretName: cilium-etcd-secrets +{{- end }} +{{- end }} +{{- if .Values.kubeConfigPath }} + - hostPath: + path: {{ .Values.kubeConfigPath }} + type: FileOrCreate + name: kube-config +{{- end }} +{{- range .Values.operator.extraHostPathMounts }} + - name: {{ .name }} + hostPath: + path: {{ .hostPath }} +{{- if .hostPathType }} + type: {{ .hostPathType }} +{{- end }} +{{- end }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-operator-service.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-operator-service.yaml new file mode 100755 index 0000000..eb1dadd --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-operator-service.yaml @@ -0,0 +1,21 @@ +{{- if and (.Values.operator.enabled) (.Values.operator.prometheus.enabled) (.Values.operator.prometheus.serviceMonitor.enabled) }} +kind: Service +apiVersion: v1 +metadata: + name: cilium-operator + namespace: {{ .Release.Namespace }} + labels: + io.cilium/app: operator + name: cilium-operator +spec: + clusterIP: None + type: ClusterIP + ports: + - name: metrics + port: 6942 + protocol: TCP + targetPort: prometheus + selector: + io.cilium/app: operator + name: cilium-operator +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-operator-serviceaccount.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-operator-serviceaccount.yaml new file mode 100755 index 0000000..efee8c3 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-operator-serviceaccount.yaml @@ -0,0 +1,11 @@ +{{- if .Values.operator.enabled }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: cilium-operator + namespace: {{ .Release.Namespace }} + {{- if .Values.serviceAccounts.operator.annotations }} + annotations: +{{ toYaml .Values.serviceAccounts.operator.annotations | indent 4 }} + {{- end }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-operator-servicemonitor.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-operator-servicemonitor.yaml new file mode 100755 index 0000000..4c0ee7e --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-operator-servicemonitor.yaml @@ -0,0 +1,26 @@ +{{- if and (.Values.operator.enabled) (.Values.operator.prometheus.enabled) (.Values.operator.prometheus.serviceMonitor.enabled) }} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: cilium-operator + {{- if .Values.operator.prometheus.serviceMonitor.namespace }} + namespace: {{ .Values.operator.prometheus.serviceMonitor.namespace }} + {{- else }} + namespace: {{ .Release.Namespace }} + {{- end }} +spec: + selector: + matchLabels: + io.cilium/app: operator + name: cilium-operator + namespaceSelector: + matchNames: + - {{ .Release.Namespace }} + endpoints: + - port: metrics + interval: 10s + honorLabels: true + path: /metrics + targetLabels: + - io.cilium/app +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-preflight-clusterrole.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-preflight-clusterrole.yaml new file mode 100755 index 0000000..593e758 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-preflight-clusterrole.yaml @@ -0,0 +1,109 @@ +{{- if .Values.preflight.enabled }} +{{- /* +Keep file in synced with cilium-agent-clusterrole.yaml +*/ -}} +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: cilium-pre-flight +rules: +- apiGroups: + - networking.k8s.io + resources: + - networkpolicies + verbs: + - get + - list + - watch +- apiGroups: + - discovery.k8s.io + resources: + - endpointslices + verbs: + - get + - list + - watch +- apiGroups: + - "" + resources: + - namespaces + - services + - nodes + - endpoints + verbs: + - get + - list + - watch +- apiGroups: + - "" + resources: + - pods + - pods/finalizers + verbs: + - get + - list + - watch + - update + - delete +- apiGroups: + - "" + resources: + - nodes + verbs: + - get + - list + - watch + - update +- apiGroups: + - "" + resources: + - nodes + - nodes/status + verbs: + - patch +- apiGroups: + - apiextensions.k8s.io + resources: + - customresourcedefinitions + verbs: + # Deprecated for removal in v1.10 + - create + - list + - watch + - update + + # This is used when validating policies in preflight. This will need to stay + # until we figure out how to avoid "get" inside the preflight, and then + # should be removed ideally. + - get +{{- if eq "k8s" .Values.tls.secretsBackend }} +- apiGroups: + - "" + resources: + - secrets + verbs: + - get +{{- end }} +- apiGroups: + - cilium.io + resources: + - ciliumnetworkpolicies + - ciliumnetworkpolicies/status + - ciliumnetworkpolicies/finalizers + - ciliumclusterwidenetworkpolicies + - ciliumclusterwidenetworkpolicies/status + - ciliumclusterwidenetworkpolicies/finalizers + - ciliumendpoints + - ciliumendpoints/status + - ciliumendpoints/finalizers + - ciliumnodes + - ciliumnodes/status + - ciliumnodes/finalizers + - ciliumidentities + - ciliumidentities/finalizers + - ciliumlocalredirectpolicies + - ciliumlocalredirectpolicies/status + - ciliumlocalredirectpolicies/finalizers + verbs: + - '*' +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-preflight-clusterrolebinding.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-preflight-clusterrolebinding.yaml new file mode 100755 index 0000000..14fb6b2 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-preflight-clusterrolebinding.yaml @@ -0,0 +1,14 @@ +{{- if .Values.preflight.enabled }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: cilium-pre-flight +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: cilium-pre-flight +subjects: +- kind: ServiceAccount + name: cilium-pre-flight + namespace: {{ .Release.Namespace }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-preflight-daemonset.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-preflight-daemonset.yaml new file mode 100755 index 0000000..ddccbb3 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-preflight-daemonset.yaml @@ -0,0 +1,158 @@ +{{- if .Values.preflight.enabled }} +apiVersion: apps/v1 +kind: DaemonSet +metadata: + name: cilium-pre-flight-check + namespace: {{ .Release.Namespace }} +spec: + selector: + matchLabels: + k8s-app: cilium-pre-flight-check + kubernetes.io/cluster-service: "true" + template: + metadata: +{{- with .Values.preflight.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} +{{- end }} + labels: + k8s-app: cilium-pre-flight-check + kubernetes.io/cluster-service: "true" + spec: +{{- if .Values.imagePullSecrets }} + imagePullSecrets: + {{ toYaml .Values.imagePullSecrets | indent 6 }} +{{- end }} + initContainers: + - name: clean-cilium-state + image: {{ template "system_default_registry" . }}{{ .Values.preflight.image.repository }}:{{ .Values.preflight.image.tag }} + imagePullPolicy: {{ .Values.preflight.image.pullPolicy }} + command: ["/bin/echo"] + args: + - "hello" + containers: + - name: cilium-pre-flight-check + image: {{ template "system_default_registry" . }}{{ .Values.preflight.image.repository }}:{{ .Values.preflight.image.tag }} + imagePullPolicy: {{ .Values.preflight.image.pullPolicy }} + command: ["/bin/sh"] + args: + - -c + - "touch /tmp/ready; sleep 1h" + livenessProbe: + exec: + command: + - cat + - /tmp/ready + initialDelaySeconds: 5 + periodSeconds: 5 + readinessProbe: + exec: + command: + - cat + - /tmp/ready + initialDelaySeconds: 5 + periodSeconds: 5 + volumeMounts: + - mountPath: /var/run/cilium + name: cilium-run +{{- if .Values.etcd.enabled }} + - mountPath: /var/lib/etcd-config + name: etcd-config-path + readOnly: true +{{- if or .Values.etcd.ssl .Values.etcd.managed }} + - mountPath: /var/lib/etcd-secrets + name: etcd-secrets + readOnly: true +{{- end }} +{{- end }} + +{{- if ne .Values.preflight.tofqdnsPreCache "" }} + - name: cilium-pre-flight-fqdn-precache + image: {{ template "system_default_registry" . }}{{ .Values.preflight.image.repository }}:{{ .Values.preflight.image.tag }} + imagePullPolicy: {{ .Values.preflight.image.pullPolicy }} + name: cilium-pre-flight-fqdn-precache + command: ["/bin/sh"] + args: + - -c + - "cilium preflight fqdn-poller --tofqdns-pre-cache {{ .Values.preflight.tofqdnsPreCache }} && touch /tmp/ready-tofqdns-precache" + livenessProbe: + exec: + command: + - cat + - /tmp/read-tofqdns-precachey + initialDelaySeconds: 5 + periodSeconds: 5 + readinessProbe: + exec: + command: + - cat + - /tmp/read-tofqdns-precachey + initialDelaySeconds: 5 + periodSeconds: 5 + env: +{{- if .Values.k8sServiceHost }} + - name: KUBERNETES_SERVICE_HOST + value: {{ .Values.k8sServiceHost | quote }} +{{- end }} +{{- if .Values.k8sServicePort }} + - name: KUBERNETES_SERVICE_PORT + value: {{ .Values.k8sServicePort | quote }} +{{- end }} + volumeMounts: + - mountPath: /var/run/cilium + name: cilium-run +{{- if .Values.etcd.enabled }} + - mountPath: /var/lib/etcd-config + name: etcd-config-path + readOnly: true +{{- if or .Values.etcd.ssl .Values.etcd.managed }} + - mountPath: /var/lib/etcd-secrets + name: etcd-secrets + readOnly: true +{{- end }} +{{- end }} +{{- 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 + serviceAccount: cilium-pre-flight + serviceAccountName: cilium-pre-flight + terminationGracePeriodSeconds: 1 +{{- with .Values.tolerations }} + tolerations: + {{- toYaml . | trim | nindent 6 }} +{{- end }} + volumes: + # To keep state between restarts / upgrades + - hostPath: + path: /var/run/cilium + type: DirectoryOrCreate + name: cilium-run + - hostPath: + path: /sys/fs/bpf + type: DirectoryOrCreate + name: bpf-maps +{{- if .Values.etcd.enabled }} + # To read the etcd config stored in config maps + - configMap: + defaultMode: 420 + items: + - key: etcd-config + path: etcd.config + name: cilium-config + name: etcd-config-path + # To read the k8s etcd secrets in case the user might want to use TLS +{{- if or .Values.etcd.ssl .Values.etcd.managed }} + - name: etcd-secrets + secret: + defaultMode: 420 + optional: true + secretName: cilium-etcd-secrets +{{- end }} +{{- end }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-preflight-deployment.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-preflight-deployment.yaml new file mode 100755 index 0000000..5098b51 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-preflight-deployment.yaml @@ -0,0 +1,86 @@ +{{- if .Values.preflight.enabled }} +{{- if .Values.preflight.validateCNPs }} +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cilium-pre-flight-check + namespace: {{ .Release.Namespace }} +spec: + selector: + matchLabels: + k8s-app: cilium-pre-flight-check-deployment + kubernetes.io/cluster-service: "true" + template: + metadata: +{{- with .Values.preflight.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} +{{- end }} + labels: + k8s-app: cilium-pre-flight-check-deployment + kubernetes.io/cluster-service: "true" + spec: + affinity: + podAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: "k8s-app" + operator: In + values: + - cilium + topologyKey: "kubernetes.io/hostname" +{{- if .Values.imagePullSecrets }} + imagePullSecrets: + {{ toYaml .Values.imagePullSecrets | indent 8 }} +{{- end }} + containers: +{{- if .Values.preflight.validateCNPs }} + - name: cnp-validator + image: {{ template "system_default_registry" . }}{{ .Values.preflight.image.repository }}:{{ .Values.preflight.image.tag }} + imagePullPolicy: {{ .Values.preflight.image.pullPolicy }} + command: ["/bin/sh"] + args: + - -c + - "cilium 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 +{{- if not ( and ( empty ( .Values.k8sServiceHost )) ( empty ( .Values.k8sServicePort ))) }} + env: +{{- if .Values.k8sServiceHost }} + - name: KUBERNETES_SERVICE_HOST + value: {{ .Values.k8sServiceHost | quote }} +{{- end }} +{{- if .Values.k8sServicePort }} + - name: KUBERNETES_SERVICE_PORT + value: {{ .Values.k8sServicePort | quote }} +{{- end }} +{{- end }} +{{- end }} + hostNetwork: true + restartPolicy: Always + serviceAccount: cilium-pre-flight + serviceAccountName: cilium-pre-flight + terminationGracePeriodSeconds: 1 +{{- with .Values.preflight.nodeSelector }} + nodeSelector: + {{- toYaml . | trim | nindent 8 }} +{{- end }} +{{- with .Values.tolerations }} + tolerations: + {{- toYaml . | trim | nindent 6 }} +{{- end }} +{{- end }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-preflight-serviceaccount.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-preflight-serviceaccount.yaml new file mode 100755 index 0000000..56afb09 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-preflight-serviceaccount.yaml @@ -0,0 +1,11 @@ +{{- if and .Values.preflight.enabled .Values.serviceAccounts.preflight.create }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: cilium-pre-flight + namespace: {{ .Release.Namespace }} + {{- if .Values.serviceAccounts.preflight.annotations }} + annotations: +{{ toYaml .Values.serviceAccounts.preflight.annotations | indent 4 }} + {{- end }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-resource-quota.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-resource-quota.yaml new file mode 100755 index 0000000..a985696 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/cilium-resource-quota.yaml @@ -0,0 +1,35 @@ +{{- if or .Values.resourceQuotas.enabled (and (ne .Release.Namespace "kube-system") .Values.gke.enabled) }} +{{- if .Values.agent }} +apiVersion: v1 +kind: ResourceQuota +metadata: + name: cilium-resource-quota + namespace: {{ .Release.Namespace }} +spec: + hard: + pods: {{ .Values.resourceQuotas.cilium.hard.pods | quote }} + scopeSelector: + matchExpressions: + - operator: In + scopeName: PriorityClass + values: + - system-node-critical +{{- end }} +{{- if .Values.operator.enabled }} +--- +apiVersion: v1 +kind: ResourceQuota +metadata: + name: cilium-operator-resource-quota + namespace: {{ .Release.Namespace }} +spec: + hard: + pods: {{ .Values.resourceQuotas.operator.hard.pods | quote }} + scopeSelector: + matchExpressions: + - operator: In + scopeName: PriorityClass + values: + - system-cluster-critical +{{- end }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/clustermesh-apiserver-admin-secret.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/clustermesh-apiserver-admin-secret.yaml new file mode 100755 index 0000000..6233965 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/clustermesh-apiserver-admin-secret.yaml @@ -0,0 +1,17 @@ +{{- if and .Values.agent (not .Values.preflight.enabled) (or .Values.externalWorkloads.enabled .Values.clustermesh.useAPIServer) }} +{{- if or (and (.Values.clustermesh.apiserver.tls.auto.enabled) (eq .Values.clustermesh.apiserver.tls.auto.method "helm")) (and .Values.clustermesh.apiserver.tls.admin.cert .Values.clustermesh.apiserver.tls.admin.key) }} +apiVersion: v1 +kind: Secret +metadata: + name: clustermesh-apiserver-admin-cert + namespace: {{ .Release.Namespace }} +type: kubernetes.io/tls +data: +{{- if and .Values.clustermesh.apiserver.tls.auto.enabled (eq .Values.clustermesh.apiserver.tls.auto.method "helm") }} +{{ include "clustermesh.apiserver.admin.gen-cert" . | indent 2 }} +{{- else }} + tls.crt: {{ .Values.clustermesh.apiserver.tls.admin.cert }} + tls.key: {{ .Values.clustermesh.apiserver.tls.admin.key }} +{{- end }} +{{- end }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/clustermesh-apiserver-ca-secret.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/clustermesh-apiserver-ca-secret.yaml new file mode 100755 index 0000000..129f8eb --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/clustermesh-apiserver-ca-secret.yaml @@ -0,0 +1,17 @@ +{{- if and .Values.agent (not .Values.preflight.enabled) (or .Values.externalWorkloads.enabled .Values.clustermesh.useAPIServer) }} +{{- if or (and .Values.clustermesh.apiserver.tls.auto.enabled (eq .Values.clustermesh.apiserver.tls.auto.method "helm")) (and .Values.clustermesh.apiserver.tls.ca.cert .Values.clustermesh.apiserver.tls.ca.key) }} +--- +apiVersion: v1 +kind: Secret +metadata: + name: clustermesh-apiserver-ca-cert + namespace: {{ .Release.Namespace }} +data: +{{- if and .Values.clustermesh.apiserver.tls.auto.enabled (eq .Values.clustermesh.apiserver.tls.auto.method "helm") }} +{{ include "clustermesh.apiserver.ca.gen-cert" . | indent 2 }} +{{- else }} + ca.crt: {{ .Values.clustermesh.apiserver.tls.ca.cert }} + ca.key: {{ .Values.clustermesh.apiserver.tls.ca.key }} +{{- end }} +{{- end }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/clustermesh-apiserver-client-secret.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/clustermesh-apiserver-client-secret.yaml new file mode 100755 index 0000000..2ca8806 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/clustermesh-apiserver-client-secret.yaml @@ -0,0 +1,17 @@ +{{- if and .Values.agent (not .Values.preflight.enabled) .Values.externalWorkloads.enabled }} +{{- if or (and (.Values.clustermesh.apiserver.tls.auto.enabled) (eq .Values.clustermesh.apiserver.tls.auto.method "helm")) (and .Values.clustermesh.apiserver.tls.client.cert .Values.clustermesh.apiserver.tls.client.key) }} +apiVersion: v1 +kind: Secret +metadata: + name: clustermesh-apiserver-client-cert + namespace: {{ .Release.Namespace }} +type: kubernetes.io/tls +data: +{{- if and .Values.clustermesh.apiserver.tls.auto.enabled (eq .Values.clustermesh.apiserver.tls.auto.method "helm") }} +{{ include "clustermesh.apiserver.client.gen-cert" . | indent 2 }} +{{- else }} + tls.crt: {{ .Values.clustermesh.apiserver.tls.client.cert }} + tls.key: {{ .Values.clustermesh.apiserver.tls.client.key }} +{{- end }} +{{- end }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/clustermesh-apiserver-clusterrole.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/clustermesh-apiserver-clusterrole.yaml new file mode 100755 index 0000000..74bd961 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/clustermesh-apiserver-clusterrole.yaml @@ -0,0 +1,44 @@ +{{- if and (or .Values.externalWorkloads.enabled .Values.clustermesh.useAPIServer) .Values.serviceAccounts.clustermeshApiserver.create }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: clustermesh-apiserver +rules: +- apiGroups: + - "" + resources: + - endpoints + - namespaces + - services + verbs: + - get + - list + - watch +- apiGroups: + - discovery.k8s.io + resources: + - endpointslices + verbs: + - get + - list + - watch +- apiGroups: + - apiextensions.k8s.io + resources: + - customresourcedefinitions + verbs: + - list +- apiGroups: + - cilium.io + resources: + - ciliumnodes + - ciliumnodes/status + - ciliumexternalworkloads + - ciliumexternalworkloads/status + - ciliumidentities + - ciliumidentities/status + - ciliumendpoints + - ciliumendpoints/status + verbs: + - '*' +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/clustermesh-apiserver-clusterrolebinding.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/clustermesh-apiserver-clusterrolebinding.yaml new file mode 100755 index 0000000..c9208ab --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/clustermesh-apiserver-clusterrolebinding.yaml @@ -0,0 +1,14 @@ +{{- if and (or .Values.externalWorkloads.enabled .Values.clustermesh.useAPIServer) .Values.serviceAccounts.clustermeshApiserver.create }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: clustermesh-apiserver +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: clustermesh-apiserver +subjects: +- kind: ServiceAccount + name: clustermesh-apiserver + namespace: {{ .Release.Namespace }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/clustermesh-apiserver-deployment.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/clustermesh-apiserver-deployment.yaml new file mode 100755 index 0000000..65833e1 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/clustermesh-apiserver-deployment.yaml @@ -0,0 +1,165 @@ +{{- if (or .Values.externalWorkloads.enabled .Values.clustermesh.useAPIServer) }} +apiVersion: apps/v1 +kind: Deployment +metadata: + name: clustermesh-apiserver + labels: + k8s-app: clustermesh-apiserver + namespace: {{ .Release.Namespace }} +spec: + replicas: {{ .Values.clustermesh.apiserver.replicas }} + selector: + matchLabels: + k8s-app: clustermesh-apiserver +{{- with .Values.clustermesh.apiserver.updateStrategy }} + strategy: {{- toYaml . | nindent 4 }} +{{- end }} + template: + metadata: + annotations: +{{- with .Values.clustermesh.apiserver.podAnnotations }} + {{- toYaml . | nindent 8 }} +{{- end }} + labels: + k8s-app: clustermesh-apiserver + spec: +{{- with .Values.imagePullSecrets }} + imagePullSecrets: {{- toYaml . | nindent 8 }} +{{- end }} + restartPolicy: Always + serviceAccount: clustermesh-apiserver + initContainers: + - name: etcd-init + image: {{ template "system_default_registry" . }}{{ .Values.clustermesh.apiserver.etcd.image.repository }}:{{ .Values.clustermesh.apiserver.etcd.image.tag }} + imagePullPolicy: {{ .Values.clustermesh.apiserver.etcd.image.pullPolicy }} + env: + - name: ETCDCTL_API + value: "3" + - name: HOSTNAME_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + command: ["/bin/sh", "-c"] + args: + - > + rm -rf /var/run/etcd/*; + export ETCDCTL_API=3; + /usr/local/bin/etcd --data-dir=/var/run/etcd --name=clustermesh-apiserver --listen-client-urls=http://127.0.0.1:2379 --advertise-client-urls=http://127.0.0.1:2379 --initial-cluster-token=clustermesh-apiserver --initial-cluster-state=new --auto-compaction-retention=1 & + export rootpw=`head /dev/urandom | tr -dc A-Za-z0-9 | head -c 16`; + echo $rootpw | etcdctl --interactive=false user add root; + etcdctl user grant-role root root; + export vmpw=`head /dev/urandom | tr -dc A-Za-z0-9 | head -c 16`; + echo $vmpw | etcdctl --interactive=false user add externalworkload; + etcdctl role add externalworkload; + etcdctl role grant-permission externalworkload --from-key read ''; + etcdctl role grant-permission externalworkload readwrite --prefix cilium/state/noderegister/v1/; + etcdctl role grant-permission externalworkload readwrite --prefix cilium/.initlock/; + etcdctl user grant-role externalworkload externalworkload; + export remotepw=`head /dev/urandom | tr -dc A-Za-z0-9 | head -c 16`; + echo $remotepw | etcdctl --interactive=false user add remote; + etcdctl role add remote; + etcdctl role grant-permission remote --from-key read ''; + etcdctl user grant-role remote remote; + etcdctl auth enable; + exit + volumeMounts: + - mountPath: /var/run/etcd + name: etcd-data-dir + containers: + - name: etcd + image: {{ template "system_default_registry" . }}{{ .Values.clustermesh.apiserver.etcd.image.repository }}:{{ .Values.clustermesh.apiserver.etcd.image.tag }} + imagePullPolicy: {{ .Values.clustermesh.apiserver.etcd.image.pullPolicy }} + env: + - name: ETCDCTL_API + value: "3" + - name: HOSTNAME_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + command: + - /usr/local/bin/etcd + args: + - --data-dir=/var/run/etcd + - --name=clustermesh-apiserver + - --client-cert-auth + - --trusted-ca-file=/var/lib/etcd-secrets/ca.crt + - --cert-file=/var/lib/etcd-secrets/tls.crt + - --key-file=/var/lib/etcd-secrets/tls.key + - --listen-client-urls=https://127.0.0.1:2379,https://$(HOSTNAME_IP):2379 + - --advertise-client-urls=https://$(HOSTNAME_IP):2379 + - --initial-cluster-token=clustermesh-apiserver + - --auto-compaction-retention=1 + volumeMounts: + - mountPath: /var/lib/etcd-secrets + name: etcd-server-secrets + readOnly: true + - mountPath: /var/run/etcd + name: etcd-data-dir + - name: "apiserver" + image: {{ template "system_default_registry" . }}{{ .Values.clustermesh.apiserver.image.repository }}:{{ .Values.clustermesh.apiserver.image.tag }} + imagePullPolicy: {{ .Values.clustermesh.apiserver.image.pullPolicy }} + command: + - /usr/bin/clustermesh-apiserver + args: +{{- if .Values.debug.enabled }} + - --debug +{{- end }} + - --cluster-name=$(CLUSTER_NAME) + - --kvstore-opt + - etcd.config=/var/lib/cilium/etcd-config.yaml + env: + - name: CLUSTER_NAME + valueFrom: + configMapKeyRef: + key: cluster-name + name: cilium-config + - name: CLUSTER_ID + valueFrom: + configMapKeyRef: + key: cluster-id + name: cilium-config + optional: true + - name: IDENTITY_ALLOCATION_MODE + valueFrom: + configMapKeyRef: + key: identity-allocation-mode + name: cilium-config +{{- with .Values.clustermesh.apiserver.resources }} + resources: {{- toYaml . | nindent 10 }} +{{- end }} + volumeMounts: + - mountPath: /var/lib/cilium/etcd-secrets + name: etcd-admin-client + readOnly: true + volumes: + - name: etcd-server-secrets + projected: + defaultMode: 0420 + sources: + - secret: + name: clustermesh-apiserver-ca-cert + items: + - key: ca.crt + path: ca.crt + - secret: + name: clustermesh-apiserver-server-cert + - name: etcd-admin-client + projected: + defaultMode: 0420 + sources: + - secret: + name: clustermesh-apiserver-ca-cert + items: + - key: ca.crt + path: ca.crt + - secret: + name: clustermesh-apiserver-admin-cert + - name: etcd-data-dir + emptyDir: {} +{{- with .Values.clustermesh.apiserver.nodeSelector }} + nodeSelector: {{- toYaml . | nindent 8 }} +{{- end }} +{{- with .Values.clustermesh.apiserver.tolerations }} + tolerations: {{- toYaml . | nindent 8 }} +{{- end }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/clustermesh-apiserver-generate-certs-cronjob.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/clustermesh-apiserver-generate-certs-cronjob.yaml new file mode 100755 index 0000000..a1962c3 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/clustermesh-apiserver-generate-certs-cronjob.yaml @@ -0,0 +1,14 @@ +{{- 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: batch/v1beta1 +kind: CronJob +metadata: + name: clustermesh-apiserver-generate-certs + namespace: {{ .Release.Namespace }} + labels: + k8s-app: clustermesh-apiserver-generate-certs +spec: + schedule: {{ .Values.clustermesh.apiserver.tls.auto.schedule | quote }} + concurrencyPolicy: Forbid + jobTemplate: +{{- include "clustermesh-apiserver-generate-certs.job.spec" . | nindent 4 }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/clustermesh-apiserver-generate-certs-job.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/clustermesh-apiserver-generate-certs-job.yaml new file mode 100755 index 0000000..c0e4f03 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/clustermesh-apiserver-generate-certs-job.yaml @@ -0,0 +1,10 @@ +{{- if and (or .Values.externalWorkloads.enabled .Values.clustermesh.useAPIServer) (eq .Values.clustermesh.apiserver.tls.auto.method "cronJob") }} +apiVersion: batch/v1 +kind: Job +metadata: + name: clustermesh-apiserver-generate-certs + namespace: {{ .Release.Namespace }} + labels: + k8s-app: clustermesh-apiserver-generate-certs +{{ include "clustermesh-apiserver-generate-certs.job.spec" . }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/clustermesh-apiserver-generate-certs-role.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/clustermesh-apiserver-generate-certs-role.yaml new file mode 100755 index 0000000..0623a86 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/clustermesh-apiserver-generate-certs-role.yaml @@ -0,0 +1,34 @@ +{{- if and (or .Values.externalWorkloads.enabled .Values.clustermesh.useAPIServer) .Values.clustermesh.apiserver.tls.auto.enabled (eq .Values.clustermesh.apiserver.tls.auto.method "cronJob") .Values.serviceAccounts.certgen.create }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: clustermesh-apiserver-generate-certs + namespace: {{ .Release.Namespace }} +rules: + - apiGroups: + - "" + resources: + - secrets + verbs: + - create + - apiGroups: + - "" + resources: + - secrets + resourceNames: + - clustermesh-apiserver-ca-cert + verbs: + - get + - update + - apiGroups: + - "" + resources: + - secrets + resourceNames: + - clustermesh-apiserver-server-cert + - clustermesh-apiserver-admin-cert + - clustermesh-apiserver-remote-cert + - clustermesh-apiserver-client-cert + verbs: + - update +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/clustermesh-apiserver-generate-certs-rolebinding.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/clustermesh-apiserver-generate-certs-rolebinding.yaml new file mode 100755 index 0000000..5d0fa33 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/clustermesh-apiserver-generate-certs-rolebinding.yaml @@ -0,0 +1,15 @@ +{{- if and (or .Values.externalWorkloads.enabled .Values.clustermesh.useAPIServer) .Values.clustermesh.apiserver.tls.auto.enabled (eq .Values.clustermesh.apiserver.tls.auto.method "cronJob") .Values.serviceAccounts.certgen.create }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: clustermesh-apiserver-generate-certs + namespace: {{ .Release.Namespace }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: clustermesh-apiserver-generate-certs +subjects: +- kind: ServiceAccount + name: clustermesh-apiserver-generate-certs + namespace: {{ .Release.Namespace }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/clustermesh-apiserver-generate-certs-serviceaccount.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/clustermesh-apiserver-generate-certs-serviceaccount.yaml new file mode 100755 index 0000000..b3e391e --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/clustermesh-apiserver-generate-certs-serviceaccount.yaml @@ -0,0 +1,10 @@ +{{- if and (or .Values.externalWorkloads.enabled .Values.clustermesh.useAPIServer) .Values.clustermesh.apiserver.tls.auto.enabled (eq .Values.clustermesh.apiserver.tls.auto.method "cronJob") .Values.serviceAccounts.certgen.create }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: clustermesh-apiserver-generate-certs + namespace: {{ .Release.Namespace }} +{{- with .Values.serviceAccounts.certgen.annotations }} + annotations: {{- toYaml . | nindent 4 }} +{{- end }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/clustermesh-apiserver-remote-secret.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/clustermesh-apiserver-remote-secret.yaml new file mode 100755 index 0000000..7a72139 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/clustermesh-apiserver-remote-secret.yaml @@ -0,0 +1,17 @@ +{{- if and .Values.agent (not .Values.preflight.enabled) .Values.clustermesh.useAPIServer }} +{{- if or (and (.Values.clustermesh.apiserver.tls.auto.enabled) (eq .Values.clustermesh.apiserver.tls.auto.method "helm")) (and .Values.clustermesh.apiserver.tls.remote.cert .Values.clustermesh.apiserver.tls.remote.key) }} +apiVersion: v1 +kind: Secret +metadata: + name: clustermesh-apiserver-remote-cert + namespace: {{ .Release.Namespace }} +type: kubernetes.io/tls +data: +{{- if and .Values.clustermesh.apiserver.tls.auto.enabled (eq .Values.clustermesh.apiserver.tls.auto.method "helm") }} +{{ include "clustermesh.apiserver.remote.gen-cert" . | indent 2 }} +{{- else }} + tls.crt: {{ .Values.clustermesh.apiserver.tls.remote.cert }} + tls.key: {{ .Values.clustermesh.apiserver.tls.remote.key }} +{{- end }} +{{- end }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/clustermesh-apiserver-server-secret.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/clustermesh-apiserver-server-secret.yaml new file mode 100755 index 0000000..10b9e27 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/clustermesh-apiserver-server-secret.yaml @@ -0,0 +1,17 @@ +{{- if and .Values.agent (not .Values.preflight.enabled) (or .Values.externalWorkloads.enabled .Values.clustermesh.useAPIServer) }} +{{- if or (and (.Values.clustermesh.apiserver.tls.auto.enabled) (eq .Values.clustermesh.apiserver.tls.auto.method "helm")) (and .Values.clustermesh.apiserver.tls.server.cert .Values.clustermesh.apiserver.tls.server.key) }} +apiVersion: v1 +kind: Secret +metadata: + name: clustermesh-apiserver-server-cert + namespace: {{ .Release.Namespace }} +type: kubernetes.io/tls +data: +{{- if and .Values.clustermesh.apiserver.tls.auto.enabled (eq .Values.clustermesh.apiserver.tls.auto.method "helm") }} +{{ include "clustermesh.apiserver.server.gen-cert" . | indent 2 }} +{{- else }} + tls.crt: {{ .Values.clustermesh.apiserver.tls.server.cert }} + tls.key: {{ .Values.clustermesh.apiserver.tls.server.key }} +{{- end }} +{{- end }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/clustermesh-apiserver-service.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/clustermesh-apiserver-service.yaml new file mode 100755 index 0000000..16480bd --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/clustermesh-apiserver-service.yaml @@ -0,0 +1,24 @@ +{{- if (or .Values.externalWorkloads.enabled .Values.clustermesh.useAPIServer) }} +apiVersion: v1 +kind: Service +metadata: + name: "clustermesh-apiserver" + namespace: {{ .Release.Namespace }} + labels: + k8s-app: clustermesh-apiserver +{{- with .Values.clustermesh.apiserver.service.annotations }} + annotations: {{- toYaml . | nindent 4 }} +{{- end }} +spec: + type: {{ .Values.clustermesh.apiserver.service.type }} + selector: + k8s-app: clustermesh-apiserver + ports: + - port: 2379 +{{- if and (eq "NodePort" .Values.clustermesh.apiserver.service.type) .Values.clustermesh.apiserver.service.nodePort }} + nodePort: {{ .Values.clustermesh.apiserver.service.nodePort }} +{{- end }} +{{- if and (eq "LoadBalancer" .Values.clustermesh.apiserver.service.type) .Values.clustermesh.apiserver.service.loadBalancerIP }} + loadBalancerIP: {{ .Values.clustermesh.apiserver.service.loadBalancerIP }} +{{- end }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/clustermesh-apiserver-serviceaccount.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/clustermesh-apiserver-serviceaccount.yaml new file mode 100755 index 0000000..6d34375 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/clustermesh-apiserver-serviceaccount.yaml @@ -0,0 +1,10 @@ +{{- if and (or .Values.externalWorkloads.enabled .Values.clustermesh.useAPIServer) .Values.serviceAccounts.clustermeshApiserver.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: clustermesh-apiserver + namespace: {{ .Release.Namespace }} +{{- with .Values.serviceAccounts.clustermeshApiserver.annotations }} + annotations: {{- toYaml . | nindent 4 }} +{{- end }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/etcd-operator-clusterrole.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/etcd-operator-clusterrole.yaml new file mode 100755 index 0000000..5a87497 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/etcd-operator-clusterrole.yaml @@ -0,0 +1,54 @@ +{{- if .Values.etcd.managed }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: etcd-operator +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 }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/etcd-operator-clusterrolebinding.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/etcd-operator-clusterrolebinding.yaml new file mode 100755 index 0000000..f2f36e2 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/etcd-operator-clusterrolebinding.yaml @@ -0,0 +1,14 @@ +{{- if .Values.etcd.managed }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: etcd-operator +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: etcd-operator +subjects: +- kind: ServiceAccount + name: cilium-etcd-sa + namespace: {{ .Release.Namespace }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/etcd-operator-serviceaccount.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/etcd-operator-serviceaccount.yaml new file mode 100755 index 0000000..278d984 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/etcd-operator-serviceaccount.yaml @@ -0,0 +1,11 @@ +{{- if .Values.etcd.managed }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: cilium-etcd-sa + namespace: {{ .Release.Namespace }} + {{- if .Values.serviceAccounts.etcd.annotations }} + annotations: +{{ toYaml .Values.serviceAccounts.etcd.annotations | indent 4 }} + {{- end }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-ca-configmap.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-ca-configmap.yaml new file mode 100755 index 0000000..c505415 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-ca-configmap.yaml @@ -0,0 +1,18 @@ +{{- if and (not .Values.preflight.enabled) .Values.agent .Values.hubble.enabled .Values.hubble.tls.enabled }} +{{- $hubbleCAProvided := .Values.hubble.tls.ca.cert }} +{{- $hubbleCAGenerate := and .Values.hubble.tls.auto.enabled (eq .Values.hubble.tls.auto.method "helm") .Values.hubble.relay.enabled -}} +{{- if or $hubbleCAProvided $hubbleCAGenerate }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: hubble-ca-cert + namespace: {{ .Release.Namespace }} +data: +{{- if $hubbleCAGenerate }} +{{ include "hubble.ca.gen-cert-only" . | indent 2 }} +{{- else }} + ca.crt: |- +{{ .Values.hubble.tls.ca.cert | b64dec | indent 4 -}} +{{- end }} +{{- end }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-generate-certs-ca-secret.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-generate-certs-ca-secret.yaml new file mode 100755 index 0000000..de579be --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-generate-certs-ca-secret.yaml @@ -0,0 +1,11 @@ +{{- if and .Values.hubble.tls.auto.enabled (eq .Values.hubble.tls.auto.method "cronJob") .Values.hubble.tls.ca.cert .Values.hubble.tls.ca.key }} +--- +apiVersion: v1 +kind: Secret +metadata: + name: hubble-ca-secret + namespace: {{ .Release.Namespace }} +data: + ca.crt: {{ .Values.hubble.tls.ca.cert }} + ca.key: {{ .Values.hubble.tls.ca.key }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-generate-certs-clusterrole.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-generate-certs-clusterrole.yaml new file mode 100755 index 0000000..648e6ac --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-generate-certs-clusterrole.yaml @@ -0,0 +1,40 @@ +{{- if and .Values.hubble.tls.auto.enabled (eq .Values.hubble.tls.auto.method "cronJob") .Values.serviceAccounts.certgen.create }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + name: hubble-generate-certs +rules: + - apiGroups: + - "" + resources: + - secrets + - configmaps + verbs: + - create + - apiGroups: + - "" + resources: + - secrets + resourceNames: + - hubble-server-certs + - hubble-relay-client-certs + - hubble-relay-server-certs + verbs: + - update + - apiGroups: + - "" + resources: + - configmaps + resourceNames: + - hubble-ca-cert + verbs: + - update + - apiGroups: + - "" + resources: + - secrets + resourceNames: + - hubble-ca-secret + verbs: + - get +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-generate-certs-clusterrolebinding.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-generate-certs-clusterrolebinding.yaml new file mode 100755 index 0000000..dc0cb52 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-generate-certs-clusterrolebinding.yaml @@ -0,0 +1,14 @@ +{{- if and .Values.hubble.tls.auto.enabled (eq .Values.hubble.tls.auto.method "cronJob") .Values.serviceAccounts.certgen.create }} +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: hubble-generate-certs +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: hubble-generate-certs +subjects: +- kind: ServiceAccount + name: hubble-generate-certs + namespace: {{ .Release.Namespace }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-generate-certs-cronjob.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-generate-certs-cronjob.yaml new file mode 100755 index 0000000..d0c8385 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-generate-certs-cronjob.yaml @@ -0,0 +1,14 @@ +{{- if and .Values.hubble.tls.auto.enabled (eq .Values.hubble.tls.auto.method "cronJob") .Values.hubble.tls.auto.schedule }} +apiVersion: batch/v1beta1 +kind: CronJob +metadata: + name: hubble-generate-certs + namespace: {{ .Release.Namespace }} + labels: + k8s-app: hubble-generate-certs +spec: + schedule: {{ .Values.hubble.tls.auto.schedule | quote }} + concurrencyPolicy: Forbid + jobTemplate: +{{- include "hubble-generate-certs.job.spec" . | nindent 4 }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-generate-certs-job.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-generate-certs-job.yaml new file mode 100755 index 0000000..8ec62b8 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-generate-certs-job.yaml @@ -0,0 +1,10 @@ +{{- if and .Values.hubble.tls.auto.enabled (eq .Values.hubble.tls.auto.method "cronJob") }} +apiVersion: batch/v1 +kind: Job +metadata: + name: hubble-generate-certs + namespace: {{ .Release.Namespace }} + labels: + k8s-app: hubble-generate-certs +{{ include "hubble-generate-certs.job.spec" . }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-generate-certs-serviceaccount.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-generate-certs-serviceaccount.yaml new file mode 100755 index 0000000..035e0af --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-generate-certs-serviceaccount.yaml @@ -0,0 +1,11 @@ +{{- if and .Values.hubble.tls.auto.enabled (eq .Values.hubble.tls.auto.method "cronJob") .Values.serviceAccounts.certgen.create }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: hubble-generate-certs + namespace: {{ .Release.Namespace }} +{{- if .Values.serviceAccounts.certgen.annotations }} + annotations: +{{ toYaml .Values.serviceAccounts.certgen.annotations | indent 4 }} +{{- end }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-relay-client-tls-secret.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-relay-client-tls-secret.yaml new file mode 100755 index 0000000..40b0081 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-relay-client-tls-secret.yaml @@ -0,0 +1,17 @@ +{{- if and (.Values.hubble.relay.enabled) (.Values.hubble.tls.enabled) }} +{{- if or (and (.Values.hubble.tls.auto.enabled) (eq .Values.hubble.tls.auto.method "helm")) .Values.hubble.relay.tls.client.cert .Values.hubble.relay.tls.client.key }} +apiVersion: v1 +kind: Secret +metadata: + name: hubble-relay-client-certs + namespace: {{ .Release.Namespace }} +type: kubernetes.io/tls +data: +{{- if and (.Values.hubble.tls.auto.enabled) (eq .Values.hubble.tls.auto.method "helm") }} +{{ include "hubble.relay.gen-certs" . | indent 2 }} +{{- else }} + tls.crt: {{ .Values.hubble.relay.tls.client.cert }} + tls.key: {{ .Values.hubble.relay.tls.client.key }} +{{- end }} +{{- end }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-relay-clusterrole.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-relay-clusterrole.yaml new file mode 100755 index 0000000..b2d9d4f --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-relay-clusterrole.yaml @@ -0,0 +1,20 @@ +{{- if and (.Values.hubble.relay.enabled) (.Values.serviceAccounts.relay.create) }} +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: hubble-relay +rules: + - apiGroups: + - "" + resources: + - componentstatuses + - endpoints + - namespaces + - nodes + - pods + - services + verbs: + - get + - list + - watch +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-relay-clusterrolebinding.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-relay-clusterrolebinding.yaml new file mode 100755 index 0000000..db454fe --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-relay-clusterrolebinding.yaml @@ -0,0 +1,14 @@ +{{- if and (.Values.hubble.relay.enabled) (.Values.serviceAccounts.relay.create) }} +kind: ClusterRoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: hubble-relay +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: hubble-relay +subjects: +- kind: ServiceAccount + namespace: {{ .Release.Namespace }} + name: hubble-relay +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-relay-configmap.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-relay-configmap.yaml new file mode 100755 index 0000000..0d281a0 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-relay-configmap.yaml @@ -0,0 +1,29 @@ +{{- if .Values.hubble.relay.enabled }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: hubble-relay-config + namespace: {{ .Release.Namespace }} +data: + config.yaml: | + peer-service: unix://{{ .Values.hubble.socketPath }} + listen-address: {{ .Values.hubble.relay.listenHost }}:{{ .Values.hubble.relay.listenPort }} + dial-timeout: {{ .Values.hubble.relay.dialTimeout }} + retry-timeout: {{ .Values.hubble.relay.retryTimeout }} + sort-buffer-len-max: {{ .Values.hubble.relay.sortBufferLenMax }} + sort-buffer-drain-timeout: {{ .Values.hubble.relay.sortBufferDrainTimeout }} +{{- if .Values.hubble.tls.enabled }} + tls-client-cert-file: /var/lib/hubble-relay/tls/client.crt + tls-client-key-file: /var/lib/hubble-relay/tls/client.key + tls-hubble-server-ca-files: /var/lib/hubble-relay/tls/hubble-server-ca.crt +{{- else }} + disable-client-tls: true +{{- end }} +{{- if .Values.hubble.relay.tls.server.enabled }} + tls-server-cert-file: /var/lib/hubble-relay/tls/server.crt + tls-server-key-file: /var/lib/hubble-relay/tls/server.key +{{- else }} + disable-server-tls: true +{{- end }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-relay-deployment.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-relay-deployment.yaml new file mode 100755 index 0000000..f954138 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-relay-deployment.yaml @@ -0,0 +1,131 @@ +{{- if .Values.hubble.relay.enabled }} +apiVersion: apps/v1 +kind: Deployment +metadata: + name: hubble-relay + labels: + k8s-app: hubble-relay + namespace: {{ .Release.Namespace }} +spec: + + replicas: {{ .Values.hubble.relay.replicas }} + selector: + matchLabels: + k8s-app: hubble-relay +{{- with .Values.hubble.relay.updateStrategy }} + strategy: +{{ toYaml . | trim | indent 4 }} +{{- end }} + template: + metadata: + annotations: +{{- if .Values.hubble.relay.rollOutPods }} + # ensure pods roll when configmap updates + cilium.io/hubble-relay-configmap-checksum: {{ include (print $.Template.BasePath "/hubble-relay-configmap.yaml") . | sha256sum | quote }} +{{- end }} +{{- with .Values.hubble.relay.podAnnotations }} + {{- toYaml . | nindent 8 }} +{{- end }} + labels: + k8s-app: hubble-relay + spec: + affinity: + podAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: "k8s-app" + operator: In + values: + - cilium + topologyKey: "kubernetes.io/hostname" +{{- if .Values.imagePullSecrets }} + imagePullSecrets: +{{ toYaml .Values.imagePullSecrets | indent 8 }} +{{- end }} + containers: + - name: hubble-relay + image: {{ template "system_default_registry" . }}{{ .Values.hubble.relay.image.repository }}:{{ .Values.hubble.relay.image.tag }} + imagePullPolicy: {{ .Values.hubble.relay.image.pullPolicy }} + command: + - hubble-relay + args: + - serve +{{- if .Values.debug.enabled }} + - "--debug" +{{- end }} + ports: + - name: grpc + containerPort: {{ .Values.hubble.relay.listenPort }} + readinessProbe: + tcpSocket: + port: grpc + livenessProbe: + tcpSocket: + port: grpc +{{- with .Values.hubble.relay.resources }} + resources: + {{- toYaml . | trim | nindent 12 }} +{{- end }} + volumeMounts: + - mountPath: {{ dir .Values.hubble.socketPath }} + name: hubble-sock-dir + readOnly: true + - mountPath: /etc/hubble-relay + name: config + readOnly: true +{{- if .Values.hubble.tls.enabled }} + - mountPath: /var/lib/hubble-relay/tls + name: tls + readOnly: true +{{- end }} + restartPolicy: Always + serviceAccount: hubble-relay + serviceAccountName: hubble-relay + terminationGracePeriodSeconds: 0 +{{- with .Values.hubble.relay.nodeSelector }} + nodeSelector: + {{- toYaml . | trim | nindent 8 }} +{{- end }} +{{- with .Values.hubble.relay.tolerations }} + tolerations: + {{- toYaml . | trim | nindent 8 }} +{{- end }} + volumes: + - configMap: + name: hubble-relay-config + items: + - key: config.yaml + path: config.yaml + name: config + - hostPath: + path: {{ dir .Values.hubble.socketPath }} + type: Directory + name: hubble-sock-dir +{{- if .Values.hubble.tls.enabled }} + - projected: + sources: + - secret: + name: hubble-relay-client-certs + items: + - key: tls.crt + path: client.crt + - key: tls.key + path: client.key + - configMap: + name: hubble-ca-cert + items: + - key: ca.crt + path: hubble-server-ca.crt +{{- if .Values.hubble.relay.tls.server.enabled }} + - secret: + name: hubble-relay-server-certs + items: + - key: tls.crt + path: server.crt + - key: tls.key + path: server.key +{{- end }} + name: tls +{{- end }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-relay-service.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-relay-service.yaml new file mode 100755 index 0000000..d50fa31 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-relay-service.yaml @@ -0,0 +1,23 @@ +{{- if .Values.hubble.relay.enabled }} +kind: Service +apiVersion: v1 +metadata: + name: hubble-relay + namespace: {{ .Release.Namespace }} + labels: + k8s-app: hubble-relay +spec: + type: ClusterIP + selector: + k8s-app: hubble-relay + ports: + - protocol: TCP +{{- if .Values.hubble.relay.servicePort }} + port: {{ .Values.hubble.relay.servicePort }} +{{- else if .Values.hubble.relay.tls.server.enabled }} + port: 443 +{{- else }} + port: 80 +{{- end }} + targetPort: {{ .Values.hubble.relay.listenPort }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-relay-serviceaccount.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-relay-serviceaccount.yaml new file mode 100755 index 0000000..659cf56 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-relay-serviceaccount.yaml @@ -0,0 +1,11 @@ +{{- if and (.Values.hubble.relay.enabled) (.Values.serviceAccounts.relay.create) -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: hubble-relay + namespace: {{ .Release.Namespace }} + {{- with .Values.serviceAccounts.relay.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-relay-tls-server-secret.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-relay-tls-server-secret.yaml new file mode 100755 index 0000000..94f481d --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-relay-tls-server-secret.yaml @@ -0,0 +1,17 @@ +{{- if and (.Values.hubble.relay.enabled) (.Values.hubble.relay.tls.server.enabled) }} +{{- if or (and (.Values.hubble.tls.auto.enabled) (eq .Values.hubble.tls.auto.method "helm")) .Values.hubble.relay.tls.server.cert .Values.hubble.relay.tls.server.key }} +apiVersion: v1 +kind: Secret +metadata: + name: hubble-relay-server-certs + namespace: {{ .Release.Namespace }} +type: kubernetes.io/tls +data: +{{- if and (.Values.hubble.tls.auto.enabled) (eq .Values.hubble.tls.auto.method "helm") }} +{{ include "hubble.relay.gen-certs" . | indent 2 }} +{{- else }} + tls.crt: {{ .Values.hubble.relay.tls.server.cert }} + tls.key: {{ .Values.hubble.relay.tls.server.key }} +{{- end }} +{{- end }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-server-secret.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-server-secret.yaml new file mode 100755 index 0000000..0db224f --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-server-secret.yaml @@ -0,0 +1,19 @@ +{{- if and .Values.agent (not .Values.preflight.enabled) .Values.hubble.enabled .Values.hubble.tls.enabled }} +{{- $hubbleCertsProvided := and .Values.hubble.tls.server.cert .Values.hubble.tls.server.key }} +{{- $hubbleCertsGenerate := and .Values.hubble.tls.auto.enabled (eq .Values.hubble.tls.auto.method "helm") .Values.hubble.relay.enabled -}} +{{- if or $hubbleCertsProvided $hubbleCertsGenerate }} +apiVersion: v1 +kind: Secret +metadata: + name: hubble-server-certs + namespace: {{ .Release.Namespace }} +type: kubernetes.io/tls +data: +{{- if $hubbleCertsGenerate }} +{{ include "hubble.server.gen-certs" . | indent 2 }} +{{- else }} + tls.crt: {{ .Values.hubble.tls.server.cert }} + tls.key: {{ .Values.hubble.tls.server.key }} +{{- end }} +{{- end }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-ui-clusterrole.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-ui-clusterrole.yaml new file mode 100755 index 0000000..fc4aa2f --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-ui-clusterrole.yaml @@ -0,0 +1,44 @@ +{{- if and (.Values.hubble.ui.enabled) (.Values.serviceAccounts.ui.create) }} +kind: ClusterRole +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: hubble-ui +rules: + - apiGroups: + - networking.k8s.io + resources: + - networkpolicies + verbs: + - get + - list + - watch + - apiGroups: + - "" + resources: + - componentstatuses + - endpoints + - namespaces + - nodes + - pods + - services + verbs: + - get + - list + - watch + - apiGroups: + - apiextensions.k8s.io + resources: + - customresourcedefinitions + verbs: + - get + - list + - watch + - apiGroups: + - cilium.io + resources: + - "*" + verbs: + - get + - list + - watch +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-ui-clusterrolebinding.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-ui-clusterrolebinding.yaml new file mode 100755 index 0000000..cd2c4cb --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-ui-clusterrolebinding.yaml @@ -0,0 +1,14 @@ +{{- if and (.Values.hubble.ui.enabled) (.Values.serviceAccounts.ui.create) }} +kind: ClusterRoleBinding +apiVersion: rbac.authorization.k8s.io/v1 +metadata: + name: hubble-ui +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: hubble-ui +subjects: +- kind: ServiceAccount + namespace: {{ .Release.Namespace }} + name: hubble-ui +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-ui-configmap.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-ui-configmap.yaml new file mode 100755 index 0000000..3739516 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-ui-configmap.yaml @@ -0,0 +1,10 @@ +{{- if .Values.hubble.ui.enabled }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: hubble-ui-envoy + namespace: {{ .Release.Namespace }} +data: +{{ (.Files.Glob "files/envoy/*").AsConfig | indent 2 }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-ui-deployment.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-ui-deployment.yaml new file mode 100755 index 0000000..515d5ae --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-ui-deployment.yaml @@ -0,0 +1,87 @@ +{{- if .Values.hubble.ui.enabled }} +kind: Deployment +apiVersion: apps/v1 +metadata: + namespace: {{ .Release.Namespace }} + labels: + k8s-app: hubble-ui + name: hubble-ui +spec: + replicas: {{ .Values.hubble.ui.replicas }} + selector: + matchLabels: + k8s-app: hubble-ui + template: + metadata: + annotations: +{{- if .Values.hubble.ui.rollOutPods }} + # ensure pods roll when configmap updates + cilium.io/hubble-ui-envoy-configmap-checksum: {{ include (print $.Template.BasePath "/hubble-ui-configmap.yaml") . | sha256sum | quote }} +{{- end }} +{{- with .Values.hubble.ui.podAnnotations }} + {{- toYaml . | nindent 8 }} +{{- end }} + labels: + k8s-app: hubble-ui + spec: + {{- if .Values.hubble.ui.securityContext.enabled }} + securityContext: + runAsUser: 1001 + {{- end }} + serviceAccount: hubble-ui + serviceAccountName: hubble-ui +{{- with .Values.hubble.ui.nodeSelector }} + nodeSelector: + {{- toYaml . | trim | nindent 8 }} +{{- end }} +{{- with .Values.hubble.ui.tolerations }} + tolerations: + {{- toYaml . | trim | nindent 6 }} +{{- end }} + containers: + - name: frontend + image: "{{ template "system_default_registry" . }}{{ .Values.hubble.ui.frontend.image.repository }}:{{ .Values.hubble.ui.frontend.image.tag }}" + imagePullPolicy: {{ .Values.hubble.ui.frontend.image.pullPolicy }} + ports: + - containerPort: 8080 + name: http + resources: + {{- toYaml .Values.hubble.ui.frontend.resources | trim | nindent 12 }} + - name: backend + image: "{{ template "system_default_registry" . }}{{ .Values.hubble.ui.backend.image.repository }}:{{ .Values.hubble.ui.backend.image.tag }}" + imagePullPolicy: {{ .Values.hubble.ui.backend.image.pullPolicy }} + env: + - name: EVENTS_SERVER_PORT + value: "8090" + - name: FLOWS_API_ADDR + value: "hubble-relay:80" + ports: + - containerPort: 8090 + name: grpc + resources: + {{- toYaml .Values.hubble.ui.backend.resources | trim | nindent 12 }} + - name: proxy + image: "{{ template "system_default_registry" . }}{{ .Values.hubble.ui.proxy.image.repository }}:{{ .Values.hubble.ui.proxy.image.tag }}" + imagePullPolicy: {{ .Values.hubble.ui.proxy.image.pullPolicy }} + ports: + - containerPort: 8081 + name: http + resources: + {{- toYaml .Values.hubble.ui.proxy.resources | trim | nindent 12 }} + command: ["envoy"] + args: + [ + "-c", + "/etc/envoy.yaml", + "-l", + "info" + ] + volumeMounts: + - name: hubble-ui-envoy-yaml + mountPath: /etc/envoy.yaml + subPath: envoy.yaml + volumes: + - name: hubble-ui-envoy-yaml + configMap: + name: hubble-ui-envoy +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-ui-ingress.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-ui-ingress.yaml new file mode 100755 index 0000000..f67a423 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-ui-ingress.yaml @@ -0,0 +1,26 @@ +{{- if and (.Values.hubble.ui.enabled) (.Values.hubble.ui.ingress.enabled) -}} +apiVersion: {{ template "ingress.apiVersion" . }} +kind: Ingress +metadata: + name: hubble-ui + namespace: {{ .Release.Namespace }} + labels: + k8s-app: hubble-ui +{{- with .Values.hubble.ui.ingress.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} +spec: +{{- if .Values.hubble.ui.ingress.tls }} + tls: +{{ toYaml .Values.hubble.ui.ingress.tls | indent 4 }} +{{- end }} + rules: + {{- range .Values.hubble.ui.ingress.hosts }} + - host: {{ . }} + http: + paths: + - path: / +{{ include "ingress.paths" $ | indent 12 }} + {{- end }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-ui-service.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-ui-service.yaml new file mode 100755 index 0000000..5aa701d --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-ui-service.yaml @@ -0,0 +1,17 @@ +{{- if .Values.hubble.ui.enabled }} +kind: Service +apiVersion: v1 +metadata: + name: hubble-ui + labels: + k8s-app: hubble-ui + namespace: {{ .Release.Namespace }} +spec: + selector: + k8s-app: hubble-ui + ports: + - name: http + port: 80 + targetPort: 8081 + type: ClusterIP +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-ui-serviceaccount.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-ui-serviceaccount.yaml new file mode 100755 index 0000000..837f044 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/hubble-ui-serviceaccount.yaml @@ -0,0 +1,11 @@ +{{- if and (.Values.hubble.ui.enabled) (.Values.serviceAccounts.ui.create) -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: hubble-ui + namespace: {{ .Release.Namespace }} + {{- with .Values.serviceAccounts.ui.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/validate.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/validate.yaml new file mode 100755 index 0000000..1e9cbb8 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/templates/validate.yaml @@ -0,0 +1,18 @@ +{{/* validate hubble config */}} +{{- if .Values.hubble.ui.enabled }} + {{- if not .Values.hubble.relay.enabled }} + {{ fail "Hubble UI requires .Values.hubble.relay.enabled=true" }} + {{- end }} +{{- end }} +{{- if .Values.hubble.relay.enabled }} + {{- if not .Values.hubble.enabled }} + {{ fail "Hubble Relay requires .Values.hubble.enabled=true" }} + {{- end }} +{{- end }} + +{{/* validate service monitoring CRDs */}} +{{- if and (.Values.prometheus.enabled) (or (.Values.prometheus.serviceMonitor.enabled) (.Values.operator.prometheus.serviceMonitor.enabled)) }} + {{- if not (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1") }} + {{ fail "Service Monitor requires monitoring.coreos.com/v1 CRDs. Please refer to https://github.com/prometheus-operator/prometheus-operator/blob/master/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml" }} + {{- end }} +{{- end }} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/values.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/values.yaml new file mode 100755 index 0000000..72a954e --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/cilium/values.yaml @@ -0,0 +1,1513 @@ +# upgradeCompatibility helps users upgrading to ensure that the configMap for +# +# Cilium will not change critical values to ensure continued operation +# This is flag is not required for new installations. +# ex: 1.7, 1.8, 1.9 +# upgradeCompatibility: '1.8' + +debug: + # -- Enable debug logging + enabled: false + # verbose: + +rbac: + # -- Enable creation of Resource-Based Access Control configuration. + create: true + +# -- Configure image pull secrets for pulling container images +imagePullSecrets: +# - name: "image-pull-secret" + +# kubeConfigPath: ~/.kube/config +# k8sServiceHost: +# k8sServicePort: + +cluster: + # -- Name of the cluster. Only required for Cluster Mesh. + name: default + # -- (int) 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. + id: + +# -- Define serviceAccount names for components. +# @default -- Component's fully qualified name. +serviceAccounts: + cilium: + create: true + annotations: {} + etcd: + create: true + annotations: {} + operator: + create: true + annotations: {} + preflight: + create: true + annotations: {} + relay: + create: true + annotations: {} + ui: + create: true + annotations: {} + clustermeshApiserver: + create: true + annotations: {} + # -- Certgen is used if hubble.tls.auto.method=cronJob + certgen: + create: true + annotations: {} + +# -- Install the cilium agent resources. +agent: true + +# -- Agent container name. +name: cilium + +# -- Roll out cilium agent pods automatically when configmap is updated. +rollOutCiliumPods: false + +# -- Agent container image. +image: + repository: quay.io/cilium/cilium + tag: v1.9.6 + pullPolicy: IfNotPresent + # cilium-digest + digest: "sha256:6e2bc051dd5d942085591ea6150623790a8ffbaaab567007a2707fc7668d8055" + useDigest: false + +# -- Pod affinity for cilium-agent. +affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: k8s-app + operator: In + values: + - cilium + topologyKey: kubernetes.io/hostname + +priorityClassName: "" + +# -- Additional agent container arguments +extraArgs: {} + +# -- Additional agent container environment variables +extraEnv: {} + +# -- Additional InitContainers to initialize the pod +extraInitContainers: [] + +# -- Additional agent hostPath mounts +extraHostPathMounts: [] + # - name: host-mnt-data + # mountPath: /host/mnt/data + # hostPath: /mnt/data + # hostPathType: Directory + # readOnly: true + # mountPropagation: HostToContainer + +# -- Additional agent ConfigMap mounts +extraConfigmapMounts: [] + # - name: certs-configmap + # mountPath: /certs + # configMap: certs-configmap + # readOnly: true + +# -- extraConfig allows you to specify additional configuration parameters to be +# included in the cilium-config configmap. +extraConfig: {} +# my-config-a: "1234" +# my-config-b: |- +# test 1 +# test 2 +# test 3 + +# -- Node tolerations for agent scheduling to nodes with taints +# ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ +tolerations: +- operator: Exists + # - key: "key" + # operator: "Equal|Exists" + # value: "value" + # effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)" + +# -- Annotations to be added to agent pods +podAnnotations: {} + +# -- Labels to be added to agent pods +podLabels: {} + +# -- PodDisruptionBudget settings +# ref: https://kubernetes.io/docs/concepts/workloads/pods/disruptions/ +podDisruptionBudget: + enabled: true + maxUnavailable: 2 + +# -- Agent resource limits & requests +# ref: https://kubernetes.io/docs/user-guide/compute-resources/ +resources: {} + # limits: + # cpu: 4000m + # memory: 4Gi + # requests: + # cpu: 100m + # memory: 512Mi + +# -- Security context to be added to agent pods +securityContext: {} + # runAsUser: 0 + +# -- Cilium agent update strategy +updateStrategy: + rollingUpdate: + maxUnavailable: 2 + type: RollingUpdate + +# Configuration Values for cilium-agent + +# -- Enable installation of PodCIDR routes between worker +# nodes if worker nodes share a common L2 network segment. +autoDirectNodeRoutes: false + +azure: + # -- Enable Azure integration + enabled: false + # resourceGroup: group1 + # subscriptionID: 00000000-0000-0000-0000-000000000000 + # tenantID: 00000000-0000-0000-0000-000000000000 + # clientID: 00000000-0000-0000-0000-000000000000 + # clientSecret: 00000000-0000-0000-0000-000000000000 + # userAssignedIdentityID: 00000000-0000-0000-0000-000000000000 + +# -- Optimize TCP and UDP workloads and enable rate-limiting traffic from +# individual Pods with EDT (Earliest Departure Time) +# through the "kubernetes.io/egress-bandwidth" Pod annotation. +bandwidthManager: false + +bpf: + clockProbe: false + + # -- Force the cilium-agent DaemonSet to wait in an initContainer until the + # eBPF filesystem has been mounted. + waitForMount: false + + # -- Enables pre-allocation of eBPF map values. This increases + # memory usage but can reduce latency. + preallocateMaps: false + + # -- Configure the maximum number of entries in the TCP connection tracking + # table. + # ctTcpMax: '524288' + + # -- Configure the maximum number of entries for the non-TCP connection + # tracking table. + # ctAnyMax: '262144' + + # -- Configure the maximum number of service entries in the + # load balancer maps. + lbMapMax: 65536 + + # -- Configure the maximum number of entries for the NAT table. + # natMax: 524288 + + # -- Configure the maximum number of entries for the neighbor table. + # neighMax: 524288 + + # -- Configure the maximum number of entries in endpoint policy map. + # (per endpoint) + policyMapMax: 16384 + + # -- Configure auto-sizing for all BPF maps based on available memory. + # ref: https://docs.cilium.io/en/v1.9/concepts/ebpf/maps/#ebpf-maps + #mapDynamicSizeRatio: 0.0025 + + # -- Configure the level of aggregation for monitor notifications. + # Valid options are none, low, medium, maximum + monitorAggregation: medium + + # -- Configure the typical time between monitor notifications for + # active connections. + monitorInterval: "5s" + + # -- Configure which TCP flags trigger notifications when seen for the + # first time in a connection. + monitorFlags: "all" + + # -- Enable native IP masquerade support in eBPF + #masquerade: true + + # -- 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. + #hostRouting: true + + # -- Configure the eBPF-based TPROXY to reduce reliance on iptables rules + # for implementing Layer 7 policy. + # tproxy: true + +# -- Clean all eBPF datapath state from the initContainer of the cilium-agent +# DaemonSet. +# +# WARNING: Use with care! +cleanBpfState: false + +# -- Clean all local Cilium state from the initContainer of the cilium-agent +# DaemonSet. Implies cleanBpfState: true. +# +# WARNING: Use with care! +cleanState: false + +cni: + # -- Install the CNI configuration and binary files into the filesystem. + install: true + + # -- Configure chaining on top of other CNI plugins. Possible values: + # - none + # - generic-veth + # - aws-cni + # - portmap + chainingMode: none + + # -- Skip writing of the CNI configuration. This can be used if + # writing of the CNI configuration is performed by external automation. + customConf: false + + # -- Configure the path to the CNI configuration directory on the host. + confPath: /etc/cni/net.d + + # -- Configure the path to the CNI binary directory on the host. + binPath: /opt/cni/bin + + # -- Specify the path to a CNI config to read from on agent start. + # This can be useful if you want to manage your CNI + # configuration outside of a Kubernetes environment. This parameter is + # mutually exclusive with the 'cni.configMap' parameter. + # readCniConf: /host/etc/cni/net.d/05-cilium.conf + + # -- When defined, configMap will mount the provided value as ConfigMap and + # interpret the cniConf variable as CNI configuration file and write it + # when the agent starts up + # configMap: cni-configuration + + # -- Configure the key in the CNI ConfigMap to read the contents of + # the CNI configuration from. + configMapKey: cni-config + + # -- Configure the path to where to mount the ConfigMap inside the agent pod. + confFileMountPath: /tmp/cni-configuration + + # -- Configure the path to where the CNI configuration directory is mounted + # inside the agent pod. + hostConfDirMountPath: /host/etc/cni/net.d + +# -- Configure how frequently garbage collection should occur for the datapath +# connection tracking table. +# conntrackGCInterval: "0s" + +# -- Configure container runtime specific integration. +containerRuntime: + # -- Enables specific integrations for container runtimes. + # Supported values: + # - containerd + # - crio + # - docker + # - none + # - auto (automatically detect the container runtime) + integration: none + # -- Configure the path to the container runtime control socket. + # socketPath: /path/to/runtime.sock + +# crdWaitTimeout: "" + +# -- Configure which datapath mode should be used for configuring container +# connectivity. Valid options are "veth" or "ipvlan". +datapathMode: veth + +daemon: + # -- Configure where Cilium runtime state should be stored. + runPath: "/var/run/cilium" + +# -- Specify which network interfaces can run the eBPF datapath. This means +# that a packet sent from a pod to a destination outside the cluster will be +# masqueraded (to an output device IPv4 address), if the output device runs the +# program. When not specified, probing will automatically detect devices. +# devices: "" + +# TODO: Add documentation +# disableIptablesFeederRules: "" + +# TODO: Add documentation +# egressMasqueradeInterfaces: "" + +enableCnpStatusUpdates: false + +# TODO: Add documentation +# enableIdentityMark: false + +# enableK8sEndpointSlice: false + +# -- 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: +# http://docs.cilium.io/en/stable/install/system_requirements/#admin-kernel-version. +enableXTSocketFallback: true + +encryption: + # -- Enable transparent network encryption. + enabled: false + + # -- Name of the key file inside the Kubernetes secret configured via secretName. + keyFile: keys + + # -- Path to mount the secret inside the Cilium pod. + mountPath: /etc/ipsec + + # -- Name of the Kubernetes secret containing the encryption keys. + secretName: cilium-ipsec-keys + + # -- Enable encryption for pure node to node traffic. + nodeEncryption: false + + # -- The interface to use for encrypted traffic. + # interface: eth0 + +# TODO: Add documentation +endpointHealthChecking: + enabled: true + +endpointRoutes: + # -- Enable use of per endpoint routes instead of routing via + # the cilium_host interface. + enabled: false + +# -- Enable Elastic Network Interface (ENI) integration. +eni: false + +externalIPs: + # -- Enable ExternalIPs service support. + enabled: false + +# flannel is the flannel specific configuration +flannel: + # enabled enables the flannel integration + enabled: false + + # masterDevice is the name of the flannel bridge + masterDevice: cni0 + + # uninstallOnExt enables uninstallation of Cilium BPF programs on flannel + # managed pods when the Cilium pod is terminated + uninstallOnExit: false + +# fragmentTracking enables IPv4 fragment tracking support in the datapath. +# fragmentTracking: true + +gke: + # -- Enable Google Kubernetes Engine integration + enabled: false + +# TODO: Add documentation +healthChecking: true + +# -- TCP port for the agent health API. This is not the port for cilium-health. +healthPort: 9876 + +# -- Enables the enforcement of host policies in the eBPF datapath. +hostFirewall: false + +hostPort: + # -- Enable hostPort service support. + enabled: false + +# -- Configure ClusterIP service handling in the host namespace (the node). +hostServices: + # -- Enable host reachable services. + enabled: false + + # -- Supported list of protocols to apply ClusterIP translation to. + protocols: tcp,udp + + +# -- 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: + image: + repository: quay.io/cilium/certgen + tag: v0.1.3 + pullPolicy: IfNotPresent + # -- Seconds after which the completed job pod will be deleted + ttlSecondsAfterFinished: 1800 + # -- Labels to be added to hubble-certgen pods + podLabels: {} + +hubble: + # -- Enable Hubble (true by default). + enabled: true + + # -- Buffer size of the channel Hubble uses to receive monitor events. If this + # value is not set, the queue size is set to the default monitor queue size. + # eventQueueSize: "" + + # -- Number of recent flows for Hubble to cache. Defaults to 4095. + # Possible values are: + # 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, + # 2047, 4095, 8191, 16383, 32767, 65535 + # eventBufferCapacity: "4095" + + # -- Hubble metrics configuration. + # See https://docs.cilium.io/en/stable/configuration/metrics/#hubble-metrics + # for more comprehensive documentation about Hubble metrics. + metrics: + # -- 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 metrics.enabled="{dns:query;ignoreAAAA,drop,tcp,flow,icmp,http}" + # + enabled: ~ + # -- Configure the port the hubble metric server listens on. + port: 9091 + serviceMonitor: + # -- Create ServiceMonitor resources for Prometheus Operator. + # This requires the prometheus CRDs to be available. + # ref: https://github.com/prometheus-operator/prometheus-operator/blob/master/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml) + enabled: false + + metricsServer: "" + + # -- Unix domain socket path to listen to when Hubble is enabled. + socketPath: /var/run/cilium/hubble.sock + + # -- 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. + listenAddress: ":4244" + + # -- TLS configuration for Hubble + tls: + # -- Enable mutual TLS for listenAddress. Setting this value to false is + # highly discouraged as the Hubble API provides access to potentially + # sensitive network flow metadata and is exposed on the host network. + enabled: true + # -- Configure automatic TLS certificates generation. + auto: + # -- Auto-generate certificates. + # When set to true, automatically generate a CA and certificates to + # enable mTLS between Hubble server and Hubble Relay instances. If set to + # false, the certs for Hubble server need to be provided by setting + # appropriate values below. + enabled: true + # -- Set the method to auto-generate certificates. Supported values: + # - helm: This method uses Helm to generate all certificates. + # - cronJob: This method uses a Kubernetes CronJob the generate any + # certificates not provided by the user at installation + # time. + method: helm + # -- Generated certificates validity duration in days. + certValidityDuration: 1095 + # -- Schedule for certificates regeneration (regardless of their expiration date). + # Only used if method is "cronJob". If nil, then no recurring job will be created. + # Instead, only the one-shot job is deployed to generate the certificates at + # installation time. + # + # Defaults to midnight of the first day of every fourth month. For syntax, see + # https://kubernetes.io/docs/tasks/job/automated-tasks-with-cron-jobs/#schedule + schedule: "0 0 1 */4 *" + # -- base64 encoded PEM values for the Hubble CA certificate and private key. + ca: + cert: "" + # -- The CA private key (optional). If it is provided, then it will be + # used by hubble.tls.auto.method=cronJob to generate all other certificates. + # Otherwise, a ephemeral CA is generated if hubble.tls.auto.enabled=true. + key: "" + # -- base64 encoded PEM values for the Hubble server certificate and private key + server: + cert: "" + key: "" + + relay: + # -- Enable Hubble Relay (requires hubble.enabled=true) + enabled: false + + # -- Roll out Hubble Relay pods automatically when configmap is updated. + rollOutPods: false + + # -- Hubble-relay container image. + image: + repository: quay.io/cilium/hubble-relay + tag: v1.9.6 + pullPolicy: IfNotPresent + # hubble-relay-digest + digest: "sha256:2ea804c454b660d474feae96c01da1b9193dfce6809b4d3825e7b6efc6ade8c7" + useDigest: false + + # -- Specifies the resources for the hubble-relay pods + resources: {} + + # -- Number of replicas run for the hubble-relay deployment. + replicas: 1 + + # -- Node labels for pod assignment + # ref: https://kubernetes.io/docs/user-guide/node-selection/ + nodeSelector: {} + + # -- Annotations to be added to hubble-relay pods + podAnnotations: {} + + # -- Labels to be added to hubble-relay pods + podLabels: {} + + # -- Node tolerations for pod assignment on nodes with taints + # ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ + # + tolerations: [] + + # -- hubble-relay update strategy + updateStrategy: + rollingUpdate: + maxUnavailable: 1 + type: RollingUpdate + + # -- Host to listen to. Specify an empty string to bind to all the interfaces. + listenHost: "" + + # -- Port to listen to. + listenPort: "4245" + + # -- TLS configuration for Hubble Relay + tls: + # -- 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. + client: + cert: "" + key: "" + # -- base64 encoded PEM values for the hubble-relay server certificate and private key + server: + # When set to true, enable TLS on for Hubble Relay server + # (ie: for clients connecting to the Hubble Relay API). + enabled: false + # These values need to be set manually if hubble.tls.auto.enabled is false. + cert: "" + key: "" + + # -- Dial timeout to connect to the local hubble instance to receive peer information (e.g. "30s"). + dialTimeout: ~ + + # -- Backoff duration to retry connecting to the local hubble instance in case of failure (e.g. "30s"). + retryTimeout: ~ + + # -- Max number of flows that can be buffered for sorting before being sent to the + # client (per request) (e.g. 100). + sortBufferLenMax: ~ + + # -- 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"). + sortBufferDrainTimeout: ~ + + # -- Port to use for the k8s service backed by hubble-relay pods. + # If not set, it is dynamically assigned to port 443 if TLS is enabled and to + # port 80 if not. + # servicePort: 80 + + ui: + enabled: false + + # -- Roll out Hubble-ui pods automatically when configmap is updated. + rollOutPods: false + + backend: + # -- Hubble-ui backend image. + image: + repository: quay.io/cilium/hubble-ui-backend + tag: v0.7.3 + pullPolicy: IfNotPresent + # Resource requests and limits for the 'hubble-ui' container of the 'hubble-ui' deployment, such as + # resources: + # limits: + # cpu: 1000m + # memory: 1024M + # requests: + # cpu: 100m + # memory: 64Mi + resources: {} + + frontend: + # -- Hubble-ui frontend image. + image: + repository: quay.io/cilium/hubble-ui + tag: v0.7.3 + pullPolicy: IfNotPresent + # Resource requests and limits for the 'hubble-ui' container of the 'hubble-ui' deployment, such as + # resources: + # limits: + # cpu: 1000m + # memory: 1024M + # requests: + # cpu: 100m + # memory: 64Mi + resources: {} + + proxy: + # -- Hubble-ui ingress proxy image. + image: + repository: docker.io/envoyproxy/envoy + tag: v1.14.5 + pullPolicy: IfNotPresent + # Resource requests and limits for the 'hubble-ui' container of the 'hubble-ui' deployment, such as + # resources: + # limits: + # cpu: 1000m + # memory: 1024M + # requests: + # cpu: 100m + # memory: 64Mi + resources: {} + + replicas: 1 + + # -- Annotations to be added to hubble-ui pods + podAnnotations: {} + + # -- Labels to be added to hubble-ui pods + podLabels: {} + + # -- Node labels for pod assignment + # ref: https://kubernetes.io/docs/user-guide/node-selection/ + nodeSelector: {} + + # -- Node tolerations for pod assignment on nodes with taints + # ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ + # + tolerations: [] + + # -- hubble-ui update strategy. + updateStrategy: + rollingUpdate: + maxUnavailable: 1 + type: RollingUpdate + + securityContext: + enabled: true + + # -- hubble-ui ingress configuration. + ingress: + enabled: false + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + hosts: + - chart-example.local + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + + +# TODO: Add documentation +identityAllocationMode: "crd" + +# TODO: Add documentation +# identityChangeGracePeriod: "5s" + +# TODO: Add documentation +# identityGCInterval: + +# TODO: Add documentation +# identityHeartbeatTimeout: "" + + +# -- Configure whether to install iptables rules to allow for TPROXY +# (L7 proxy injection), iptables-based masquerading and compatibility +# with kube-proxy. +installIptablesRules: true + +ipam: + # -- Configure IP Address Management mode. + # ref: https://docs.cilium.io/en/stable/concepts/networking/ipam/ + mode: "cluster-pool" + operator: + # -- IPv4 CIDR range to delegate to individual nodes for IPAM. + clusterPoolIPv4PodCIDR: "10.0.0.0/8" + # -- IPv4 CIDR mask size to delegate to individual nodes for IPAM. + clusterPoolIPv4MaskSize: 24 + # -- IPv6 CIDR range to delegate to individual nodes for IPAM. + clusterPoolIPv6PodCIDR: "fd00::/104" + # -- IPv6 CIDR mask size to delegate to individual nodes for IPAM. + clusterPoolIPv6MaskSize: 120 + +# -- Configure the eBPF-based ip-masq-agent +ipMasqAgent: + enabled: false + +# iptablesLockTimeout defines the iptables "--wait" option when invoked from Cilium. +# iptablesLockTimeout: "5s" + +ipv4: + # -- Enable IPv4 support. + enabled: true + +ipv6: + # -- Enable IPv6 support. + enabled: false + +ipvlan: + # -- Enable the IPVLAN datapath + enabled: false + + # -- masterDevice is the name of the device to use to attach secondary IPVLAN + # devices + # masterDevice: eth0 + +# -- Configure Kubernetes specific configuration +k8s: {} + # -- requireIPv4PodCIDR enables waiting for Kubernetes to provide the PodCIDR + # range via the Kubernetes node resource + # requireIPv4PodCIDR: false + + # -- requireIPv6PodCIDR enables waiting for Kubernetes to provide the PodCIDR + # range via the Kubernetes node resource + # requireIPv6PodCIDR: false + +# -- Keep the deprecated selector labels when deploying Cilium DaemonSet +keepDeprecatedLabels: false + +# -- Keep the deprecated probes when deploying Cilium DaemonSet +keepDeprecatedProbes: false + +# -- Configure the kube-proxy replacement in Cilium BPF datapath +# Valid options are "disabled", "probe", "partial", "strict". +# ref: https://docs.cilium.io/en/stable/gettingstarted/kubeproxy-free/ +kubeProxyReplacement: "probe" + +# -- healthz server bind address for the kube-proxy replacement. +# To enable set the value to '0.0.0.0:10256' for all ipv4 +# addresses and this '[::]:10256' for all ipv6 addresses. +# By default it is disabled. +kubeProxyReplacementHealthzBindAddr: "" + +# -- Enable Layer 7 network policy. +l7Proxy: true + +localRedirectPolicy: false + +# To include or exclude matched resources from cilium identity evaluation +# labels: "" + +# logOptions allows you to define logging options. eg: +# logOptions: +# format: json + +# -- Enables periodic logging of system load +logSystemLoad: false + + +# -- Configure maglev consistent hashing +maglev: {} + # -- tableSize is the size (parameter M) for the backend table of one + # service entry + # tableSize: + + # -- hashSeed is the cluster-wide base64 encoded seed for the hashing + # hashSeed: + +# -- Enables masquerading of traffic leaving the node for destinations +# outside of the cluster. +masquerade: true + +# -- Specify the CIDR for native routing (ie to avoid IP masquerade for). +# This value corresponds to the configured cluster-cidr. +# nativeRoutingCIDR: + +# -- Configure cilium-monitor sidecar +monitor: + enabled: false + +# -- Configure service load balancing +# loadBalancer: + # algorithm is the name of the load balancing algorithm for backend + # selection e.g. random or maglev + # algorithm: "random" + + # mode is the operation mode of load balancing for remote backends + # e.g. snat, dsr, hybrid + # mode: snat + + # acceleration is the option to accelerate service handling via XDP + # e.g. native, disabled + # acceleration: disabled + +nodePort: + # -- Enable the Cilium NodePort service implementation. + enabled: false + + # -- Port range to use for NodePort services. + # range: "30000,32767" + + # -- Set to true to prevent applications binding to service ports. + bindProtection: true + + # -- Append NodePort range to ip_local_reserved_ports if clash with ephemeral + # ports is detected. + autoProtectPortRange: true + + # -- Enable healthcheck nodePort server for NodePort services + enableHealthCheck: true + +# policyAuditMode: false + +# -- The agent can be put into one of the three policy enforcement modes: +# default, always and never. +# ref: https://docs.cilium.io/en/stable/policy/intro/#policy-enforcement-modes +policyEnforcementMode: "default" + +pprof: + # -- Enable Go pprof debugging + enabled: false + +# -- Configure prometheus metrics on the configured port at /metrics +prometheus: + enabled: false + port: 9090 + serviceMonitor: + # -- Enable service monitors. + # This requires the prometheus CRDs to be available (see https://github.com/prometheus-operator/prometheus-operator/blob/master/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml) + # + enabled: false + # -- Specify the Kubernetes namespace where Prometheus expects to find + # service monitors configured. + # namespace: "" + +# -- Configure Istio proxy options. +proxy: + prometheus: + port: "9095" + # -- Regular expression matching compatible Istio sidecar istio-proxy + # container image names + sidecarImageRegex: "cilium/istio_proxy" + +# -- Enable use of the remote node identity. +# ref: https://docs.cilium.io/en/v1.7/install/upgrade/#configmap-remote-node-identity +remoteNodeIdentity: true + +# -- Enable resource quotas for priority classes used in the cluster. +resourceQuotas: + enabled: false + cilium: + hard: + # 5k nodes * 2 DaemonSets (Cilium and cilium node init) + pods: "10k" + operator: + hard: + # 15 "clusterwide" Cilium Operator pods for HA + pods: "15" + +# Need to document default +################## +#sessionAffinity: false + +# -- Do not run Cilium agent when running with clean mode. Useful to completely +# uninstall Cilium as it will stop Cilium from starting and create artifacts +# in the node. +sleepAfterInit: false + +# -- Configure BPF socket operations configuration +sockops: + # enabled enables installation of socket options acceleration. + enabled: false + +# TODO: Add documentation, default value +# svcSourceRangeCheck: + +# synchronizeK8sNodes: true + +# -- Configure TLS configuration in the agent. +tls: + enabled: true + secretsBackend: local + +# -- Configure the encapsulation configuration for communication between nodes. +# Possible values: +# - disabled +# - vxlan (default) +# - geneve +tunnel: "vxlan" + +etcd: + # -- Enable etcd mode for the agent. + enabled: false + + # -- cilium-etcd-operator image. + image: + repository: quay.io/cilium/cilium-etcd-operator + tag: v2.0.7 + pullPolicy: IfNotPresent + + # -- cilium-etcd-operator priorityClassName + # + priorityClassName: "" + + # -- Additional cilium-etcd-operator container arguments + # + extraArgs: {} + + # -- Additional InitContainers to initialize the pod + # + extraInitContainers: [] + + # -- Additional cilium-etcd-operator hostPath mounts + # + extraHostPathMounts: [] + # - name: textfile-dir + # mountPath: /srv/txt_collector + # hostPath: /var/lib/cilium-etcd-operator + # readOnly: true + # mountPropagation: HostToContainer + + # -- Additional cilium-etcd-operator ConfigMap mounts + # + extraConfigmapMounts: [] + # - name: certs-configmap + # mountPath: /certs + # configMap: certs-configmap + # readOnly: true + + # -- Node tolerations for cilium-etcd-operator scheduling to nodes with taints + # ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ + # + tolerations: + - operator: Exists + # - key: "key" + # operator: "Equal|Exists" + # value: "value" + # effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)" + + # -- Node labels for cilium-etcd-operator pod assignment + # ref: https://kubernetes.io/docs/user-guide/node-selection/ + # + nodeSelector: {} + + # -- Annotations to be added to cilium-etcd-operator pods + podAnnotations: {} + + # -- Labels to be added to cilium-etcd-operator pods + podLabels: {} + + # -- PodDisruptionBudget settings + # ref: https://kubernetes.io/docs/concepts/workloads/pods/disruptions/ + # + podDisruptionBudget: + enabled: true + maxUnavailable: 2 + + # -- cilium-etcd-operator resource limits & requests + # ref: https://kubernetes.io/docs/user-guide/compute-resources/ + # + resources: {} + # limits: + # cpu: 4000m + # memory: 4Gi + # requests: + # cpu: 100m + # memory: 512Mi + + # -- Security context to be added to cilium-etcd-operator pods + # + securityContext: {} + # runAsUser: 0 + + # -- cilium-etcd-operator update strategy + updateStrategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 1 + type: RollingUpdate + + # -- 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. + k8sService: false + + # -- Enable managed etcd mode based on the cilium-etcd-operator. + managed: false + + # -- Cluster domain for cilium-etcd-operator. + clusterDomain: cluster.local + + # -- Size of the managed etcd cluster. + clusterSize: 3 + + # -- List of etcd endpoints (not needed when using managed=true). + endpoints: + - https://CHANGE-ME:2379 + + # -- Enable use of TLS/SSL for connectivity to etcd. (auto-enabled if + # managed=true) + ssl: false + +operator: + # -- Enable the cilium-operator component (required). + enabled: true + + # -- Roll out cilium-operator pods automatically when configmap is updated. + rollOutPods: false + + # -- cilium-operator image. + image: + repository: quay.io/cilium/operator + tag: v1.9.6 + pullPolicy: IfNotPresent + suffix: "" + # operator-generic-digest + genericDigest: "sha256:29a315472ae0701dbfbfff1e9766f68c2915edd896a011f7e8e409cf4d687453" + # operator-azure-digest + azureDigest: "sha256:e70493e05af077501563db990db1165dfcc66b09bfb751065f3d72e504e46ca7" + # operator-aws-digest + awsDigest: "sha256:9cc271130849e109608478b5fa695d84ab9542900ceeb7128c1a0c7b29abad3c" + useDigest: false + + # -- Number of replicas to run for the cilium-operator deployment + replicas: 2 + + # -- cilium-operator priorityClassName + priorityClassName: "" + + # -- cilium-operator update strategy + updateStrategy: + rollingUpdate: + maxSurge: 1 + maxUnavailable: 1 + type: RollingUpdate + + # -- cilium-operator affinity + affinity: + podAntiAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: io.cilium/app + operator: In + values: + - operator + topologyKey: kubernetes.io/hostname + + + # -- Additional cilium-etcd-operator container arguments + # + extraArgs: {} + + extraEnv: {} + + # -- Additional InitContainers to initialize the pod + # + extraInitContainers: [] + + # -- Additional cilium-operator hostPath mounts + extraHostPathMounts: [] + # - name: host-mnt-data + # mountPath: /host/mnt/data + # hostPath: /mnt/data + # hostPathType: Directory + # readOnly: true + # mountPropagation: HostToContainer + + extraConfigmapMounts: [] + # - name: certs-configmap + # mountPath: /certs + # configMap: certs-configmap + # readOnly: true + + # -- Node tolerations for cilium-operator scheduling to nodes with taints + # ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ + # + tolerations: + - operator: Exists + # - key: "key" + # operator: "Equal|Exists" + # value: "value" + # effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)" + + # -- Node labels for cilium-operator pod assignment + # ref: https://kubernetes.io/docs/user-guide/node-selection/ + # + nodeSelector: {} + + # -- Annotations to be added to cilium-operator pods + podAnnotations: {} + + # -- Labels to be added to cilium-operator pods + podLabels: {} + + # -- PodDisruptionBudget settings + # ref: https://kubernetes.io/docs/concepts/workloads/pods/disruptions/ + # + podDisruptionBudget: + enabled: false + maxUnavailable: 1 + + # -- cilium-operator resource limits & requests + # ref: https://kubernetes.io/docs/user-guide/compute-resources/ + # + resources: {} + # limits: + # cpu: 1000m + # memory: 1Gi + # requests: + # cpu: 100m + # memory: 128Mi + + # -- Security context to be added to cilium-operator pods + # + securityContext: {} + # runAsUser: 0 + + endpointGCInterval: "5m0s" + identityGCInterval: "15m0s" + identityHeartbeatTimeout: "30m0s" + + # -- Enable prometheus metrics for cilium-operator on the configured port at + # /metrics + prometheus: + enabled: false + port: 6942 + serviceMonitor: + # -- Enable service monitors. + # This requires the prometheus CRDs to be available (see https://github.com/prometheus-operator/prometheus-operator/blob/master/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml) + ## + enabled: false + + +nodeinit: + # -- Enable the node initialization DaemonSet + enabled: false + + # -- node-init image. + image: + repository: quay.io/cilium/startup-script + tag: 62bfbe88c17778aad7bef9fa57ff9e2d4a9ba0d8 + pullPolicy: IfNotPresent + + priorityClassName: "" + + # -- node-init update strategy + updateStrategy: + type: RollingUpdate + + extraArgs: {} + + extraEnv: {} + + extraInitContainers: [] + + extraHostPathMounts: [] + # - name: textfile-dir + # mountPath: /srv/txt_collector + # hostPath: /var/lib/nodeinit + # readOnly: true + # mountPropagation: HostToContainer + + extraConfigmapMounts: [] + # - name: certs-configmap + # mountPath: /certs + # configMap: certs-configmap + # readOnly: true + + # -- Node tolerations for nodeinit scheduling to nodes with taints + # ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ + # + tolerations: + - operator: Exists + # - key: "key" + # operator: "Equal|Exists" + # value: "value" + # effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)" + + # -- Node labels for nodeinit pod assignment + # ref: https://kubernetes.io/docs/user-guide/node-selection/ + # + nodeSelector: {} + + # -- Annotations to be added to node-init pods + podAnnotations: {} + + # -- Labels to be added to node-init pods + podLabels: {} + + # -- PodDisruptionBudget settings + # ref: https://kubernetes.io/docs/concepts/workloads/pods/disruptions/ + # + podDisruptionBudget: + enabled: true + maxUnavailable: 2 + + # -- nodeinit resource limits & requests + # ref: https://kubernetes.io/docs/user-guide/compute-resources/ + # + resources: + requests: + cpu: 100m + memory: 100Mi + + # -- Security context to be added to nodeinit pods + # + securityContext: {} + # runAsUser: 0 + + # -- bootstrapFile is the location of the file where the bootstrap timestamp is + # written by the node-init DaemonSet + bootstrapFile: "/tmp/cilium-bootstrap-time" + +preflight: + # -- Enable Cilium pre-flight resources (required for upgrade) + enabled: false + + # -- Cilium pre-flight image. + image: + repository: quay.io/cilium/cilium + tag: v1.9.6 + pullPolicy: IfNotPresent + # cilium-digest + digest: "sha256:6e2bc051dd5d942085591ea6150623790a8ffbaaab567007a2707fc7668d8055" + useDigest: false + + priorityClassName: "" + + # -- preflight update strategy + updateStrategy: + type: RollingUpdate + + extraArgs: {} + + extraEnv: {} + + extraInitContainers: [] + + extraHostPathMounts: [] + # - name: textfile-dir + # mountPath: /srv/txt_collector + # hostPath: /var/lib/preflight + # readOnly: true + # mountPropagation: HostToContainer + + extraConfigmapMounts: [] + # - name: certs-configmap + # mountPath: /certs + # configMap: certs-configmap + # readOnly: true + + # -- Node tolerations for preflight scheduling to nodes with taints + # ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ + # + tolerations: + - effect: NoSchedule + key: node.kubernetes.io/not-ready + - effect: NoSchedule + key: node-role.kubernetes.io/master + - effect: NoSchedule + key: node.cloudprovider.kubernetes.io/uninitialized + value: "true" + - key: CriticalAddonsOnly + operator: "Exists" + # - key: "key" + # operator: "Equal|Exists" + # value: "value" + # effect: "NoSchedule|PreferNoSchedule|NoExecute(1.6 only)" + + # -- Node labels for preflight pod assignment + # ref: https://kubernetes.io/docs/user-guide/node-selection/ + # + nodeSelector: {} + + # -- Annotations to be added to preflight pods + podAnnotations: {} + + # Labels to be added to preflight pods + podLabels: {} + + # -- PodDisruptionBudget settings + # ref: https://kubernetes.io/docs/concepts/workloads/pods/disruptions/ + # + podDisruptionBudget: + enabled: true + maxUnavailable: 2 + + # -- preflight resource limits & requests + # ref: https://kubernetes.io/docs/user-guide/compute-resources/ + # + resources: {} + # limits: + # cpu: 4000m + # memory: 4Gi + # requests: + # cpu: 100m + # memory: 512Mi + + # -- Security context to be added to preflight pods + # + securityContext: {} + # runAsUser: 0 + + # -- Path to write the --tofqdns-pre-cache file to. + tofqdnsPreCache: "" + # -- 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. + validateCNPs: true + +# -- Explicitly enable or disable priority class. +# .Capabilities.KubeVersion is unsettable in `helm template` calls, +# it depends on k8s libriaries 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. +enableCriticalPriorityClass: true + +# disableEnvoyVersionCheck removes the check for Envoy, which can be useful +# on AArch64 as the images do not currently ship a version of Envoy. +#disableEnvoyVersionCheck: false + +clustermesh: + # -- Deploy clustermesh-apiserver for clustermesh + useAPIServer: false + + apiserver: + # -- Clustermesh API server image. + image: + repository: quay.io/cilium/clustermesh-apiserver + tag: v1.9.6 + pullPolicy: IfNotPresent + # clustermesh-apiserver-digest + digest: "sha256:e4a6d47d0d8e4ef52c44e99a906076e29e8513a35a972e60100df2168b381318" + useDigest: false + + etcd: + # -- Clustermesh API server etcd image. + image: + repository: quay.io/coreos/etcd + tag: v3.4.13 + pullPolicy: IfNotPresent + + service: + type: NodePort + # -- Optional port to use as the node port for apiserver access. + nodePort: 32379 + # -- Optional loadBalancer IP address to use with type LoadBalancer. + # loadBalancerIP: + + # -- 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 + annotations: {} + + # -- Number of replicas run for the clustermesh-apiserver deployment. + replicas: 1 + + # -- Node labels for pod assignment + # ref: https://kubernetes.io/docs/user-guide/node-selection/ + nodeSelector: {} + + # -- Annotations to be added to clustermesh-apiserver pods + podAnnotations: {} + + # -- Labels to be added to clustermesh-apiserver pods + podLabels: {} + + # -- Resource requests and limits for the clustermesh-apiserver container of the clustermesh-apiserver deployment, such as + # resources: + # limits: + # cpu: 1000m + # memory: 1024M + # requests: + # cpu: 100m + # memory: 64Mi + resources: {} + + # -- Node tolerations for pod assignment on nodes with taints + # ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ + tolerations: [] + + # -- clustermesh-apiserver update strategy + updateStrategy: + rollingUpdate: + maxUnavailable: 1 + type: RollingUpdate + + tls: + # -- Configure automatic TLS certificates generation. + # A Kubernetes CronJob is used the generate any + # certificates not provided by the user at installation + # time. + auto: + # -- 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. + enabled: true + # Sets the method to auto-generate certificates. Supported values: + # - helm: This method uses Helm to generate all certificates. + # - cronJob: This method uses a Kubernetes CronJob the generate any + # certificates not provided by the user at installation + # time. + method: helm + # -- Generated certificates validity duration in days. + certValidityDuration: 1095 + # -- Schedule for certificates regeneration (regardless of their expiration date). + # Only used if method is "cronJob". If nil, then no recurring job will be created. + # Instead, only the one-shot job is deployed to generate the certificates at + # installation time. + # + # Due to the out-of-band distribution of client certs to external workloads the + # CA is (re)regenerated only if it is not provided as a helm value and the k8s + # secret is manually deleted. + # + # Defaults to none. Commented syntax gives midnight of the first day of every + # fourth month. For syntax, see + # https://kubernetes.io/docs/tasks/job/automated-tasks-with-cron-jobs/#schedule + # schedule: "0 0 1 */4 *" + # -- base64 encoded PEM values for the ExternalWorkload CA certificate and private key. + ca: + # -- Optional CA cert. If it is provided, it will be used by the 'cronJob' method to + # generate all other certificates. Otherwise, an ephemeral CA is generated. + cert: "" + # -- Optional CA private key. If it is provided, it will be used by the 'cronJob' method to + # generate all other certificates. Otherwise, an ephemeral CA is generated. + key: "" + # -- base64 encoded PEM values for the clustermesh-apiserver server certificate and private key + # Used if 'auto' is not enabled. + server: + cert: "" + key: "" + # -- base64 encoded PEM values for the clustermesh-apiserver admin certificate and private key + # Used if 'auto' is not enabled. + admin: + cert: "" + key: "" + # -- base64 encoded PEM values for the clustermesh-apiserver client certificate and private key + # Used if 'auto' is not enabled. + client: + cert: "" + key: "" + # -- base64 encoded PEM values for the clustermesh-apiserver remote cluster certificate and private key + # Used if 'auto' is not enabled. + remote: + cert: "" + key: "" + +# -- Configure external workloads support +externalWorkloads: + # -- Enable support for external workloads, such as VMs (false by default). + enabled: false diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/rke2-cilium-hard-defaults/Chart.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/rke2-cilium-hard-defaults/Chart.yaml new file mode 100755 index 0000000..cabecf7 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/rke2-cilium-hard-defaults/Chart.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +description: Default options for cilium in RKE2 +home: https://docs.rke2.io/ +keywords: +- cilium +maintainers: +- email: charts@rancher.com + name: Rancher Labs +name: rke2-cilium-hard-defaults +sources: +- https://github.com/rancher/rke2-charts +version: 1.0.0 diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/charts/rke2-cilium-hard-defaults/values.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/rke2-cilium-hard-defaults/values.yaml new file mode 100755 index 0000000..424330d --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/charts/rke2-cilium-hard-defaults/values.yaml @@ -0,0 +1,17 @@ +exports: + defaults: + # These are the default options override of cilium for RKE2 + # for which no customization is allowed + cilium: + + # Enable all metrics + prometheus: + enabled: true + operator: + prometheus: + enabled: true + + # Enable node init to correctly setup the node as required for cilium + # throughout all the supported OS + nodeinit: + enabled: true diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/requirements.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/requirements.yaml new file mode 100755 index 0000000..4da90d4 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/requirements.yaml @@ -0,0 +1,7 @@ +dependencies: +- name: cilium + repository: file://./charts/cilium +- import-values: + - defaults + name: rke2-cilium-hard-defaults + repository: file://./charts/rke2-cilium-hard-defaults diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/values.schema.json b/charts/rke2-cilium/rke2-cilium/1.9.603/values.schema.json new file mode 100755 index 0000000..928d273 --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/values.schema.json @@ -0,0 +1,248 @@ +{ + "$schema": "http://json-schema.org/draft-09/schema", + "type": "object", + "properties": { + "cilium": { + "type": "object", + "properties": { + "azure": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + } + }, + "cni": { + "type": "object", + "properties": { + "chainingMode": { + "type": "string" + }, + "customConf": { + "type": "boolean" + } + } + }, + "eni": { + "type": "boolean" + }, + "image": { + "type": "object", + "properties": { + "repository": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "required": ["repository", "tag" ] + }, + "imagePullSecrets": { + "type": "array" + }, + "ipam": { + "type": "object", + "properties": { + "mode": { + "type": "string" + } + } + }, + "masquerade": { + "type": "boolean" + }, + "nodeinit": { + "type": "object", + "properties": { + "image": { + "type": "object", + "properties": { + "repository": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "required": ["repository", "tag" ] + } + }, + "required": ["image" ] + }, + "operator": { + "type": "object", + "properties": { + "image": { + "type": "object", + "properties": { + "repository": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "required": ["repository", "tag" ] + } + }, + "required": ["image" ] + }, + "preflight": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "image": { + "type": "object", + "properties": { + "repository": { + "type": "string" + }, + "tag": { + "type": "string" + } + }, + "required": ["repository", "tag" ] + } + } + }, + "tunnel": { + "type": "string" + }, + "ipv6": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + } + } + }, + "required": ["image", "operator", "nodeinit" ] + }, + "global": { + "type": "object", + "properties": { + "systemDefaultRegistry": { + "type": "string" + } + } + } + }, + "required": ["cilium"], + "allOf": [ + { "$ref" : "#/$defs/azure-requires-config" }, + { "$ref" : "#/$defs/aws-requires-config" }, + { "$ref" : "#/$defs/azure-aws-are-exclusive" }, + { "$ref" : "#/$defs/preflight-requires-config" } + ], + "$defs": { + "is-azure": { + "properties" : { + "cilium": { + "properties": { + "azure": { + "properties": { + "enabled": { "const": true } + } + } + } + } + } + }, + "azure-requires-config" : { + "anyOf": [ + { "not": { "$ref": "#/$defs/is-azure" } }, + { + "properties": { + "cilium": { + "properties": { + "masquerade": { "const": true }, + "cni": { + "properties": { + "chainingMode": { "const": "generic-veth" }, + "customConf": { "const": true }, + "configMap": { "const": "cni-configuration"} + }, + "required": [ "chainingMode", "customConf", "configMap" ] + } + }, + "required": [ "cni" ] + } + } + } + ] + }, + "is-aws": { + "properties" : { + "cilium": { + "properties": { + "eni": { "const": true } + } + } + } + }, + "aws-requires-config": { + "anyOf": [ + { "not": { "$ref": "#/$defs/is-aws" } }, + { + "properties": { + "cilium": { + "properties": { + "tunnel": { "const": "disabled" }, + "egressMasqueradeInterfaces": { "const": "eth0" }, + "ipam": { + "properties": { + "mode": { "const": "eni" } + }, + "required": [ "mode" ] + } + }, + "required": [ "tunnel", "egressMasqueradeInterfaces", "ipam" ] + } + } + } + ] + }, + "azure-aws-are-exclusive": { + "not": { + "allOf": [ + { "$ref": "#/$defs/is-azure" }, + { "$ref": "#/$defs/is-aws" } + ] + } + }, + "is-preflight": { + "properties" : { + "cilium": { + "properties": { + "preflight": { + "properties": { + "enabled": { "const": true } + } + } + } + } + } + }, + "preflight-requires-config" : { + "anyOf": [ + { "not": { "$ref": "#/$defs/is-preflight" } }, + { + "properties": { + "cilium": { + "properties": { + "preflight": { + "required": [ "image" ] + } + } + } + } + } + ] + } + } +} diff --git a/charts/rke2-cilium/rke2-cilium/1.9.603/values.yaml b/charts/rke2-cilium/rke2-cilium/1.9.603/values.yaml new file mode 100755 index 0000000..69129db --- /dev/null +++ b/charts/rke2-cilium/rke2-cilium/1.9.603/values.yaml @@ -0,0 +1,57 @@ +# Cilium specific options that can be customized for RKE2 +# Set with '--set cilium.