apiVersion: apps/v1
kind: ReplicaSet
metadata:
  labels:
    app: eni-todo
  name: eni-todo
spec:
  replicas: 2
  selector:
    matchLabels:
      app: eni-todo
  template:
    metadata:
      labels:
        app: eni-todo
    spec:
      containers:
      - image: eni-todo:tomcat-h2-env
        #ou image: registry.diehard.net:5000/tomcat-eni-todo-h2-env:dev
        imagePullPolicy: IfNotPresent
        name: eni-todo
        ports:
        - name: http8080 
          containerPort: 8080
          protocol: TCP
        startupProbe: 
          httpGet:
            #host: 127.0.0.1
            path: "/eni-todo"
            port: 8080
            scheme : "HTTP"
            httpHeaders :
                - name : "x-kubeprob-header"
                  value : "startupProbe"
          initialDelaySeconds : 300 
          failureThreshold : 3 
          periodSeconds : 30
          successThreshold : 1
          timeoutSeconds : 2
        livenessProbe : 
          httpGet:
            path: "/eni-todo"
            port: 8080
            scheme : "HTTP"
            httpHeaders :
                - name : "x-kubeprob-header"
                  value : "startupProbe"
          initialDelaySeconds : 300 
          failureThreshold : 3 
          periodSeconds : 30
          successThreshold : 1
          timeoutSeconds : 2
        readinessProbe: 
          httpGet:
            path: "/eni-todo"
            port: 8080
            scheme : "HTTP"
            httpHeaders :
                - name : "x-kubeprob-header"
                  value : "startupProbe"
          initialDelaySeconds : 300 
          failureThreshold : 3 
          periodSeconds : 30
          successThreshold : 1
          timeoutSeconds : 2
        resources:
          requests:
            cpu : "500m"
            memory: "512Mi"
          limits:
            cpu : "2000m"
            memory: "512Mi"
