apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: awssecrets.mumoshu.github.io
spec:
  group: mumoshu.github.io
  names:
    kind: AWSSecret
    listKind: AWSSecretList
    plural: awssecrets
    singular: awssecret
  scope: Namespaced
  # The conversion section is introduced in Kubernetes 1.13+ with a default value of
  # None conversion (strategy sub-field set to None).
  conversion:
    # None conversion assumes the same schema for all versions and only sets the apiVersion
    # field of custom resources to the proper value
    strategy: None
  versions:
  - name: v1alpha1
    # Each version can be enabled/disabled by Served flag.
    served: true
    # One and only one version must be marked as the storage version.
    storage: true
    # A schema is required
    schema:
      openAPIV3Schema:
        type: object
        properties:
          stringDataFrom:
            type: object
            required:
            - secretsManagerSecretRef
            properties:
              secretsManagerSecretRef:
                type: object
                required:
                - secretId
                properties:
                  secretId:
                    type: string
                  versionId:
                    type: string
