apiVersion: apps/v1
kind: Deployment
metadata:
  name: watcher-deployment
spec:
  selector:
    matchLabels:
      app: configuration-watcher
  template:
    metadata:
      labels:
        app: configuration-watcher
    spec:
      serviceAccountName: spring-cloud-kubernetes-serviceaccount
      containers:
        - name: configuration-watcher
          image: docker.io/springcloud/spring-cloud-kubernetes-configuration-watcher
          imagePullPolicy: IfNotPresent
          env:
            - name: SPRING_PROFILES_ACTIVE
              value: bus-amqp
            - name: SPRING_RABBITMQ_HOST
              value: rabbitmq-service
            - name: SPRING_CLOUD_BUS_DESTINATION
              value: app
            - name: SPRING_CLOUD_KUBERNETES_CONFIGURATION_WATCHER_REFRESHDELAY
              value: "1"
          readinessProbe:
            httpGet:
              port: 8888
              path: /actuator/health/readiness
          livenessProbe:
            httpGet:
              port: 8888
              path: /actuator/health/liveness
          ports:
            - containerPort: 8888

