Browse Source

Give the deployment some persistent storage

Signed-off-by: Martyn Ranyard <m@rtyn.berlin>
master
Martyn 1 year ago
parent
commit
8a9b37cb02
4 changed files with 59 additions and 28 deletions
  1. +7
    -28
      deployments/kubernetes/deploy.yaml
  2. +25
    -0
      deployments/kubernetes/ing.yaml
  3. +10
    -0
      deployments/kubernetes/pvc.yaml
  4. +17
    -0
      deployments/kubernetes/service.yaml

+ 7
- 28
deployments/kubernetes/deploy.yaml View File

@ -1,17 +1,10 @@
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: "1"
creationTimestamp: "2020-01-27T19:50:47Z"
generation: 3
labels:
run: kardbot
name: kardbot
namespace: karaokards
resourceVersion: "48537399"
selfLink: /apis/extensions/v1beta1/namespaces/karaokards/deployments/kardbot
uid: 502b4760-413e-11ea-94d8-9cb6540931b5
spec:
progressDeadlineSeconds: 600
replicas: 1
@ -31,7 +24,7 @@ spec:
run: kardbot
spec:
containers:
- image: imartyn/karaokardbot:0.0.1
- image: imartyn/karaokardbot:0.0.3-linux-amd64
imagePullPolicy: IfNotPresent
name: kardbot
ports:
@ -46,6 +39,8 @@ spec:
- mountPath: /app/strings.json
name: extracards
subPath: strings.json
- mountPath: /data
name: data
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
@ -63,22 +58,6 @@ spec:
path: strings.json
name: extracards
name: extracards
status:
availableReplicas: 1
conditions:
- lastTransitionTime: "2020-01-27T19:50:47Z"
lastUpdateTime: "2020-01-27T20:05:34Z"
message: ReplicaSet "kardbot-6dff8d86dd" has successfully progressed.
reason: NewReplicaSetAvailable
status: "True"
type: Progressing
- lastTransitionTime: "2020-01-27T20:08:26Z"
lastUpdateTime: "2020-01-27T20:08:26Z"
message: Deployment has minimum availability.
reason: MinimumReplicasAvailable
status: "True"
type: Available
observedGeneration: 3
readyReplicas: 1
replicas: 1
updatedReplicas: 1
- name: data
persistentVolumeClaim:
claimName: kkard-data

+ 25
- 0
deployments/kubernetes/ing.yaml View File

@ -0,0 +1,25 @@
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
certmanager.k8s.io/cluster-issuer: letsencrypt
name: karaokards
spec:
rules:
- host: karaokards.ing.martyn.berlin
http:
paths:
- backend:
serviceName: karaokards
servicePort: 80
path: /nope
- backend:
serviceName: karaokards
servicePort: 80
path: /
tls:
- hosts:
- karaokards.ing.martyn.berlin
secretName: karaokards-cert
status:
loadBalancer: {}

+ 10
- 0
deployments/kubernetes/pvc.yaml View File

@ -0,0 +1,10 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: kkard-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi

+ 17
- 0
deployments/kubernetes/service.yaml View File

@ -0,0 +1,17 @@
apiVersion: v1
kind: Service
metadata:
creationTimestamp: null
labels:
run: kardbot
name: karaokards
spec:
externalTrafficPolicy: Cluster
ports:
- port: 80
protocol: TCP
targetPort: 5353
selector:
run: kardbot
sessionAffinity: None
type: LoadBalancer

Loading…
Cancel
Save