# A specification to declare needed OAuth credentials (tokens, clients) for the
# Zalando Platform IAM system
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: platformcredentialssets.zalando.org
spec:
  scope: Namespaced
  group: zalando.org
  version: v1
  names:
    kind: PlatformCredentialsSet
    plural: platformcredentialssets
    singular: platformcredentialsset
    shortNames:
    - pcs
    categories:
      - all
  subresources:
    status: {}

# A specification to declare needed OAuth credentials (tokens, clients) for the
# Zalando Platform IAM system
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: platformcredentialssets.zalando.org
spec:
  scope: Namespaced
  group: zalando.org
  version: v1
  names:
    kind: PlatformCredentialsSet
    plural: platformcredentialssets
    singular: platformcredentialsset
    shortNames:
    - pcs
    categories:
      - all
  validation:
    openAPIV3Schema:
      required:
        - spec
      properties:
        spec:
          required:
            - application
          properties:
            application:
              type: string
            clients:
              type: object
              additionalProperties:
                type: object
                properties:
                  realm:
                    type: string
                    enum:
                      - customers
                      - users
                      - services
                  grant:
                    type: string
                    enum:
                      - authorization-code
                      - implicit
                      - resource-owner-password-credentials
                      - client-credentials
                  redirectUri:
                    type: string
            tokens:
              type: object
              additionalProperties:
                type: object
                properties:
                  privileges:
                    type: array
                    items:
                      type: string
            token_version:
              type: string
              enum:
                - v1
                - v2
  subresources:
    status: {}

Add a schema for PlatformCredentialsSets
Add a schema for PlatformCredentialsSets

Signed-off-by: Alexey Ermakov <6610c7e1c26fb4c3222ac4f760cb43a9f3c01622@zalando.de>
