Skip to content

Commit 3f199ce

Browse files
killianmuldoondpf-release
authored andcommitted
fix: revert branch to 25.7.0 and essential fixes
* fix: snap-host-controller image link in storage helm chart * fix: snap-host-controller image link in storage helm chart * fix: snap-host-controller image link in storage helm chart The template points to STORAGE_SYSTEM_IMAGE env variable that is wrong and should be replaced by STORAGE_SYSTEM_UPSTREAM_IMAGE Signed-off-by: Yury Kulazhenkov <[email protected]> (cherry picked from commit e7a3aad930319ab3c2b6004e9a7572a812b596ff) f53e77db fix: snap-host-controller image link in storage helm chart Co-authored-by: Yury Kulazhenkov <[email protected]> * chore: ensure ghcr.io login happens on github release * chore: ensure ghcr.io login happens on github release * chore: ensure ghcr.io login happens on github release this commit ensures that ghcr.io login happens on github release. The condition was using a removed variable that is not possible to use in 25.7 branch because the github source code publishing script exists. Signed-off-by: Vasilis Remmas <[email protected]> * chore: bump broken dependency in hostdriver image * chore: bump broken dependency in hostdriver image bump the unavailable dpkg-dev package in the hostdriver image Signed-off-by: Killian Muldoon <[email protected]> * ci: disable source code downloading for CI * ci: disable source code downloading for CI * ci(vpc): disable source code downloading for CI We have currently issues with downloading the source code from the Ubuntu mirrors in our CI. To mitigate the issues we opt-out the source downloading. Separate commit for VPC. Signed-off-by: Tobias Giese <[email protected]> * ci: disable source code downloading for CI We have currently issues with downloading the source code from the Ubuntu mirrors in our CI. To mitigate the issues we opt-out the source downloading. Signed-off-by: Tobias Giese <[email protected]> * fix: stabilize ovn-kubernetes build add -qq and PACKAGE_SOURCES to stabilis ovn-kubernetes build Signed-off-by: Killian Muldoon <[email protected]> * fix: add ubuntu ports mirror to ovn k Dockerfile add a mirror for ubuntu ports to the ovn-kubernetes Dockerfile Signed-off-by: Killian Muldoon <[email protected]> * fix: support DPUSelect on multi DPU host * fix: support DPUSelect on multi DPU host fix: support DPUSelect on multi DPU host Signed-off-by: Peng Wang <[email protected]> * fix: update ovn-central test image tag in ovnlib test * fix: adjust ovn-central image tag to v24.03 in vpc - adjust ovn-central image tag in vpc topology tests - adjust ovn app version in vpc chart Signed-off-by: adrianc <[email protected]> * fix: update ovn-central test image tag in ovnlib test * fix: update ovn-central test image tag in ovnlib test update tag to point to the correct image in ovnlib test suite Signed-off-by: adrianc <[email protected]> (cherry picked from commit 2f83c0ad7fcc52d53e336510f6a71b2343a48736) 3055492c fix: update ovn-central test image tag in ovnlib test Co-authored-by: Adrian Chiris <[email protected]> * chore: use ubuntu24.04 base image for ovn * chore: use ubuntu 24.04 image for ovn-kubernetes image ovn-kubernetes Dockerfile used ubuntu 24.10 which is EOL its pacakges are no longer present in ubuntu archive. use ubuntu 24.04 base image instead Signed-off-by: adrianc <[email protected]> * chore: use ubuntu24.04 base image for ovn ubuntu24.10 is EOL as of July 2025 its packages are no longer available in ubuntu archive. use 24.04 instead. downgarde ovn to v24.03 as the current version is not available in ubuntu 24.04 base image. Signed-off-by: adrianc <[email protected]> * fix: revert to v25.7.0 revert to the release version to enable clean patch releases This reverts the following commits: - 09a9b7328 chore: rename ovn-kubernetes image to ovnk-utils - 639252b6b fix: revert "chore: parallelize docker build and push for release" - c7ad4592c fix: downgrade dms base image for path issue - f84f0d80d fix: watch dpunode - 4819b4e4d chore: parallelize docker build and push for release - 82c9acdd6 chore: bump broken dependency in hostdriver image - d1da98709 chore: drop additional ovn dependencies from ovn-k build - 41fd58e1e fix: add yq dependency to all helm package make targets - eef457525 chore: drop OVS dependencies from OVN utils image - fd7072e81 ci: disable source code downloading for CI - ddd7962ac fix: create Endpoints with ConfigPorts - 40fa10fb3 fix: support DPUSelect on multi DPU host - 1409acc6e fix: update ovn-central test image tag in ovnlib test - 8f8a11c79 chore: use ubuntu24.04 base image for ovn - ed4b29915 feat: enable ovn-kubernetes images for the hbn_ovnk usecase - c6c0c9c5f fix: snap-host-controller image link in storage helm chart - 645a193de fix: drop generation check for reconcilers - ec2bf0e0f chore: ensure ghcr.io login happens on github release - 0b588c738 ci: replace aws mirror with gcr mirror for redis argocd Signed-off-by: Killian Muldoon <[email protected]> Based on release-v25.7@e37720b549ecd03e08d1d6ad0624a8a80cb67945
1 parent ccba49c commit 3f199ce

