|
@@ -0,0 +1,95 @@
|
|
|
|
+apiVersion: apps/v1
|
|
|
|
+kind: Deployment
|
|
|
|
+metadata:
|
|
|
|
+ name: vbt
|
|
|
|
+ namespace: vbt
|
|
|
|
+spec:
|
|
|
|
+ replicas: 1
|
|
|
|
+ selector:
|
|
|
|
+ matchLabels:
|
|
|
|
+ name: vbt
|
|
|
|
+ template:
|
|
|
|
+ metadata:
|
|
|
|
+ namespace: vbt
|
|
|
|
+ labels:
|
|
|
|
+ name: vbt
|
|
|
|
+ nginx: backend
|
|
|
|
+ spec:
|
|
|
|
+ containers:
|
|
|
|
+ - name: vbt
|
|
|
|
+ env:
|
|
|
|
+ - name: TWILIO_ACCOUNT_SID
|
|
|
|
+ valueFrom:
|
|
|
|
+ secretKeyRef:
|
|
|
|
+ name: twilio
|
|
|
|
+ key: account_sid
|
|
|
|
+ - name: TWILIO_AUTH_TOKEN
|
|
|
|
+ valueFrom:
|
|
|
|
+ secretKeyRef:
|
|
|
|
+ name: twilio
|
|
|
|
+ key: auth_token
|
|
|
|
+ - name: TWILIO_WA_PHONE_NUMBER
|
|
|
|
+ value: '+41795757244'
|
|
|
|
+ image: qdii/volleybot:0.0.1
|
|
|
|
+ imagePullPolicy: "Always"
|
|
|
|
+ ports:
|
|
|
|
+ - containerPort: 8000
|
|
|
|
+ name: http
|
|
|
|
+ livenessProbe:
|
|
|
|
+ initialDelaySeconds: 300
|
|
|
|
+ timeoutSeconds: 10
|
|
|
|
+ httpGet:
|
|
|
|
+ path: "/api/healthz"
|
|
|
|
+ port: 8000
|
|
|
|
+ httpHeaders:
|
|
|
|
+ - name: Host
|
|
|
|
+ value: "vbt.dodges.it"
|
|
|
|
+---
|
|
|
|
+apiVersion: v1
|
|
|
|
+kind: Service
|
|
|
|
+metadata:
|
|
|
|
+ name: vbt
|
|
|
|
+ namespace: vbt
|
|
|
|
+spec:
|
|
|
|
+ type: ClusterIP
|
|
|
|
+ ipFamilyPolicy: PreferDualStack
|
|
|
|
+ selector:
|
|
|
|
+ name: vbt
|
|
|
|
+ ports:
|
|
|
|
+ - protocol: TCP
|
|
|
|
+ port: 8000
|
|
|
|
+ targetPort: 8000
|
|
|
|
+ name: http
|
|
|
|
+---
|
|
|
|
+apiVersion: networking.k8s.io/v1
|
|
|
|
+kind: Ingress
|
|
|
|
+metadata:
|
|
|
|
+ name: vbt-ingress
|
|
|
|
+ namespace: vbt
|
|
|
|
+ annotations:
|
|
|
|
+ cert-manager.io/cluster-issuer: "letsencrypt"
|
|
|
|
+ acme.cert-manager.io/http01-edit-in-place: "true"
|
|
|
|
+ nginx.org/client-max-body-size: "500m"
|
|
|
|
+ nginx.org/proxy-connect-timeout: "60s"
|
|
|
|
+ nginx.org/proxy-read-timeout: "60s"
|
|
|
|
+ # Uncomment to allow solving HTTP01 challenge
|
|
|
|
+ nginx.org/hsts: "false"
|
|
|
|
+ ingress.kubernetes.io/ssl-redirect: "false"
|
|
|
|
+ nginx.org/redirect-to-https: "false"
|
|
|
|
+spec:
|
|
|
|
+ tls:
|
|
|
|
+ - hosts:
|
|
|
|
+ - vbt.dodges.it
|
|
|
|
+ secretName: vbt-le-secret
|
|
|
|
+ rules:
|
|
|
|
+ - host: vbt.dodges.it
|
|
|
|
+ http:
|
|
|
|
+ paths:
|
|
|
|
+ - path: /
|
|
|
|
+ pathType: Prefix
|
|
|
|
+ backend:
|
|
|
|
+ service:
|
|
|
|
+ name: vbt
|
|
|
|
+ port:
|
|
|
|
+ number: 8000
|
|
|
|
+ ingressClassName: nginx
|