apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: initialisation-service
  name: initialisation-service
spec:
  replicas: 1
  selector:
    matchLabels:
      app: initialisation-service
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
    type: RollingUpdate
  revisionHistoryLimit: 5
  template:
    metadata:
      labels:
        app: initialisation-service
    spec:
      containers:
      - image: beaware/initialisation-service:IMAGE_TAG
        imagePullPolicy: Always
        name: initialisation-service
        ports:
        - containerPort: 2355
          name: http
          protocol: TCP
        resources:
          requests:
            cpu: 200m
            memory: 256Mi
        env:
          - name: SECRET_MH_API_KEY
            valueFrom:
             secretKeyRef:
              name: mh-secret2
              key: api_key
          - name: SECRET_MH_BROKERS
            valueFrom:
             secretKeyRef:
              name: mh-secret2
              key: kafka_brokers_sasl