File tree

30 files changed

+343
-766
lines changed

30 files changed

+343
-766
lines changed

.golangci.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,6 @@ linters:
9898
- linters:
9999
- staticcheck
100100
text: "QF1008"
101-
- linters:
102-
- staticcheck
103-
# corev1.Endpoints and related types are needed for DPUService reconciliation. Ignore warnings that they're deprecated.
104-
text: "SA1019.*corev1.Endpoint.*deprecated"
105101
paths:
106102
- third_party
107103
- third_party$

Dockerfile.ovn-kubernetes

Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
ARG builder_image
2+
3+
FROM --platform=${BUILDPLATFORM} ${builder_image} AS ovnkubernetes-builder
4+
5+
ARG TARGETARCH
6+
ARG gcflags
7+
ARG ldflags
8+
9+
WORKDIR /workspace
10+
RUN apt update && apt install -y make git
11+
ARG ovn_kubernetes_dir
12+
COPY ${ovn_kubernetes_dir} ovn-kubernetes
13+
RUN cd ovn-kubernetes/dist/images && \
14+
CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} make bld
15+
16+
ARG ipallocator_dir
17+
COPY ./ ./
18+
COPY go.mod go.mod
19+
COPY go.sum go.sum
20+
21+
RUN --mount=type=cache,target=/go/pkg/mod \
22+
go mod download
23+
24+
RUN --mount=type=cache,target=/root/.cache/go-build \
25+
--mount=type=cache,target=/go/pkg/mod \
26+
CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} \
27+
go build -trimpath \
28+
-ldflags="${ldflags}" \
29+
-gcflags="${gcflags}" \
30+
-o ipallocator ./cmd/ipallocator
31+
32+
RUN --mount=type=cache,target=/root/.cache/go-build \
33+
--mount=type=cache,target=/go/pkg/mod \
34+
CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} \
35+
go build -trimpath \
36+
-ldflags="${ldflags}" \
37+
-gcflags="${gcflags}" \
38+
-o dpucniprovisioner ./cmd/dpucniprovisioner
39+
40+
RUN --mount=type=cache,target=/root/.cache/go-build \
41+
--mount=type=cache,target=/go/pkg/mod \
42+
CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} \
43+
go build -trimpath \
44+
-ldflags="${ldflags}" \
45+
-gcflags="${gcflags}" \
46+
-o ovnkubernetesresourceinjector ./cmd/ovnkubernetesresourceinjector
47+
48+
# Create source code archive excluding .gocache, and test files.
49+
# Skipping `.gocache` since it contains pre-compiled versions of packages and other build artifacts for speeding up subsequent builds
50+
RUN mkdir src && \
51+
find . -name '*.go' \
52+
-not -path "./hack/*" \
53+
-not -path "./.gocache/*" \
54+
-not -name "*_test.go" \
55+
-exec cp --parents {} src/ \; && \
56+
tar -czf source-code.tar.gz src
57+
58+
# Build the final image
59+
FROM nvcr.io/nvidia/doca/canonical:ubuntu24.04
60+
61+
ARG TARGETARCH
62+
63+
USER root
64+
65+
ARG ubuntu_mirror=http://archive.ubuntu.com/ubuntu/
66+
ARG BASE_PACKAGES="iproute2 curl software-properties-common util-linux dnsmasq"
67+
68+
# Dependencies for installing OVN (Netplan, systemd and udev required by dpucniprovisioner).
69+
ARG OVN_PACKAGES="openvswitch-switch openvswitch-common netplan.io udev systemd"
70+
71+
RUN dpkg -l | awk '/^ii/{print $2"="$3}' | sort > /initial-dpkg-list.txt
72+
73+
RUN find /etc/apt/sources.list* -type f -exec sed -i \
74+
-e "s|http://archive.ubuntu.com/ubuntu/|${ubuntu_mirror}|g" \
75+
-e "s|http://ports.ubuntu.com/ubuntu/|${ubuntu_mirror}|g" \
76+
-e "s|http://security.ubuntu.com/ubuntu/|${ubuntu_mirror}|g" '{}' \;
77+
78+
RUN apt-get update && \
79+
apt-get install -y -qq ${BASE_PACKAGES} && \
80+
apt-get clean && \
81+
rm -rf /var/lib/apt/lists/*
82+
83+
RUN curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
84+
85+
RUN apt-get update && \
86+
apt-get install -y -qq --no-install-recommends ${OVN_PACKAGES} && \
87+
apt-get clean && \
88+
rm -rf /var/lib/apt/lists/*
89+
90+
RUN dpkg -l | awk '/^ii/{print $2"="$3}' | sort > /after-ovn-dpkg-list.txt
91+
92+
ARG KUBECTL_VERSION=1.33.2
93+
RUN curl -LO "https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/${TARGETARCH}/kubectl" && \
94+
install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
95+
96+
ARG OVN_VERSION="24.03.6"
97+
98+
RUN curl -fsSL "https://github.com/Mellanox/ovn/releases/download/v${OVN_VERSION}/ovn-common_${OVN_VERSION}-1_${TARGETARCH}.deb" \
99+
-o ovn-common_${OVN_VERSION}-1_${TARGETARCH}.deb && \
100+
curl -fsSL "https://github.com/Mellanox/ovn/releases/download/v${OVN_VERSION}/ovn-central_${OVN_VERSION}-1_${TARGETARCH}.deb" \
101+
-o ovn-central_${OVN_VERSION}-1_${TARGETARCH}.deb && \
102+
curl -fsSL "https://github.com/Mellanox/ovn/releases/download/v${OVN_VERSION}/ovn-host_${OVN_VERSION}-1_${TARGETARCH}.deb" \
103+
-o ovn-host_${OVN_VERSION}-1_${TARGETARCH}.deb
104+
105+
RUN dpkg -i "ovn-common_${OVN_VERSION}-1_${TARGETARCH}.deb" \
106+
"ovn-central_${OVN_VERSION}-1_${TARGETARCH}.deb" \
107+
"ovn-host_${OVN_VERSION}-1_${TARGETARCH}.deb" && \
108+
rm "ovn-common_${OVN_VERSION}-1_${TARGETARCH}.deb" \
109+
"ovn-central_${OVN_VERSION}-1_${TARGETARCH}.deb" \
110+
"ovn-host_${OVN_VERSION}-1_${TARGETARCH}.deb"
111+
112+
RUN mkdir -p /var/run/openvswitch
113+
114+
# Built in ../../go_controller, then the binaries are copied here.
115+
# put things where they are in the pkg
116+
RUN mkdir -p /usr/libexec/cni/
117+
COPY --from=ovnkubernetes-builder /workspace/ipallocator /ipallocator
118+
COPY --from=ovnkubernetes-builder /workspace/dpucniprovisioner /cniprovisioner
119+
COPY --from=ovnkubernetes-builder /workspace/ovnkubernetesresourceinjector /ovnkubernetesresourceinjector
120+
COPY --from=ovnkubernetes-builder /workspace/ovn-kubernetes/go-controller/_output/go/bin/ovnkube /usr/bin/
121+
COPY --from=ovnkubernetes-builder /workspace/ovn-kubernetes/go-controller/_output/go/bin/ovn-kube-util /usr/bin/
122+
COPY --from=ovnkubernetes-builder /workspace/ovn-kubernetes/go-controller/_output/go/bin/ovndbchecker /usr/bin/
123+
COPY --from=ovnkubernetes-builder /workspace/ovn-kubernetes/go-controller/_output/go/bin/hybrid-overlay-node /usr/bin/
124+
COPY --from=ovnkubernetes-builder /workspace/ovn-kubernetes/go-controller/_output/go/bin/ovnkube-identity /usr/bin/
125+
COPY --from=ovnkubernetes-builder /workspace/ovn-kubernetes/go-controller/_output/go/bin/ovn-k8s-cni-overlay /usr/libexec/cni/ovn-k8s-cni-overlay
126+
127+
# ovnkube.sh is the entry point. This script examines environment
128+
# variables to direct operation and configure ovn
129+
COPY --from=ovnkubernetes-builder /workspace/ovn-kubernetes/dist/images/ovnkube.sh /root/
130+
COPY --from=ovnkubernetes-builder /workspace/ovn-kubernetes/dist/images/ovndb-raft-functions.sh /root/
131+
# override the pkg's ovn_k8s.conf with this local copy
132+
COPY --from=ovnkubernetes-builder /workspace/ovn-kubernetes/dist/images/ovn_k8s.conf /etc/openvswitch/ovn_k8s.conf
133+
134+
# copy git commit number into image
135+
COPY --from=ovnkubernetes-builder /workspace/ovn-kubernetes/dist/images/git_info /root
136+
137+
# iptables wrappers
138+
COPY --from=ovnkubernetes-builder /workspace/ovn-kubernetes/dist/images/iptables-scripts/iptables /usr/sbin/
139+
COPY --from=ovnkubernetes-builder /workspace/ovn-kubernetes/dist/images/iptables-scripts/iptables-save /usr/sbin/
140+
COPY --from=ovnkubernetes-builder /workspace/ovn-kubernetes/dist/images/iptables-scripts/iptables-restore /usr/sbin/
141+
COPY --from=ovnkubernetes-builder /workspace/ovn-kubernetes/dist/images/iptables-scripts/ip6tables /usr/sbin/
142+
COPY --from=ovnkubernetes-builder /workspace/ovn-kubernetes/dist/images/iptables-scripts/ip6tables-save /usr/sbin/
143+
COPY --from=ovnkubernetes-builder /workspace/ovn-kubernetes/dist/images/iptables-scripts/ip6tables-restore /usr/sbin/
144+
145+
# Get all the source code
146+
RUN mkdir -p /src
147+
WORKDIR /src
148+
149+
# Copy ovn-kubernetes source code from builder stage
150+
COPY --from=ovnkubernetes-builder /workspace/source-code.tar.gz ovn-kubernetes-source-code.tar.gz
151+
152+
RUN curl -fsSL -o kubectl-${KUBECTL_VERSION}.tar.gz \
153+
https://github.com/kubernetes/kubectl/archive/refs/tags/kubernetes-${KUBECTL_VERSION}.tar.gz
154+
155+
RUN curl -fsSL -o ovn-${OVN_VERSION}.tar.gz \
156+
https://github.com/Mellanox/ovn/archive/refs/tags/v${OVN_VERSION}.tar.gz
157+
158+
# Download source code for apt packages.
159+
# Starting from Ubuntu 24.04 shifted to the new deb822 format for source management.
160+
# Enable `deb-src` to be able to fetch sources using `apt-get source`
161+
ARG PACKAGE_SOURCES
162+
RUN test "${PACKAGE_SOURCES}" = "false" || ( \
163+
sed -i 's/^# deb-src/deb-src/g' /etc/apt/sources.list /etc/apt/sources.list.d/* && \
164+
sed -i 's/^Types: deb$/Types: deb deb-src/g' /etc/apt/sources.list.d/*.sources && \
165+
apt-get update && \
166+
apt-get source --download-only ${BASE_PACKAGES} ${OVN_PACKAGES} && \
167+
comm -23 /after-ovn-dpkg-list.txt /initial-dpkg-list.txt | xargs -r apt-get source --download-only && \
168+
apt-get clean && \
169+
rm -f /initial-dpkg-list.txt /after-ovn-dpkg-list.txt && \
170+
rm -rf /var/lib/apt/lists/* && \
171+
cd / && \
172+
tar -cf source-code.tar /src && \
173+
rm -rf /src \
174+
)
175+
176+
LABEL io.k8s.display-name="ovn-kubernetes" \
177+
io.k8s.description="ovn-kubernetes ubuntu image"
178+
179+
WORKDIR /root
180+
ENTRYPOINT /root/ovnkube.sh

Dockerfile.ovnk-utils

Lines changed: 0 additions & 115 deletions
This file was deleted.

0 commit comments

Comments
 (0)