github.com/fafucoder/cilium@v1.6.11/install/kubernetes/cilium/charts/config/templates/configmap.yaml (about) 1 apiVersion: v1 2 kind: ConfigMap 3 metadata: 4 name: cilium-config 5 namespace: {{ .Release.Namespace }} 6 data: 7 {{- if .Values.global.etcd.enabled }} 8 # The kvstore configuration is used to enable use of a kvstore for state 9 # storage. This can either be provided with an external kvstore or with the 10 # help of cilium-etcd-operator which operates an etcd cluster automatically. 11 kvstore: etcd 12 kvstore-opt: '{"etcd.config": "/var/lib/etcd-config/etcd.config"}' 13 14 # This etcd-config contains the etcd endpoints of your cluster. If you use 15 # TLS please make sure you follow the tutorial in https://cilium.link/etcd-config 16 etcd-config: |- 17 --- 18 endpoints: 19 {{- if .Values.global.etcd.managed }} 20 - https://cilium-etcd-client.{{ .Release.Namespace }}.svc:2379 21 {{- else }} 22 {{- range .Values.global.etcd.endpoints }} 23 - {{ . }} 24 {{- end }} 25 {{- end }} 26 {{- if or .Values.global.etcd.ssl .Values.global.etcd.managed }} 27 trusted-ca-file: '/var/lib/etcd-secrets/etcd-client-ca.crt' 28 key-file: '/var/lib/etcd-secrets/etcd-client.key' 29 cert-file: '/var/lib/etcd-secrets/etcd-client.crt' 30 {{- end }} 31 {{- end }} 32 33 # Identity allocation mode selects how identities are shared between cilium 34 # nodes by setting how they are stored. The options are "crd" or "kvstore". 35 # - "crd" stores identities in kubernetes as CRDs (custom resource definition). 36 # These can be queried with: 37 # kubectl get ciliumid 38 # - "kvstore" stores identities in a kvstore, etcd or consul, that is 39 # configured below. Cilium versions before 1.6 supported only the kvstore 40 # backend. Upgrades from these older cilium versions should continue using 41 # the kvstore by commenting out the identity-allocation-mode below, or 42 # setting it to "kvstore". 43 identity-allocation-mode: {{ .Values.global.identityAllocationMode }} 44 45 # If you want to run cilium in debug mode change this value to true 46 debug: {{ .Values.global.debug.enabled | quote }} 47 48 {{- if .Values.global.debug.verbose }} 49 debug-verbose: "{{ .Values.global.debug.verbose }}" 50 {{- end }} 51 52 {{- if .Values.global.prometheus.enabled }} 53 # If you want metrics enabled in all of your Cilium agents, set the port for 54 # which the Cilium agents will have their metrics exposed. 55 # This option deprecates the "prometheus-serve-addr" in the 56 # "cilium-metrics-config" ConfigMap 57 # NOTE that this will open the port on ALL nodes where Cilium pods are 58 # scheduled. 59 prometheus-serve-addr: ":9090" 60 {{- end }} 61 62 # Enable IPv4 addressing. If enabled, all endpoints are allocated an IPv4 63 # address. 64 {{- if .Values.global.ipv4 }} 65 enable-ipv4: {{ .Values.global.ipv4.enabled | quote }} 66 {{- end }} 67 68 # Enable IPv6 addressing. If enabled, all endpoints are allocated an IPv6 69 # address. 70 {{- if .Values.global.ipv6 }} 71 enable-ipv6: {{ .Values.global.ipv6.enabled | quote }} 72 {{- end }} 73 74 {{- if .Values.global.cleanState }} 75 # If a serious issue occurs during Cilium startup, this 76 # invasive option may be set to true to remove all persistent 77 # state. Endpoints will not be restored using knowledge from a 78 # prior Cilium run, so they may receive new IP addresses upon 79 # restart. This also triggers clean-cilium-bpf-state. 80 clean-cilium-state: "true" 81 {{- end }} 82 83 {{- if .Values.global.cleanBpfState }} 84 # If you want to clean cilium BPF state, set this to true; 85 # Removes all BPF maps from the filesystem. Upon restart, 86 # endpoints are restored with the same IP addresses, however 87 # any ongoing connections may be disrupted briefly. 88 # Loadbalancing decisions will be reset, so any ongoing 89 # connections via a service may be loadbalanced to a different 90 # backend after restart. 91 clean-cilium-bpf-state: "true" 92 {{- end }} 93 94 {{- if .Values.global.cni.customConf }} 95 # Users who wish to specify their own custom CNI configuration file must set 96 # custom-cni-conf to "true", otherwise Cilium may overwrite the configuration. 97 custom-cni-conf: "{{ .Values.global.cni.customConf }}" 98 {{- end }} 99 100 # If you want cilium monitor to aggregate tracing for packets, set this level 101 # to "low", "medium", or "maximum". The higher the level, the less packets 102 # that will be seen in monitor output. 103 monitor-aggregation: {{ .Values.global.bpf.monitorAggregation }} 104 105 # ct-global-max-entries-* specifies the maximum number of connections 106 # supported across all endpoints, split by protocol: tcp or other. One pair 107 # of maps uses these values for IPv4 connections, and another pair of maps 108 # use these values for IPv6 connections. 109 # 110 # If these values are modified, then during the next Cilium startup the 111 # tracking of ongoing connections may be disrupted. This may lead to brief 112 # policy drops or a change in loadbalancing decisions for a connection. 113 # 114 # For users upgrading from Cilium 1.2 or earlier, to minimize disruption 115 # during the upgrade process, comment out these options. 116 bpf-ct-global-tcp-max: "{{ .Values.global.bpf.ctTcpMax }}" 117 bpf-ct-global-any-max: "{{ .Values.global.bpf.ctAnyMax }}" 118 119 # Pre-allocation of map entries allows per-packet latency to be reduced, at 120 # the expense of up-front memory allocation for the entries in the maps. The 121 # default value below will minimize memory usage in the default installation; 122 # users who are sensitive to latency may consider setting this to "true". 123 # 124 # This option was introduced in Cilium 1.4. Cilium 1.3 and earlier ignore 125 # this option and behave as though it is set to "true". 126 # 127 # If this value is modified, then during the next Cilium startup the restore 128 # of existing endpoints and tracking of ongoing connections may be disrupted. 129 # This may lead to policy drops or a change in loadbalancing decisions for a 130 # connection for some time. Endpoints may need to be recreated to restore 131 # connectivity. 132 # 133 # If this option is set to "false" during an upgrade from 1.3 or earlier to 134 # 1.4 or later, then it may cause one-time disruptions during the upgrade. 135 preallocate-bpf-maps: "{{ .Values.global.bpf.preallocateMaps }}" 136 137 # Regular expression matching compatible Istio sidecar istio-proxy 138 # container image names 139 sidecar-istio-proxy-image: "cilium/istio_proxy" 140 141 # Encapsulation mode for communication between nodes 142 # Possible values: 143 # - disabled 144 # - vxlan (default) 145 # - geneve 146 tunnel: {{ .Values.global.tunnel }} 147 148 # Name of the cluster. Only relevant when building a mesh of clusters. 149 cluster-name: {{ .Values.global.cluster.name }} 150 151 {{- if .Values.global.cluster.id }} 152 # Unique ID of the cluster. Must be unique across all conneted clusters and 153 # in the range of 1 and 255. Only relevant when building a mesh of clusters. 154 cluster-id: "{{ .Values.global.cluster.id }}" 155 {{- end }} 156 157 {{- if .Values.global.eni }} 158 ipam: "eni" 159 enable-endpoint-routes: "true" 160 auto-create-cilium-node-resource: "true" 161 blacklist-conflicting-routes: "false" 162 {{- end }} 163 164 {{- if .Values.global.flannel.enabled }} 165 # Interface to be used when running Cilium on top of a CNI plugin. 166 # For flannel, use "cni0" 167 flannel-master-device: {{ .Values.global.flannel.masterDevice }} 168 169 # When running Cilium with policy enforcement enabled on top of a CNI plugin 170 # the BPF programs will be installed on the network interface specified in 171 # 'flannel-master-device' and on all network interfaces belonging to 172 # a container. When the Cilium DaemonSet is removed, the BPF programs will 173 # be kept in the interfaces unless this option is set to "true". 174 flannel-uninstall-on-exit: "{{ .Values.global.flannel.uninstallOnExit}}" 175 176 # Installs a BPF program to allow for policy enforcement in already running 177 # containers managed by Flannel. 178 # NOTE: This requires Cilium DaemonSet to be running in the hostPID. 179 # To run in this mode in Kubernetes change the value of the hostPID from 180 # false to true. Can be found under the path `spec.spec.hostPID` 181 flannel-manage-existing-containers: "{{ .Values.global.flannel.manageExistingContainers }}" 182 {{- end }} 183 184 {{- if .Values.global.l7Proxy }} 185 186 # Enables L7 proxy for L7 policy enforcement and visibility 187 enable-l7-proxy: {{ .Values.global.l7Proxy.enabled | quote }} 188 {{- end }} 189 190 # DNS Polling periodically issues a DNS lookup for each `matchName` from 191 # cilium-agent. The result is used to regenerate endpoint policy. 192 # DNS lookups are repeated with an interval of 5 seconds, and are made for 193 # A(IPv4) and AAAA(IPv6) addresses. Should a lookup fail, the most recent IP 194 # data is used instead. An IP change will trigger a regeneration of the Cilium 195 # policy for each endpoint and increment the per cilium-agent policy 196 # repository revision. 197 # 198 # This option is disabled by default starting from version 1.4.x in favor 199 # of a more powerful DNS proxy-based implementation, see [0] for details. 200 # Enable this option if you want to use FQDN policies but do not want to use 201 # the DNS proxy. 202 # 203 # To ease upgrade, users may opt to set this option to "true". 204 # Otherwise please refer to the Upgrade Guide [1] which explains how to 205 # prepare policy rules for upgrade. 206 # 207 # [0] http://docs.cilium.io/en/stable/policy/language/#dns-based 208 # [1] http://docs.cilium.io/en/stable/install/upgrade/#changes-that-may-require-action 209 tofqdns-enable-poller: "false" 210 211 # wait-bpf-mount makes init container wait until bpf filesystem is mounted 212 wait-bpf-mount: "{{ .Values.global.bpf.waitForMount }}" 213 214 {{- if ne .Values.global.cni.chainingMode "none" }} 215 # Enable chaining with another CNI plugin 216 # 217 # Supported modes: 218 # - none 219 # - aws-cni 220 # - flannel 221 # - portmap (Enables HostPort support for Cilium) 222 cni-chaining-mode: {{ .Values.global.cni.chainingMode }} 223 {{- end }} 224 225 # Enable fetching of container-runtime specific metadata 226 # 227 # By default, the Kubernetes pod and namespace labels are retrieved and 228 # associated with endpoints for identification purposes. By integrating 229 # with the container runtime, container runtime specific labels can be 230 # retrieved, such labels will be prefixed with container: 231 # 232 # CAUTION: The container runtime labels can include information such as pod 233 # annotations which may result in each pod being associated a unique set of 234 # labels which can result in excessive security identities being allocated. 235 # Please review the labels filter when enabling container runtime labels. 236 # 237 # Supported values: 238 # - containerd 239 # - crio 240 # - docker 241 # - none 242 # - auto (automatically detect the container runtime) 243 # 244 container-runtime: {{ .Values.global.containerRuntime.integration }} 245 246 masquerade: {{ .Values.global.masquerade | quote }} 247 {{- if .Values.global.egressMasqueradeInterfaces }} 248 egress-masquerade-interfaces: {{ .Values.global.egressMasqueradeInterfaces }} 249 {{- end }} 250 251 {{- if .Values.global.encryption.enabled }} 252 enable-ipsec: {{ .Values.global.encryption.enabled | quote }} 253 ipsec-key-file: {{ .Values.global.encryption.mountPath }}/{{ .Values.global.encryption.keyFile }} 254 {{- if .Values.global.encryption.interface }} 255 encrypt-interface: {{ .Values.global.encryption.interface }} 256 {{- end }} 257 {{- if .Values.global.encryption.nodeEncryption }} 258 encrypt-node: {{ .Values.global.encryption.nodeEncryption | quote }} 259 {{- end }} 260 {{- end }} 261 262 {{- if .Values.global.hostServices.enabled }} 263 enable-host-reachable-services: "true" 264 {{- if ne .Values.global.hostServices.protocols "tcp,udp" }} 265 host-reachable-services-protos: {{ .Values.global.hostServices.protocols }} 266 {{- end }} 267 {{- end }} 268 269 {{- if .Values.global.datapathMode }} 270 {{- if eq .Values.global.datapathMode "ipvlan" }} 271 datapath-mode: ipvlan 272 ipvlan-master-device: {{ .Values.global.ipvlan.masterDevice }} 273 {{- end }} 274 {{- end }} 275 276 enable-xt-socket-fallback: {{ .Values.global.enableXTSocketFallback | quote }} 277 install-iptables-rules: {{ .Values.global.installIptablesRules | quote }} 278 {{- if .Values.global.iptablesLockTimeout }} 279 iptables-lock-timeout: {{ .Values.global.iptablesLockTimeout | quote }} 280 {{- end }} 281 auto-direct-node-routes: {{ .Values.global.autoDirectNodeRoutes | quote }} 282 {{- if .Values.global.nodePort }} 283 enable-node-port: {{ .Values.global.nodePort.enabled | quote }} 284 {{- if .Values.global.nodePort.range }} 285 node-port-range: {{ .Values.global.nodePort.range | quote }} 286 {{- end }} 287 {{- if .Values.global.nodePort.device }} 288 device: {{ .Values.global.nodePort.device | quote }} 289 {{- end }} 290 291 {{- end }} 292 {{- if and .Values.global.pprof .Values.global.pprof.enabled }} 293 pprof: {{ .Values.global.pprof.enabled | quote }} 294 {{- end }} 295 {{- if .Values.global.logSystemLoad }} 296 log-system-load: {{ .Values.global.logSystemLoad | quote }} 297 {{- end }} 298 {{- if and .Values.global.sockops .Values.global.sockops.enabled }} 299 sockops-enable: {{ .Values.global.sockops.enabled | quote }} 300 {{- end }} 301 {{- if and .Values.global.k8s .Values.global.k8s.requireIPv4PodCIDR }} 302 k8s-require-ipv4-pod-cidr: {{ .Values.global.k8s.requireIPv4PodCIDR | quote }} 303 {{- end }} 304 {{- if and .Values.global.endpointRoutes .Values.global.endpointRoutes.enabled }} 305 enable-endpoint-routes: {{ .Values.global.endpointRoutes.enabled | quote }} 306 {{- end }} 307 {{- if .Values.global.cni.configMap }} 308 read-cni-conf: {{ .Values.global.cni.confFileMountPath }}/{{ .Values.global.cni.configMapKey }} 309 write-cni-conf-when-ready: {{ .Values.global.cni.hostConfDirMountPath }}/05-cilium.conflist 310 {{- end }} 311 {{- if .Values.global.kubeConfigPath }} 312 k8s-kubeconfig-path: {{ .Values.global.kubeConfigPath | quote }} 313 {{- end }} 314 {{- if or (eq .Values.global.cni.chainingMode "portmap") (eq .Values.global.cni.chainingMode "none") }} 315 # Chaining mode is set to portmap, enable health checking 316 enable-endpoint-health-checking: "true" 317 {{- else}} 318 # Disable health checking, when chaining mode is not set to portmap or none 319 enable-endpoint-health-checking: "false" 320 {{- end }}