{{- if .Values.controller.enabled }}
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: sharedsecrets.monax.io
{{ if .Values.controller.keep }}
  annotations:
    "helm.sh/resource-policy": keep
{{ end }}
  labels:
    app.kubernetes.io/name: {{ include "hoard.name" . }}
    app.kubernetes.io/instance: {{ .Release.Name }}
    app.kubernetes.io/managed-by: {{ .Release.Service }}
    helm.sh/chart: {{ include "hoard.chart" . }}
spec:
  group: monax.io
  names:
    kind: SharedSecret
    listKind: SharedSecretList
    plural: sharedsecrets
    shortNames:
    - ss
    singular: sharedsecret
  scope: Namespaced
  version: v1
  versions:
  - name: v1
    served: true
    storage: true
{{- end }}

