📝 docs(project): 添加项目文档文件
All checks were successful
Virtual Kubelet Docker Build and Deploy / build-and-deploy (push) Successful in 5m29s
All checks were successful
Virtual Kubelet Docker Build and Deploy / build-and-deploy (push) Successful in 5m29s
- 创建 CLAUDE.md 项目说明文档 - 包含项目概述、关键命令、架构说明和开发指南 - 提供主要文件说明和开发环境要求 - 添加测试、构建和 CI/CD 相关信息
This commit is contained in:
56
CLAUDE.md
Normal file
56
CLAUDE.md
Normal file
@@ -0,0 +1,56 @@
|
||||
# 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 binary
|
||||
- `make test` - Run all tests
|
||||
- `make vet` - Run go vet for code analysis
|
||||
- `make lint` - Run golangci-lint for linting
|
||||
- `make mod` - Tidy Go modules
|
||||
- `make 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 client
|
||||
- `config.go` - Configuration parsing and validation
|
||||
- `cmd/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 test` to execute tests
|
||||
- Test files follow `*_test.go` naming 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
|
||||
Reference in New Issue
Block a user