---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: consoles.pcc.paloaltonetworks.com
spec:
  group: pcc.paloaltonetworks.com
  names:
    kind: Console
    listKind: ConsoleList
    plural: consoles
    singular: console
  scope: Namespaced
  versions:
  - name: v1alpha1
    served: true
    storage: true
    schema:
      openAPIV3Schema:
        type: object
        properties:
          spec:
            type: object
            properties:
              namespace:
                type: string
              orchestrator:
                type: string
                pattern: '^(?:kubernetes|openshift)$'
              toolBundleUrl:
                type: string
              version:
                type: string
                pattern: '^\d{2}_\d{2}_\d{1,5}$'
              credentials:
                type: object
                properties:
                  accessToken:
                    type: string
                    pattern: '^[0-9a-z]{32}$'
                  license:
                    type: string
                  password:
                    type: string
                  username:
                    type: string
              consoleConfig:
                type: object
                properties:
                  imagePullSecret:
                    type: string
                  imageName:
                    type: string
                  nodeLabels:
                    type: string
                  persistentVolumeLabels:
                    type: string
                  persistentVolumeStorage:
                    type: string
                  runAsUser:
                    type: boolean
                    default: false
                  serviceType:
                    type: string
                  storageClass:
                    type: string
