Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sdn 1185 new #54

Open
wants to merge 89 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
8d56cbe
kind: Improve kubectl_wait_pods
andreaskaris Nov 2, 2022
b1d92e7
Apply retry to namespace controller in ovnk node
ricky-rav Nov 4, 2022
6a1babe
Apply retry logic to endpointslice controller in pkg/node/node.go
ricky-rav Nov 4, 2022
6c4a4d9
Apply retry logic to services and endpointslices in gateway.go
ricky-rav Nov 4, 2022
70c6b30
Regenerated /pkg/factory/mocks/NodeWatchFactory.go after interface ch…
ricky-rav Oct 4, 2022
0e7f512
unit test for retrying add operation in NodePortWatcher
ricky-rav Nov 4, 2022
0bb654f
kind: Add IPsec option, DaemonSet and NBDB option
andreaskaris Nov 2, 2022
5b7ad10
correct the hybrid overlay port MAC address
JacobTanenbaum Nov 7, 2022
74710ac
Merge pull request #3265 from JacobTanenbaum/fixMACPorts
dcbw Nov 8, 2022
17ab3c3
Merge pull request #3176 from ricky-rav/dev_ovnknode_retry
trozet Nov 9, 2022
6cf5c61
Reverts NetPol-Service dependency
tssurya Sep 24, 2022
7891009
Add Service Hairpin MasqueradeIP
tssurya Sep 24, 2022
b05d66a
Add hairpin SNAT IP to all LBs
tssurya Sep 24, 2022
5a05e26
Modify ingressACLs to take care of service hairpin
tssurya Sep 24, 2022
d2ca5d6
Ignore addresses in masquerade subnet when retrieving gateway IPs
ricky-rav Nov 9, 2022
3ca6336
Don't log in iterateRetryResources when there are no retry entries
ricky-rav Nov 10, 2022
4a23853
Merge pull request #3268 from ricky-rav/bug_2868_upstream
trozet Nov 10, 2022
88f4a93
Merge pull request #3270 from ricky-rav/log_retry
trozet Nov 10, 2022
3784254
Handle expired entry while handling dns update
pperiyasamy Nov 10, 2022
0ada940
Merge pull request #3269 from pperiyasamy/egressfirewall-dns-update-p…
dcbw Nov 11, 2022
2508881
OCPBUGS-2319: Set NODAD flag on masquerade address
cybertron Nov 11, 2022
849c9fe
Merge pull request #3178 from tssurya/service-traffic-hairpin
trozet Nov 14, 2022
f5fef8c
Hold lock when deleting completed pod during update event
ricky-rav Nov 15, 2022
1a2bdaf
Merge pull request #3274 from ricky-rav/lock_completed_pods
trozet Nov 15, 2022
27aa998
node: mock conntrack delete operations for service and EgressIP testc…
dcbw Nov 15, 2022
e55c501
ovn: fix "egressIP pod recreate with same name (stateful-sets)" testcase
dcbw Nov 16, 2022
2cabe99
Merge pull request #3275 from dcbw/node-fake-conntrack
dcbw Nov 17, 2022
a1b961d
Handle cases where a pod may exist but the node does not
trozet Nov 9, 2022
414fa65
Merge pull request #3255 from andreaskaris/ipsec
dcbw Nov 17, 2022
2c8eda4
Merge pull request #3266 from trozet/fix_pod_finalizers
jcaamano Nov 18, 2022
21f9e60
add multi-network controller manager
cathy-zhou Jun 22, 2022
a3369b4
change LogicalSwitchManager to be based on switch name
cathy-zhou Oct 14, 2022
1f628f9
hybrid-overlay: mock netlink usage in test cases
dcbw Nov 18, 2022
c47592c
hybrid-overlay: tests now work with race detection
dcbw Nov 18, 2022
36c326e
Merge pull request #3258 from cathy-zhou/multi-network-mr1
trozet Nov 18, 2022
8e003d9
close default controller stopchan first to stop all the goroutines
cathy-zhou Nov 20, 2022
2cf9268
egressip node update: set the node as reachable only when it is being…
kyrtapz Nov 9, 2022
1552134
Merge pull request #3267 from kyrtapz/reachability_fix
jcaamano Nov 22, 2022
2cceeeb
Merge pull request #3280 from dcbw/mock-netlink-hybrid-overlay
dcbw Nov 22, 2022
d4604ec
Don't delete equivalent ACLs by predicate, since it will fail if
npinaeva Nov 21, 2022
674e7a1
Catch all errors in gateway_init_linux_test.go
andreaskaris Nov 24, 2022
b240dba
Set gwRouterPort gateway_mtu option to match default MTU
andreaskaris Nov 23, 2022
eb34da0
e2e: Add tests for nodePort svc to pods
andreaskaris Nov 23, 2022
6ddef15
Merge pull request #3284 from cathy-zhou/fixstop
trozet Nov 29, 2022
3a97365
Merge pull request #3286 from npinaeva/fix-delete-equivalent-acl
jcaamano Nov 29, 2022
bd3ced8
Merge pull request #3273 from cybertron/masq-no-dad
trozet Nov 30, 2022
2476055
Bump minimatch from 3.0.4 to 3.1.2 in /.github/actions/cleanup-action
dependabot[bot] Nov 30, 2022
b489b14
pods: deleteLogicalPort should not fail when node is gone
flavio-fernandes Nov 22, 2022
453b763
Rename LinkRoutesAddOrUpdateSrcOrMTU to LinkRoutesApply
kyrtapz Nov 30, 2022
2e6e321
Merge pull request #3289 from flavio-fernandes/release-ips-idempotent
jcaamano Dec 1, 2022
b0c423d
LinkRoutesApply: update routes GW if it was changed
kyrtapz Nov 30, 2022
bdd0a9d
Metrics: update pod creation latency description
martinkennelly Nov 18, 2022
8e5a605
retry: refactor stop channel/WaitGroup usage to reduce dependency on …
dcbw Dec 1, 2022
0abccf4
Merge pull request #3272 from andreaskaris/OCPBUGS-2827-upstream
trozet Dec 1, 2022
0980f8f
Merge pull request #3294 from ovn-org/dependabot/npm_and_yarn/dot-git…
trozet Dec 1, 2022
019e52c
Merge pull request #3297 from dcbw/retry-wait-refactor
dcbw Dec 1, 2022
0747a5c
fix the hybrid testing to make better use of mocked functions
JacobTanenbaum Nov 28, 2022
62a60ca
correct the hybrid overlay test
JacobTanenbaum Nov 28, 2022
1368c6a
Merge pull request #3293 from JacobTanenbaum/Hybrid-testing
dcbw Dec 1, 2022
149425e
Dockerfile.fedora: bump OVN to 22.09.0-22
dcbw Dec 1, 2022
719fe89
Generating ops to delete stale LSPs should not fail if LS doesnt exist
martinkennelly Nov 25, 2022
28c368f
Merge pull request #3299 from dcbw/ovn22.09-22
dcbw Dec 2, 2022
161fbb9
Merge pull request #3291 from martinkennelly/ignorenodeswithnolsatsta…
jcaamano Dec 2, 2022
0237b31
kind: Fix ipsec in kind.sh and fix counter expression
andreaskaris Dec 2, 2022
aeca11d
Merge pull request #3301 from andreaskaris/fix-ipsec-2022-12-02
dcbw Dec 6, 2022
8dd825c
egress ip: Skip mgmt ports that cannot have assignable IP addresses
wizhaoredhat Dec 1, 2022
77e5987
Dockerfile.fedora: bump OVN to 22.09.0-25
numansiddique Dec 6, 2022
f620c6c
make code shareble for secondary network controller
cathy-zhou Nov 1, 2022
36ff206
Merge pull request #3306 from numansiddique/ovn22.09-25
dcbw Dec 7, 2022
898d2f8
Support LB Session Affinity TimeOut
tssurya Oct 17, 2022
90d77b7
Merge pull request #3230 from tssurya/lb-session-affinity-timeout
dcbw Dec 7, 2022
b8ed49a
Merge pull request #3283 from cathy-zhou/multi-network-mr3
jcaamano Dec 7, 2022
1299ed4
Fix address set cleanup: only delete address sets owned by given object.
npinaeva Dec 7, 2022
dabaf9f
fix hybridOverlay DRIP address allocation
JacobTanenbaum Dec 8, 2022
b5488fb
Avoid duplicate address set transactions
trozet Dec 8, 2022
ad43995
Avoid duplicate add port to port group txns
trozet Dec 8, 2022
14dd2f0
Merge pull request #3309 from trozet/netpol_dupe_txns
jcaamano Dec 11, 2022
66bb8fe
Delete egress firewall acls before deleting referenced address sets
npinaeva Dec 8, 2022
766e8b2
Merge pull request #3295 from kyrtapz/route_gw_update
jcaamano Dec 12, 2022
b825a29
Use PeerPodHandler if namespaceAndPod selector has empty namespace
npinaeva Dec 12, 2022
e3f93be
Merge pull request #3307 from npinaeva/address-set-not-found-fast-fix
trozet Dec 12, 2022
17a287b
Merge pull request #3315 from npinaeva/netpol-empty-ns-selector
trozet Dec 12, 2022
08443f3
Merge pull request #3279 from martinkennelly/update_metric_desc_pod_c…
jcaamano Dec 13, 2022
ec8a85f
Set gateway-chassis when LRP is being created, to avoid scaling probl…
hzhou8 Dec 11, 2022
01c3735
Merge pull request #3304 from JacobTanenbaum/hybrid-fix-master.v2
dcbw Dec 14, 2022
490763e
Merge pull request #3311 from hzhou8/set-gw-chassis-while-creating-lrp
dcbw Dec 14, 2022
c1ad7d7
Revert "fix hybridOverlay DRIP address allocation"
trozet Dec 14, 2022
4d59944
Merge pull request #3320 from trozet/revert_pr3304
trozet Dec 14, 2022
c8fdea9
sharing port_groups for multiple policies of the same local pod selector
cathy-zhou Dec 3, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/actions/cleanup-action/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

