fix
This commit is contained in:
@@ -1,43 +1,10 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: nocodb
|
||||
---
|
||||
# PostgreSQL Persistent Volume Claim
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: postgres-pv
|
||||
namespace: nocodb
|
||||
spec:
|
||||
capacity:
|
||||
storage: 1Gi
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: local-path
|
||||
hostPath:
|
||||
path: /opt/docker/nocodb/postgres_data
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: postgres-pvc
|
||||
namespace: nocodb
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
volumeName: postgres-pv
|
||||
---
|
||||
# PostgreSQL Deployment
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: root-db
|
||||
namespace: nocodb
|
||||
namespace: default
|
||||
labels:
|
||||
app: root-db
|
||||
spec:
|
||||
@@ -90,16 +57,18 @@ spec:
|
||||
periodSeconds: 5
|
||||
timeoutSeconds: 3
|
||||
volumes:
|
||||
- name: postgres-storage
|
||||
persistentVolumeClaim:
|
||||
claimName: postgres-pvc
|
||||
- name: postgres-storage
|
||||
hostPath:
|
||||
path: /opt/docker/nocodb/postgres_data
|
||||
type: Directory
|
||||
nodeSelector:
|
||||
machine: "kevisual"
|
||||
---
|
||||
# PostgreSQL Service (ClusterIP, internal access)
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: root-db
|
||||
namespace: nocodb
|
||||
labels:
|
||||
app: root-db
|
||||
spec:
|
||||
@@ -111,40 +80,11 @@ spec:
|
||||
targetPort: 5432
|
||||
type: ClusterIP
|
||||
---
|
||||
# NocoDB Persistent Volume Claim
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: nc-data-pv
|
||||
namespace: nocodb
|
||||
spec:
|
||||
capacity:
|
||||
storage: 1Gi
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: local-path
|
||||
hostPath:
|
||||
path: /opt/docker/nocodb/nc_data
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: nc-data-pvc
|
||||
namespace: nocodb
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
volumeName: nc-data-pv
|
||||
---
|
||||
# NocoDB Deployment
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nocodb
|
||||
namespace: nocodb
|
||||
labels:
|
||||
app: nocodb
|
||||
spec:
|
||||
@@ -164,7 +104,7 @@ spec:
|
||||
- containerPort: 8080
|
||||
env:
|
||||
- name: NC_DB
|
||||
value: "pg://root-db.nocodb.svc.cluster.local:5432?u=postgres&p=abearxiong&d=postgres"
|
||||
value: "pg://root-db:5432?u=postgres&p=abearxiong&d=postgres"
|
||||
- name: NC_AUTH_JWT_SECRET
|
||||
value: "MaCpbZugRlwFWUfpAUNAd7p64V4Yj7Xx" # openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | head -c 32
|
||||
volumeMounts:
|
||||
@@ -179,16 +119,18 @@ spec:
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
volumes:
|
||||
- name: nc-data-storage
|
||||
persistentVolumeClaim:
|
||||
claimName: nc-data-pvc
|
||||
- name: nc-data-storage
|
||||
hostPath:
|
||||
path: /opt/docker/nocodb/nc_data
|
||||
type: Directory
|
||||
nodeSelector:
|
||||
machine: "kevisual"
|
||||
---
|
||||
# NocoDB Service (NodePort to expose on host:8080)
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: nocodb
|
||||
namespace: nocodb
|
||||
labels:
|
||||
app: nocodb
|
||||
spec:
|
||||
@@ -206,7 +148,6 @@ apiVersion: traefik.io/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: nocodb-https
|
||||
namespace: nocodb
|
||||
spec:
|
||||
entryPoints:
|
||||
- websecure
|
||||
|
||||
Reference in New Issue
Block a user