apiVersion: apps/v1
kind: Deployment
metadata:
  name: spring-cloud-kubernetes-configuration-watcher-deployment
spec:
  selector:
    matchLabels:
      app: spring-cloud-kubernetes-configuration-watcher
  template:
    metadata:
      labels:
        app: spring-cloud-kubernetes-configuration-watcher
    spec:
      serviceAccountName: spring-cloud-kubernetes-serviceaccount
      containers:
        - name: spring-cloud-kubernetes-configuration-watcher
          image: docker.io/springcloud/spring-cloud-kubernetes-configuration-watcher
          imagePullPolicy: IfNotPresent
          env:
            - name: SPRING_PROFILES_ACTIVE
              value: bus-kafka
            - name: SPRING_CLOUD_BUS_DESTINATION
              value: multiple-apps
            - name: spring.kafka.bootstrap-servers
              value: kafka:9092
            - name: SPRING_CLOUD_KUBERNETES_CONFIGURATION_WATCHER_REFRESHDELAY
              value: 1
          readinessProbe:
            httpGet:
              port: 8888
              path: /actuator/health/readiness
            initialDelaySeconds: 60
            periodSeconds: 10
            timeoutSeconds: 5
            failureThreshold: 3
            successThreshold: 1
          livenessProbe:
            httpGet:
              port: 8888
              path: /actuator/health/liveness
            initialDelaySeconds: 60
            periodSeconds: 10
            timeoutSeconds: 5
            failureThreshold: 3
            successThreshold: 1
          ports:
            - containerPort: 8888
