apiVersion: apps/v1
kind: Deployment
metadata:
  name: invoicing
  labels:
    app: invoicing
spec:
  replicas: 1
  selector:
    matchLabels:
      app: invoicing
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 25% 
  template:
    metadata:
      labels:
        app: invoicing
    spec:      
      containers:
      - name: invoicing
        image: thecloudgarage/k8s-springboot-kafka-order-management:mskafka_invoicing
        ports:
        - name: invoicing-http
          containerPort: 8080
        imagePullPolicy: Always
        env:
        - name: postgresql
          value: postgresql
        - name: SPRING_KAFKA_BOOTSTRAP_SERVERS
          value: "kafka-service.kafka-cluster:9092"
