apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: systemprofiles.training.eduk8s.io
spec:
  scope: Cluster
  group: training.eduk8s.io
  names:
    plural: systemprofiles
    singular: systemprofile
    kind: SystemProfile
    categories:
    - eduk8s
    - eduk8s-training
  versions:
    - name: v1alpha1
      served: true
      storage: true
      schema:
        openAPIV3Schema:
          type: object
          properties:
            spec:
              type: object
              properties:
                ingress:
                  type: object
                  properties:
                    domain:
                      type: string
                    protocol:
                      type: string
                    secret:
                      type: string
                    class:
                      type: string
                storage:
                  type: object
                  properties:
                    class:
                      type: string
                    user:
                      type: integer
                    group:
                      type: integer
                dockerd:
                  type: object
                  properties:
                    rootless:
                      type: boolean
                    privileged:
                      type: boolean
                    mtu:
                      type: integer
                    mirror:
                      type: object
                      required:
                      - remote
                      properties:
                        remote:
                          type: string
                        username:
                          type: string
                        password:
                          type: string
                portal:
                  type: object
                  properties:
                    image:
                      type: string
                    credentials:
                      type: object
                      properties:
                        admin:
                          type: object
                          properties:
                            username:
                              type: string
                            password:
                              type: string
                        robot:
                          type: object
                          properties:
                            username:
                              type: string
                            password:
                              type: string
                    clients:
                      type: object
                      properties:
                        robot:
                          type: object
                          properties:
                            id:
                              type: string
                            secret:
                              type: string
                environment:
                  type: object
                  properties:
                    secrets:
                      type: object
                      properties:
                        pull:
                          type: array
                          items:
                            type: string
                workshop:
                  type: object
                  properties:
                    images:
                      type: object
                      x-kubernetes-preserve-unknown-fields: true
                registry:
                  type: object
                  properties:
                    host:
                      type: string
                    namespace:
                      type: string
                    secret:
                      type: string
                analytics:
                  type: object
                  properties:
                    google:
                      type: object
                      properties:
                        trackingId:
                          type: string
                theme:
                  type: object
                  properties:
                    dashboard:
                      type: object
                      properties:
                        script:
                          type: string
                        style:
                          type: string
                    workshop:
                      type: object
                      properties:
                        script:
                          type: string
                        style:
                          type: string
                    portal:
                      type: object
                      properties:
                        script:
                          type: string
                        style:
                          type: string
            status:
              type: object
              x-kubernetes-preserve-unknown-fields: true
