Skip to content

Commit

Permalink
provide a kube-proxy package that matches the kubelet source
Browse files Browse the repository at this point in the history
This package provides a matching binary only.
  • Loading branch information
tzneal committed Jul 2, 2024
1 parent e4f9f14 commit 563f5d4
Show file tree
Hide file tree
Showing 8 changed files with 360 additions and 8 deletions.
46 changes: 45 additions & 1 deletion packages/kubernetes-1.23/kubernetes-1.23.spec
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,35 @@ Conflicts: (%{_cross_os}image-feature(no-fips) or %{_cross_os}kubelet-1.23-bin)
%description -n %{_cross_os}kubelet-1.23-fips-bin
%{summary}.

%package -n %{_cross_os}kube-proxy-1.23
Summary: Container cluster node proxy
Requires: %{_cross_os}conntrack-tools
Requires: %{_cross_os}containerd
Requires: %{_cross_os}ecr-credential-provider-1.23
Requires: %{_cross_os}aws-signing-helper
Requires: %{_cross_os}kube-proxy-1.23(binaries)

%description -n %{_cross_os}kube-proxy-1.23
%{summary}.

%package -n %{_cross_os}kube-proxy-1.23-bin
Summary: Container cluster node proxy binaries
Provides: %{_cross_os}kube-proxy-1.23(binaries)
Requires: (%{_cross_os}image-feature(no-fips) and %{_cross_os}kube-proxy-1.23)
Conflicts: (%{_cross_os}image-feature(fips) or %{_cross_os}kube-proxy-1.23-fips-bin)

%description -n %{_cross_os}kube-proxy-1.23-bin
%{summary}.

%package -n %{_cross_os}kube-proxy-1.23-fips-bin
Summary: Container cluster node proxy binaries, FIPS edition
Provides: %{_cross_os}kube-proxy-1.23(binaries)
Requires: (%{_cross_os}image-feature(fips) and %{_cross_os}kube-proxy-1.23)
Conflicts: (%{_cross_os}image-feature(no-fips) or %{_cross_os}kube-proxy-1.23-bin)

%description -n %{_cross_os}kube-proxy-1.23-fips-bin
%{summary}.

%prep
%autosetup -Sgit -c -n %{gorepo}-%{gover} -p1

Expand All @@ -118,18 +147,22 @@ export FORCE_HOST_GO=1
# Build codegen programs with the host toolchain.
make generated_files

# Build kubelet with the target toolchain.
# Build kubelet and kube-proxy with the target toolchain.
%set_cross_go_flags
unset CC
export KUBE_BUILD_PLATFORMS="linux/%{_cross_go_arch}"
export %{kube_cc}
export GOFLAGS="${GOFLAGS} -tags=dockerless"
export GOLDFLAGS="${GOLDFLAGS}"
make WHAT="cmd/kubelet"
make WHAT="cmd/kube-proxy"

export KUBE_OUTPUT_SUBPATH="_fips_output/local"
export GOEXPERIMENT="boringcrypto"
# don't build kube-proxy statically so we can build a fips version
export KUBE_CGO_OVERRIDES="kube-proxy"
make WHAT="cmd/kubelet"
make WHAT="cmd/kube-proxy"

# build the pause container
cd build/pause/linux/
Expand All @@ -152,10 +185,12 @@ install -m 0644 %{S:101} image/manifest.json
output="./_output/local/bin/linux/%{_cross_go_arch}"
install -d %{buildroot}%{_cross_bindir}
install -p -m 0755 ${output}/kubelet %{buildroot}%{_cross_bindir}
install -p -m 0755 ${output}/kube-proxy %{buildroot}%{_cross_bindir}

fips_output="./_fips_output/local/bin/linux/%{_cross_go_arch}"
install -d %{buildroot}%{_cross_fips_bindir}
install -p -m 0755 ${fips_output}/kubelet %{buildroot}%{_cross_fips_bindir}
install -p -m 0755 ${fips_output}/kube-proxy %{buildroot}%{_cross_fips_bindir}

install -d %{buildroot}%{_cross_unitdir}
install -p -m 0644 %{S:1} %{S:10} %{S:13} %{buildroot}%{_cross_unitdir}
Expand Down Expand Up @@ -229,4 +264,13 @@ install -p -m 0644 %{S:102} %{buildroot}%{_cross_templatedir}/pod-infra-containe
%files -n %{_cross_os}kubelet-1.23-fips-bin
%{_cross_fips_bindir}/kubelet

%files -n %{_cross_os}kube-proxy-1.23
%license LICENSE LICENSE.gonum.graph LICENSE.shell2junit LICENSE.golang PATENTS.golang

