apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: basic-spring-boot
  name: basic-spring-boot
spec:
  replicas: 2
  selector:
    matchLabels:
      deployment: basic-spring-boot
  template:
    metadata:
      name: basic-spring-boot
      labels:
        app: basic-spring-boot
        deployment: basic-spring-boot
      annotations:
        sidecar.istio.io/inject: "true"
    spec:
      containers:
      - name: basic-spring-boot
        image: eu.gcr.io/kube-bootcamp-pc/basic-spring-boot:1.1.1
        resources:
          requests:
            cpu: 200m
            memory: 300Mi
          limits:
            cpu: 1000m
            memory: 1Gi
        ports:
        - containerPort: 8080
          name: http
          protocol: TCP
        readinessProbe:
          httpGet:
            path: /actuator/health
            port: 8080
          initialDelaySeconds: 5
          periodSeconds: 5
        livenessProbe:
          httpGet:
            path: /actuator/health
            port: 8080
          initialDelaySeconds: 15
          periodSeconds: 5
