apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  labels:
    app.kubernetes.io/name: ibm-monitoring
    app.kubernetes.io/instance: common-monitoring
    app.kubernetes.io/managed-by: ibm-monitoring-grafana-operator
  name: grafanas.operator.ibm.com
spec:
  group: operator.ibm.com
  names:
    kind: Grafana
    listKind: GrafanaList
    plural: grafanas
    singular: grafana
  scope: Namespaced
  versions:
  - name: v1alpha1
    schema:
      openAPIV3Schema:
        description: Grafana is the Schema for the grafanas API
        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/sig-architecture/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/sig-architecture/api-conventions.md#types-kinds'
            type: string
          metadata:
            type: object
          spec:
            description: GrafanaSpec defines the desired state of Grafana
            properties:
              baseImage:
                type: string
              baseImageSHA:
                type: string
              baseImageTag:
                type: string
              clusterPort:
                format: int32
                type: integer
              dashboardConfig:
                description: DashboardConfig define dashboard config DashboardsStatus
                  to disable/enable dashboards by name MainOrg to decide which org
                  as the main org  for all dashboards
                properties:
                  dashboardsStatus:
                    additionalProperties:
                      type: boolean
                    type: object
                  ipVersion:
                    type: string
                  mainOrg:
                    type: string
                  resources:
                    description: ResourceRequirements describes the compute resource
                      requirements.
                    properties:
                      limits:
                        additionalProperties:
                          type: string
                        description: 'Limits describes the maximum amount of compute
                          resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
                        type: object
                      requests:
                        additionalProperties:
                          type: string
                        description: 'Requests describes the minimum amount of compute
                          resources required. If Requests is omitted for a container,
                          it defaults to Limits if that is explicitly specified, otherwise
                          to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
                        type: object
                    type: object
                type: object
              dashboardCtlImage:
                type: string
              dashboardCtlImageSHA:
                type: string
              dashboardCtlImageTag:
                type: string
              datasourceConfig:
                description: DataSourceConfig defines Grafana datasource configurations
                  Datasource defined here should be Prometheus or 'as-is' prometheus
                  like thanos-querier
                properties:
                  openshift:
                    description: OCPDSConfig defines openshift application monitoring
                      datasource configurations
                    properties:
                      url:
                        type: string
                    type: object
                  proxyResources:
                    description: ResourceRequirements describes the compute resource
                      requirements.
                    properties:
                      limits:
                        additionalProperties:
                          type: string
                        description: 'Limits describes the maximum amount of compute
                          resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
                        type: object
                      requests:
                        additionalProperties:
                          type: string
                        description: 'Requests describes the minimum amount of compute
                          resources required. If Requests is omitted for a container,
                          it defaults to Limits if that is explicitly specified, otherwise
                          to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
                        type: object
                    type: object
                type: object
              grafanaConfig:
                properties:
                  persistentVolumeClaim:
                    type: string
                  resources:
                    description: ResourceRequirements describes the compute resource
                      requirements.
                    properties:
                      limits:
                        additionalProperties:
                          type: string
                        description: 'Limits describes the maximum amount of compute
                          resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
                        type: object
                      requests:
                        additionalProperties:
                          type: string
                        description: 'Requests describes the minimum amount of compute
                          resources required. If Requests is omitted for a container,
                          it defaults to Limits if that is explicitly specified, otherwise
                          to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
                        type: object
                    type: object
                  storageClass:
                    type: string
                type: object
              imagePullSecrets:
                items:
                  type: string
                type: array
              initImage:
                type: string
              initImageSHA:
                type: string
              initImageTag:
                type: string
              ipVersion:
                type: string
              isHub:
                type: boolean
              issuer:
                type: string
              issuerType:
                type: string
              nodeSelector:
                additionalProperties:
                  type: string
                type: object
              persistentVolume:
                description: GrafanaPersistentVolume setup persistent volumes.
                properties:
                  claimName:
                    type: string
                  enabled:
                    type: boolean
                type: object
              resources:
                properties:
                  dashboard:
                    type: integer
                  grafana:
                    type: integer
                  router:
                    type: integer
                type: object
              routerConfig:
                properties:
                  resources:
                    description: ResourceRequirements describes the compute resource
                      requirements.
                    properties:
                      limits:
                        additionalProperties:
                          type: string
                        description: 'Limits describes the maximum amount of compute
                          resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
                        type: object
                      requests:
                        additionalProperties:
                          type: string
                        description: 'Requests describes the minimum amount of compute
                          resources required. If Requests is omitted for a container,
                          it defaults to Limits if that is explicitly specified, otherwise
                          to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/'
                        type: object
                    type: object
                type: object
              routerImage:
                type: string
              routerImageSHA:
                type: string
              routerImageTag:
                type: string
              service:
                description: 'INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
                  Important: Run "operator-sdk generate k8s" to regenerate code after
                  modifying this file Add custom validation using kubebuilder tags:
                  https://book-v1.book.kubebuilder.io/beyond_basics/generating_crd.html'
                properties:
                  annotations:
                    additionalProperties:
                      type: string
                    type: object
                  labels:
                    additionalProperties:
                      type: string
                    type: object
                  ports:
                    items:
                      description: ServicePort contains information on service's port.
                      properties:
                        name:
                          description: The name of this port within the service. This
                            must be a DNS_LABEL. All ports within a ServiceSpec must
                            have unique names. When considering the endpoints for
                            a Service, this must match the 'name' field in the EndpointPort.
                            Optional if only one ServicePort is defined on this service.
                          type: string
                        nodePort:
                          description: 'The port on each node on which this service
                            is exposed when type=NodePort or LoadBalancer. Usually
                            assigned by the system. If specified, it will be allocated
                            to the service if unused or else creation of the service
                            will fail. Default is to auto-allocate a port if the ServiceType
                            of this Service requires one. More info: https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport'
                          format: int32
                          type: integer
                        port:
                          description: The port that will be exposed by this service.
                          format: int32
                          type: integer
                        protocol:
                          description: The IP protocol for this port. Supports "TCP",
                            "UDP", and "SCTP". Default is TCP.
                          type: string
                        targetPort:
                          anyOf:
                          - type: integer
                          - type: string
                          description: 'Number or name of the port to access on the
                            pods targeted by the service. Number must be in the range
                            1 to 65535. Name must be an IANA_SVC_NAME. If this is
                            a string, it will be looked up as a named port in the
                            target Pod''s container ports. If this is not specified,
                            the value of the ''port'' field is used (an identity map).
                            This field is ignored for services with clusterIP=None,
                            and should be omitted or set equal to the ''port'' field.
                            More info: https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service'
                          x-kubernetes-int-or-string: true
                      required:
                      - port
                      type: object
                    type: array
                  selector:
                    additionalProperties:
                      type: string
                    type: object
                  type:
                    description: Service Type string describes ingress methods for
                      a service
                    type: string
                type: object
              serviceAccount:
                type: string
              tlsClientSecretName:
                type: string
              tlsSecretName:
                type: string
            type: object
          status:
            description: GrafanaStatus defines the observed state of Grafana
            properties:
              message:
                type: string
              phase:
                description: 'INSERT ADDITIONAL STATUS FIELD - define observed state
                  of cluster Important: Run "operator-sdk generate k8s" to regenerate
                  code after modifying this file Add custom validation using kubebuilder
                  tags: https://book-v1.book.kubebuilder.io/beyond_basics/generating_crd.htm'
                type: string
            required:
            - message
            - phase
            type: object
        type: object
    served: true
    storage: true
    subresources:
      status: {}