%files -n %{_cross_os}kube-proxy-1.23-bin
%{_cross_bindir}/kube-proxy

%files -n %{_cross_os}kube-proxy-1.23-fips-bin
%{_cross_fips_bindir}/kube-proxy

%changelog
46 changes: 45 additions & 1 deletion packages/kubernetes-1.24/kubernetes-1.24.spec
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,35 @@ Conflicts: (%{_cross_os}image-feature(no-fips) or %{_cross_os}kubelet-1.24-bin)
%description -n %{_cross_os}kubelet-1.24-fips-bin
%{summary}.

%package -n %{_cross_os}kube-proxy-1.24
Summary: Container cluster node proxy
Requires: %{_cross_os}conntrack-tools
Requires: %{_cross_os}containerd
Requires: %{_cross_os}ecr-credential-provider-1.24
Requires: %{_cross_os}aws-signing-helper
Requires: %{_cross_os}kube-proxy-1.24(binaries)

%description -n %{_cross_os}kube-proxy-1.24
%{summary}.

%package -n %{_cross_os}kube-proxy-1.24-bin
Summary: Container cluster node proxy binaries
Provides: %{_cross_os}kube-proxy-1.24(binaries)
Requires: (%{_cross_os}image-feature(no-fips) and %{_cross_os}kube-proxy-1.24)
Conflicts: (%{_cross_os}image-feature(fips) or %{_cross_os}kube-proxy-1.24-fips-bin)

%description -n %{_cross_os}kube-proxy-1.24-bin
%{summary}.

%package -n %{_cross_os}kube-proxy-1.24-fips-bin
Summary: Container cluster node proxy binaries, FIPS edition
Provides: %{_cross_os}kube-proxy-1.24(binaries)
Requires: (%{_cross_os}image-feature(fips) and %{_cross_os}kube-proxy-1.24)
Conflicts: (%{_cross_os}image-feature(no-fips) or %{_cross_os}kube-proxy-1.24-bin)

%description -n %{_cross_os}kube-proxy-1.24-fips-bin
%{summary}.

%prep
%autosetup -Sgit -c -n %{gorepo}-%{gover} -p1

Expand All @@ -119,18 +148,22 @@ export FORCE_HOST_GO=1
# Build codegen programs with the host toolchain.
make generated_files

# Build kubelet with the target toolchain.
# Build kubelet and kube-proxy with the target toolchain.
%set_cross_go_flags
unset CC
export KUBE_BUILD_PLATFORMS="linux/%{_cross_go_arch}"
export %{kube_cc}
export GOFLAGS="${GOFLAGS} -tags=dockerless"
export GOLDFLAGS="${GOLDFLAGS}"
make WHAT="cmd/kubelet"
make WHAT="cmd/kube-proxy"

export KUBE_OUTPUT_SUBPATH="_fips_output/local"
export GOEXPERIMENT="boringcrypto"
# don't build kube-proxy statically so we can build a fips version
export KUBE_CGO_OVERRIDES="kube-proxy"
make WHAT="cmd/kubelet"
make WHAT="cmd/kube-proxy"

# build the pause container
cd build/pause/linux/
Expand All @@ -153,10 +186,12 @@ install -m 0644 %{S:101} image/manifest.json
output="./_output/local/bin/linux/%{_cross_go_arch}"
install -d %{buildroot}%{_cross_bindir}
install -p -m 0755 ${output}/kubelet %{buildroot}%{_cross_bindir}
install -p -m 0755 ${output}/kube-proxy %{buildroot}%{_cross_bindir}

fips_output="./_fips_output/local/bin/linux/%{_cross_go_arch}"
install -d %{buildroot}%{_cross_fips_bindir}
install -p -m 0755 ${fips_output}/kubelet %{buildroot}%{_cross_fips_bindir}
install -p -m 0755 ${fips_output}/kube-proxy %{buildroot}%{_cross_fips_bindir}

install -d %{buildroot}%{_cross_unitdir}
install -p -m 0644 %{S:1} %{S:10} %{S:13} %{buildroot}%{_cross_unitdir}
Expand Down Expand Up @@ -230,4 +265,13 @@ install -p -m 0644 %{S:102} %{buildroot}%{_cross_templatedir}/pod-infra-containe
%files -n %{_cross_os}kubelet-1.24-fips-bin
%{_cross_fips_bindir}/kubelet

%files -n %{_cross_os}kube-proxy-1.24
%license LICENSE LICENSE.gonum.graph LICENSE.shell2junit LICENSE.golang PATENTS.golang

%files -n %{_cross_os}kube-proxy-1.24-bin
%{_cross_bindir}/kube-proxy

