Files
HomeMonitor/Weather/SerialReader/deploy/manifest.yaml
2021-06-14 16:29:11 -04:00

123 lines
3.0 KiB
YAML

---
kind: StatefulSet
apiVersion: apps/v1
metadata:
name: weather-queue
namespace: home-monitor
labels:
app: weather-queue
spec:
replicas: 1
selector:
matchLabels:
app: weather-queue
serviceName: weather-queue
template:
metadata:
labels:
app: weather-queue
spec:
containers:
- name: weather-queue
image: rabbitmq:3.7.16-management-alpine
terminationMessagePath: "/dev/termination-log"
terminationMessagePolicy: File
imagePullPolicy: IfNotPresent
env:
- name: RABBITMQ_DEFAULT_USER
valueFrom:
secretKeyRef:
name: weather-queue-credentials
key: username
- name: RABBITMQ_DEFAULT_PASS
valueFrom:
secretKeyRef:
name: weather-queue-credentials
key: password
volumeMounts:
- name: data
mountPath: /var/lib/rabbitmq
restartPolicy: Always
terminationGracePeriodSeconds: 30
dnsPolicy: ClusterFirst
nodeSelector:
kubernetes.io/hostname: weather
schedulerName: default-scheduler
volumeClaimTemplates:
- metadata:
name: data
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: local-path
resources:
requests:
storage: 1Gi
---
kind: Service
apiVersion: v1
metadata:
name: weather-queue
spec:
ports:
- name: client
port: 5672
- name: http
port: 15672
selector:
app: weather-queue
type: LoadBalancer
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: weather-serial-reader
namespace: home-monitor
labels:
app: weather-serial-reader
spec:
replicas: 1
selector:
matchLabels:
app: weather-serial-reader
template:
metadata:
labels:
app: weather-serial-reader
spec:
containers:
- name: weather-serial-reader
image: ckaczor/home-monitor-weather-serialreader:#BUILD_BUILDNUMBER#
terminationMessagePath: "/dev/termination-log"
terminationMessagePolicy: File
imagePullPolicy: Always
securityContext:
privileged: true
livenessProbe:
httpGet:
path: health/health
port: 80
initialDelaySeconds: 30
readinessProbe:
httpGet:
path: health/ready
port: 80
initialDelaySeconds: 30
env:
- name: Weather__Queue__Host
value: weather-queue
- name: Weather__Queue__User
valueFrom:
secretKeyRef:
name: weather-queue-credentials
key: username
- name: Weather__Queue__Password
valueFrom:
secretKeyRef:
name: weather-queue-credentials
key: password
restartPolicy: Always
terminationGracePeriodSeconds: 30
dnsPolicy: ClusterFirst
nodeSelector:
kubernetes.io/hostname: weather
schedulerName: default-scheduler