feat(chart): add ability for extra objects, reading database user from secret, gcp service account for workload identity#107
Open
Mberga14 wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
No issues found across 9 files
Architecture diagram
sequenceDiagram
participant Helm as Helm / K8s API
participant SA as ServiceAccount
participant Secret as DB Secret
participant Pod as n8n Pod
participant GCP as GCP IAM / Metadata
participant DB as PostgreSQL
Note over Helm, DB: Deployment & Runtime Flow
Helm->>Helm: Render templates
opt NEW: extraManifests defined
Helm->>K8s API: Provision custom Kubernetes objects
end
Helm->>SA: Create ServiceAccount
opt NEW: gcpServiceAccount provided
SA->>SA: CHANGED: Add iam.gke.io/gcp-service-account annotation
end
Helm->>Pod: Deploy n8n (main component)
Note right of Pod: NEW: podLabels applied to metadata
Pod->>Secret: CHANGED: Inject DB_POSTGRESDB_USER
Note over Pod,Secret: via secretKeyRef (if database.userSecret.name set)
alt NEW: GCP Workload Identity active
Pod->>GCP: Request identity token
GCP-->>Pod: Return GCP IAM credentials
Pod->>DB: Connect using IAM / Cloud SQL Proxy
else Standard Auth
Pod->>DB: Connect using Secret-based credentials
end
alt Connection Success
DB-->>Pod: Session established
else Connection Failure
Pod->>Pod: Retry / CrashLoopBackOff
end
0a0f025 to
9f19b61
Compare
…m secret, gcp service account for workload identity
9f19b61 to
e115a03
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Description
Added extraManifests to enable provisioning of additional kubernetes objects, added ability to read the
database.userfrom a kubernetes secret, addedserviceAccount.gcpServiceAccountto enable workload identity for GCPType of Change
Related Issues
Fixes # (issue)
Relates to # (issue)
Changes Made
Testing Performed
Chart Validation
helm lint charts/n8npasses: no, with an unrelated issue./scripts/validate-examples.shpassesDeployment Testing (if applicable)
Specific Testing for Changes
Describe any specific testing you performed for your changes:
Documentation Updates
Checklist
Screenshots (if applicable)
Add screenshots to help explain your changes.
Additional Notes
Any additional information that reviewers should know.
Summary by cubic
Adds
extraManifests, Secret-based DB user, GKE Workload Identity, and support for custompodLabelsto then8nHelm chart. This lets you ship extra K8s objects, secure DB credentials, use GCP auth without node-scoped keys, and label pods for integrations and policies.extraManifests: render additional Kubernetes objects from values.database.userSecret: read the DB username from a Secret; falls back todatabase.user.serviceAccount.gcpServiceAccount: addsiam.gke.io/gcp-service-accountfor GKE Workload Identity.Written for commit 70fc029. Summary will update on new commits.