Skip to content

Commit

Permalink
k8s (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
yylt authored May 22, 2024
1 parent 642d428 commit dbb361f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 17 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/k8s.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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: |
Expand Down Expand Up @@ -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
Expand All @@ -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 }} .
20 changes: 9 additions & 11 deletions Dockerfile-k8s
Original file line number Diff line number Diff line change
@@ -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* /

0 comments on commit dbb361f

Please sign in to comment.