---
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: result
  name: result
  namespace: voting
spec:
  minReadySeconds: 10
  replicas: 3
  selector:
    matchLabels:
      app: result
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0
    type: RollingUpdate  
  template:
    metadata:
      labels:
        app: result
    spec:
      containers:
      - image: docker.pkg.github.com/atix-ag/voting-app-code/result
        name: result
        envFrom:
        - prefix: OPTION_
          configMapRef:
            name: options
        - prefix: POSTGRES_
          secretRef:
            name: db-secret
        env:
        - name: POSTGRES_HOST
          value: db
        livenessProbe:
          httpGet:
            path: /
            port: http
        startupProbe:
          httpGet:
            path: /
            port: http
        ports:
        - containerPort: 8080
          name: http
...
