Production Helm Chart, CRD Manifests, Multi-Component Dockerfiles, and GitHub Actions CI/CD
此内容尚不支持你的语言。
Source:
docs/enhancements/0014-helm-dockerfiles-and-ci/README.md· Status:implemented· Area:core· Milestone:v0.3.0
- CEP Number:
0014 - Status:
implementable - Target Version:
v0.3.0 - Components:
.github/workflows/{ci.yml,release.yml},deploy/helm/cubepod/,deploy/docker-compose/docker-compose.yaml,images/{controller,gateway,egress,podd}/Dockerfile
1. Summary
Section titled “1. Summary”Establishes production packaging, Kubernetes deployment manifests, and automated GitHub Actions CI/CD pipelines for CubePod:
- Component Dockerfiles (
images/):images/podd/Dockerfile: Packages statically-linkedpodd-initandpoddinto/opt/cubepod/dist/forinitContainerinjection into/opt/cubepod/bin.images/controller/Dockerfile: Packagescubepod-controller.images/gateway/Dockerfile: Packagescubepod-gateway.images/egress/Dockerfile: Packagescubepod-egress.
- Complete Helm Chart & Kubernetes CRDs (
deploy/helm/cubepod/):crds/cubepod.io_podboxes.yaml,crds/cubepod.io_podtemplates.yaml,crds/cubepod.io_podwarmpools.yamltemplates/namespace.yaml,templates/rbac.yaml,templates/controller-deployment.yaml,templates/gateway-deployment.yaml,templates/service.yaml
- GitHub Actions CI/CD (
.github/workflows/ci.yml&.github/workflows/release.yml):- Runs Rust (
cargo fmt --check,cargo clippy --workspace --all-targets -- -D warnings,cargo test), Go (gofmt,go vet,go test -race,make test-e2e), Python SDK tests, and Helm chart verification on every push and pull request.
- Runs Rust (
2. Motivation
Section titled “2. Motivation”- Enable one-command deployment of CubePod onto any Kubernetes cluster via
helm upgrade --installorkubectl apply. - Enforce strict CI gates on every PR and automate release artifact builds.
Non-Goals
Section titled “Non-Goals”- External cloud Terraform modules.
3. Design Details
Section titled “3. Design Details”3.1 Dockerfiles (images/{podd,controller,gateway,egress}/Dockerfile)
Section titled “3.1 Dockerfiles (images/{podd,controller,gateway,egress}/Dockerfile)”- Support both multi-stage source builds and pre-built
bin/binary packaging for fast local/cluster image builds. images/podd/Dockerfilecopiespodd-initandpoddto/opt/cubepod/dist/and sets default commandsh -c "cp -f /opt/cubepod/dist/podd-init /opt/cubepod/dist/podd /opt/cubepod/bin/ && chmod 0755 /opt/cubepod/bin/podd-init /opt/cubepod/bin/podd".
3.2 Helm Chart (deploy/helm/cubepod/)
Section titled “3.2 Helm Chart (deploy/helm/cubepod/)”templates/rbac.yaml: CreatesServiceAccount,ClusterRole(permissions forpods,persistentvolumeclaims,podboxes.cubepod.io,podtemplates.cubepod.io,podwarmpools.cubepod.io), andClusterRoleBinding.templates/controller-deployment.yaml: Runscubepod-controllerwith:8081/healthzliveness/readiness probes.templates/gateway-deployment.yaml&templates/service.yaml: Runscubepod-gatewaywith:8080/healthprobes and configurableClusterIP/NodePortService.
3.3 GitHub Actions Workflows (.github/workflows/ci.yml & .github/workflows/release.yml)
Section titled “3.3 GitHub Actions Workflows (.github/workflows/ci.yml & .github/workflows/release.yml)”ci.yml: Jobs forrust-ci,go-ci,python-sdk-ci, ande2e-suite.release.yml: Triggered onv*tags to compile all 6 binaries (podd-init,podd,cubepod-controller,cubepod-gateway,cubepod-egress,cubepod) and attach them to the GitHub Release.
4. Test Plan
Section titled “4. Test Plan”- Automated manifest & template validation test (
pkg/controller/helm_test.goormake lint-helm) verifying YAML structure of all CRDs, Helm templates, and GitHub workflows.
5. Graduation Criteria & PRR
Section titled “5. Graduation Criteria & PRR”- All Dockerfiles build cleanly (
docker build) and deploy on the Kubernetes test cluster.
6. Alternatives Considered
Section titled “6. Alternatives Considered”- Kustomize-only deployment: Helm provides cleaner parameterization across
Block(Kata + Longhorn) vs.Filesystem(NFS / test cluster) environments.