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

OCPBUGS-37955,SDN-4930,OCPBUGS-42616,SDN-5031,OCPBUGS-38753: [DownstreamMerge] 10-8-24 #2314

Merged
merged 101 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
101a749
fedora: Update Dockerfile to OVN release ovn-24.09.0-33.
numansiddique Sep 17, 2024
a2d0eb1
Pin multus to 4.1.1
RamLavi Sep 17, 2024
c49c07d
udn, cni: Report UDN iface info on network-status
maiqueb Jul 12, 2024
6f61f39
udn, cni, tests: Refactor existing context
maiqueb Aug 30, 2024
d2e1939
udn, cni, tests: Ensure we report the UDN interface via CNI result
maiqueb Aug 30, 2024
62acd7e
udn, cni, tests: Must specify cluster ip configs
maiqueb Sep 13, 2024
03205d3
udn, cni, e2e: Check UDN iface info on network-status
RamLavi Sep 16, 2024
ea94a5a
Layer2 UDN: Rename gateway switch ports
kyrtapz Sep 3, 2024
7be00b7
LGW: Add pod-route towards mpX in L2 network
tssurya Sep 3, 2024
a350b49
Fix name of switch for L2
tssurya Sep 3, 2024
21db02a
Expose GetNodeIfAddrAnnotation as a public function
tssurya Sep 5, 2024
e535317
Rename generateMatch to generateNodeIPMatch
tssurya Sep 5, 2024
9b3eacb
Rename Add to AddSameNodeIPPolicy
tssurya Sep 5, 2024
a3cc1bd
LGW: L2: Add a new LRP at 1500 for UDN
tssurya Sep 5, 2024
d1e41e8
rename hostIfAddr to mgmtIfAddr
tssurya Sep 7, 2024
bd58b4c
Add LGW unit tests for secondary networks topologies
tssurya Sep 7, 2024
f61fbbf
Make error logs better
tssurya Sep 17, 2024
b0dd59b
L2: syncNodeManagementPort should be called after gwManager
tssurya Sep 18, 2024
12b9838
fix retries for node events in udn
tssurya Sep 18, 2024
a6ae180
Merge pull request #4730 from numansiddique/ovn24.09_release
tssurya Sep 18, 2024
8017e9a
Merge pull request #4694 from tssurya/udn-design-l2-routes-policies
trozet Sep 18, 2024
950ff7a
Services E2Es: Reset test variables before each test
kyrtapz Sep 19, 2024
6d269b0
Don't configure arp proxy for UDNs
jcaamano Sep 19, 2024
9bf12b8
Add ovnkube-observ to .gitignore
jcaamano Sep 19, 2024
5f0dab7
Add ginkgo.report to .gitignore
jcaamano Sep 19, 2024
d1ebf1c
Make GetActiveNetworkForNamespace use a controller
trozet Aug 28, 2024
1bc6214
Adds UDN check to getActiveNetworkForNamespace
trozet Sep 17, 2024
bc013a8
Fix missing ICMP SNAT for L2 UDNs GR
jcaamano Sep 17, 2024
1b9ae6a
Bump github.com/urfave/cli/v2
kyrtapz Jul 15, 2024
d89b8e9
Do not masquerade service traffic
kyrtapz Jul 24, 2024
354fa00
Enable access to default network services from user-defined networks
kyrtapz Sep 4, 2024
cbff31f
Use correct pod subnets for Layer2 networks
kyrtapz Sep 18, 2024
86cdf53
Conditional SNAT for Layer2 networks
kyrtapz Sep 2, 2024
3683bf4
L2 services support
kyrtapz Aug 22, 2024
36c9b1b
Unskip UDN enabled service test for L2
kyrtapz Sep 18, 2024
69d70ca
Refactor services_controller_test.go
kyrtapz Aug 27, 2024
760d9e2
Add layer2 UDN tests to services_controller_test.go
kyrtapz Aug 27, 2024
4b9c42b
Add egress gateway e2e test option to delete gateway pod instead of
npinaeva Sep 20, 2024
839842b
Cleanup gateway pod for remote zone.
npinaeva Sep 20, 2024
0f16d95
Merge pull request #4567 from kyrtapz/udn_to_default_svc_base4554
trozet Sep 20, 2024
312a5cb
Merge pull request #4735 from jcaamano/arp-proxy-fix
trozet Sep 20, 2024
9a25bc3
Merge pull request #4653 from kyrtapz/l2_pod_svc
trozet Sep 20, 2024
0349977
Verify udn-allowed-default-services config field
kyrtapz Sep 20, 2024
d63887e
node: udn: Ensure UDN traffic doesn't leak into default network servi…
dceara Sep 6, 2024
1c8b933
Merge pull request #4705 from dceara/udn-pod2service-isolation
trozet Sep 20, 2024
7eb8114
VRF manager: reduce log chat for link updates
martinkennelly Sep 30, 2024
de0757f
Add support for nodes managing their own networks
crnithya Jul 30, 2024
8d544d9
Helm chart fixes for DPUs
crnithya Jul 31, 2024
a627562
Capture dpu->dpu_host relation during ovnkube-node-dpu bringup
crnithya Jul 31, 2024
218c1f1
[upstream] not to update ovs openflow in dpu-host mode
cathy-zhou Feb 26, 2024
ab58b7b
[upstream] dpu bridge mac should not be used in openflow rules
cathy-zhou Mar 5, 2024
1a3854f
service traffic route through Masquerade node IP on dpu host node
cathy-zhou Mar 5, 2024
47056a6
Add gateway options in DPU mode
crnithya Sep 3, 2024
d272c27
Fix node certificate handling for DPUs
crnithya Sep 3, 2024
8c79e29
Disable nodeIPManager on dpu nodes
crnithya Sep 3, 2024
a65242d
requested-chassis should not be set for dpu-host nodes
crnithya Sep 3, 2024
7d4bb98
Update readinessprobe for DPUs
crnithya Sep 3, 2024
c9eeafe
Merge pull request #4744 from npinaeva/egressgw-deletepod-
trozet Oct 4, 2024
e4f360c
interconenct: Ask ovn-northd to bind the remote ports.
numansiddique Oct 4, 2024
d8e4469
Merge pull request #4757 from numansiddique/remote_port_binding
trozet Oct 7, 2024
26079c2
Fix sudo perms
tssurya Sep 11, 2024
005a822
Add UDN pod annotation to open default network ports.
npinaeva Sep 10, 2024
fd9a0a1
Support NetPol for user defined networks
pperiyasamy Sep 2, 2024
f4e83f5
Skip handling NetPol events on non primary networks
pperiyasamy Oct 1, 2024
7cbca4f
Merge pull request #4696 from npinaeva/udn-open-ports
trozet Oct 8, 2024
69781a1
Merge remote-tracking branch 'origin/master' into merge-10-8-24
trozet Oct 8, 2024
956f8fa
Merge pull request #4713 from tssurya/unit-test-sudo-req
tssurya Oct 8, 2024
2edeedc
Fix panic in UT
tssurya Oct 9, 2024
2d3ea23
Merge pull request #4767 from tssurya/fix-panic
tssurya Oct 9, 2024
e183df5
UDN: Skip adding managementport to clusterPortGrp
tssurya Sep 19, 2024
f29d848
Fix UTs for UDNs: don't set exclude_ips
tssurya Oct 9, 2024
6c0733d
Merge pull request #4738 from tssurya/udn-fix-noise
tssurya Oct 10, 2024
7432f67
Merge pull request #4752 from martinkennelly/reduce-vrf-ll
trozet Oct 10, 2024
689e95a
Merge pull request #4745 from kyrtapz/udn_allowed_arg_verify
trozet Oct 11, 2024
93dbdf4
kind: Allow to install custom kubevirt versions
oshoval Sep 10, 2024
4b58ba5
kubevirt, dhcp: Add fqdn and router/dns/mtu opts
qinqon Sep 26, 2024
99607f1
dhcp, kubevirt, l2: Integrate with primary udn
qinqon Sep 26, 2024
828be8d
udpn, l2: Configure lrp dhcpv6_stateful
qinqon Sep 27, 2024
a92c1fc
udpn, l2, gw: Configure ipv6 ra mtu
qinqon Oct 3, 2024
62bef1d
udp, l2, gw: Configure RA priodicity
qinqon Oct 3, 2024
e55d89b
udpn, l2, gw: Configure LOW router preference
qinqon Oct 8, 2024
435adaf
udpn, e2e: Adapt to multiple default gws
qinqon Oct 3, 2024
fd33c42
kubevirt, e2e: Add DHCP/ND test case for UDPN
qinqon Oct 1, 2024
6f0312d
doc, multihoming: Add virt ip dynamic condig
qinqon Oct 8, 2024
715d525
Merge pull request #4750 from qinqon/secondary-udn-dhcp-ra-support
tssurya Oct 16, 2024
c73e0db
node_annotations: Make GetNodeHostAddrs() return stable results.
dceara Oct 17, 2024
508f043
parseNodeGatewayRouterJoinNetwork: Avoid unneeded warnings.
npinaeva Aug 16, 2024
4ead774
UDN controller: allow other subsystems reporting conditions.
npinaeva Aug 22, 2024
db6ca99
Move existing UDN tests using the same UDN config under its own context.
npinaeva Aug 22, 2024
8dc0ca0
Add e2e for a new subsystem error report mechanism.
npinaeva Aug 22, 2024
1e4d8ea
controller: make stop idempotent.
npinaeva Oct 18, 2024
cc3c784
update ginkgo to v2
JacobTanenbaum Sep 25, 2024
c004001
fix deprecated call to -ginkgo.reportFile
JacobTanenbaum Sep 25, 2024
2924095
Add e2e vendor directory to gitignore
jcaamano Oct 9, 2024
1cb09d4
Bump to k8s 1.31
jcaamano Aug 21, 2024
de390b1
Disable kube manager service-lb-controller for kind
jcaamano Oct 15, 2024
52a8537
Merge pull request #4781 from dceara/stable-host-address-annotation-p…
tssurya Oct 21, 2024
30585c1
Invert CNI result order for UDN
trozet Oct 10, 2024
a97d896
Pin multus to 4.1.3
tssurya Oct 21, 2024
75d2e6d
Merge pull request #4770 from trozet/swap_cni_order
tssurya Oct 21, 2024
c6a0243
Merge remote-tracking branch 'origin/master' into merge-10-8-24
trozet Oct 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ concurrency:

