summaryrefslogtreecommitdiff
path: root/k8s
diff options
context:
space:
mode:
Diffstat (limited to 'k8s')
-rw-r--r--k8s/cas-config.yaml8
-rw-r--r--k8s/cas-deployment.yaml52
-rw-r--r--k8s/cas-secret.yaml9
-rw-r--r--k8s/cas-service.yaml11
-rw-r--r--k8s/network-policy.yaml18
-rw-r--r--k8s/pgdata-pvc.yaml10
-rw-r--r--k8s/postgres-deployment.yaml38
-rw-r--r--k8s/postgres-service.yaml11
8 files changed, 0 insertions, 157 deletions
diff --git a/k8s/cas-config.yaml b/k8s/cas-config.yaml
deleted file mode 100644
index a7aa9d8..0000000
--- a/k8s/cas-config.yaml
+++ /dev/null
@@ -1,8 +0,0 @@
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: cas-config
-data:
- RUST_LOG: ${RUST_LOG}
- DATABASE_URL: "postgres://postgres:password@postgres-service:5432/gis"
- ALLOWED_HOST: "0.0.0.0:8000"
diff --git a/k8s/cas-deployment.yaml b/k8s/cas-deployment.yaml
deleted file mode 100644
index fc0289a..0000000
--- a/k8s/cas-deployment.yaml
+++ /dev/null
@@ -1,52 +0,0 @@
-apiVersion: apps/v1
-kind: Deployment
-metadata:
- name: cas-deployment
-spec:
- replicas: 1
- selector:
- matchLabels:
- app: cas
- template:
- metadata:
- labels:
- app: cas
- spec:
- containers:
- - name: cas
- image: ghcr.io/cas-4/backend:latest
- imagePullPolicy: Always
- env:
- - name: RUST_LOG
- valueFrom:
- configMapKeyRef:
- name: cas-config
- key: RUST_LOG
- - name: DATABASE_URL
- valueFrom:
- configMapKeyRef:
- name: cas-config
- key: DATABASE_URL
- - name: JWT_SECRET
- valueFrom:
- secretKeyRef:
- name: cas-secret
- key: JWT_SECRET
- - name: EXPO_ACCESS_TOKEN
- valueFrom:
- secretKeyRef:
- name: cas-secret
- key: EXPO_ACCESS_TOKEN
- - name: UNREALSPEECH_TOKEN
- valueFrom:
- secretKeyRef:
- name: cas-secret
- key: UNREALSPEECH_TOKEN
- - name: ALLOWED_HOST
- valueFrom:
- configMapKeyRef:
- name: cas-config
- key: ALLOWED_HOST
- ports:
- - containerPort: 8000
- restartPolicy: Always
diff --git a/k8s/cas-secret.yaml b/k8s/cas-secret.yaml
deleted file mode 100644
index a2fc3e3..0000000
--- a/k8s/cas-secret.yaml
+++ /dev/null
@@ -1,9 +0,0 @@
-apiVersion: v1
-kind: Secret
-metadata:
- name: cas-secret
-type: Opaque
-data:
- JWT_SECRET: ${JWT_SECRET}
- EXPO_ACCESS_TOKEN: ${EXPO_ACCESS_TOKEN}
- UNREALSPEECH_TOKEN: ${UNREALSPEECH_TOKEN}
diff --git a/k8s/cas-service.yaml b/k8s/cas-service.yaml
deleted file mode 100644
index 98a7a9d..0000000
--- a/k8s/cas-service.yaml
+++ /dev/null
@@ -1,11 +0,0 @@
-apiVersion: v1
-kind: Service
-metadata:
- name: cas-service
-spec:
- ports:
- - port: 8000
- targetPort: 8000
- selector:
- app: cas
- type: ClusterIP
diff --git a/k8s/network-policy.yaml b/k8s/network-policy.yaml
deleted file mode 100644
index 2af8a27..0000000
--- a/k8s/network-policy.yaml
+++ /dev/null
@@ -1,18 +0,0 @@
-apiVersion: networking.k8s.io/v1
-kind: NetworkPolicy
-metadata:
- name: allow-cas-postgres
-spec:
- podSelector:
- matchLabels:
- app: cas
- policyTypes:
- - Ingress
- ingress:
- - from:
- - podSelector:
- matchLabels:
- app: postgres
- ports:
- - protocol: TCP
- port: 5432
diff --git a/k8s/pgdata-pvc.yaml b/k8s/pgdata-pvc.yaml
deleted file mode 100644
index 7580530..0000000
--- a/k8s/pgdata-pvc.yaml
+++ /dev/null
@@ -1,10 +0,0 @@
-apiVersion: v1
-kind: PersistentVolumeClaim
-metadata:
- name: pgdata-pvc
-spec:
- accessModes:
- - ReadWriteOnce
- resources:
- requests:
- storage: 1Gi
diff --git a/k8s/postgres-deployment.yaml b/k8s/postgres-deployment.yaml
deleted file mode 100644
index fd9945f..0000000
--- a/k8s/postgres-deployment.yaml
+++ /dev/null
@@ -1,38 +0,0 @@
-apiVersion: apps/v1
-kind: Deployment
-metadata:
- name: postgres-deployment
-spec:
- replicas: 1
- selector:
- matchLabels:
- app: postgres
- template:
- metadata:
- labels:
- app: postgres
- spec:
- containers:
- - name: postgres
- image: postgis/postgis:16-3.4
- env:
- - name: POSTGRES_USER
- value: "postgres"
- - name: POSTGRES_PASSWORD
- value: "password"
- - name: POSTGRES_DB
- value: "gis"
- ports:
- - containerPort: 5432
- volumeMounts:
- - mountPath: /var/lib/postgresql/data
- name: pgdata
- - mountPath: /docker-entrypoint-initdb.d
- name: schema
- volumes:
- - name: pgdata
- persistentVolumeClaim:
- claimName: pgdata-pvc
- - name: schema
- hostPath:
- path: ${PGDATA}
diff --git a/k8s/postgres-service.yaml b/k8s/postgres-service.yaml
deleted file mode 100644
index ad3b969..0000000
--- a/k8s/postgres-service.yaml
+++ /dev/null
@@ -1,11 +0,0 @@
-apiVersion: v1
-kind: Service
-metadata:
- name: postgres-service
-spec:
- ports:
- - port: 5432
- targetPort: 5432
- selector:
- app: postgres
- type: ClusterIP