added cargo files
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
# db-secret.yaml
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: db-secret
|
||||
type: Opaque
|
||||
data:
|
||||
MYSQL_ROOT_PASSWORD: myS3curepass
|
||||
DB_PASSWORD: myS3curepass
|
||||
@@ -0,0 +1,16 @@
|
||||
# env-configmap.yaml
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: pinepods-config
|
||||
data:
|
||||
SEARCH_API_URL: "https://search.pinepods.online/api/search"
|
||||
USERNAME: "myadminuser01"
|
||||
PASSWORD: "myS3curepass"
|
||||
FULLNAME: "Pinepods Admin"
|
||||
EMAIL: "user@pinepods.online"
|
||||
DB_TYPE: "postgresql"
|
||||
DB_HOST: "postgres"
|
||||
DB_PORT: "5432"
|
||||
DB_NAME: "pypods_database"
|
||||
DEBUG_MODE: "False"
|
||||
@@ -0,0 +1,118 @@
|
||||
# pinepods-deployment.yaml
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: pinepods
|
||||
spec:
|
||||
replicas: 3
|
||||
selector:
|
||||
matchLabels:
|
||||
app: pinepods
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: pinepods
|
||||
spec:
|
||||
containers:
|
||||
- name: pinepods
|
||||
image: madeofpendletonwool/pinepods:latest
|
||||
ports:
|
||||
- containerPort: 8040
|
||||
env:
|
||||
- name: SEARCH_API_URL
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: pinepods-config
|
||||
key: SEARCH_API_URL
|
||||
- name: USERNAME
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: pinepods-config
|
||||
key: USERNAME
|
||||
- name: PASSWORD
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: pinepods-config
|
||||
key: PASSWORD
|
||||
- name: FULLNAME
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: pinepods-config
|
||||
key: FULLNAME
|
||||
- name: EMAIL
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: pinepods-config
|
||||
key: EMAIL
|
||||
- name: DB_TYPE
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: pinepods-config
|
||||
key: DB_TYPE
|
||||
- name: DB_HOST
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: pinepods-config
|
||||
key: DB_HOST
|
||||
- name: DB_PORT
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: pinepods-config
|
||||
key: DB_PORT
|
||||
- name: DB_USER
|
||||
value: postgres
|
||||
- name: DB_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: db-secret
|
||||
key: DB_PASSWORD
|
||||
- name: DB_NAME
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: pinepods-config
|
||||
key: DB_NAME
|
||||
- name: DEBUG_MODE
|
||||
valueFrom:
|
||||
configMapKeyRef:
|
||||
name: pinepods-config
|
||||
key: DEBUG_MODE
|
||||
volumeMounts:
|
||||
- name: downloads
|
||||
mountPath: /opt/pypods/downloads
|
||||
- name: backups
|
||||
mountPath: /opt/pinepods/backups
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /api/pinepods_check
|
||||
port: 8040
|
||||
initialDelaySeconds: 60
|
||||
periodSeconds: 30
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /api/pinepods_check
|
||||
port: 8040
|
||||
initialDelaySeconds: 60
|
||||
periodSeconds: 30
|
||||
volumes:
|
||||
- name: downloads
|
||||
hostPath:
|
||||
path: /home/collinp/wait/downloads
|
||||
- name: backups
|
||||
hostPath:
|
||||
path: /home/user/pinepods/backups
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: pinepods-service
|
||||
spec:
|
||||
type: NodePort
|
||||
selector:
|
||||
app: pinepods
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 8040
|
||||
targetPort: 8040
|
||||
nodePort: 30007 # Adjust the NodePort range as needed
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
# postgres-deployment.yaml
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: postgres
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: postgres
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: postgres
|
||||
spec:
|
||||
containers:
|
||||
- image: postgres:latest
|
||||
name: postgres
|
||||
env:
|
||||
- name: POSTGRES_DB
|
||||
value: pypods_database
|
||||
- name: POSTGRES_USER
|
||||
value: postgres
|
||||
- name: POSTGRES_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: db-secret
|
||||
key: DB_PASSWORD
|
||||
- name: PGDATA
|
||||
value: /var/lib/postgresql/data/pgdata
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
name: postgres
|
||||
volumeMounts:
|
||||
- name: postgres-persistent-storage
|
||||
mountPath: /var/lib/postgresql/data
|
||||
volumes:
|
||||
- name: postgres-persistent-storage
|
||||
persistentVolumeClaim:
|
||||
claimName: postgres-pvc
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: postgres
|
||||
spec:
|
||||
ports:
|
||||
- port: 5432
|
||||
selector:
|
||||
app: postgres
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
# pv-pvc.yaml
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: postgres-pv
|
||||
spec:
|
||||
capacity:
|
||||
storage: 10Gi
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
hostPath:
|
||||
path: "/home/user/pgdata"
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: postgres-pvc
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
Reference in New Issue
Block a user