apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{.Name}}
  labels:
    app: inflate
spec:
  replicas: {{.Replicas}}
  selector:
    matchLabels:
      app: inflate
  template:
    metadata:
      labels:
        app: inflate
    spec:
      nodeSelector:
      {{- range $key, $value := .NodeSelector }}
        {{ (StructuralData $key ) }}: {{ $value }}
      {{- end }}
      containers:
        - name: nginx
          image: mcr.microsoft.com/cbl-mariner/base/nginx:1
          resources:
            requests:
              cpu: {{.CPUperJob}}
            limits:
              cpu: {{.CPUperJob}}
          command:
            - "/bin/bash"
            - "-c"
            - runtime="1 minute"; endtime=$(date -ud "$runtime" +%s); while [[ $(date -u +%s) -le $endtime ]]; do echo $(date); sleep 6000; done
      restartPolicy: Always
