set up customer1 kustomization
This commit is contained in:
parent
c07327a01c
commit
2c25f4ad1e
14 changed files with 66 additions and 30 deletions
|
|
@ -2,7 +2,7 @@ apiVersion: gateway.networking.k8s.io/v1
|
|||
kind: Gateway
|
||||
metadata:
|
||||
name: external-http-gateway
|
||||
namespace: n8n
|
||||
namespace: customer1
|
||||
spec:
|
||||
gatewayClassName: gke-l7-global-external-managed # Use gke-l7-global-external-http for external, or gke-l7-rilb for internal
|
||||
listeners:
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: n8n-config
|
||||
namespace: n8n
|
||||
name: customer1-n8n-config
|
||||
namespace: customer1
|
||||
data:
|
||||
N8N_PORT: "5678"
|
||||
|
||||
|
|
@ -13,9 +13,9 @@ data:
|
|||
N8N_METRICS: "true"
|
||||
QUEUE_HEALTH_CHECK_ACTIVE: "true"
|
||||
DB_TYPE: "postgresdb"
|
||||
DB_POSTGRESDB_HOST: "35.188.139.22"
|
||||
DB_POSTGRESDB_HOST: "customer1-db-rw-customer1.svc.cluster.local"
|
||||
DB_POSTGRESDB_PORT: "5432"
|
||||
DB_POSTGRESDB_DATABASE: "n8ndb"
|
||||
DB_POSTGRESDB_DATABASE: "app"
|
||||
DB_POSTGRESDB_USER: "sirius"
|
||||
|
||||
|
||||
|
|
@ -1,14 +1,14 @@
|
|||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: n8n
|
||||
namespace: n8n
|
||||
name: customer1-n8n
|
||||
namespace: customer1
|
||||
labels:
|
||||
app: n8n
|
||||
app: customer1-n8n
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: n8n
|
||||
app: customer1-n8n
|
||||
replicas: 1
|
||||
strategy:
|
||||
rollingUpdate:
|
||||
|
|
@ -16,7 +16,7 @@ spec:
|
|||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: n8n
|
||||
app: customer1-n8n
|
||||
spec:
|
||||
# initContainers:
|
||||
# Init containers are exactly like regular containers, except:
|
||||
|
|
@ -28,7 +28,7 @@ spec:
|
|||
fsGroup: 1000
|
||||
|
||||
containers:
|
||||
- name: n8n
|
||||
- name: customer1-n8n
|
||||
image: docker.n8n.io/n8nio/n8n:2.1.4
|
||||
imagePullPolicy: IfNotPresent
|
||||
resources:
|
||||
|
|
@ -45,7 +45,7 @@ spec:
|
|||
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: n8n-config
|
||||
name: customer1-n8n-config
|
||||
- secretRef:
|
||||
name: n8n-secret
|
||||
|
||||
|
|
@ -2,7 +2,7 @@ apiVersion: networking.gke.io/v1
|
|||
kind: HealthCheckPolicy
|
||||
metadata:
|
||||
name: n8n-healthcheck
|
||||
namespace: n8n
|
||||
namespace: customer1
|
||||
spec:
|
||||
default:
|
||||
config:
|
||||
|
|
@ -2,7 +2,7 @@ apiVersion: gateway.networking.k8s.io/v1
|
|||
kind: HTTPRoute
|
||||
metadata:
|
||||
name: n8n-route
|
||||
namespace: n8n
|
||||
namespace: customer1
|
||||
spec:
|
||||
parentRefs:
|
||||
- name: external-http-gateway
|
||||
|
|
@ -1,10 +1,15 @@
|
|||
apiVersion: kustomize.config.k8s.io/v1beta
|
||||
kind: Kustomization
|
||||
namespace: n8n
|
||||
namespace: customer1
|
||||
resources:
|
||||
- namespace.yaml
|
||||
- deployment.yaml
|
||||
- configmap.yaml
|
||||
- service.yaml
|
||||
- storage.yaml
|
||||
- http-route.yaml
|
||||
- n8n-secret.yaml
|
||||
- pg-cluster-customer1.yaml
|
||||
- service.yaml
|
||||
- storage.yaml
|
||||
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
apiVersion: v1
|
||||
data:
|
||||
DB_POSTGRESDB_PASSWORD: RzIzPWFRKjhpcnRmKnhLTA==
|
||||
DB_POSTGRESDB_PASSWORD:
|
||||
kind: Secret
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: n8n-secret
|
||||
namespace: n8n
|
||||
namespace: customer1
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: n8n
|
||||
name: customer1
|
||||
16
apps/base/customer1/pg-cluster-n8n.yaml
Normal file
16
apps/base/customer1/pg-cluster-n8n.yaml
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
apiVersion: postgresql.cnpg.io/v1
|
||||
kind: Cluster
|
||||
metadata:
|
||||
name: customer1-pgdb
|
||||
spec:
|
||||
instances: 3
|
||||
imageName: ghcr.io/cloudnative-pg/postgresql:15.2
|
||||
storage:
|
||||
size: 5Gi
|
||||
bootstrap:
|
||||
initdb:
|
||||
database: app
|
||||
owner: app
|
||||
secret:
|
||||
name: customer1-db-credentials
|
||||
|
||||
|
|
@ -2,12 +2,12 @@ apiVersion: v1
|
|||
kind: Service
|
||||
metadata:
|
||||
name: n8n-service
|
||||
namespace: n8n
|
||||
namespace: customer1
|
||||
annotations:
|
||||
cloud.google.com: '{"ingress": true}'
|
||||
spec:
|
||||
selector:
|
||||
app: n8n
|
||||
app: customer1-n8n
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 5678
|
||||
|
|
@ -2,7 +2,7 @@ apiVersion: v1
|
|||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: n8n-data
|
||||
namespace: n8n
|
||||
namespace: customer1
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
apiVersion: postgresql.cnpg.io/v1
|
||||
kind: Cluster
|
||||
metadata:
|
||||
name: cluster-n8n
|
||||
spec:
|
||||
instances: 1
|
||||
|
||||
storage:
|
||||
size: 1G
|
||||
6
apps/staging/customer1/kustomization.yaml
Normal file
6
apps/staging/customer1/kustomization.yaml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
apiVersion: kustomize.config.k8s.io/v1beta
|
||||
kind: Kustomization
|
||||
namespace: customer1
|
||||
resources:
|
||||
- customer1
|
||||
18
clusters/devops-lab/customer1.yaml
Normal file
18
clusters/devops-lab/customer1.yaml
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||
kind: Kustomization
|
||||
metadata:
|
||||
name: customer1
|
||||
namespace: flux-system
|
||||
spec:
|
||||
interval: 1m0s
|
||||
retryInterval: 1m
|
||||
timeout: 5m
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: flux-system
|
||||
path: ./apps/staging/customer1
|
||||
prune: true
|
||||
decryption:
|
||||
provider: sops
|
||||
secretRef:
|
||||
name: sops-age
|
||||
Loading…
Add table
Reference in a new issue