Feature/airgap enterprise ca support#134
Conversation
This commit adds comprehensive support for deploying GoCD in airgapped enterprise environments with private Certificate Authorities. New features: - Private CA injection via Kubernetes Secret or ConfigMap - Automatic Java truststore generation via init container - Plugin mirror configuration (replaces hardcoded GitHub URLs) - Git URL rewrite rules for internal mirrors - Kubernetes Elastic Agent CA propagation - Environment variable injection for common tools (Git, Python, Node, curl, etc.) Configuration: - global.privateCA: CA bundle from Secret/ConfigMap with automatic truststore generation and environment variable injection - Fully extensible environmentVariables map for custom build tools - Documented examples for Maven, Gradle, Go, Pip, Cargo, Ruby Bundler - global.airgap: Registry override, imagePullSecrets, plugin mirror with authentication support, Git URL rewrites - global.elasticAgentCAInjection: CA injection into elastic agent pods Files Modified: - values.yaml: Added global configuration sections for privateCA, airgap, and elasticAgentCAInjection with extensive documentation and examples - templates/_helpers.tpl: Added helper templates for CA volumes, volume mounts, env vars, truststore init container, plugin downloads, and Git config - templates/gocd-server-deployment.yaml: Integrated CA injection (volumes, mounts, env vars, init containers) - templates/gocd-agent-controller.yaml: Integrated CA injection (volumes, mounts, env vars, init containers) - templates/configmap-gitconfig.yaml: New ConfigMap for Git SSL configuration - templates/configmap-elastic-agent-pod-template.yaml: New pod template for elastic agents with CA injection This enhancement enables GoCD to run in fully airgapped environments with zero internet access by: 1. Eliminating hardcoded GitHub plugin downloads 2. Supporting internal Git repositories (GitLab, Bitbucket, etc.) 3. Propagating CA trust to all components (server, static agents, elastic agents) 4. Configuring SSL verification for all common build tools 5. Allowing users to add custom environment variables for their specific build tools All features are disabled by default to maintain backward compatibility. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Fixed an issue where volume mounts were being rendered inside the env section when persistence was disabled, causing Kubernetes validation errors. The conditional check for rendering the volumeMounts: declaration now includes checking if private CA is enabled, ensuring the section is properly rendered when CA injection is active. Issue: - When agent.persistence.enabled=false and global.privateCA.enabled=true, the volumeMounts: declaration was skipped, but CA volume mounts were still rendered, causing them to appear as environment variables Solution: - Updated volumeMounts conditional in both server and agent templates to include: (eq (include \"gocd.privateCA.enabled\" .) \"true\") Files modified: - gocd/templates/gocd-agent-controller.yaml (line 174) - gocd/templates/gocd-server-deployment.yaml (line 140) Testing: - Deployed to Docker Desktop Kubernetes v1.34.1 - Both server and agent pods running successfully - All CA injection features verified and working - See TEST-RESULTS.md for comprehensive test results Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Update documentation and metadata for airgap deployment release: - CHANGELOG.md: Add v2.18.0 release notes with comprehensive feature list - Chart.yaml: Bump version from 2.17.1 to 2.18.0 - README.md: Add 250+ line 'Airgap Deployment & Enterprise Private CA Support' section - Private CA configuration and prerequisites - Environment variables reference - Airgap mode configuration (plugin mirror, Git URL rewrites) - Kubernetes Elastic Agent CA injection - Complete production example - Troubleshooting guide These documentation updates support the airgap implementation in commits: - 617d174: feat: Add airgap and enterprise private CA support - 81e1288: fix: Add volumeMounts condition for CA injection All features disabled by default, 100% backward compatible. Tested on Docker Desktop Kubernetes v1.34.1 (14/14 tests passed). Implementation assisted by Claude Code (Anthropic). Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
|
I'm closing this - this is not the way to go about it. There are a dozen reasons, but I will put only as much effort into reply as it took you to prompt Claude to generate this garbage; albeit probably with about the same accuracy.
If this works for you, fine, go for it, but this is very far from suitable and is not the way to go about it and will not be supported. You have shown zero effort in doing anything except for generating big AI descriptions and PRs - and not even bothered to answer any of the questions at gocd/docs.go.cd#1118 (comment) that might help navigate to the right solution. If you want to go somewhere with this, please engage in person, in good faith. If you want to use OSS maintainers to prompt your LLM for you, you're in the wrong place. |
Summary
Adds comprehensive airgap deployment support for GoCD in disconnected Kubernetes environments with private certificate authorities.
Motivation
Many enterprise environments require GoCD deployments in airgapped (zero internet access) clusters with private CAs:
Currently, these deployments require extensive manual configuration and workarounds.
What Changed
New Features
Private CA Certificate Injection (
global.privateCA)Airgap Mode (
global.airgap).gitconfiggeneration with SSL CA pathsKubernetes Elastic Agent CA Propagation (
global.elasticAgentCAInjection)Bug Fixes
privateCA.enabled=truebutpersistence.enabled=falseenv:sectionDocumentation
Backward Compatibility
✅ 100% backward compatible - All features are disabled by default (opt-in)
No changes to existing deployments unless explicitly configured.
Testing
Tested locally on Docker Desktop Kubernetes v1.34.1:
Test Environment
Configuration Example
Click to expand airgap configuration example
Files Modified
gocd/values.yaml(+123 lines) - Global airgap/CA configurationgocd/templates/_helpers.tpl(+227 lines) - Helper templatesgocd/templates/gocd-server-deployment.yaml(+49 lines, 1 fix)gocd/templates/gocd-agent-controller.yaml(+43 lines, 1 fix)gocd/templates/configmap-gitconfig.yaml(new file, +11 lines)gocd/templates/configmap-elastic-agent-pod-template.yaml(new file, +90 lines)gocd/CHANGELOG.md(+17 lines)gocd/README.md(+250 lines)gocd/Chart.yaml(version bump to 2.18.0)Total: 543 lines of Helm chart code + 267 lines of documentation
AI Assistance Disclosure
This implementation was developed with assistance from Claude Code (Anthropic AI):
All code has been:
Human oversight and validation applied throughout development.
Checklist
Follow-up Work
A corresponding documentation PR will be submitted to gocd/docs.go.cd.
gocd/docs.go.cd#1120