---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: app
  namespace: k8s-prometheus-micrometer-demo
spec:
  replicas: 3
  selector:
    matchLabels:
      role: app
  template:
    metadata:
      labels:
        role: app
      annotations:
        prometheus.io/scrape: "true"
        prometheus.io/path: "/actuator/prometheus"
        prometheus.io/port:  "8080"
    spec:
      containers:
        - name: app
          image: alexandreroman/k8s-prometheus-micrometer-demo
          imagePullPolicy: Always
          ports:
            - containerPort: 8080
          livenessProbe:
            httpGet:
              port: 8080
              path: /actuator/health
            initialDelaySeconds: 30
            periodSeconds: 2
          readinessProbe:
            httpGet:
              port: 8080
              path: /actuator/health
            initialDelaySeconds: 10
