apiVersion: apps/v1
kind: Deployment
metadata:
  name: spring-cloud-kubernetes-discoveryserver-deployment
spec:
  selector:
    matchLabels:
      app: spring-cloud-kubernetes-discoveryserver
  template:
    metadata:
      labels:
        app: spring-cloud-kubernetes-discoveryserver
    spec:
      serviceAccountName: spring-cloud-kubernetes-serviceaccount
      containers:
        - name: spring-cloud-kubernetes-discoveryserver
          image: docker.io/springcloud/spring-cloud-kubernetes-discoveryserver
          imagePullPolicy: IfNotPresent
          readinessProbe:
            httpGet:
              port: 32321
              path: /actuator/health/readiness
          livenessProbe:
            httpGet:
              port: 32321
              path: /actuator/health/liveness
          env:
            - name: LOGGING_LEVEL_ORG_SPRINGFRAMEWORK_CLOUD_KUBERNETES_DISCOVERYSERVER
              value: "DEBUG"
            - name: SPRING_CLOUD_KUBERNETES_DISCOVERY_CATALOGSERVICESWATCHDELAY
              value: "3000"
            - name: SPRING_CLOUD_KUBERNETES_HTTP_DISCOVERY_CATALOG_WATCHER_ENABLED
              value: "TRUE"
            - name: MANAGEMENT_ENDPOINT_HEALTH_SHOWCOMPONENTS
              value: "ALWAYS"
            - name: MANAGEMENT_ENDPOINT_HEALTH_SHOWDETAILS
              value: "ALWAYS"
            - name: SPRING_CLOUD_KUBERNETES_DISCOVERY_NAMESPACES_0
              value: left
            - name: SPRING_CLOUD_KUBERNETES_DISCOVERY_NAMESPACES_1
              value: right
            - name: SERVER_PORT
              value: "32321"
          ports:
            - containerPort: 32321
