---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: kubeturbos.charts.helm.k8s.io
  annotations:
    "api-approved.kubernetes.io": "https://github.com/operator-framework/operator-sdk/pull/2703"
spec:
  group: charts.helm.k8s.io
  names:
    kind: Kubeturbo
    listKind: KubeturboList
    plural: kubeturbos
    singular: kubeturbo
  scope: Namespaced
  versions:
  # Each version can be enabled/disabled by Served flag.
  # One and only one version must be marked as the storage version.
  - name: v1alpha1
    served: true
    storage: false
    schema:
      openAPIV3Schema:
        description: Kubeturbo is the Schema for the kubeturbos API
        type: object
        properties:
          apiVersion:
            description: 'APIVersion defines the versioned schema of this representation
            of an object. Servers should convert recognized schemas to the latest
            internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
            type: string
          kind:
            description: 'Kind is a string value representing the REST resource this
            object represents. Servers may infer this from the endpoint the client
            submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
            type: string
          metadata:
            type: object
          spec:
            description: Spec defines the desired state of Kubeturbo
            type: object
            x-kubernetes-preserve-unknown-fields: true
  - name: v1
    served: true
    storage: true
    schema:
      openAPIV3Schema:
        description: Kubeturbo is the Schema for the kubeturbos API
        type: object
        properties:
          apiVersion:
            description: 'APIVersion defines the versioned schema of this representation
              of an object. Servers should convert recognized schemas to the latest
              internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources'
            type: string
          kind:
            description: 'Kind is a string value representing the REST resource this
              object represents. Servers may infer this from the endpoint the client
              submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds'
            type: string
          metadata:
            type: object
          spec:
            description: Spec defines the desired state of Kubeturbo
            type: object
            x-kubernetes-preserve-unknown-fields: true
            properties:
              roleBinding:
                description: The name of cluster role binding. Default is turbo-all-binding
                type: string
              serviceAccountName:
                description: The name of the service account name. Default is turbo-user
                type: string
              replicaCount:
                description: Kubeturbo replicaCount
                type: integer
              image:
                description: Kubeturbo image details for deployments outside of RH Operator Hub
                type: object
                properties:
                  repository:
                    description: Container repository. default is docker hub
                    type: string
                  tag:
                    description: Kubeturbo container image tag
                    type: string
                  busyboxRepository:
                    description: Busybox repository. default is busybox
                    type: string
                  pullPolicy:
                    description: Define pull policy, Always is default
                    type: string
                  imagePullSecret:
                    description: Define the secret used to authenticate to the container image registry
                    type: string
              serverMeta:
                description: Configuration for Turbo Server
                type: object
                properties:
                  version:
                    description: Turbo Server major version
                    type: string
                  turboServer:
                    description: URL for Turbo Server endpoint
                    type: string
              restAPIConfig:
                description: Credentials to register probe with Turbo Server
                type: object
                properties:
                  turbonomicCredentialsSecretName:
                    description: Name of k8s secret that contains the turbo credentials
                    type: string
                  opsManagerUserName:
                    description: Turbo admin user id
                    type: string
                  opsManagerPassword:
                    description: Turbo admin user password
                    type: string
              featureGates:
                description: Disable features
                type: object
                properties:
                  disabledFeatures:
                    description: Feature names
                    type: string
              HANodeConfig:
                description: Create HA placement policy for Node to Hypervisor by node role. Master is default
                type: object
                properties:
                  nodeRoles:
                    description: Node role names
                    type: string
              targetConfig:
                description: Optional target configuration
                type: object
                properties:
                  targetName:
                    description: Optional target name for registration
                    type: string
              args:
                description: Kubeturbo command line arguments
                type: object
                properties:
                  logginglevel:
                    description: Define logging level, default is info = 2
                    type: integer
                  kubelethttps:
                    description: Identify if kubelet requires https
                    type: boolean
                  kubeletport:
                    description: Identify kubelet port
                    type: integer
                  sccsupport:
                    description: Allow kubeturbo to execute actions in OCP
                    type: string
                  failVolumePodMoves:
                    description: Allow kubeturbo to reschedule pods with volumes attached
                    type: string
                  busyboxExcludeNodeLabels:
                    description: Do not run busybox on these nodes to discover the cpu frequency with k8s 1.18 and later, default is either of kubernetes.io/os=windows or beta.kubernetes.io/os=windows present as node label
                    type: string
                  stitchuuid:
                    description: Identify if using uuid or ip for stitching
                    type: boolean
              resources:
                description: Kubeturbo resource configuration
                type: object
                properties:
                  limits:
                    description: Define limits
                    type: object
                    properties:
                      memory:
                        description: Define memory limits in Gi or Mi, include units
                        type: string
                      cpu:
                        description: Define cpu limits in cores or millicores, include units
                        type: string
                  requests:
                    description: Define requests
                    type: object
                    properties:
                      memory:
                        description: Define memory requests in Gi or Mi, include units
                        type: string
                      cpu:
                        description: Define cpu requests in cores or millicores, include units
                        type: string
