apiVersion: apps/v1
kind: Deployment
metadata:
  name: user-management
  labels:
    app: user-management
    version: 0.1.3
spec:
  revisionHistoryLimit: 2
  strategy:
    rollingUpdate:
      maxUnavailable: 0
    type: RollingUpdate
  selector:
    matchLabels:
      app: user-management
      version: 0.1.3
  template:
    metadata:
      annotations:
        prometheus.io/scrape: "true"
        prometheus.io/port: "9464"
      labels:
        app: user-management
        version: 0.1.3
    spec:
      containers:
      - name: user-management
        image: vampio/vamp-bizdata-demo-user-management:0.1.3
        imagePullPolicy: IfNotPresent
        env:
        - name: DB_URI
          value: mongodb://mongodb:27017/
        - name: DB_NAME
          value: vamp-bizdata-demo-app-user-management
        ports:
        - name: grpc
          containerPort: 5051
          protocol: TCP
        - name: http-metrics
          containerPort: 9496
          protocol: TCP
        - name: http
          containerPort: 5000
          protocol: TCP
        livenessProbe:
          httpGet:
             path: /healthz
             port: http
          initialDelaySeconds: 10
          timeoutSeconds: 5
        readinessProbe:
          httpGet:
             path: /healthz
             port: http
          initialDelaySeconds: 10
          timeoutSeconds: 5