%files -n %{_cross_os}kube-proxy-1.24-fips-bin
%{_cross_fips_bindir}/kube-proxy

%changelog
46 changes: 45 additions & 1 deletion packages/kubernetes-1.25/kubernetes-1.25.spec
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,35 @@ Conflicts: (%{_cross_os}image-feature(no-fips) or %{_cross_os}kubelet-1.25-bin)
%description -n %{_cross_os}kubelet-1.25-fips-bin
%{summary}.

%package -n %{_cross_os}kube-proxy-1.25
Summary: Container cluster node proxy
Requires: %{_cross_os}conntrack-tools
Requires: %{_cross_os}containerd
Requires: %{_cross_os}ecr-credential-provider-1.25
Requires: %{_cross_os}aws-signing-helper
Requires: %{_cross_os}kube-proxy-1.25(binaries)

%description -n %{_cross_os}kube-proxy-1.25
%{summary}.

%package -n %{_cross_os}kube-proxy-1.25-bin
Summary: Container cluster node proxy binaries
Provides: %{_cross_os}kube-proxy-1.25(binaries)
Requires: (%{_cross_os}image-feature(no-fips) and %{_cross_os}kube-proxy-1.25)
Conflicts: (%{_cross_os}image-feature(fips) or %{_cross_os}kube-proxy-1.25-fips-bin)

%description -n %{_cross_os}kube-proxy-1.25-bin
%{summary}.

%package -n %{_cross_os}kube-proxy-1.25-fips-bin
Summary: Container cluster node proxy binaries, FIPS edition
Provides: %{_cross_os}kube-proxy-1.25(binaries)
Requires: (%{_cross_os}image-feature(fips) and %{_cross_os}kube-proxy-1.25)
Conflicts: (%{_cross_os}image-feature(no-fips) or %{_cross_os}kube-proxy-1.25-bin)

%description -n %{_cross_os}kube-proxy-1.25-fips-bin
%{summary}.

%prep
%autosetup -Sgit -c -n %{gorepo}-%{gover} -p1

Expand All @@ -119,18 +148,22 @@ export FORCE_HOST_GO=1
# Build codegen programs with the host toolchain.
make generated_files

# Build kubelet with the target toolchain.
# Build kubelet and kube-proxy with the target toolchain.
%set_cross_go_flags
unset CC
export KUBE_BUILD_PLATFORMS="linux/%{_cross_go_arch}"
export %{kube_cc}
export GOFLAGS="${GOFLAGS} -tags=dockerless"
export GOLDFLAGS="${GOLDFLAGS}"
make WHAT="cmd/kubelet"
make WHAT="cmd/kube-proxy"

export KUBE_OUTPUT_SUBPATH="_fips_output/local"
export GOEXPERIMENT="boringcrypto"
# don't build kube-proxy statically so we can build a fips version
export KUBE_CGO_OVERRIDES="kube-proxy"
make WHAT="cmd/kubelet"
make WHAT="cmd/kube-proxy"

# build the pause container
cd build/pause/linux/
Expand All @@ -153,10 +186,12 @@ install -m 0644 %{S:101} image/manifest.json
output="./_output/local/bin/linux/%{_cross_go_arch}"
install -d %{buildroot}%{_cross_bindir}
install -p -m 0755 ${output}/kubelet %{buildroot}%{_cross_bindir}
install -p -m 0755 ${output}/kube-proxy %{buildroot}%{_cross_bindir}

fips_output="./_fips_output/local/bin/linux/%{_cross_go_arch}"
install -d %{buildroot}%{_cross_fips_bindir}
install -p -m 0755 ${fips_output}/kubelet %{buildroot}%{_cross_fips_bindir}
install -p -m 0755 ${fips_output}/kube-proxy %{buildroot}%{_cross_fips_bindir}

install -d %{buildroot}%{_cross_unitdir}
install -p -m 0644 %{S:1} %{S:10} %{S:13} %{buildroot}%{_cross_unitdir}
Expand Down Expand Up @@ -230,4 +265,13 @@ install -p -m 0644 %{S:102} %{buildroot}%{_cross_templatedir}/pod-infra-containe
%files -n %{_cross_os}kubelet-1.25-fips-bin
%{_cross_fips_bindir}/kubelet

%files -n %{_cross_os}kube-proxy-1.25
%license LICENSE LICENSE.gonum.graph LICENSE.shell2junit LICENSE.golang PATENTS.golang

%files -n %{_cross_os}kube-proxy-1.25-bin
%{_cross_bindir}/kube-proxy

%files -n %{_cross_os}kube-proxy-1.25-fips-bin
%{_cross_fips_bindir}/kube-proxy

