2020-12-29 21:51:46 +01:00
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: ConfigMap
|
|
|
|
metadata:
|
|
|
|
name: geogame-config
|
|
|
|
labels:
|
|
|
|
app: geogame
|
|
|
|
namespace: geogame
|
|
|
|
data:
|
|
|
|
SECRET_KEY: lofasz
|
|
|
|
DB_PW: lofasz
|
|
|
|
---
|
|
|
|
kind: PersistentVolumeClaim
|
|
|
|
apiVersion: v1
|
|
|
|
metadata:
|
|
|
|
name: geogame-static-pv-claim
|
|
|
|
labels:
|
|
|
|
app: geogame
|
|
|
|
namespace: geogame
|
|
|
|
spec:
|
|
|
|
storageClassName: longhorn
|
|
|
|
accessModes:
|
|
|
|
- ReadWriteOnce
|
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
storage: 1Gi
|
|
|
|
---
|
|
|
|
kind: PersistentVolumeClaim
|
|
|
|
apiVersion: v1
|
|
|
|
metadata:
|
|
|
|
name: geogame-media-pv-claim
|
|
|
|
labels:
|
|
|
|
app: geogame
|
|
|
|
namespace: geogame
|
|
|
|
spec:
|
|
|
|
storageClassName: longhorn
|
|
|
|
accessModes:
|
|
|
|
- ReadWriteOnce
|
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
storage: 1Gi
|
|
|
|
---
|
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
2020-12-30 02:06:27 +01:00
|
|
|
metadata:
|
|
|
|
name: apache-static
|
|
|
|
namespace: geogame
|
|
|
|
spec:
|
|
|
|
replicas: 1
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: apache-geogame
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: apache-geogame
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: apache-geogame
|
2020-12-30 02:07:12 +01:00
|
|
|
image: httpd:2
|
2020-12-30 02:06:27 +01:00
|
|
|
imagePullPolicy: "Always"
|
|
|
|
volumeMounts:
|
|
|
|
- mountPath: /usr/local/apache2/htdocs
|
|
|
|
name: geogame-static-volume
|
|
|
|
ports:
|
|
|
|
- containerPort: 80
|
|
|
|
imagePullSecrets:
|
|
|
|
- name: regcred
|
|
|
|
volumes:
|
|
|
|
- name: geogame-static-volume
|
|
|
|
persistentVolumeClaim:
|
|
|
|
claimName: geogame-static-pv-claim
|
|
|
|
---
|
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
2020-12-29 21:51:46 +01:00
|
|
|
metadata:
|
|
|
|
name: geogame
|
|
|
|
namespace: geogame
|
|
|
|
spec:
|
|
|
|
replicas: 1
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: geogame
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: geogame
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: geogame
|
|
|
|
image: registry.kmlabz.com/tormakris/geogame
|
|
|
|
imagePullPolicy: "Always"
|
|
|
|
volumeMounts:
|
|
|
|
- mountPath: /app/media
|
|
|
|
name: geogame-media-volume
|
|
|
|
ports:
|
|
|
|
- containerPort: 8080
|
|
|
|
envFrom:
|
|
|
|
- configMapRef:
|
2020-12-30 02:06:27 +01:00
|
|
|
name: geogame-config
|
2020-12-29 21:51:46 +01:00
|
|
|
imagePullSecrets:
|
|
|
|
- name: regcred
|
|
|
|
volumes:
|
|
|
|
- name: geogame-media-volume
|
|
|
|
persistentVolumeClaim:
|
|
|
|
claimName: geogame-media-pv-claim
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: geogame
|
|
|
|
namespace: geogame
|
|
|
|
spec:
|
|
|
|
type: ClusterIP
|
|
|
|
ports:
|
|
|
|
- port: 80
|
|
|
|
targetPort: 8080
|
|
|
|
name: http
|
|
|
|
protocol: TCP
|
|
|
|
selector:
|
|
|
|
app: geogame
|
|
|
|
---
|
2020-12-30 02:06:27 +01:00
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: geogame-static
|
|
|
|
namespace: geogame
|
|
|
|
spec:
|
|
|
|
type: ClusterIP
|
|
|
|
ports:
|
|
|
|
- port: 80
|
|
|
|
targetPort: 80
|
|
|
|
name: http
|
|
|
|
protocol: TCP
|
|
|
|
selector:
|
|
|
|
app: apache-geogame
|
|
|
|
---
|
2020-12-29 21:51:46 +01:00
|
|
|
apiVersion: networking.k8s.io/v1beta1
|
|
|
|
kind: Ingress
|
|
|
|
metadata:
|
|
|
|
name: geogame
|
|
|
|
namespace: geogame
|
|
|
|
annotations:
|
|
|
|
kubernetes.io/ingress.class: "nginx"
|
|
|
|
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
|
|
|
spec:
|
|
|
|
tls:
|
|
|
|
- hosts:
|
|
|
|
- geogame.kmlabz.com
|
|
|
|
secretName: geogame-cert-secret
|
|
|
|
rules:
|
|
|
|
- host: geogame.kmlabz.com
|
|
|
|
http:
|
|
|
|
paths:
|
|
|
|
- path: /
|
|
|
|
backend:
|
|
|
|
serviceName: geogame
|
2020-12-30 02:06:27 +01:00
|
|
|
servicePort: http
|
|
|
|
- path: /static
|
|
|
|
backend:
|
|
|
|
serviceName: geogame-static
|
2020-12-29 21:51:46 +01:00
|
|
|
servicePort: http
|