---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: ingress-tfv
  namespace: iot
  labels:
    app: ingress-tfv
  annotations:
    fluxcd.io/automated: "true"
    fluxcd.io/tag.ingress-tfv: glob:prod-*
spec:
  replicas: 1
  selector:
    matchLabels:
      app: ingress-tfv
  strategy:
    rollingUpdate:
      maxUnavailable: 0
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: ingress-tfv
    spec:
      containers:
      - name: ingress-tfv
        image: docker.pkg.github.com/iot-for-tillgenglighet/ingress-trafikverket/ingress-tfv:prod-a4b371d7541de3bdc0820182a26e244589fc095d
        env:
        - name: TFV_API_AUTH_KEY
          valueFrom:
            secretKeyRef:
              name: api-key
              key: tfv-api-key
        - name: RABBITMQ_HOST
          valueFrom:
            secretKeyRef:
              name: rabbitmq
              key: host
        - name: RABBITMQ_USER
          valueFrom:
            secretKeyRef:
              name: rabbitmq
              key: user
        - name: RABBITMQ_PASS
          valueFrom:
            secretKeyRef:
              name: rabbitmq
              key: password
        imagePullPolicy: IfNotPresent
      imagePullSecrets:
      - name: regcred

