Commit 24eabdb
committed
feat: add skipCertCopy option for SIGHUP-based certificate rotation
This change introduces a new 'skipCertCopy' field to the CrdbCluster API
that enables zero-downtime certificate rotation using SIGHUP signals.
Changes:
- Add skipCertCopy boolean field to CrdbClusterSpec API
- Make cert-copy initContainer conditional based on skipCertCopy flag
- When skipCertCopy=true: mount certs directly from secrets for SIGHUP rotation
- When skipCertCopy=false (default): use initContainer for strict 0400 permissions
- Add comprehensive documentation in README.md
- Add example manifests demonstrating both modes
- Add detailed testing guide
When skipCertCopy is enabled:
- No initContainer is created
- Certificates are mounted directly from Kubernetes secrets
- Certificate files have 0440 permissions (group readable)
- Certificates can be reloaded via SIGHUP without pod restart
When skipCertCopy is disabled (default):
- initContainer 'db-init' copies certificates to emptyDir
- Private keys have strict 0400 permissions
- Pod restart required for certificate rotation
Trade-offs are documented in README.md to help users choose the
appropriate mode for their security and operational requirements.
Fixes: cockroachdb/helm-charts#408
Related: cockroachdb/helm-charts#423
JIRA: CRDB-427721 parent b4cfbb4 commit 24eabdb
7 files changed
Lines changed: 1435 additions & 963 deletions
File tree
- apis/v1alpha1
- config/crd/bases
- examples
- pkg/resource
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
| 76 | + | |
| 77 | + | |
75 | 78 | | |
76 | 79 | | |
77 | 80 | | |
| |||
96 | 99 | | |
97 | 100 | | |
98 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
99 | 167 | | |
100 | 168 | | |
101 | 169 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
62 | 70 | | |
63 | 71 | | |
64 | 72 | | |
| |||
0 commit comments