---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: api-graphql
  namespace: iot
  labels:
    app: api-graphql
  annotations:
    fluxcd.io/automated: "true"
    fluxcd.io/tag.api-graphql: glob:prod-*
spec:
  replicas: 1
  selector:
    matchLabels:
      app: api-graphql
  strategy:
    rollingUpdate:
      maxUnavailable: 0
    type: RollingUpdate
  template:
    metadata:
      annotations:
        sidecar.istio.io/inject: "true"
      labels:
        app: api-graphql
    spec:
      containers:
      - name: api-graphql
        image: docker.pkg.github.com/iot-for-tillgenglighet/api-graphql/api-graphql:prod-77766f87ad5e5b60256372c333f936a6c44ac334
        imagePullPolicy: IfNotPresent
        env:
        - name: API_GQL_FEDERATION_PORT
          value: '8989'
        - name: API_GQL_FEDERATION_SVCS
          value: 'api-problemreport-service.iot.svc.cluster.local:80,api-snowdepth-service.iot.svc.cluster.local:80,api-temperature-service.iot.svc.cluster.local:80,iot-device-registry-service.iot.svc.cluster.local:80'
        ports:
        - containerPort: 8989
          name: http
          protocol: TCP
      imagePullSecrets:
      - name: regcred