150 changes: 123 additions & 27 deletions contrib/kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ usage() {
echo " [-ric | --run-in-container |"
echo " [-cn | --cluster-name |"
echo " [-ehp|--egress-ip-healthcheck-port <num>]"
echo " [-is | --ipsec]"
echo " [-h]]"
echo ""
echo "-cf | --config-file Name of the KIND J2 configuration file."
Expand Down Expand Up @@ -143,6 +144,7 @@ usage() {
echo "-cn | --cluster-name Configure the kind cluster's name"
echo "-ric | --run-in-container Configure the script to be run from a docker container, allowing it to still communicate with the kind controlplane"
echo "-ehp | --egress-ip-healthcheck-port TCP port used for gRPC session by egress IP node check. DEFAULT: 9107 (Use "0" for legacy dial to port 9)."
echo "-is | --ipsec Enable IPsec encryption (spawns ovn-ipsec pods)"
echo "--delete Delete current cluster"
echo ""
}
Expand Down Expand Up @@ -199,6 +201,8 @@ parse_args() {
;;
-i6 | --ipv6 ) KIND_IPV6_SUPPORT=true
;;
-is | --ipsec ) ENABLE_IPSEC=true
;;
-wk | --num-workers ) shift
if ! [[ "$1" =~ ^[0-9]+$ ]]; then
echo "Invalid num-workers: $1"
Expand Down Expand Up @@ -309,6 +313,7 @@ print_params() {
echo "KIND_REMOVE_TAINT = $KIND_REMOVE_TAINT"
echo "KIND_IPV4_SUPPORT = $KIND_IPV4_SUPPORT"
echo "KIND_IPV6_SUPPORT = $KIND_IPV6_SUPPORT"
echo "ENABLE_IPSEC = $ENABLE_IPSEC"
echo "KIND_NUM_WORKER = $KIND_NUM_WORKER"
echo "KIND_ALLOW_SYSTEM_WRITES = $KIND_ALLOW_SYSTEM_WRITES"
echo "KIND_EXPERIMENTAL_PROVIDER = $KIND_EXPERIMENTAL_PROVIDER"
Expand Down Expand Up @@ -373,6 +378,11 @@ check_dependencies() {
exit 1
fi

if ! command_exists awk ; then
echo "Dependency not met: Command not found 'awk'"
exit 1
fi

if ! command_exists j2 ; then
if ! command_exists pip ; then
echo "Dependency not met: 'j2' not installed and cannot install with 'pip'"
Expand All @@ -388,6 +398,24 @@ check_dependencies() {
fi
}

OPENSSL=""
set_openssl_binary() {
for s in openssl openssl3; do
if ! command_exists "${s}" ; then
continue
fi
if [ "$(${s} version | awk -F '[ |.]' '{print $2}')" == "3" ]; then
OPENSSL="${s}"
echo "Found OpenSSL version 3 in binary ${OPENSSL}"
break
fi
done
if [ "${OPENSSL}" == "" ] ; then
echo "Dependency not met: Cannot find openssl version 3 (searched for openssl and openssl3)"
exit 1
fi
}

set_default_params() {
# Set default values
# Used for multi cluster setups
Expand All @@ -412,6 +440,7 @@ set_default_params() {
KIND_REMOVE_TAINT=${KIND_REMOVE_TAINT:-true}
KIND_IPV4_SUPPORT=${KIND_IPV4_SUPPORT:-true}
KIND_IPV6_SUPPORT=${KIND_IPV6_SUPPORT:-false}
ENABLE_IPSEC=${ENABLE_IPSEC:-false}
OVN_HYBRID_OVERLAY_ENABLE=${OVN_HYBRID_OVERLAY_ENABLE:-false}
OVN_DISABLE_SNAT_MULTIPLE_GWS=${OVN_DISABLE_SNAT_MULTIPLE_GWS:-false}
OVN_DISABLE_PKT_MTU_CHECK=${OVN_DISABLE_PKT_MTU_CHECK:-false}
Expand Down Expand Up @@ -633,6 +662,7 @@ create_ovn_kube_manifests() {
--net-cidr="${NET_CIDR}" \
--svc-cidr="${SVC_CIDR}" \
--gateway-mode="${OVN_GATEWAY_MODE}" \
--enable-ipsec="${ENABLE_IPSEC}" \
--hybrid-enabled="${OVN_HYBRID_OVERLAY_ENABLE}" \
--disable-snat-multiple-gws="${OVN_DISABLE_SNAT_MULTIPLE_GWS}" \
--disable-pkt-mtu-check="${OVN_DISABLE_PKT_MTU_CHECK}" \
Expand Down Expand Up @@ -712,40 +742,97 @@ install_ingress() {
run_kubectl apply -f ingress/service-nodeport.yaml
}

# kubectl_wait_pods will set a total timeout of 300s for IPv4 and 480s for IPv6. It will first wait for all
# DaemonSets to complete with kubectl rollout. This command will block until all pods of the DS are actually up.
# Next, it iterates over all pods with name=ovnkube-db and ovnkube-master and waits for them to post "Ready".
# Last, it will do the same with all pods in the kube-system namespace.
kubectl_wait_pods() {
echo "Waiting for k8s to create ovn-kubernetes pod resources..."
local PODS_CREATED=false
for i in {1..10}; do
local NUM_PODS=$(kubectl -n ovn-kubernetes get pods -o json 2> /dev/null | jq '.items | length')
if [[ "${NUM_PODS}" -ne 0 ]]; then
echo "ovn-kubernetes pods created."
PODS_CREATED=true
break
fi
sleep 1
# IPv6 cluster seems to take a little longer to come up, so extend the wait time.
OVN_TIMEOUT=300
if [ "$KIND_IPV6_SUPPORT" == true ]; then
OVN_TIMEOUT=480
fi

# We will make sure that we timeout all commands at current seconds + the desired timeout.
endtime=$(( SECONDS + OVN_TIMEOUT ))

for ds in ovnkube-node ovs-node; do
timeout=$(calculate_timeout ${endtime})
echo "Waiting for k8s to launch all ${ds} pods (timeout ${timeout})..."
kubectl rollout status daemonset -n ovn-kubernetes ${ds} --timeout ${timeout}s
done
for name in ovnkube-db ovnkube-master; do
timeout=$(calculate_timeout ${endtime})
echo "Waiting for k8s to create ${name} pods (timeout ${timeout})..."
kubectl wait pods -n ovn-kubernetes -l name=${name} --for condition=Ready --timeout=${timeout}s
done

if [[ "$PODS_CREATED" == false ]]; then
echo "ovn-kubernetes pods were not created."
timeout=$(calculate_timeout ${endtime})
if ! kubectl wait -n kube-system --for=condition=ready pods --all --timeout=${timeout}s ; then
echo "some pods in the system are not running"
kubectl get pods -A -o wide || true
exit 1
fi
echo "ovn-kubernetes pods created."
}

# Check that everything is fine and running. IPv6 cluster seems to take a little
# longer to come up, so extend the wait time.
OVN_TIMEOUT=300s
if [ "$KIND_IPV6_SUPPORT" == true ]; then
OVN_TIMEOUT=480s
fi
if ! kubectl wait -n ovn-kubernetes --for=condition=ready pods --all --timeout=${OVN_TIMEOUT} ; then
echo "some pods in OVN Kubernetes are not running"
kubectl get pods -A -o wide || true
exit 1
# calculate_timeout takes an absolute endtime in seconds (based on bash script runtime, see
# variable $SECONDS) and calculates a relative timeout value. Should the calculated timeout
# be <= 0, return one second.
calculate_timeout() {
endtime=$1
timeout=$(( endtime - SECONDS ))
if [ ${timeout} -le 0 ]; then
timeout=1
fi
if ! kubectl wait -n kube-system --for=condition=ready pods --all --timeout=300s ; then
echo "some pods in the system are not running"
kubectl get pods -A -o wide || true
exit 1
echo ${timeout}
}

# install_ipsec will apply the IPsec DaemonSet, create a CA that can be used by the IPsec pods. It will then add it to
# configmap -n ovn-kubernetes signer-ca. After that, it will monitor all CSRs that are pending and it will sign those
# with the CA cert. After each iteration, it will check if the ovn-ipsec DaemonSet pods rolled out successfully.
# Make sure to run this at the very end of the setup process.
install_ipsec() {
pushd "${MANIFEST_OUTPUT_DIR}"
run_kubectl apply -f ovn-ipsec.yaml
popd

# Create the CA (stored inside the signer-ca ConfigMap) that the IPsec pods use to sign their certificates
ca_dir=$(mktemp -d)
pushd "${ca_dir}"
${OPENSSL} genrsa -out ca-bundle.key 4096
${OPENSSL} req -x509 -new -nodes -key ca-bundle.key -sha256 -days 10240 -out ca-bundle.crt \
-subj "/C=CA/ST=Arctica/L=Northpole/O=Acme Inc/OU=DevOps/CN=www.example.com/[email protected]"
kubectl create configmap -n ovn-kubernetes signer-ca --from-file ca-bundle.crt

# For ca. 5 minutes max (60 * 5 seconds + overhead) ...
success=false
for i in {1..60}; do
# ... try to get all CSRs and sign them
csrs=$(oc get csr -o go-template='{{range .items}}{{if not .status}}{{.metadata.name}}{{"\n"}}{{end}}{{end}}')
for csr in ${csrs}; do
kubectl get csr "${csr}" -o jsonpath='{.spec.request}' | base64 --decode | \
sed -n '/BEGIN CERTIFICATE REQUEST/,$p' > "${csr}"
${OPENSSL} x509 -req -in ${csr} -CA ca-bundle.crt -CAkey ca-bundle.key -CAcreateserial -out "${csr}.crt" -days 3650 \
-sha256 -extensions v3_req -copy_extensions copy
kubectl get csr "${csr}" -o json | \
jq '.status.certificate = "'$(base64 "${csr}.crt" | tr -d '\n')'"' | \
kubectl replace --raw /apis/certificates.k8s.io/v1/certificatesigningrequests/${csr}/status -f -
done

# ... and then check if the ovn-ipsec DaemonSet rolled out completely (wait for 5 seconds)
if kubectl rollout status daemonset -n ovn-kubernetes ovn-ipsec --timeout 5s; then
echo "All IPsec pods rolled out successfully"
success=true
break
fi
echo "IPsec pods did not roll out successfully yet"
done
popd
rm -Rf "${ca_dir}"

if ! ${success}; then
echo "IPsec pods did not roll out successfully"
exit 1
fi
}

Expand Down Expand Up @@ -790,6 +877,9 @@ check_dependencies
parse_args "$@"
set_default_params
print_params
if [ "${ENABLE_IPSEC}" == true ]; then
set_openssl_binary
fi

set -euxo pipefail
check_ipv6
Expand Down Expand Up @@ -817,3 +907,9 @@ if [ "$KIND_INSTALL_INGRESS" == true ]; then
fi
kubectl_wait_pods
sleep_until_pods_settle
# Launch IPsec pods last to make sure that CSR signing logic works
# Launch csr_signer in background
# Wait for DaemonSet to rollout
if [ "${ENABLE_IPSEC}" == true ]; then
install_ipsec
fi
4 changes: 3 additions & 1 deletion dist/images/Dockerfile.fedora
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ USER root

ENV PYTHONDONTWRITEBYTECODE yes

ARG ovnver=ovn-22.09.0-4.fc36
ARG ovnver=ovn-22.09.0-25.fc36
# Automatically populated when using docker buildx
ARG TARGETPLATFORM
ARG BUILDPLATFORM
Expand All @@ -28,9 +28,11 @@ RUN INSTALL_PKGS=" \
libpcap hostname kubernetes-client util-linux \
ovn ovn-central ovn-host python3-openvswitch tcpdump openvswitch-test python3-pyOpenSSL \
iptables iproute iputils strace socat koji \
libreswan openvswitch-ipsec \
" && \
dnf install --best --refresh -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
dnf clean all && rm -rf /var/cache/dnf/*
RUN ln -s /usr/bin/python3 /usr/libexec/platform-python

RUN mkdir -p /var/run/openvswitch

Expand Down
13 changes: 13 additions & 0 deletions dist/images/daemonset.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ while [ "$1" != "" ]; do
--gateway-options)
OVN_GATEWAY_OPTS=$VALUE
;;
--enable-ipsec)
ENABLE_IPSEC=$VALUE
;;
--ovn-monitor-all)
OVN_MONITOR_ALL=$VALUE
;;
Expand Down Expand Up @@ -293,6 +296,9 @@ echo "ovn_gateway_mode: ${ovn_gateway_mode}"
ovn_gateway_opts=${OVN_GATEWAY_OPTS}
echo "ovn_gateway_opts: ${ovn_gateway_opts}"

enable_ipsec=${ENABLE_IPSEC:-false}
echo "enable_ipsec: ${enable_ipsec}"

ovn_db_replicas=${OVN_DB_REPLICAS:-3}
echo "ovn_db_replicas: ${ovn_db_replicas}"
ovn_db_minAvailable=$(((${ovn_db_replicas} + 1) / 2))
Expand Down Expand Up @@ -499,6 +505,7 @@ ovn_image=${image} \
ovn_ssl_en=${ovn_ssl_en} \
ovn_nb_port=${ovn_nb_port} \
ovn_sb_port=${ovn_sb_port} \
enable_ipsec=${enable_ipsec} \
j2 ../templates/ovnkube-db.yaml.j2 -o ${output_dir}/ovnkube-db.yaml

ovn_image=${image} \
Expand All @@ -517,13 +524,19 @@ ovn_image=${image} \
ovn_sb_port=${ovn_sb_port} \
ovn_nb_raft_port=${ovn_nb_raft_port} \
ovn_sb_raft_port=${ovn_sb_raft_port} \
enable_ipsec=${enable_ipsec} \
j2 ../templates/ovnkube-db-raft.yaml.j2 -o ${output_dir}/ovnkube-db-raft.yaml

ovn_image=${image} \
ovn_image_pull_policy=${image_pull_policy} \
ovn_unprivileged_mode=${ovn_unprivileged_mode} \
j2 ../templates/ovs-node.yaml.j2 -o ${output_dir}/ovs-node.yaml

if ${enable_ipsec}; then
ovn_image=${image} \
j2 ../templates/ovn-ipsec.yaml.j2 -o ${output_dir}/ovn-ipsec.yaml
fi

# ovn-setup.yaml
net_cidr=${OVN_NET_CIDR:-"10.128.0.0/14/23"}
svc_cidr=${OVN_SVC_CIDR:-"172.30.0.0/16"}
Expand Down
3 changes: 3 additions & 0 deletions dist/images/ovndb-raft-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,9 @@ ovsdb-raft() {
set_election_timer ${db} ${election_timer}
if [[ ${db} == "nb" ]]; then
set_northd_probe_interval
[[ "true" == "${ENABLE_IPSEC}" ]] && {
ovn-nbctl set nb_global . ipsec=true
}
fi
# set the connection and disable inactivity probe, this deletes the old connection if any
# this will unblock pod-1 and pod-2 waiters
Expand Down
4 changes: 4 additions & 0 deletions dist/images/ovnkube.sh
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,10 @@ nb-ovsdb() {
ovn-nbctl set-ssl ${ovn_nb_pk} ${ovn_nb_cert} ${ovn_ca_cert}
echo "=============== nb-ovsdb ========== reconfigured for SSL"
}
[[ "true" == "${ENABLE_IPSEC}" ]] && {
ovn-nbctl set nb_global . ipsec=true
echo "=============== nb-ovsdb ========== reconfigured for ipsec"
}
ovn-nbctl --inactivity-probe=0 set-connection p${transport}:${ovn_nb_port}:$(bracketify ${ovn_db_host})
if memory_trim_on_compaction_supported "nbdb"
then
Expand Down
Loading