feat(gcp): enable k8s deployment with federated workload identity#224
Conversation
Greptile SummaryThis PR extends the GCP provider Helm chart to support two distinct Kubernetes authentication paths — mounting a service account key Secret ( Key observations:
Confidence Score: 3/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Helm Install / Upgrade] --> B{global.provider.name == gcp?}
B -- No --> C[No GCP env vars or volumes]
B -- Yes --> D{_validation.tpl checks}
D -- both set --> E[FAIL: mutually exclusive]
D -- WIF missing field --> F[FAIL: requires both fields]
D -- Valid --> G{Which auth method?}
G -- serviceAccountKeysSecret --> H[Set GOOGLE_APPLICATION_CREDENTIALS\n/etc/topograph/gcp/service-account-keys.json]
H --> I[Mount Secret as volume\nat /etc/topograph/gcp/service-account-keys.json\nwith subPath for file mount]
G -- workloadIdentityFederation --> J[Set GOOGLE_APPLICATION_CREDENTIALS\n/etc/topograph/gcp/credentials-config.json]
J --> K[Mount credentialsConfigmap\nat /etc/topograph/gcp/]
K --> L[Mount projected ServiceAccount token\nat /var/run/service-account/token]
G -- neither set --> M[No GOOGLE_APPLICATION_CREDENTIALS set\nRelies on metadata server / GKE WI]
N[config.credentialsSecret set?] -- Yes --> O[Mount secret at /etc/topograph/credentials\nAdd credentialsPath to ConfigMap]
N -- No --> P[No generic credentials mount]
Last reviewed commit: 5c496c8 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #224 +/- ##
=======================================
Coverage 66.35% 66.35%
=======================================
Files 82 82
Lines 4559 4559
=======================================
Hits 3025 3025
Misses 1415 1415
Partials 119 119 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
369165b to
b127be4
Compare
Signed-off-by: Dmitry Shmulevich <dshmulevich@nvidia.com>
Additional Comments (2)
This PR adds full Helm support for GCP Workload Identity Federation (projected OIDC tokens + credentials config), but
Consider adding a new
The new GCP-specific parameters ( Consider adding commented-out stubs, similar to how other optional keys are documented: global:
provider:
name: test
# params:
# # GCP: mutually exclusive auth options
# # serviceAccountKeysSecret: ""
# # workloadIdentityFederation:
# # credentialsConfigmap: ""
# # audience: ""This makes the available configuration surface discoverable without requiring users to locate the example files. Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time! |
No description provided.