All checks were successful
Virtual Kubelet Docker Build and Deploy / build-and-deploy (push) Successful in 5m29s
- 创建 CLAUDE.md 项目说明文档 - 包含项目概述、关键命令、架构说明和开发指南 - 提供主要文件说明和开发环境要求 - 添加测试、构建和 CI/CD 相关信息
1.7 KiB
1.7 KiB
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
This is the Alibaba Cloud ECI (Elastic Container Instance) provider for Virtual Kubelet. It allows Kubernetes pods to be scheduled onto Alibaba Cloud's serverless container instances instead of traditional cluster nodes.
Key Commands
make build- Build the virtual-kubelet binarymake test- Run all testsmake vet- Run go vet for code analysismake lint- Run golangci-lint for lintingmake mod- Tidy Go modulesmake clean- Remove built binaries
Architecture
- Main Provider:
eci.go- Implements the Virtual Kubelet provider interface - ECI Client:
eci/directory - Contains Alibaba Cloud ECI API client and data structures - CLI:
cmd/virtual-kubelet/- Command-line interface using Cobra - Configuration:
config.go- Provider configuration handling
Key Files
eci.go- Main provider implementation (ECIProvider struct)eci/client.go- ECI API clientconfig.go- Configuration parsing and validationcmd/virtual-kubelet/main.go- Main entry point
Development
- Go 1.13+ required
- Uses Go modules for dependency management
- Follows Virtual Kubelet provider interface conventions
- Integration with Alibaba Cloud ECI API
Testing
- Run
make testto execute tests - Test files follow
*_test.gonaming convention - Uses standard Go testing framework
Building
The build produces bin/virtual-kubelet binary with version information embedded via ldflags.
CI/CD
- CircleCI configuration in
.circleci/config.yml - Runs validation (vet, lint), tests, and module checks
- Uses golangci-lint for linting
Develop Notes
- Always response in Chinese