# https://kubernetes.io/docs/concepts/workloads/controllers/deployment/
apiVersion: apps/v1
kind: Deployment
metadata:
  name: spring-cloud-k8s-config
  labels:
    app: spring-cloud-k8s-config
    group: spring-cloud-k8s-samples
spec:
  replicas: 1
  selector:
    matchLabels:
      app: spring-cloud-k8s-config
  template:
    metadata:
      labels:
        app: spring-cloud-k8s-config
    spec:
      containers:
      - name: spring-cloud-k8s-config
        image: spring-cloud-k8s-config:0.0.1
        imagePullPolicy: IfNotPresent
        ports:
        - containerPort: 8081
        livenessProbe:
          httpGet:
            path: /actuator/health
            port: 8081
          initialDelaySeconds: 90
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 1
        readinessProbe:
          httpGet:
            path: /actuator/health
            port: 8081
          periodSeconds: 70
          successThreshold: 1
          timeoutSeconds: 1
      terminationGracePeriodSeconds: 10
      serviceAccountName: spring-cloud-k8s-config
