---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: secrets.dhs.dockhand.dev
  labels:
    app.kubernetes.io/name: secrets.dhs.dockhand.dev
spec:
  group: dhs.dockhand.dev
  scope: Namespaced
  names:
    plural: secrets
    singular: secret
    kind: Secret
  versions:
    - additionalPrinterColumns:
      - name: Secret
        type: string
        jsonPath: .secretSpec.name
      - name: Status
        type: string
        jsonPath: .status.state
      - name: Age
        type: date
        jsonPath: .metadata.creationTimestamp
      name: v1alpha2
      served: true
      storage: true
      schema:
        openAPIV3Schema:
          type: object
          properties:
            profile:
              type: object
              description: |-
                Profile to use for this secret
              properties:
                name:
                  type: string
                  description: |-
                    Name of Profile
                namespace:
                  type: string
                  description: |-
                    Namespace of profile (optional) defaults to same namespace
            secretSpec:
              type: object
              description: |-
                Specification to use for creating the Kubernetes Secret
              properties:
                name:
                  type: string
                  description: |-
                    Name of the secret that will be created or updated with the processed contents of the data field.
                type:
                  type: string
                  description: |-
                    Type of k8s secret to create Opaque, kubernetes.io/service-account-token, kubernetes.io/dockercfg,
                    kubernetes.io/dockerconfigjson, kubernetes.io/basic-auth, kubernetes.io/ssh-auth, kubernetes.io/tls
                    or bootstrap.kubernetes.io/token
                labels:
                  type: object
                  nullable: true
                  description: |-
                    Optional additional labels to add to the secret managed by this Dockhand Secret
                  additionalProperties:
                    type: string
                annotations:
                  type: object
                  nullable: true
                  description: |-
                    Optional additional annotations to add to the secret managed by this Dockhand Secret
                  additionalProperties:
                    type: string
            status:
              type: object
              description: |-
                Provides basic status for a DockhandSecret
              properties:
                state:
                  type: string
                  description: |-
                    Ready, Pending or ErrApplied
                observedGeneration:
                  type: integer
                  description: |-
                    The last generation processed by the controller
                observedSecretResourceVersion:
                  type: string
                  description: |-
                    The managed secret resource version last observed by the controller
            data:
              type: object
              description: |-
                Store arbitrary templated secret data here just as you would in a kubernetes configmap.
                The dockhand-secrets-operator will retrieve the secrets from the secrets backend and create normal
                kubernetes secrets for use by your application. Secrets should be templated using go templating with
                alternative delimiters << >> rather than \{\{ \}\}.
              additionalProperties:
                type: string
      subresources:
        status: {}
