Compare commits

...

34 Commits
0.01 ... master

Author SHA1 Message Date
9245a4aa87 更新 .github/workflows/build.yaml
All checks were successful
Virtual Kubelet Docker Build and Deploy / build-and-deploy (push) Successful in 14m16s
2025-10-03 03:21:47 +00:00
c86c5414f3 更新 .github/workflows/build.yaml
Some checks failed
Virtual Kubelet Docker Build and Deploy / build-and-deploy (push) Has been cancelled
2025-10-03 03:10:26 +00:00
8769b4d7f8 更新 .github/workflows/build.yaml
Some checks failed
Virtual Kubelet Docker Build and Deploy / build-and-deploy (push) Has been cancelled
2025-10-03 03:00:55 +00:00
9cba926550 更新 .github/workflows/build.yaml
Some checks failed
Virtual Kubelet Docker Build and Deploy / build-and-deploy (push) Has been cancelled
2025-10-03 02:35:45 +00:00
79f5054804 更新 .github/workflows/build.yaml
Some checks failed
Virtual Kubelet Docker Build and Deploy / build-and-deploy (push) Has been cancelled
2025-10-03 02:30:24 +00:00
0aebf31939 更新 .github/workflows/build.yaml 2025-10-03 02:26:54 +00:00
cc86998f2c 更新 .github/workflows/build.yaml
Some checks failed
Virtual Kubelet Docker Build and Deploy / build-and-deploy (push) Failing after 32s
2025-10-03 02:17:15 +00:00
5480aa25b8 更新 .github/workflows/build.yaml
Some checks failed
Virtual Kubelet Docker Build and Deploy / build-and-deploy (push) Has been cancelled
2025-10-03 02:13:12 +00:00
795b7e399d 更新 .github/workflows/build.yaml
Some checks failed
Virtual Kubelet Docker Build and Deploy / build-and-deploy (push) Failing after 29s
2025-10-03 01:40:22 +00:00
8bebd56cf1 更新 .github/workflows/build.yaml
Some checks failed
Virtual Kubelet Docker Build and Deploy / build-and-deploy (push) Failing after 33s
2025-10-03 01:27:10 +00:00
76374a698a 更新 .github/workflows/build.yaml
Some checks failed
Virtual Kubelet Docker Build and Deploy / build-and-deploy (push) Has been cancelled
2025-10-03 01:23:29 +00:00
63626c2ab9 更新 .github/workflows/build.yaml
Some checks failed
Virtual Kubelet Docker Build and Deploy / build-and-deploy (push) Has been cancelled
2025-10-03 01:06:31 +00:00
96fd02b85f 更新 .github/workflows/build.yaml
Some checks failed
Virtual Kubelet Docker Build and Deploy / build-and-deploy (push) Has been cancelled
2025-10-03 01:01:26 +00:00
bcb52e3548 更新 .github/workflows/build.yaml
Some checks failed
Virtual Kubelet Docker Build and Deploy / build-and-deploy (push) Failing after 31s
2025-10-03 00:55:28 +00:00
084cc375da 更新 .github/workflows/build.yaml
Some checks failed
Virtual Kubelet Docker Build and Deploy / build-and-deploy (push) Failing after 28s
2025-10-03 00:41:50 +00:00
fa02b48f15 更新 .github/workflows/build.yaml
Some checks failed
Virtual Kubelet Docker Build and Deploy / build-and-deploy (push) Failing after 30s
2025-10-03 00:39:35 +00:00
422f8c4871 更新 .github/workflows/build.yaml
Some checks failed
Virtual Kubelet Docker Build and Deploy / build-and-deploy (push) Failing after 36s
2025-10-03 00:35:20 +00:00
eb6869404e 更新 .github/workflows/build.yaml
Some checks failed
Virtual Kubelet Docker Build and Deploy / build-and-deploy (push) Has been cancelled
2025-10-02 23:58:22 +00:00
34409f04a3 更新 .github/workflows/build.yaml
Some checks failed
Virtual Kubelet Docker Build and Deploy / build-and-deploy (push) Has been cancelled
2025-10-02 23:52:12 +00:00
b47ed9f622 更新 .github/workflows/build.yaml
Some checks failed
Virtual Kubelet Docker Build and Deploy / build-and-deploy (push) Failing after 59s
2025-10-02 23:43:59 +00:00
9c678d50e6 更新 .github/workflows/build.yaml
Some checks failed
Virtual Kubelet Docker Build and Deploy / build-and-deploy (push) Failing after 1m1s
2025-10-02 23:31:02 +00:00
b683bfbcc0 更新 .github/workflows/build.yaml
Some checks failed
Virtual Kubelet Docker Build and Deploy / build-and-deploy (push) Failing after 20s
2025-10-02 23:29:18 +00:00
68095c2434 更新 .github/workflows/build.yaml
Some checks failed
Virtual Kubelet Docker Build and Deploy / build-and-deploy (push) Failing after 15s
2025-10-02 23:14:48 +00:00
c8d463dcb8 更新 .github/workflows/build.yaml
Some checks failed
Virtual Kubelet Docker Build and Deploy / build-and-deploy (push) Failing after 18s
2025-10-02 23:11:21 +00:00
11525cf938 更新 .github/workflows/build.yaml 2025-10-02 23:08:28 +00:00
1afb6a2260 更新 .github/workflows/build.yaml
Some checks failed
Virtual Kubelet Docker Build and Deploy / build-and-deploy (push) Failing after 55s
2025-10-02 23:03:39 +00:00
12784de8d3 更新 .github/workflows/build.yaml
Some checks failed
Virtual Kubelet Docker Build and Deploy / build-and-deploy (push) Failing after 57s
2025-10-02 17:01:01 +00:00
5c71e3c2c5 alpine
Some checks failed
Virtual Kubelet Docker Build and Deploy / build-and-deploy (push) Failing after 55s
2025-07-01 02:34:40 +00:00
27576e9557 删除 .github/workflows/codeql-analysis.yml
Some checks failed
Virtual Kubelet Docker Build and Deploy / build-and-deploy (push) Has been cancelled
2025-07-01 02:27:31 +00:00
2e357d1988 删除 .github/workflows/ci.yml
Some checks failed
Virtual Kubelet Docker Build and Deploy / build-and-deploy (push) Has been cancelled
CodeQL / Analyze (go) (push) Has been cancelled
2025-07-01 02:27:16 +00:00
bd151cea10 更新 Dockerfile
Some checks failed
CI / Lint (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Envtest Tests (push) Has been cancelled
CI / E2E (push) Has been cancelled
CodeQL / Analyze (go) (push) Has been cancelled
Virtual Kubelet Docker Build and Deploy / build-and-deploy (push) Has been cancelled
2025-07-01 02:17:49 +00:00
f1ff24e1c4 更新 Dockerfile
Some checks failed
CI / Lint (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Envtest Tests (push) Has been cancelled
CI / E2E (push) Has been cancelled
CodeQL / Analyze (go) (push) Has been cancelled
Virtual Kubelet Docker Build and Deploy / build-and-deploy (push) Has been cancelled
2025-07-01 02:08:47 +00:00
a34171c71e 更新 .github/workflows/build.yaml
Some checks failed
Virtual Kubelet Docker Build and Deploy / build-and-deploy (push) Successful in 7m47s
CI / Lint (push) Failing after 20m58s
CodeQL / Analyze (go) (push) Has been cancelled
CI / Unit Tests (push) Failing after 11m40s
CI / Envtest Tests (push) Failing after 3m53s
CI / E2E (push) Failing after 35s
2025-07-01 00:26:45 +00:00
08ddc9acf6 更新 .github/workflows/build.yaml
Some checks failed
CI / Unit Tests (push) Has been cancelled
CI / Lint (push) Has been cancelled
CI / Envtest Tests (push) Has been cancelled
CI / E2E (push) Has been cancelled
CodeQL / Analyze (go) (push) Has been cancelled
2025-07-01 00:24:59 +00:00
4 changed files with 24 additions and 182 deletions

View File

@@ -1,7 +1,8 @@
name: Virtual Kubelet Docker Build and Deploy
on:
release:
types: [created] # 仅在创建Release时触发也可选择published、edited等
push:
branches: [master]
pull_request:
jobs:
build-and-deploy:
@@ -23,8 +24,12 @@ jobs:
ls -la ${{ github.workspace }}
echo "🍏 此作业的状态是 ${{ job.status }}。"
- name: 设置 Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver: docker # 明确指定使用 docker 驱动
- name: 从标签名中提取版本号
id: extract_version
@@ -37,22 +42,25 @@ jobs:
- name: 登录 Docker 注册表
uses: docker/login-action@v3
with:
registry: registry.cn-beijing.aliyuncs.com
registry: registry-vpc.cn-beijing.aliyuncs.com
username: ${{ secrets.ALI_DOCKER_REGISTRY_USERNAME }}
password: ${{ secrets.ALI_DOCKER_REGISTRY_PASSWORD }}
- name: 构建并推送 Virtual Kubelet 镜像
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile # 确保Dockerfile路径正确
push: true
tags: |
registry.cn-beijing.aliyuncs.com/d8dcloud/virtual-kubelet:${{ env.VERSION }}
registry.cn-beijing.aliyuncs.com/d8dcloud/virtual-kubelet:latest
registry-vpc.cn-beijing.aliyuncs.com/d8dcloud/virtual-kubelet:alpine
build-args: |
GOLANG_CI_LINT_VERSION=v1.68.0
BUILD_TAGS=""
BUILD_TAGS=
HTTP_PROXY=${{ vars.HTTP_PROXY }}
HTTPS_PROXY=${{ vars.HTTPS_PROXY }}
NO_PROXY=${{ vars.NO_PROXY }}
labels: |
org.opencontainers.image.title=Virtual Kubelet
org.opencontainers.image.description=Kubernetes Virtual Kubelet implementation

View File

@@ -1,115 +0,0 @@
name: CI
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches: [master]
pull_request:
permissions:
contents: read
env:
GO_VERSION: "1.23"
jobs:
lint:
name: Lint
runs-on: ubuntu-22.04
timeout-minutes: 20
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache: false
- uses: actions/checkout@v4
- uses: golangci/golangci-lint-action@v8
with:
version: v2.1
args: --timeout=15m --config=.golangci.yml
skip-cache: true
unit-tests:
name: Unit Tests
runs-on: ubuntu-22.04
timeout-minutes: 20
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- uses: actions/checkout@v4
- name: Run Tests
run: make test
env-tests:
name: Envtest Tests
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- uses: actions/checkout@v4
- name: Run Tests
run: make envtest
e2e:
name: E2E
runs-on: ubuntu-22.04
timeout-minutes: 20
env:
CHANGE_MINIKUBE_NONE_USER: true
KUBERNETES_VERSION: v1.31
MINIKUBE_HOME: /home/runner
MINIKUBE_VERSION: v1.34.0
MINIKUBE_WANTUPDATENOTIFICATION: false
MINIKUBE_WANTREPORTERRORPROMPT: false
SKAFFOLD_VERSION: v2.13.2
GO111MODULE: "on"
steps:
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Skaffold
run: |
curl -sLo skaffold https://storage.googleapis.com/skaffold/releases/${SKAFFOLD_VERSION}/skaffold-linux-amd64
chmod +x skaffold
sudo mv skaffold /usr/local/bin/
echo /usr/local/bin >> $GITHUB_PATH
- name: Install Minikube dependencies
run: |
sudo apt-get update && sudo apt-get install -y apt-transport-https curl
echo "deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/${KUBERNETES_VERSION}/deb/ /" | sudo tee /etc/apt/sources.list.d/kubernetes.list
curl -fsSL https://pkgs.k8s.io/core:/stable:/${KUBERNETES_VERSION}/deb/Release.key | sudo gpg --no-tty --yes --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
sudo apt-get update
sudo apt-get remove -y containerd.io containerd
sudo apt-get install -y kubectl docker.io
- name: Install Minikube
run: |
curl -sLo minikube https://storage.googleapis.com/minikube/releases/${MINIKUBE_VERSION}/minikube-linux-amd64
chmod +x minikube
sudo mv minikube /usr/local/bin/
- name: Start Minikube
run: |
sudo usermod -aG docker $USER && newgrp docker
minikube start --vm-driver=docker --cpus 2 --memory 2048 --kubernetes-version=${KUBERNETES_VERSION}
- name: Wait for Minikube
run: |
JSONPATH='{range .items[*]}{@.metadata.name}:{range @.status.conditions[*]}{@.type}={@.status};{end}{end}';
until kubectl get nodes -o jsonpath="$JSONPATH" 2>&1 | grep -q "Ready=True"; do
sleep 1;
done
- name: Run Tests
run: make e2e

View File

@@ -1,59 +0,0 @@
name: "CodeQL"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches: [master]
schedule:
- cron: "19 18 * * 3"
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
security-events: write
strategy:
fail-fast: false
matrix:
language: ["go"]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3

View File

@@ -25,8 +25,16 @@ RUN \
--mount=type=cache,target=/root/.cache/golangci-lint \
golangci-lint run -v --out-format="${OUT_FORMAT:-colored-line-number}"
FROM scratch
# FROM scratch
# COPY --from=builder /usr/bin/virtual-kubelet /usr/bin/virtual-kubelet
# COPY --from=builder /etc/ssl/certs/ /etc/ssl/certs
FROM alpine:latest
COPY --from=builder /usr/bin/virtual-kubelet /usr/bin/virtual-kubelet
COPY --from=builder /etc/ssl/certs/ /etc/ssl/certs
# 创建必要的目录
RUN mkdir -p /root/.kube
ENTRYPOINT [ "/usr/bin/virtual-kubelet" ]
CMD [ "--help" ]