From dbb361f114e08cba8e8ab3119c62e708da7804c3 Mon Sep 17 00:00:00 2001 From: yylt <34183906+yylt@users.noreply.github.com> Date: Wed, 22 May 2024 14:50:58 +0800 Subject: [PATCH] k8s (#89) --- .github/workflows/k8s.yaml | 12 ++++++------ Dockerfile-k8s | 20 +++++++++----------- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/.github/workflows/k8s.yaml b/.github/workflows/k8s.yaml index e96f56f..ae5f45a 100644 --- a/.github/workflows/k8s.yaml +++ b/.github/workflows/k8s.yaml @@ -9,7 +9,7 @@ on: env: REPO: easystack/kubernetes PROJECT: kubernetes - BRANCH: v1.27.6-es + BRANCH: v1.28.2-es Dockerfile: Dockerfile-k8s jobs: @@ -24,7 +24,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: '^1.21' + go-version: '^1.22' - name: install arm tools run: | @@ -61,10 +61,10 @@ jobs: export KUBE_GIT_VERSION=${{ env.BRANCH }} export KUBE_BUILD_PLATFORMS=linux/arm64 - make kube-apiserver kubelet kube-proxy kube-controller-manager kube-scheduler kubectl cloud-controller-manager + make kube-apiserver kubelet kube-proxy kube-controller-manager kube-scheduler kubectl #cloud-controller-manager - # export KUBE_BUILD_PLATFORMS=linux/amd64 - # make kube-apiserver kubelet kube-proxy kube-controller-manager kube-scheduler kubectl cloud-controller-manager + export KUBE_BUILD_PLATFORMS=linux/amd64 + make kube-apiserver kubelet kube-proxy kube-controller-manager kube-scheduler kubectl #cloud-controller-manager tree _output - name: Login to DockerHub @@ -78,7 +78,7 @@ jobs: cd ${{ env.PROJECT }} docker buildx build \ --cache-from "type=local,src=/tmp/.buildx-cache" \ - --platform linux/arm64 \ + --platform linux/arm64,linux/amd64 \ --output "type=image,push=true" \ --tag yylt/hyperkube:${{ steps.date.outputs.date }} \ --file ../${{ env.Dockerfile }} . diff --git a/Dockerfile-k8s b/Dockerfile-k8s index 48bd825..e52a51c 100644 --- a/Dockerfile-k8s +++ b/Dockerfile-k8s @@ -1,18 +1,16 @@ -FROM alpine:latest +FROM alpine:3.15 ARG TARGETARCH RUN apk --no-cache add ca-certificates ceph-common \ e2fsprogs xfsprogs ebtables ethtool conntrack-tools \ iptables ipset bash kmod socat util-linux ; \ - echo 'hosts: files dns' > /etc/nsswitch.conf; - # rm -rf /sbin/iptables /sbin/iptables-save /sbin/iptables-restore; \ - # ln -s /sbin/xtables-nft-multi /sbin/iptables; \ - # ln -s /sbin/xtables-nft-multi /sbin/iptables-save; \ - # ln -s /sbin/xtables-nft-multi /sbin/iptables-restore - -ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin - -COPY ./_output/local/bin/linux/$TARGETARCH/kube* / -#COPY ./_output/local/bin/linux/$TARGETARCH/cloud* / + echo 'hosts: files dns' > /etc/nsswitch.conf; \ + rm -rf /sbin/iptables /sbin/iptables-save /sbin/iptables-restore; \ + ln -s /sbin/xtables-nft-multi /sbin/iptables; \ + ln -s /sbin/xtables-nft-multi /sbin/iptables-save; \ + ln -s /sbin/xtables-nft-multi /sbin/iptables-restore +# Copy the hyperkube binary +COPY ./_output/local/bin/linux/${TARGETARCH}/kube* / +#COPY ./_output/local/bin/linux/$TARGETARCH/cloud* / \ No newline at end of file