---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: app
  namespace: cnb-springboot
spec:
  replicas: 1
  selector:
    matchLabels:
      app: cnb-springboot
  template:
    metadata:
      labels:
        app: cnb-springboot
      annotations:
        prometheus.io/scrape: "true"
        prometheus.io/path: "/actuator/prometheus"
        prometheus.io/port:  "8080"
    spec:
      containers:
      - image: ghcr.io/alexandreroman/cnb-springboot
        name: app
        resources:
          limits:
            memory: 1Gi
        ports:
          - containerPort: 8080
        livenessProbe:
          httpGet:
            port: 8080
            path: /actuator/health/liveness
          initialDelaySeconds: 60
          periodSeconds: 2
        readinessProbe:
          httpGet:
            port: 8080
            path: /actuator/health/readiness
          initialDelaySeconds: 10
