--- /dev/null
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: squad-rotation-bot
+spec:
+ selector:
+ matchLabels:
+ app: squad-rotation-bot
+ replicas: 1
+ template:
+ metadata:
+ labels:
+ app: squad-rotation-bot
+ spec:
+ containers:
+ - name: squad-rotation-bot
+ image: aloussase69/squad-rotation-bot:latest
+ ports:
+ - containerPort: 80
+ env:
+ - name: WEB_HOOK_URL
+ valueFrom:
+ configMapKeyRef:
+ name: squad-rotation-config
+ key: web-hook-url
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: squad-rotation-config
+data:
+ # You can replace this with envsubst
+ # ex: envsubst < squal-rotation-bot.yaml | kubectl apply -f -
+ web-hook-url: ${WEB_HOOK_URL}
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: squad-rotation-bot
+ labels:
+ app: squad-rotation-bot
+spec:
+ type: NodePort
+ ports:
+ - port: 8080 # internal to the cluster
+ targetPort: 8080 # port to target on the Pod
+ protocol: TCP
+ name: http
+ selector:
+ app: squad-rotation-bot