89 lines
2.3 KiB
YAML
89 lines
2.3 KiB
YAML
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: psono
|
|
namespace: psono
|
|
spec:
|
|
clusterIP: None
|
|
selector:
|
|
app: psono
|
|
ports:
|
|
- name: http
|
|
port: 80
|
|
targetPort: 80
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: StatefulSet
|
|
metadata:
|
|
name: psono
|
|
namespace: psono
|
|
spec:
|
|
serviceName: psono
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: psono
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: psono
|
|
spec:
|
|
initContainers:
|
|
- name: envsubst
|
|
image: bhgedigital/envsubst:latest
|
|
command: ["sh", "-c", "envsubst < /tmp/settings-template/settings.yaml > /root/.psono_server/settings.yaml"]
|
|
envFrom:
|
|
- secretRef:
|
|
name: psono-secrets
|
|
volumeMounts:
|
|
- name: psono-settings-template
|
|
mountPath: /tmp/settings-template
|
|
- name: psono-settings-processed
|
|
mountPath: /root/.psono_server
|
|
- name: migrate
|
|
image: psono/psono-combo-enterprise:7.1.5-4.5.3-1.8.0
|
|
command: ["python3", "./psono/manage.py", "migrate"]
|
|
envFrom:
|
|
- secretRef:
|
|
name: psono-secrets
|
|
volumeMounts:
|
|
- name: psono-settings-processed
|
|
mountPath: /root/.psono_server
|
|
containers:
|
|
- name: psono
|
|
image: psono/psono-combo-enterprise:7.1.5-4.5.3-1.8.0
|
|
ports:
|
|
- name: http
|
|
containerPort: 80
|
|
envFrom:
|
|
- secretRef:
|
|
name: psono-secrets
|
|
volumeMounts:
|
|
- name: psono-settings-processed
|
|
mountPath: /root/.psono_server
|
|
- name: psono-data
|
|
mountPath: /var/log/psono
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /server/healthcheck/
|
|
port: 80
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 30
|
|
failureThreshold: 3
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /server/healthcheck/
|
|
port: 80
|
|
initialDelaySeconds: 15
|
|
periodSeconds: 10
|
|
failureThreshold: 3
|
|
volumes:
|
|
- name: psono-settings-template
|
|
configMap:
|
|
name: psono-settings
|
|
- name: psono-settings-processed
|
|
emptyDir: {}
|
|
- name: psono-data
|
|
persistentVolumeClaim:
|
|
claimName: psono-data
|