Some checks failed
ci/woodpecker/push/build/4 Pipeline was successful
ci/woodpecker/push/predeploy Pipeline was successful
ci/woodpecker/push/build/3 Pipeline was successful
ci/woodpecker/push/build/2 Pipeline failed
ci/woodpecker/push/deploy/2 unknown status
ci/woodpecker/push/deploy/3 unknown status
ci/woodpecker/push/build/1 Pipeline failed
ci/woodpecker/push/deploy/1 unknown status
ci/woodpecker/push/deploy/4 unknown status
ci/woodpecker/tag/predeploy Pipeline was successful
ci/woodpecker/tag/build/4 Pipeline was successful
ci/woodpecker/tag/build/1 Pipeline was successful
ci/woodpecker/tag/build/3 Pipeline was successful
ci/woodpecker/tag/build/2 Pipeline was successful
ci/woodpecker/tag/deploy/1 Pipeline was successful
ci/woodpecker/tag/deploy/2 Pipeline was successful
ci/woodpecker/tag/deploy/4 Pipeline was successful
ci/woodpecker/tag/deploy/3 Pipeline was successful
127 lines
3.1 KiB
YAML
127 lines
3.1 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: api
|
|
namespace: homea2
|
|
labels:
|
|
app: api
|
|
component: home-automation
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: api
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
reloader.stakater.com/auto: "true"
|
|
configmap.reloader.stakater.com/reload: "home-automation-environment,home-automation-config"
|
|
labels:
|
|
app: api
|
|
component: home-automation
|
|
spec:
|
|
containers:
|
|
- name: api
|
|
image: %IMAGE%
|
|
ports:
|
|
- containerPort: 8001
|
|
name: http
|
|
env:
|
|
- name: MQTT_BROKER
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: home-automation-environment
|
|
key: SHARED_MQTT_BROKER
|
|
- name: MQTT_PORT
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: home-automation-environment
|
|
key: SHARED_MQTT_PORT
|
|
- name: REDIS_HOST
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: home-automation-environment
|
|
key: SHARED_REDIS_HOST
|
|
- name: REDIS_PORT
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: home-automation-environment
|
|
key: SHARED_REDIS_PORT
|
|
- name: REDIS_DB
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: home-automation-environment
|
|
key: SHARED_REDIS_DB
|
|
- name: REDIS_CHANNEL
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: home-automation-environment
|
|
key: API_REDIS_CHANNEL
|
|
volumeMounts:
|
|
- name: config-volume
|
|
mountPath: /app/config
|
|
readOnly: true
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: 8001
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 10
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: 8001
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 5
|
|
resources:
|
|
limits:
|
|
cpu: 1000m
|
|
memory: 1Gi
|
|
requests:
|
|
cpu: 200m
|
|
memory: 256Mi
|
|
volumes:
|
|
- name: config-volume
|
|
configMap:
|
|
name: home-automation-config
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: api
|
|
labels:
|
|
app: api
|
|
component: home-automation
|
|
spec:
|
|
selector:
|
|
app: api
|
|
ports:
|
|
- port: 80
|
|
targetPort: 8001
|
|
name: http
|
|
type: ClusterIP
|
|
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: api-ingress
|
|
annotations:
|
|
cert-manager.io/cluster-issuer: letsencrypt-production-http
|
|
traefik.ingress.kubernetes.io/router.middlewares: default-mtls-auth@kubernetescrd,default-security-headers@kubernetescrd
|
|
traefik.ingress.kubernetes.io/router.tls.options: default-homea2-mtls@kubernetescrd
|
|
spec:
|
|
tls:
|
|
- hosts:
|
|
- homea2-api.hottis.de
|
|
secretName: homea2-api-cert
|
|
rules:
|
|
- host: homea2-api.hottis.de
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: api
|
|
port:
|
|
number: 80 |