apiVersion: apps/v1
kind: Deployment
metadata:
  name: echo-v1
  labels:
    app: echo
    version: v1
spec:
  selector:
    matchLabels:
      app: echo
      version: v1
  template:
    metadata:
      labels:
        app: echo
        version: v1
    spec:
      containers:
        - name: echo
          image: jxlwqq/http-echo
          imagePullPolicy: IfNotPresent
          ports:
            - containerPort: 8080
          args:
            - "--text=v1"
          readinessProbe:
            httpGet:
              path: /health
              port: 8080
          livenessProbe:
            httpGet:
              path: /health
              port: 8080
          lifecycle:
            preStop:
              exec:
                command: [ "sh", "-c", "sleep 10" ]
          resources:
            requests:
              cpu: 100m
              memory: 100Mi
            limits:
              cpu: 100m
              memory: 100Mi