Skip to content

Commit

Permalink
Disable src/dst checks for Calico in IPv6 mode
Browse files Browse the repository at this point in the history
  • Loading branch information
hakman committed Jun 19, 2021
1 parent 23ab07e commit 9e587c7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3886,7 +3886,7 @@ spec:
# kops additions
# Enable source/destination checks for AWS
- name: FELIX_AWSSRCDSTCHECK
value: "{{- if and (eq .CloudProvider "aws") (.Networking.Calico.CrossSubnet) -}}Disable{{- else -}} {{- or .Networking.Calico.AWSSrcDstCheck "DoNothing" -}} {{- end -}}"
value: "{{ CalicoAWSSrcDstCheck }}"
# Enable eBPF dataplane mode
- name: FELIX_BPFENABLED
value: "{{ .Networking.Calico.BPFEnabled }}"
Expand Down
10 changes: 10 additions & 0 deletions upup/pkg/fi/cloudup/template_functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,16 @@ func (tf *TemplateFunctions) AddTo(dest template.FuncMap, secretStore fi.SecretS
}
return "Always"
}
dest["CalicoAWSSrcDstCheck"] = func() string {
if kops.CloudProviderID(cluster.Spec.CloudProvider) == kops.CloudProviderAWS {
if c.AWSSrcDstCheck != "" {
return c.AWSSrcDstCheck
} else if cluster.Spec.IsIPv6Only() || c.CrossSubnet {
return "Disable"
}
}
return "DoNothing"
}
}

if cluster.Spec.Networking != nil && cluster.Spec.Networking.Cilium != nil {
Expand Down

0 comments on commit 9e587c7

Please sign in to comment.