%changelog
46 changes: 45 additions & 1 deletion packages/kubernetes-1.26/kubernetes-1.26.spec
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,35 @@ Conflicts: (%{_cross_os}image-feature(no-fips) or %{_cross_os}kubelet-1.26-bin)
%description -n %{_cross_os}kubelet-1.26-fips-bin
%{summary}.

%package -n %{_cross_os}kube-proxy-1.26
Summary: Container cluster node proxy
Requires: %{_cross_os}conntrack-tools
Requires: %{_cross_os}containerd
Requires: %{_cross_os}ecr-credential-provider-1.26
Requires: %{_cross_os}aws-signing-helper
Requires: %{_cross_os}kube-proxy-1.26(binaries)

%description -n %{_cross_os}kube-proxy-1.26
%{summary}.

%package -n %{_cross_os}kube-proxy-1.26-bin
Summary: Container cluster node proxy binaries
Provides: %{_cross_os}kube-proxy-1.26(binaries)
Requires: (%{_cross_os}image-feature(no-fips) and %{_cross_os}kube-proxy-1.26)
Conflicts: (%{_cross_os}image-feature(fips) or %{_cross_os}kube-proxy-1.26-fips-bin)

%description -n %{_cross_os}kube-proxy-1.26-bin
%{summary}.

%package -n %{_cross_os}kube-proxy-1.26-fips-bin
Summary: Container cluster node proxy binaries, FIPS edition
Provides: %{_cross_os}kube-proxy-1.26(binaries)
Requires: (%{_cross_os}image-feature(fips) and %{_cross_os}kube-proxy-1.26)
Conflicts: (%{_cross_os}image-feature(no-fips) or %{_cross_os}kube-proxy-1.26-bin)

%description -n %{_cross_os}kube-proxy-1.26-fips-bin
%{summary}.

%prep
%autosetup -Sgit -c -n %{gorepo}-%{gover} -p1

Expand All @@ -119,18 +148,22 @@ export FORCE_HOST_GO=1
# Build codegen programs with the host toolchain.
make hack/update-codegen.sh

# Build kubelet with the target toolchain.
# Build kubelet and kube-proxy with the target toolchain.
%set_cross_go_flags
unset CC
export KUBE_BUILD_PLATFORMS="linux/%{_cross_go_arch}"
export %{kube_cc}
export GOFLAGS="${GOFLAGS} -tags=dockerless"
export GOLDFLAGS="${GOLDFLAGS}"
make WHAT="cmd/kubelet"
make WHAT="cmd/kube-proxy"

export KUBE_OUTPUT_SUBPATH="_fips_output/local"
export GOEXPERIMENT="boringcrypto"
# don't build kube-proxy statically so we can build a fips version
export KUBE_CGO_OVERRIDES="kube-proxy"
make WHAT="cmd/kubelet"
make WHAT="cmd/kube-proxy"

# build the pause container
cd build/pause/linux/
Expand All @@ -153,10 +186,12 @@ install -m 0644 %{S:101} image/manifest.json
output="./_output/local/bin/linux/%{_cross_go_arch}"
install -d %{buildroot}%{_cross_bindir}
install -p -m 0755 ${output}/kubelet %{buildroot}%{_cross_bindir}
install -p -m 0755 ${output}/kube-proxy %{buildroot}%{_cross_bindir}

fips_output="./_fips_output/local/bin/linux/%{_cross_go_arch}"
install -d %{buildroot}%{_cross_fips_bindir}
install -p -m 0755 ${fips_output}/kubelet %{buildroot}%{_cross_fips_bindir}
install -p -m 0755 ${fips_output}/kube-proxy %{buildroot}%{_cross_fips_bindir}

install -d %{buildroot}%{_cross_unitdir}
install -p -m 0644 %{S:1} %{S:10} %{S:13} %{buildroot}%{_cross_unitdir}
Expand Down Expand Up @@ -230,4 +265,13 @@ install -p -m 0644 %{S:102} %{buildroot}%{_cross_templatedir}/pod-infra-containe
%files -n %{_cross_os}kubelet-1.26-fips-bin
%{_cross_fips_bindir}/kubelet

%files -n %{_cross_os}kube-proxy-1.26
%license LICENSE LICENSE.gonum.graph LICENSE.shell2junit LICENSE.golang PATENTS.golang

%files -n %{_cross_os}kube-proxy-1.26-bin
%{_cross_bindir}/kube-proxy

%files -n %{_cross_os}kube-proxy-1.26-fips-bin
%{_cross_fips_bindir}/kube-proxy

%changelog
Loading

0 comments on commit 563f5d4

Please sign in to comment.