apiVersion: v1
kind: ConfigMap
metadata:
  labels:
    ksonnet.io/component: katib
  name: metricscollector-template
  namespace: kubeflow
data:
  defaultMetricsCollectorTemplate.yaml: "apiVersion: batch/v1beta1\nkind: CronJob\nmetadata:\n
    \ name: {{.WorkerId}}\n  namespace: {{.NameSpace}}  \nspec:\n  schedule: \"*/1
    * * * *\"\n  successfulJobsHistoryLimit: 1\n  failedJobsHistoryLimit: 1\n  jobTemplate:\n
    \   spec:\n      template:\n        spec:\n          serviceAccountName: metrics-collector\n
    \         containers:\n          - name: {{.WorkerId}}\n            image: katib/metrics-collector\n
    \           args:\n            - \"./metricscollector\"\n            - \"-s\"\n
    \           - \"{{.StudyId}}\"\n            - \"-t\"\n            - \"{{.TrialId}}\"\n
    \           - \"-w\"\n            - \"{{.WorkerId}}\"\n            - \"-n\"\n
    \           - \"{{.NameSpace}}\"\n          restartPolicy: Never\n"
---
apiVersion: v1
kind: ConfigMap
metadata:
  labels:
    ksonnet.io/component: katib
  name: worker-template
  namespace: kubeflow
data:
  defaultWorkerTemplate.yaml: |
    apiVersion: batch/v1
    namespace: kubeflow
    kind: Job
    metadata:
      name: {{.WorkerId}}
    spec:
      template:
        spec:
          containers:
          - name: {{.WorkerId}}
            image: alpine
          restartPolicy: Never
