Add ability to configure calico failsafe ports

Made FailsafeOutboundHostPorts and FailsafeInboundHostPorts configurable
to allow users to have custom network policy for example SSH (22)

Previously failsafe rules would always have opened 22 even if user had
custom GlobalNetworkPolicy applied on the node.

Fixes https://github.com/rancher/rke2/issues/921
pull/74/head
Jonas Falck 2021-04-26 10:08:05 +02:00 committed by Brad Davidson
parent 1b4dda478d
commit 22324fa3fc
3 changed files with 9 additions and 1 deletions

View File

@ -154,6 +154,10 @@ spec:
value: {{ .Values.calico.felixPrometheusMetricsEnabled | quote }} value: {{ .Values.calico.felixPrometheusMetricsEnabled | quote }}
- name: FELIX_XDPENABLED - name: FELIX_XDPENABLED
value: {{ .Values.calico.felixXDPEnabled | quote }} value: {{ .Values.calico.felixXDPEnabled | quote }}
- name: FELIX_FAILSAFEINBOUNDHOSTPORTS
value: {{ .Values.calico.felixFailsafeInboundHostPorts | quote }}
- name: FELIX_FAILSAFEOUTBOUNDHOSTPORTS
value: {{ .Values.calico.felixFailsafeOutboundHostPorts | quote }}
securityContext: securityContext:
privileged: true privileged: true
resources: resources:

View File

@ -71,6 +71,10 @@ calico:
typhaServiceName: none typhaServiceName: none
# Kubelet flex-volume-plugin-dir # Kubelet flex-volume-plugin-dir
flexVolumePluginDir: /var/lib/kubelet/volumeplugins flexVolumePluginDir: /var/lib/kubelet/volumeplugins
# calico inbound failsafe ports. Empty string means defaults. Use 'none' to disable failsafe if you have your own rules.
felixFailsafeInboundHostPorts: ""
# calico outbound failsafe ports. Empty string means defaults. Use 'none' to disable failsafe if you have your own rules.
felixFailsafeOutboundHostPorts: ""
global: global:
systemDefaultRegistry: "" systemDefaultRegistry: ""

View File

@ -1,4 +1,4 @@
url: local url: local
packageVersion: 02 packageVersion: 03
# This repository does not use releaseCandidateVersions, so you can leave this as 00. # This repository does not use releaseCandidateVersions, so you can leave this as 00.
releaseCandidateVersion: 00 releaseCandidateVersion: 00