Implements Better Deployment System (#4) (#5)

* Initial Work of Better Deployment Script

* Checks if .secret is Present on Test Setup

* Implements Custom Routing per Profile

* Rewriting Setup Tools - Adds Postgres and Redis

* Rewriting Setup Tools - Adds Frontend

* Rewriting Setup Tools - Adds Backend

* Rewriting Setup Tools - Adds CertManager

* Rewriting Setup Tools - Adds Frontend

* Adds Nginx-Ingress and Fixes Staging Environment

* Updates CertManager and Nginx-Ingress

* Implements New Setup Process


Initial Adjustments to CI/CD


Adjusts CI/CD


test

* Adds CI/CD for Prod Environment
This commit is contained in:
2023-07-10 06:14:42 -03:00
committed by GitHub
parent 7c928b3ace
commit 2b92706be0
31 changed files with 1407 additions and 1037 deletions

View File

@@ -0,0 +1,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
namespace: portfolio
name: postgres-config
data:
postgres_url: postgres-service

View File

@@ -0,0 +1,31 @@
kind: PersistentVolume
apiVersion: v1
metadata:
namespace: portfolio
name: postgres-pv-volume
labels:
type: local
app: postgres
spec:
storageClassName: manual
capacity:
storage: 5Gi
accessModes:
- ReadWriteMany
hostPath:
path: "/mnt/data"
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
namespace: portfolio
name: postgres-pv-claim
labels:
app: postgres
spec:
storageClassName: manual
accessModes:
- ReadWriteMany
resources:
requests:
storage: 5Gi

View File

@@ -0,0 +1,45 @@
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: portfolio
name: postgres-deployment
spec:
replicas: 1
selector:
matchLabels:
app: postgres
template:
metadata:
labels:
app: postgres
spec:
containers:
- name: postgres
image: postgres:14-bullseye
imagePullPolicy: "IfNotPresent"
ports:
- containerPort: 5432
envFrom:
- secretRef:
name: postgres-secret
volumeMounts:
- mountPath: /var/lib/postgresql/data
name: postgredb
volumes:
- name: postgredb
persistentVolumeClaim:
claimName: postgres-pv-claim
---
apiVersion: v1
kind: Service
metadata:
namespace: portfolio
name: postgres-service
spec:
selector:
app: postgres
ports:
- port: 5432
protocol: TCP
targetPort: 5432
type: ClusterIP