Skip to content

Commit

Permalink
Add github action for calico kube-proxy (#295)
Browse files Browse the repository at this point in the history
Signed-off-by: James Sturtevant <jstur@microsoft.com>
  • Loading branch information
jsturtevant committed Apr 28, 2023
1 parent 971c21a commit 162ff8f
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/build-calico-kube-proxy-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Build Calico Kube-Proxy images

on:
workflow_dispatch:
inputs:
proxy_version:
description: 'Version of kube-proxy to build (ex: v1.27.1)'
required: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build and push images
run: |
echo "${{ secrets.DOCKER_SECRET }}" | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
cd ./hostprocess/calico && ./build.sh -p ${{ github.event.inputs.proxy_version }}
4 changes: 2 additions & 2 deletions hostprocess/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

repository=${repository:-"sigwindowstools"}
flannelVersion=${flannelVersion:-"v0.14.0"}
calicoVersion=${calicoVersion:-"v3.23.3"}
calicoVersion=${calicoVersion:-"v3.25.0"}

SCRIPTROOT=$(dirname "${BASH_SOURCE[0]}")
pushd $SCRIPTROOT/flannel
Expand All @@ -12,7 +12,7 @@ pushd $SCRIPTROOT/calico
./build.sh -r $repository --calicoVersion $calicoVersion
popd

declare -a proxyVersions=("v1.22.17" "v1.23.15" "v1.24.9" "v1.25.5" "v1.26.0")
declare -a proxyVersions=("v1.24.13" "v1.25.9" "v1.26.4" "v1.27.0")

# Read the array values with space
for proxyVersion in "${proxyVersions[@]}"; do
Expand Down
4 changes: 2 additions & 2 deletions hostprocess/calico/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ esac; shift; done
if [[ "$1" == '--' ]]; then shift; fi

repository=${repository:-"sigwindowstools"}
calicoVersion=${calicoVersion:-"v3.20.0"}
calicoVersion=${calicoVersion:-"v3.25.0"}

docker buildx create --name img-builder --use --platform windows/amd64
trap 'docker buildx rm img-builder' EXIT
Expand All @@ -37,7 +37,7 @@ if [[ -n "$calicoVersion" || "$all" == "1" ]] ; then
fi

if [[ -n "$proxyVersion" || "$all" == "1" ]] ; then
proxyVersion=${proxyVersion:-"v1.22.4"}
proxyVersion=${proxyVersion:-"v1.27.1"}
pushd kube-proxy
docker buildx build --provenance=false --sbom=false --platform windows/amd64 --output=type=registry --pull --build-arg=k8sVersion=$proxyVersion -f Dockerfile -t $repository/kube-proxy:$proxyVersion-calico-hostprocess .
popd
Expand Down

0 comments on commit 162ff8f

Please sign in to comment.