apiVersion: apps/v1
kind: Deployment
metadata:
  name: helloservice-deployment
  labels:
    app: helloservice
spec:
  replicas: 1
  selector:
    matchLabels:
      app: helloservice
  template:
    metadata:
      labels:
        app: helloservice
    spec:
      containers:
        - name: helloservice-container
          image: helloservice:1
          ports:
            - containerPort: 8000
          readinessProbe:
            httpGet:
              path: /actuator/health/readiness
              port: 8000
            initialDelaySeconds: 10
            periodSeconds: 3
          livenessProbe:
            httpGet:
              path: /actuator/health/liveness
              port: 8000
            initialDelaySeconds: 10
            periodSeconds: 3
          resources:
            requests:
              memory: "256Mi"
              cpu: "250m"
            limits:
              memory: "512Mi"
              cpu: "0.5"
          env:
            - name: GREETING
              valueFrom:
                configMapKeyRef:
                  name: helloservice-config
                  key: greeting
