Commit ef083f7
committed
Allow FedRAMP deployments to avoid default initializer identities
FedRAMP Gatekeeper can reject pods that fall back to the default service account. TidbInitializer creates a Job pod directly, so the CRD needs an explicit field that users can bind to a dedicated ServiceAccount without carrying operator-side patches.
The initializer spec now exposes serviceAccountName and passes it through to the generated Job pod template. The CRD and OpenAPI schema are updated so users can configure the field through the v1 API.
Constraint: FedRAMP block-default-service-account policy rejects implicit default service account usage
Rejected: Hardcode tidb-initializer in the manager | forces one service account name on all users and keeps requiring operator code patches
Confidence: high
Scope-risk: narrow
Directive: Keep this field as a pass-through to the Job pod spec; do not add defaulting here without checking backward compatibility
Tested: go test ./pkg/manager/member
Tested: cd pkg/apis && go test ./pingcap/v1alpha1
Tested: git diff --check1 parent a043946 commit ef083f7
7 files changed
Lines changed: 55 additions & 0 deletions
File tree
- docs/api-references
- manifests
- crd/v1
- pkg
- apis/pingcap/v1alpha1
- manager/member
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2664 | 2664 | | |
2665 | 2665 | | |
2666 | 2666 | | |
| 2667 | + | |
| 2668 | + | |
| 2669 | + | |
| 2670 | + | |
| 2671 | + | |
| 2672 | + | |
| 2673 | + | |
| 2674 | + | |
| 2675 | + | |
| 2676 | + | |
| 2677 | + | |
| 2678 | + | |
2667 | 2679 | | |
2668 | 2680 | | |
2669 | 2681 | | |
| |||
27273 | 27285 | | |
27274 | 27286 | | |
27275 | 27287 | | |
| 27288 | + | |
| 27289 | + | |
| 27290 | + | |
| 27291 | + | |
| 27292 | + | |
| 27293 | + | |
| 27294 | + | |
| 27295 | + | |
| 27296 | + | |
| 27297 | + | |
| 27298 | + | |
| 27299 | + | |
27276 | 27300 | | |
27277 | 27301 | | |
27278 | 27302 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63536 | 63536 | | |
63537 | 63537 | | |
63538 | 63538 | | |
| 63539 | + | |
| 63540 | + | |
63539 | 63541 | | |
63540 | 63542 | | |
63541 | 63543 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| 161 | + | |
| 162 | + | |
161 | 163 | | |
162 | 164 | | |
163 | 165 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
76 | 80 | | |
77 | 81 | | |
78 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
353 | 353 | | |
354 | 354 | | |
355 | 355 | | |
| 356 | + | |
356 | 357 | | |
357 | 358 | | |
358 | 359 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
146 | 161 | | |
147 | 162 | | |
148 | 163 | | |
| |||
0 commit comments