---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.15.0
  name: sonarqualitygates.edp.epam.com
spec:
  group: edp.epam.com
  names:
    kind: SonarQualityGate
    listKind: SonarQualityGateList
    plural: sonarqualitygates
    singular: sonarqualitygate
  scope: Namespaced
  versions:
  - name: v1alpha1
    schema:
      openAPIV3Schema:
        description: SonarQualityGate is the Schema for the sonarqualitygates 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: SonarQualityGateSpec defines the desired state of SonarQualityGate
            properties:
              conditions:
                additionalProperties:
                  description: Condition defines the condition for quality gate.
                  properties:
                    error:
                      description: Error is condition error threshold.
                      example: "10"
                      maxLength: 64
                      type: string
                    op:
                      description: |-
                        Op is condition operator.
                        LT = is lower than
                        GT = is greater than
                      enum:
                      - LT
                      - GT
                      type: string
                  required:
                  - error
                  type: object
                description: |-
                  Conditions is a list of conditions for quality gate.
                  Key is a metric name, value is a condition.
                example:
                  new_code_smells:
                    error: "10"
                    op: LT
                nullable: true
                type: object
              default:
                description: |-
                  Default is a flag to set quality gate as default.
                  Only one quality gate can be default.
                  If several quality gates have default flag, the random one will be chosen.
                  Default quality gate can't be deleted. You need to set another quality gate as default before.
                example: "true"
                type: boolean
              name:
                description: |-
                  Name is a name of quality gate.
                  Name should be unique across all quality gates.
                  Don't change this field after creation otherwise quality gate will be recreated.
                example: My Quality Gate
                maxLength: 100
                type: string
              sonarRef:
                description: SonarRef is a reference to Sonar custom resource.
                properties:
                  kind:
                    default: Sonar
                    description: Kind specifies the kind of the Sonar resource.
                    type: string
                  name:
                    description: Name specifies the name of the Sonar resource.
                    type: string
                required:
                - name
                type: object
            required:
            - name
            - sonarRef
            type: object
          status:
            description: SonarQualityGateStatus defines the observed state of SonarQualityGate
            properties:
              error:
                description: Error is an error message if something went wrong.
                type: string
              value:
                description: Value is a status of the quality gate.
                type: string
            type: object
        type: object
    served: true
    storage: true
    subresources:
      status: {}
