apiVersion: v1
kind: Pod
metadata:
  name: cluster-capacity
  labels:
    name: cluster-capacity
spec:
  containers:
  - name: cluster-capacity
    image: docker.io/gofed/cluster-capacity
    env:
    - name: CC_INCLUSTER
      value: "true"
    command:
    - "/bin/sh"
    - "-ec"
    - |
      echo "Generating pod"
      /bin/genpod --namespace=cluster-capacity >> /pod.yaml
      cat /pod.yaml
      echo "Running cluster capacity framework"
      /bin/cluster-capacity --podspec=/pod.yaml --default-config /config/default-scheduler.yaml

apiVersion: v1
kind: Pod
metadata:
  name: cluster-capacity
  labels:
    name: cluster-capacity
spec:
  containers:
  - name: cluster-capacity
    image: docker.io/gofed/cluster-capacity
    env:
    - name: CC_INCLUSTER
      value: "true"
    command:
    - "/bin/sh"
    - "-ec"
    - |
      echo "Generating pod"
      /bin/genpod --namespace=cluster-capacity >> /pod.yaml
      cat /pod.yaml
      echo "Running cluster capacity framework"
      /bin/cluster-capacity --podspec=/pod.yaml --default-config /config/default-scheduler.yaml
  restartPolicy: "OnFailure"

Fix restart policy for pod spec file for in cluster scenario.
Fix restart policy for pod spec file for in cluster scenario.