env:
GO_VERSION: 1.22.0
K8S_VERSION: v1.30.2
K8S_VERSION: v1.31.0
KIND_CLUSTER_NAME: ovn
KIND_INSTALL_INGRESS: true
KIND_ALLOW_SYSTEM_WRITES: true
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@
contrib/bin

ovn-kubernetes-anp-test-report.yaml

**/ginkgo.report
48 changes: 41 additions & 7 deletions contrib/kind-common
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,13 @@ is_nested_virt_enabled() {
}

install_kubevirt() {
local kubevirt_version="$(curl -L https://storage.googleapis.com/kubevirt-prow/release/kubevirt/kubevirt/stable.txt)"
# possible values:
# stable - install newest stable (default)
# vX.Y.Z - install specific stable (i.e v1.3.1)
# nightly - install newest nightly
# nightly tag - install specific nightly (i.e 20240910)
KUBEVIRT_VERSION=${KUBEVIRT_VERSION:-"stable"}

for node in $(kubectl get node --no-headers -o custom-columns=":metadata.name"); do
$OCI_BIN exec -t $node bash -c "echo 'fs.inotify.max_user_watches=1048576' >> /etc/sysctl.conf"
$OCI_BIN exec -t $node bash -c "echo 'fs.inotify.max_user_instances=512' >> /etc/sysctl.conf"
Expand All @@ -330,10 +336,10 @@ install_kubevirt() {
kubectl label nodes $node node-role.kubernetes.io/worker="" --overwrite=true
fi
done
local kubevirt_release_url="https://github.com/kubevirt/kubevirt/releases/download/${kubevirt_version}"

echo "Deploy latest nighly build Kubevirt"
if [ "$(kubectl get kubevirts -n kubevirt kubevirt -ojsonpath='{.status.phase}')" != "Deployed" ]; then
local kubevirt_release_url=$(get_kubevirt_release_url "$KUBEVIRT_VERSION")
echo "Deploying Kubevirt from $kubevirt_release_url"
kubectl apply -f "${kubevirt_release_url}/kubevirt-operator.yaml"
kubectl apply -f "${kubevirt_release_url}/kubevirt-cr.yaml"
if ! is_nested_virt_enabled; then
Expand All @@ -352,7 +358,8 @@ install_kubevirt() {

kubectl -n kubevirt patch kubevirt kubevirt --type=json --patch '[{"op":"add","path":"/spec/configuration/developerConfiguration","value":{"featureGates":[]}},{"op":"add","path":"/spec/configuration/developerConfiguration/featureGates/-","value":"NetworkBindingPlugins"}]'

local passt_binding_image="quay.io/kubevirt/network-passt-binding:${kubevirt_version}"
local kubevirt_stable_release_url=$(get_kubevirt_release_url "stable")
local passt_binding_image="quay.io/kubevirt/network-passt-binding:${kubevirt_stable_release_url##*/}"
kubectl -n kubevirt patch kubevirt kubevirt --type=json --patch '[{"op":"add","path":"/spec/configuration/network","value":{}},{"op":"add","path":"/spec/configuration/network/binding","value":{"passt":{"computeResourceOverhead":{"requests":{"memory":"500Mi"}},"migration":{"method":"link-refresh"},"networkAttachmentDefinition":"default/primary-udn-kubevirt-binding","sidecarImage":"'"${passt_binding_image}"'"}}}]'

if [ ! -d "./bin" ]
Expand All @@ -369,8 +376,9 @@ install_kubevirt() {

pushd ./bin
if [ ! -f ./virtctl ]; then
cli_name="virtctl-${kubevirt_version}-${OS_TYPE}-${ARCH}"
curl -LO "${kubevirt_release_url}/${cli_name}"
kubevirt_stable_release_url=$(get_kubevirt_release_url "stable")
cli_name="virtctl-${kubevirt_stable_release_url##*/}-${OS_TYPE}-${ARCH}"
curl -LO "${kubevirt_stable_release_url}/${cli_name}"
mv ${cli_name} virtctl
if_error_exit "Failed to download virtctl!"
fi
Expand All @@ -394,7 +402,7 @@ install_kubevirt_ipam_controller() {
}

install_multus() {
local version="v4.1.0"
local version="v4.1.3"
echo "Installing multus-cni $version daemonset ..."
wget -qO- "https://raw.githubusercontent.com/k8snetworkplumbingwg/multus-cni/${version}/deployments/multus-daemonset.yml" |\
sed -e "s|multus-cni:snapshot|multus-cni:${version}|g" |\
Expand Down Expand Up @@ -615,3 +623,29 @@ deploy_passt_binary() {

run_kubectl rollout status -n kube-system daemonset/passt-binding-cni --timeout 2m
}

get_kubevirt_release_url() {
local VERSION="$1"

local kubevirt_version
local kubevirt_release_url

if [[ "$VERSION" == "stable" ]]; then
kubevirt_version=$(curl -sL https://storage.googleapis.com/kubevirt-prow/release/kubevirt/kubevirt/stable.txt)
kubevirt_release_url="https://github.com/kubevirt/kubevirt/releases/download/${kubevirt_version}"
elif [[ "$VERSION" == v* ]]; then
kubevirt_version="$VERSION"
kubevirt_release_url="https://github.com/kubevirt/kubevirt/releases/download/${kubevirt_version}"
elif [[ "$VERSION" == "nightly" ]]; then
kubevirt_version=$(curl -sL https://storage.googleapis.com/kubevirt-prow/devel/nightly/release/kubevirt/kubevirt/latest)
kubevirt_release_url="https://storage.googleapis.com/kubevirt-prow/devel/nightly/release/kubevirt/kubevirt/${kubevirt_version}"
elif [[ "$VERSION" =~ ^[0-9]{8}$ ]]; then
kubevirt_version="$VERSION"
kubevirt_release_url="https://storage.googleapis.com/kubevirt-prow/devel/nightly/release/kubevirt/kubevirt/${kubevirt_version}"
else
echo "Unsupported KUBEVIRT_VERSION value $VERSION (use either stable, vX.Y.Z, nightly or nightly tag)"
exit 1
fi

echo "$kubevirt_release_url"
}
2 changes: 1 addition & 1 deletion contrib/kind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ set_default_params() {
fi
RUN_IN_CONTAINER=${RUN_IN_CONTAINER:-false}
KIND_IMAGE=${KIND_IMAGE:-kindest/node}
K8S_VERSION=${K8S_VERSION:-v1.30.2}
K8S_VERSION=${K8S_VERSION:-v1.31.1}
OVN_GATEWAY_MODE=${OVN_GATEWAY_MODE:-shared}
KIND_INSTALL_INGRESS=${KIND_INSTALL_INGRESS:-false}
KIND_INSTALL_METALLB=${KIND_INSTALL_METALLB:-false}
Expand Down
6 changes: 6 additions & 0 deletions contrib/kind.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ kubeadmConfigPatches:
controllerManager:
extraArgs:
"v": "{{ cluster_log_level }}"
# Disable service-lb-controller for now
# https://github.com/kubernetes/kubernetes/issues/128121
# Once the upstream issue is fixed we can remove this controller
# customization fully. Tracked with
# https://github.com/ovn-org/ovn-kubernetes/issues/4785
"controllers": "*,bootstrap-signer-controller,token-cleaner-controller,-service-lb-controller"
scheduler:
extraArgs:
"v": "{{ cluster_log_level }}"
Expand Down
1 change: 1 addition & 0 deletions dist/images/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ ovn-kube-util
ovnkube
ovnkube-trace
ovnkube-identity
ovnkube-observ
ovndbchecker
hybrid-overlay-node
git_info
Expand Down
2 changes: 1 addition & 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-24.03.90-7.fc41
ARG ovnver=ovn-24.09.0-33.fc41
# Automatically populated when using docker buildx
ARG TARGETPLATFORM
ARG BUILDPLATFORM
Expand Down
55 changes: 55 additions & 0 deletions dist/images/Dockerfile.ubuntu.arm64
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#
# The standard name for this image is ovn-kube-ubuntu

# Notes:
# This is for a development build where the ovn-kubernetes utilities
# are built in this Dockerfile and included in the image (instead of the deb package)
#
#
# So this file will change over time.

FROM ubuntu:24.10

USER root

RUN apt-get update && apt-get install -y iproute2 curl software-properties-common util-linux

RUN curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -

# Install OVS and OVN packages.
RUN apt-get update && apt-get install -y openvswitch-switch openvswitch-common ovn-central ovn-common ovn-host

RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/arm64/kubectl" \
&& install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl

RUN mkdir -p /var/run/openvswitch

# Built in ../../go_controller, then the binaries are copied here.
# put things where they are in the pkg
RUN mkdir -p /usr/libexec/cni/
COPY ovnkube ovn-kube-util ovndbchecker hybrid-overlay-node ovnkube-identity ovnkube-observ /usr/bin/
COPY ovn-k8s-cni-overlay /usr/libexec/cni/ovn-k8s-cni-overlay

# ovnkube.sh is the entry point. This script examines environment
# variables to direct operation and configure ovn
COPY ovnkube.sh /root/
COPY ovndb-raft-functions.sh /root/
# override the pkg's ovn_k8s.conf with this local copy
COPY ovn_k8s.conf /etc/openvswitch/ovn_k8s.conf

# copy git commit number into image
COPY git_info /root

# iptables wrappers
COPY ./iptables-scripts/iptables /usr/sbin/
COPY ./iptables-scripts/iptables-save /usr/sbin/
COPY ./iptables-scripts/iptables-restore /usr/sbin/
COPY ./iptables-scripts/ip6tables /usr/sbin/
COPY ./iptables-scripts/ip6tables-save /usr/sbin/
COPY ./iptables-scripts/ip6tables-restore /usr/sbin/

LABEL io.k8s.display-name="ovn-kubernetes" \
io.k8s.description="ovnkube ubuntu image"

WORKDIR /root
ENTRYPOINT /root/ovnkube.sh
16 changes: 16 additions & 0 deletions dist/images/daemonset.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ OVN_ENABLE_OVNKUBE_IDENTITY="true"
OVN_ENABLE_PERSISTENT_IPS=
OVN_ENABLE_SVC_TEMPLATE_SUPPORT="true"
OVN_ENABLE_DNSNAMERESOLVER="false"
OVN_NOHOSTSUBNET_LABEL=""
OVN_DISABLE_REQUESTEDCHASSIS="false"
# IN_UPGRADE is true only if called by upgrade-ovn.sh during the upgrade test,
# it will render only the parts in ovn-setup.yaml related to RBAC permissions.
IN_UPGRADE=
Expand Down Expand Up @@ -358,6 +360,12 @@ while [ "$1" != "" ]; do
--enable-observ)
OVN_OBSERV_ENABLE=$VALUE
;;
--no-hostsubnet-label)
OVN_NOHOSTSUBNET_LABEL=$VALUE
;;
--ovn_disable_requestedchassis)
OVN_DISABLE_REQUESTEDCHASSIS=$value
;;
*)
echo "WARNING: unknown parameter \"$PARAM\""
exit 1
Expand Down Expand Up @@ -551,6 +559,12 @@ echo "ovn_enable_dnsnameresolver: ${ovn_enable_dnsnameresolver}"
ovn_observ_enable=${OVN_OBSERV_ENABLE}
echo "ovn_observ_enable: ${ovn_observ_enable}"

ovn_nohostsubnet_label=${OVN_NOHOSTSUBNET_LABEL}
echo "ovn_nohostsubnet_label: ${ovn_nohostsubnet_label}"

ovn_disable_requestedchassis=${OVN_DISABLE_REQUESTEDCHASSIS}
echo "ovn_disable_requestedchassis: ${ovn_disable_requestedchassis}"

ovn_image=${ovnkube_image} \
ovnkube_compact_mode_enable=${ovnkube_compact_mode_enable} \
ovn_image_pull_policy=${image_pull_policy} \
Expand Down Expand Up @@ -743,6 +757,8 @@ ovn_image=${ovnkube_image} \
ovn_enable_svc_template_support=${ovn_enable_svc_template_support} \
ovn_enable_dnsnameresolver=${ovn_enable_dnsnameresolver} \
ovn_observ_enable=${ovn_observ_enable} \
ovn_nohostsubnet_label=${ovn_nohostsubnet_label} \
ovn_disable_requestedchassis=${ovn_disable_requestedchassis} \
jinjanate ../templates/ovnkube-master.yaml.j2 -o ${output_dir}/ovnkube-master.yaml

ovn_image=${ovnkube_image} \
Expand Down
51 changes: 51 additions & 0 deletions dist/images/ovnkube.sh
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,11 @@ ovn_enable_svc_template_support=${OVN_ENABLE_SVC_TEMPLATE_SUPPORT:-true}
ovn_enable_dnsnameresolver=${OVN_ENABLE_DNSNAMERESOLVER:-false}
# OVN_OBSERV_ENABLE - enable observability for ovnkube
ovn_observ_enable=${OVN_OBSERV_ENABLE:-false}
# OVN_NOHOSTSUBNET_LABEL - node label indicating nodes managing their own network
ovn_nohostsubnet_label=${OVN_NOHOSTSUBNET_LABEL:-""}
# OVN_DISABLE_REQUESTEDCHASSIS - disable requested-chassis option during pod creation
# should be set to true when dpu nodes are in the cluster
ovn_disable_requestedchassis=${OVN_DISABLE_REQUESTEDCHASSIS:-false}

# Determine the ovn rundir.
if [[ -f /usr/bin/ovn-appctl ]]; then
Expand Down Expand Up @@ -1267,6 +1272,17 @@ ovn-master() {
ovn_observ_enable_flag="--enable-observability"
fi
echo "ovn_observ_enable_flag=${ovn_observ_enable_flag}"

nohostsubnet_label_option=
if [[ ${ovn_nohostsubnet_label} != "" ]]; then
nohostsubnet_label_option="--no-hostsubnet-nodes=${ovn_nohostsubnet_label}"
fi

ovn_disable_requestedchassis_flag=
if [[ ${ovn_disable_requestedchassis} == "true" ]]; then
ovn_disable_requestedchassis_flag="--disable-requestedchassis"
fi
echo "ovn_disable_requestedchassis_flag=${ovn_disable_requestedchassis_flag}"

init_node_flags=
if [[ ${ovnkube_compact_mode_enable} == "true" ]]; then
Expand Down Expand Up @@ -1320,6 +1336,8 @@ ovn-master() {
${ovn_v6_masquerade_subnet_opt} \
${persistent_ips_enabled_flag} \
${ovn_enable_dnsnameresolver_flag} \
${nohostsubnet_label_option} \
${ovn_disable_requestedchassis_flag} \
--cluster-subnets ${net_cidr} --k8s-service-cidr=${svc_cidr} \
--gateway-mode=${ovn_gateway_mode} ${ovn_gateway_opts} \
--host-network-namespace ${ovn_host_network_namespace} \
Expand Down Expand Up @@ -2483,6 +2501,39 @@ ovn-node() {
node_mgmt_port_netdev_flags="$node_mgmt_port_netdev_flags --ovnkube-node-mgmt-port-dp-resource-name ${ovnkube_node_mgmt_port_dp_resource_name}"
fi

if [[ ${ovnkube_node_mode} == "dpu" ]]; then
# in the case of dpu mode we want the host K8s Node Name and not the DPU K8s Node Name
K8S_NODE=$(ovs-vsctl --if-exists get Open_vSwitch . external_ids:host-k8s-nodename | tr -d '\"')
if [[ ${K8S_NODE} == "" ]]; then
echo "Couldn't get the required Host K8s Nodename. Exiting..."
exit 1
fi
if [[ ${ovn_gateway_opts} == "" ]]; then
# get the gateway interface
gw_iface=$(ovs-vsctl --if-exists get Open_vSwitch . external_ids:ovn-gw-interface | tr -d \")
if [[ ${gw_iface} == "" ]]; then
echo "Couldn't get the required OVN Gateway Interface. Exiting..."
exit 1
fi
ovn_gateway_opts="--gateway-interface=${gw_iface} "

# get the gateway nexthop
gw_nexthop=$(ovs-vsctl --if-exists get Open_vSwitch . external_ids:ovn-gw-nexthop | tr -d \")
if [[ ${gw_nexthop} == "" ]]; then
echo "Couldn't get the required OVN Gateway NextHop. Exiting..."
exit 1
fi
ovn_gateway_opts+="--gateway-nexthop=${gw_nexthop} "
fi

# this is required if the DPU and DPU Host are in different subnets
if [[ ${ovn_gateway_router_subnet} == "" ]]; then
# get the gateway router subnet
ovn_gateway_router_subnet=$(ovs-vsctl --if-exists get Open_vSwitch . external_ids:ovn-gw-router-subnet | tr -d \")
fi

fi

local ovn_node_ssl_opts=""
if [[ ${ovnkube_node_mode} != "dpu-host" ]]; then
[[ "yes" == ${OVN_SSL_ENABLE} ]] && {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
controller-gen.kubebuilder.io/version: v0.16.4
name: adminpolicybasedexternalroutes.k8s.ovn.org
spec:
group: k8s.ovn.org
Expand Down Expand Up @@ -85,11 +85,13 @@ spec:
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchLabels:
additionalProperties:
type: string
Expand Down Expand Up @@ -154,11 +156,13 @@ spec:
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchLabels:
additionalProperties:
type: string
Expand Down Expand Up @@ -205,11 +209,13 @@ spec:
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchLabels:
additionalProperties:
type: string
Expand Down
Loading