---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: graphites.database.otc.com
spec:
  group: database.otc.com
  names:
    kind: Graphite
    listKind: GraphiteList
    plural: graphites
    singular: graphite
  scope: Namespaced
  versions:
  - name: v1
    schema:
      openAPIV3Schema:
        description: Graphite is the Schema for the graphites 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: Spec defines the desired state of Graphite
            type: object
            x-kubernetes-preserve-unknown-fields: true
            required: ['graphite_namespace']
            properties:
              graphite_namespace:
                description: Namespace in which we deploy
                type: string
              graphite_image:
                description: graphite image to use
                type: string
              graphite_service_account:
                description: Optional service account to use
                type: string
              graphite_ingress_host:
                description: URL to expose WEB application
                type: string
              graphite_ingress_tls:
                description: Whether ssl encryption of the traffic should be done
                type: boolean
              graphite_ingress_tls_letsencrypt_issuer:
                description: Issues name for the cert-manager
                type: string
              graphite_ingress_tls_secret_name:
                description: Secret name to store the certificate
                type: string
              graphite_timezone:
                description: Timezone for the graphite
                type: string
              graphite_node_count:
                description: Count of carbon-cache nodes in the cluster
                type: integer
                format: int32
                minimum: 1
              graphite_relay_count:
                description: Count of relay nodes
                type: integer
                minimum: 1
                format: int32
              graphite_node_pvc_size:
                description: PVC size for the node storage
                type: string
              graphite_node_pvc_storage_class_name:
                description: Storage class to request for the node
                type: string
              graphite_relay_enable_aggregation:
                description: Enable use of carbon-aggregate
                type: boolean
              graphite_carbon_storage_stats_retentions:
                description: Default storage retention for StatsD metrics
                type: string
                default: "10s:6h,1m:6d,10m:1y"
              graphite_carbon_storage_default_retentions:
                description: Default storage retention
                type: string
                default: "60s:1d,5m:30d,1h:3y"
          status:
            description: Status defines the observed state of Graphite
            type: object
            x-kubernetes-preserve-unknown-fields: true
        type: object
    served: true
    storage: true
    subresources:
      status: {}
