You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Move to use newer IPsec DaemonSets when MCP is in paused state
When MCP is in paused state, network operator continues to render older
IPsec daemonsets which blocks network cluster operator not getting upgraded
to newer version. Hence this commit renders newer IPsec daemonsets for
intermediate period. When MCPs are moved to unpaused state and IPsec machine
configs are installed on it, then it goes ahead with rendering only host
flavored IPsec daemonset.
Signed-off-by: Periyasamy Palanisamy <[email protected]>
Copy file name to clipboardExpand all lines: bindata/network/ovn-kubernetes/common/ipsec-host.yaml
+35Lines changed: 35 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -50,6 +50,12 @@ spec:
50
50
- |
51
51
#!/bin/bash
52
52
set -exuo pipefail
53
+
{{ if .IPsecCheckForLibreswan }}
54
+
if ! rpm --dbpath=/usr/share/rpm -q libreswan; then
55
+
echo "host doesnt have libreswan, therefore ipsec will be configured by ipsec-containerized daemonset, this ovn ipsec container has nothing to init"
56
+
exit 0
57
+
fi
58
+
{{ end }}
53
59
{{ if .NETWORK_NODE_IDENTITY_ENABLE }}
54
60
# When NETWORK_NODE_IDENTITY_ENABLE is true, use the per-node certificate to create a kubeconfig
55
61
# that will be used to talk to the API
@@ -194,6 +200,9 @@ spec:
194
200
name: etc-openvswitch
195
201
- mountPath: /etc
196
202
name: host-etc
203
+
- mountPath: /usr/share/rpm
204
+
name: host-usr-share-rpm
205
+
readOnly: true
197
206
resources:
198
207
requests:
199
208
cpu: 10m
@@ -210,6 +219,12 @@ spec:
210
219
#!/bin/bash
211
220
set -exuo pipefail
212
221
222
+
{{ if .IPsecCheckForLibreswan }}
223
+
if ! rpm --dbpath=/usr/share/rpm -q libreswan; then
224
+
echo "host doesnt have libreswan, therefore ipsec will be configured by ipsec-containerized daemonset, this ovn ipsec container will sleep to infinity"
225
+
sleep infinity
226
+
fi
227
+
{{ end }}
213
228
214
229
# Don't start IPsec until ovnkube-node has finished setting up the node
215
230
counter=0
@@ -268,6 +283,13 @@ spec:
268
283
# In order to maintain traffic flows during container restart, we
269
284
# need to ensure that xfrm state and policies are not flushed.
270
285
286
+
{{ if .IPsecCheckForLibreswan }}
287
+
if ! rpm --dbpath=/usr/share/rpm -q libreswan; then
288
+
echo "host doesnt have libreswan, therefore ipsec will be configured by ipsec-containerized daemonset, preStop wont do anything"
289
+
exit 0
290
+
fi
291
+
{{ end }}
292
+
271
293
# Don't allow ovs monitor to cleanup persistent state
0 commit comments