{{- if .Values.namespaceCreate.enabled }}
---
apiVersion: v1
kind: Namespace
metadata:
  name: {{ include "katib.namespace" . }}
  labels:
    {{- include "katib.labels" . | nindent 4 }}
    katib.kubeflow.org/metrics-collector-injection: enabled
    {{- if .Values.podSecurityStandards.enforced }}
    pod-security.kubernetes.io/enforce: restricted
    pod-security.kubernetes.io/audit: restricted
    pod-security.kubernetes.io/warn: restricted
    {{- end }}
    {{- with .Values.namespaceCreate.labels }}
    {{- toYaml . | nindent 4 }}
    {{- end }}
  {{- with .Values.namespaceCreate.annotations }}
  annotations:
    {{- toYaml . | nindent 4 }}
  {{- end }}
{{- end }}