---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.8.0
  creationTimestamp: null
  name: servicelevelobjectives.pyrra.dev
spec:
  group: pyrra.dev
  names:
    kind: ServiceLevelObjective
    listKind: ServiceLevelObjectiveList
    plural: servicelevelobjectives
    shortNames:
    - slo
    singular: servicelevelobjective
  scope: Namespaced
  versions:
  - name: v1alpha1
    schema:
      openAPIV3Schema:
        description: ServiceLevelObjective is the Schema for the ServiceLevelObjectives
          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: ServiceLevelObjectiveSpec defines the desired state of ServiceLevelObjective.
            properties:
              alerting:
                description: Alerting customizes the alerting rules generated by Pyrra.
                properties:
                  disabled:
                    description: Disabled is used to disable the generation of alerts.
                      Recording rules are still generated.
                    type: boolean
                  name:
                    description: Name is used as the name of the alert generated by
                      Pyrra. Defaults to "ErrorBudgetBurn".
                    type: string
                type: object
              description:
                description: Description describes the ServiceLevelObjective in more
                  detail and gives extra context for engineers that might not directly
                  work on the service.
                type: string
              indicator:
                description: ServiceLevelIndicator is the underlying data source that
                  indicates how the service is doing. This will be a Prometheus metric
                  with specific selectors for your service.
                properties:
                  latency:
                    description: Latency is the indicator that measures a certain
                      percentage to be fast than.
                    properties:
                      grouping:
                        description: Grouping allows an SLO to be defined for many
                          SLI at once, like HTTP handlers for example.
                        items:
                          type: string
                        type: array
                      success:
                        description: Success is the metric that returns how many errors
                          there are.
                        properties:
                          metric:
                            type: string
                        required:
                        - metric
                        type: object
                      total:
                        description: Total is the metric that returns how many requests
                          there are in total.
                        properties:
                          metric:
                            type: string
                        required:
                        - metric
                        type: object
                    required:
                    - success
                    - total
                    type: object
                  ratio:
                    description: Ratio is the indicator that measures against errors
                      / total events.
                    properties:
                      errors:
                        description: Errors is the metric that returns how many errors
                          there are.
                        properties:
                          metric:
                            type: string
                        required:
                        - metric
                        type: object
                      grouping:
                        description: Grouping allows an SLO to be defined for many
                          SLI at once, like HTTP handlers for example.
                        items:
                          type: string
                        type: array
                      total:
                        description: Total is the metric that returns how many requests
                          there are in total.
                        properties:
                          metric:
                            type: string
                        required:
                        - metric
                        type: object
                    required:
                    - errors
                    - total
                    type: object
                type: object
              target:
                description: 'Target is a string that''s casted to a float64 between
                  0 - 100. It represents the desired availability of the service in
                  the given window. float64 are not supported: https://github.com/kubernetes-sigs/controller-tools/issues/245'
                type: string
              window:
                description: Window within which the Target is supposed to be kept.
                  Usually something like 1d, 7d or 28d.
                type: string
            required:
            - indicator
            - target
            - window
            type: object
          status:
            description: ServiceLevelObjectiveStatus defines the observed state of
              ServiceLevelObjective.
            type: object
        type: object
    served: true
    storage: true
status:
  acceptedNames:
    kind: ""
    plural: ""
  conditions: []
  storedVersions: []
