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
|
kind: Gateway
|
||||||
metadata:
|
metadata:
|
||||||
name: external-http-gateway
|
name: external-http-gateway
|
||||||
namespace: n8n
|
namespace: customer1
|
||||||
spec:
|
spec:
|
||||||
gatewayClassName: gke-l7-global-external-managed # Use gke-l7-global-external-http for external, or gke-l7-rilb for internal
|
gatewayClassName: gke-l7-global-external-managed # Use gke-l7-global-external-http for external, or gke-l7-rilb for internal
|
||||||
listeners:
|
listeners:
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
name: n8n-config
|
name: customer1-n8n-config
|
||||||
namespace: n8n
|
namespace: customer1
|
||||||
data:
|
data:
|
||||||
N8N_PORT: "5678"
|
N8N_PORT: "5678"
|
||||||
|
|
||||||
|
|
@ -13,9 +13,9 @@ data:
|
||||||
N8N_METRICS: "true"
|
N8N_METRICS: "true"
|
||||||
QUEUE_HEALTH_CHECK_ACTIVE: "true"
|
QUEUE_HEALTH_CHECK_ACTIVE: "true"
|
||||||
DB_TYPE: "postgresdb"
|
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_PORT: "5432"
|
||||||
DB_POSTGRESDB_DATABASE: "n8ndb"
|
DB_POSTGRESDB_DATABASE: "app"
|
||||||
DB_POSTGRESDB_USER: "sirius"
|
DB_POSTGRESDB_USER: "sirius"
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: n8n
|
name: customer1-n8n
|
||||||
namespace: n8n
|
namespace: customer1
|
||||||
labels:
|
labels:
|
||||||
app: n8n
|
app: customer1-n8n
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: n8n
|
app: customer1-n8n
|
||||||
replicas: 1
|
replicas: 1
|
||||||
strategy:
|
strategy:
|
||||||
rollingUpdate:
|
rollingUpdate:
|
||||||
|
|
@ -16,7 +16,7 @@ spec:
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: n8n
|
app: customer1-n8n
|
||||||
spec:
|
spec:
|
||||||
# initContainers:
|
# initContainers:
|
||||||
# Init containers are exactly like regular containers, except:
|
# Init containers are exactly like regular containers, except:
|
||||||
|
|
@ -28,7 +28,7 @@ spec:
|
||||||
fsGroup: 1000
|
fsGroup: 1000
|
||||||
|
|
||||||
containers:
|
containers:
|
||||||
- name: n8n
|
- name: customer1-n8n
|
||||||
image: docker.n8n.io/n8nio/n8n:2.1.4
|
image: docker.n8n.io/n8nio/n8n:2.1.4
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
resources:
|
resources:
|
||||||
|
|
@ -45,7 +45,7 @@ spec:
|
||||||
|
|
||||||
envFrom:
|
envFrom:
|
||||||
- configMapRef:
|
- configMapRef:
|
||||||
name: n8n-config
|
name: customer1-n8n-config
|
||||||
- secretRef:
|
- secretRef:
|
||||||
name: n8n-secret
|
name: n8n-secret
|
||||||
|
|
||||||
|
|
@ -2,7 +2,7 @@ apiVersion: networking.gke.io/v1
|
||||||
kind: HealthCheckPolicy
|
kind: HealthCheckPolicy
|
||||||
metadata:
|
metadata:
|
||||||
name: n8n-healthcheck
|
name: n8n-healthcheck
|
||||||
namespace: n8n
|
namespace: customer1
|
||||||
spec:
|
spec:
|
||||||
default:
|
default:
|
||||||
config:
|
config:
|
||||||
|
|
@ -2,7 +2,7 @@ apiVersion: gateway.networking.k8s.io/v1
|
||||||
kind: HTTPRoute
|
kind: HTTPRoute
|
||||||
metadata:
|
metadata:
|
||||||
name: n8n-route
|
name: n8n-route
|
||||||
namespace: n8n
|
namespace: customer1
|
||||||
spec:
|
spec:
|
||||||
parentRefs:
|
parentRefs:
|
||||||
- name: external-http-gateway
|
- name: external-http-gateway
|
||||||
|
|
@ -1,10 +1,15 @@
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta
|
apiVersion: kustomize.config.k8s.io/v1beta
|
||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
namespace: n8n
|
namespace: customer1
|
||||||
resources:
|
resources:
|
||||||
- namespace.yaml
|
- namespace.yaml
|
||||||
- deployment.yaml
|
- deployment.yaml
|
||||||
- configmap.yaml
|
- configmap.yaml
|
||||||
- service.yaml
|
- service.yaml
|
||||||
- storage.yaml
|
- storage.yaml
|
||||||
|
- http-route.yaml
|
||||||
|
- n8n-secret.yaml
|
||||||
|
- pg-cluster-customer1.yaml
|
||||||
|
- service.yaml
|
||||||
|
- storage.yaml
|
||||||
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
data:
|
data:
|
||||||
DB_POSTGRESDB_PASSWORD: RzIzPWFRKjhpcnRmKnhLTA==
|
DB_POSTGRESDB_PASSWORD:
|
||||||
kind: Secret
|
kind: Secret
|
||||||
metadata:
|
metadata:
|
||||||
creationTimestamp: null
|
creationTimestamp: null
|
||||||
name: n8n-secret
|
name: n8n-secret
|
||||||
namespace: n8n
|
namespace: customer1
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Namespace
|
kind: Namespace
|
||||||
metadata:
|
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
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: n8n-service
|
name: n8n-service
|
||||||
namespace: n8n
|
namespace: customer1
|
||||||
annotations:
|
annotations:
|
||||||
cloud.google.com: '{"ingress": true}'
|
cloud.google.com: '{"ingress": true}'
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
app: n8n
|
app: customer1-n8n
|
||||||
ports:
|
ports:
|
||||||
- port: 80
|
- port: 80
|
||||||
targetPort: 5678
|
targetPort: 5678
|
||||||
|
|
@ -2,7 +2,7 @@ apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
metadata:
|
metadata:
|
||||||
name: n8n-data
|
name: n8n-data
|
||||||
namespace: n8n
|
namespace: customer1
|
||||||
spec:
|
spec:
|
||||||
accessModes:
|
accessModes:
|
||||||
- ReadWriteOnce
|
- 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