apiVersion: apps/v1
kind: Deployment
metadata:
  name: helloworld
spec:
  replicas: 1
  selector:
    matchLabels:
      app: helloworld
  template:
    metadata:
      labels:
        app: helloworld
        app_label_image_short_digest: "{{//helloworld:image.short-digest}}"
    spec:
      containers:
        - name: helloworld
          image: //helloworld:image
          args:
            - --port=8080
          ports:
            - containerPort: 8080
              name: web
          resources:
            requests:
              memory: 2Mi
          readinessProbe:
            httpGet:
              path: /healthz
              port: 8080
          env:
            - name: NODE_NAME
              valueFrom:
                fieldRef:
                  fieldPath: spec.nodeName
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: POD_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: POD_IP
              valueFrom:
                fieldRef:
                  fieldPath: status.podIP
