Skip to content

Commit

Permalink
Fix kubeproxy tests
Browse files Browse the repository at this point in the history
  • Loading branch information
shafeeqes committed Feb 16, 2024
1 parent 13f4756 commit 5e8efff
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
8 changes: 8 additions & 0 deletions pkg/component/kubeproxy/configcodec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,11 @@ configSyncPeriod: 0s
conntrack:
maxPerCore: null
min: null
tcpBeLiberal: false
tcpCloseWaitTimeout: null
tcpEstablishedTimeout: null
udpStreamTimeout: 0s
udpTimeout: 0s
detectLocal:
bridgeInterface: ""
interfaceNamePrefix: ""
Expand Down Expand Up @@ -80,6 +83,11 @@ logging:
verbosity: 0
metricsBindAddress: ""
mode: ""
nftables:
masqueradeAll: false
masqueradeBit: null
minSyncPeriod: 0s
syncPeriod: 0s
nodePortAddresses: null
oomScoreAdj: null
portRange: ""
Expand Down
16 changes: 12 additions & 4 deletions pkg/component/kubeproxy/kube_proxy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,9 @@ type: Opaque

configMapNameFor = func(ipvsEnabled bool) string {
if !ipvsEnabled {
return "kube-proxy-config-b2209acf"
return "kube-proxy-config-fd4a356e"
}
return "kube-proxy-config-ff9faa85"
return "kube-proxy-config-eaba5162"
}
configMapYAMLFor = func(ipvsEnabled bool) string {
out := `apiVersion: v1
Expand All @@ -241,8 +241,11 @@ data:
conntrack:
maxPerCore: 524288
min: null
tcpBeLiberal: false
tcpCloseWaitTimeout: null
tcpEstablishedTimeout: null
udpStreamTimeout: 0s
udpTimeout: 0s
detectLocal:
bridgeInterface: ""
interfaceNamePrefix: ""
Expand Down Expand Up @@ -284,6 +287,11 @@ data:
mode: iptables`
}
out += `
nftables:
masqueradeAll: false
masqueradeBit: null
minSyncPeriod: 0s
syncPeriod: 0s
nodePortAddresses: null
oomScoreAdj: null
portRange: ""
Expand Down Expand Up @@ -385,14 +393,14 @@ metadata:
if ipvsEnabled {
annotations = []string{
references.AnnotationKey(references.KindConfigMap, configMapCleanupScriptName) + `: ` + configMapCleanupScriptName,
references.AnnotationKey(references.KindConfigMap, configMapNameFor(ipvsEnabled)) + `: ` + configMapNameFor(ipvsEnabled),
references.AnnotationKey(references.KindConfigMap, configMapConntrackFixScriptName) + `: ` + configMapConntrackFixScriptName,
references.AnnotationKey(references.KindConfigMap, configMapNameFor(ipvsEnabled)) + `: ` + configMapNameFor(ipvsEnabled),
references.AnnotationKey(references.KindSecret, secretName) + `: ` + secretName,
}
} else {
annotations = []string{
references.AnnotationKey(references.KindConfigMap, configMapCleanupScriptName) + `: ` + configMapCleanupScriptName,
references.AnnotationKey(references.KindConfigMap, configMapNameFor(ipvsEnabled)) + `: ` + configMapNameFor(ipvsEnabled),
references.AnnotationKey(references.KindConfigMap, configMapCleanupScriptName) + `: ` + configMapCleanupScriptName,
references.AnnotationKey(references.KindConfigMap, configMapConntrackFixScriptName) + `: ` + configMapConntrackFixScriptName,
references.AnnotationKey(references.KindSecret, secretName) + `: ` + secretName,
}
Expand Down

0 comments on commit 5e8efff

Please sign in to comment.