Initial commit.

This commit is contained in:
2023-01-09 11:25:07 +02:00
parent 5d06e769fb
commit 4ddb9ceb60
4 changed files with 36 additions and 26 deletions

View File

@@ -1,12 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: {{k3sApp}}-{{k3sEnv}}-svc
name: {{k3sApp}}-svc
namespace: {{k3sNamespace}}
spec:
type: NodePort
selector:
app: {{k3sApp}}-{{k3sEnv}}
app: {{k3sApp}}
ports:
- name: http
nodePort: {{k3sport}}
@@ -17,35 +17,36 @@ spec:
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{k3sApp}}-{{k3sEnv}}
name: {{k3sApp}}
namespace: {{k3sNamespace}}
spec:
replicas: 1
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
type: RollingUpdate
selector:
matchLabels:
app: {{k3sApp}}-{{k3sEnv}}
app: {{k3sApp}}
template:
metadata:
labels:
app: {{k3sApp}}-{{k3sEnv}}
app: {{k3sApp}}
delpoymentDate: "{{replaceMe}}"
spec:
containers:
- name: {{k3sApp}}-{{k3sEnv}}
image: 192.168.195.195:30000/{{k3sApp}}:{{k3sEnv}}
- name: postgis
image: {{k3sContainerBase}}
imagePullPolicy: Always
env:
- name: POSTGRES_PASSWORD
value: {{postgresPassword}}
- name: PGDATA
value: /var/lib/postgresql/data/pgdata
ports:
- name: http
containerPort: 5432
readinessProbe:
httpGet:
path: /
port: 5432
initialDelaySeconds: 5
periodSeconds: 5
successThreshold: 1
volumeMounts:
- mountPath: /var/lib/postgresql/data
name: postgis-volume
volumes:
- name: postgis-volume
hostPath:
path: /home/victor/cluster/postgis/{{k3sApp}}
type: ""