Skip to content

Commit d4c604e

Browse files
committed
Expose EnableNFTables in flannel config
1 parent f369c3a commit d4c604e

File tree

6 files changed

+11
-1
lines changed

6 files changed

+11
-1
lines changed

pkg/apis/kops/networking.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,8 @@ type FlannelNetworkingSpec struct {
173173
Backend string `json:"backend,omitempty"`
174174
// IptablesResyncSeconds sets resync period for iptables rules, in seconds
175175
IptablesResyncSeconds *int32 `json:"iptablesResyncSeconds,omitempty"`
176+
// EnableNFTables makes flannel use nftables instead of iptables.
177+
EnableNFTables bool `json:"enableNFTables,omitempty"`
176178
}
177179

178180
// CalicoNetworkingSpec declares that we want Calico networking

pkg/apis/kops/v1alpha2/networking.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,8 @@ type FlannelNetworkingSpec struct {
128128
DisableTxChecksumOffloading bool `json:"disableTxChecksumOffloading,omitempty"`
129129
// IptablesResyncSeconds sets resync period for iptables rules, in seconds
130130
IptablesResyncSeconds *int32 `json:"iptablesResyncSeconds,omitempty"`
131+
// EnableNFTables makes flannel use nftables instead of iptables.
132+
EnableNFTables bool `json:"enableNFTables,omitempty"`
131133
}
132134

133135
// CalicoNetworkingSpec declares that we want Calico networking

pkg/apis/kops/v1alpha2/zz_generated.conversion.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/apis/kops/v1alpha3/networking.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ type FlannelNetworkingSpec struct {
137137
Backend string `json:"backend,omitempty"`
138138
// IptablesResyncSeconds sets resync period for iptables rules, in seconds
139139
IptablesResyncSeconds *int32 `json:"iptablesResyncSeconds,omitempty"`
140+
// EnableNFTables makes flannel use nftables instead of iptables.
141+
EnableNFTables bool `json:"enableNFTables,omitempty"`
140142
}
141143

142144
// CalicoNetworkingSpec declares that we want Calico networking

pkg/apis/kops/v1alpha3/zz_generated.conversion.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

upup/models/cloudup/resources/addons/networking.flannel/k8s-1.25.yaml.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ data:
9292
net-conf.json: |
9393
{
9494
"Network": "{{ .Networking.NonMasqueradeCIDR }}",
95-
"EnableNFTables": false,
95+
"EnableNFTables": {{ .Networking.Flannel.EnableNFTables }},
9696
"Backend": {
9797
"Type": "{{ FlannelBackendType }}"
9898
}

0 commit comments

Comments
 (0)