Manifests to deploy n8n on OpenShift#83
Open
giofontana wants to merge 4 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
1 issue found across 13 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="openshift/postgres-configmap.yaml">
<violation number="1" location="openshift/postgres-configmap.yaml:12">
P1: Unescaped password interpolation can break `CREATE USER` when password contains a single quote, aborting initialization.</violation>
</file>
Architecture diagram
sequenceDiagram
participant Op as Operator (oc client)
participant OCP as OpenShift API
participant Route as OpenShift Route (TLS Edge)
participant n8n as n8n Pod
participant SVC as n8n/Postgres Services
participant DB as PostgreSQL Pod
participant Storage as Persistent Volumes
Note over Op,Storage: Deployment & Resource Provisioning
Op->>OCP: NEW: oc apply -k . (Kustomize)
OCP->>Storage: NEW: Claim storage via PVC (2Gi & 300Gi)
OCP->>DB: Deploy Postgres with Secret/ConfigMap refs
OCP->>n8n: Deploy n8n with Environment Variables
Note over DB,Storage: Database Initialization
DB->>DB: NEW: Load init-data.sh from ConfigMap
DB->>DB: NEW: Create non-root user using Secret credentials
DB->>Storage: NEW: Persist DB data to /var/lib/postgresql/data
Note over n8n,DB: Application Startup & Connectivity
n8n->>n8n: NEW: sleep 5 (wait for DB readiness)
n8n->>SVC: NEW: Connect to postgres-service:5432
SVC->>DB: Forward DB traffic
n8n->>Storage: NEW: Persist application data to /data
Note over Route,n8n: External Request Flow
participant User as External User
User->>Route: NEW: Request https://n8n.example.com
Route->>Route: NEW: Terminate TLS (Edge)
Route->>SVC: NEW: Forward to n8n-service:5678
SVC->>n8n: Deliver request to n8n container
n8n-->>User: Response (Webhook/UI)
Since this is your first cubic review, here's how it works:
- cubic automatically reviews your code and comments on bugs and improvements
- Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
- Add one-off context when rerunning by tagging
@cubic-dev-aiwith guidance or docs links (includingllms.txt) - Ask questions if you need clarification on any suggestion
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
Author
|
Fixed the "password interpolation" issue reported by cubic AI. |
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
This PR adds OpenShift manifests to deploy n8n with a PostgreSQL backend, persistent storage, service exposure, and an OpenShift Route.
It also updates the OpenShift README.md with deployment steps, required pre-deploy edits, and verification/cleanup commands.
Type of Change
Related Issues
Fixes # (issue)
Relates to # (issue)
Changes Made
Testing Performed
Chart Validation
helm lint charts/n8npasses./scripts/validate-examples.shpassesDeployment Testing (if applicable)
Specific Testing for Changes
Describe any specific testing you performed for your changes:
oc apply -k .in an OpenShift cluster.oc get all/pvc/routeandoc rollout status.Breaking Changes
If this includes breaking changes, describe what they are and provide migration instructions:
Documentation Updates
Checklist
Screenshots (if applicable)
N/A (infrastructure/configuration change).
Additional Notes
WEBHOOK_URL.Summary by cubic
Add OpenShift manifests to deploy n8n with a PostgreSQL backend, persistent storage, and public access via an OpenShift Route. Also fixes password quoting in the Postgres init script so non-root passwords with quotes work.
New Features
n8nwith PVCs for n8n (2Gi) and PostgreSQL (300Gi).kustomization.yaml(oc apply -k ./oc delete -k .).Migration
postgres-secret.yaml.n8n-route.yaml.WEBHOOK_URLinn8n-deployment.yamlto match the Route.Written for commit 46d1bf0. Summary will update on new commits.