apiVersion: apps/v1
kind: Deployment
metadata:
  name: jhooq-springboot
spec:
  replicas: 2
  selector:
    matchLabels:
      app: jhooq-springboot
  template:
    metadata:
      labels:
        app: jhooq-springboot
    spec:
      containers:
        - name: springboot
          image: rahulwagh17/kubernetes:jhooq-k8s-springboot

          resources:
            requests:
              memory: "128Mi"
              cpu: "512m"
            limits:
              memory: "128Mi"
              cpu: "512m"

          ports:
            - containerPort: 8080

          readinessProbe:
            httpGet:
              path: /hello
              port: 8080
            initialDelaySeconds: 15
            periodSeconds: 10

          livenessProbe:
            httpGet:
              path: /hello
              port: 8080
            initialDelaySeconds: 15
            periodSeconds: 10
          
          env:
            - name: PORT
              value: "8080"
