apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: keptnconfigs.options.keptn.sh
  annotations:
    controller-gen.kubebuilder.io/version: v0.16.5
    {{- with .Values.global.caInjectionAnnotations  }}
    {{- toYaml . | nindent 4 }}
    {{- end }}
  {{- include "common.annotations" ( dict "context" . ) }}
  labels:
    app.kubernetes.io/part-of: keptn
    crdGroup: lifecycle.keptn.sh
    keptn.sh/inject-cert: "true"
{{- include "common.labels.standard" ( dict "context" . ) | nindent 4 }}
spec:
  group: options.keptn.sh
  names:
    kind: KeptnConfig
    listKind: KeptnConfigList
    plural: keptnconfigs
    singular: keptnconfig
  scope: Namespaced
  versions:
  - name: v1alpha1
    schema:
      openAPIV3Schema:
        description: KeptnConfig is the Schema for the keptnconfigs 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: KeptnConfigSpec defines the desired state of KeptnConfig
            properties:
              OTelCollectorUrl:
                description: OTelCollectorUrl can be used to set the Open Telemetry
                  collector that the lifecycle operator should use
                type: string
              blockDeployment:
                default: true
                description: |-
                  BlockDeployment is used to block the deployment of the application until the pre-deployment
                  tasks and evaluations succeed
                type: boolean
              cloudEventsEndpoint:
                description: CloudEventsEndpoint can be used to set the endpoint where
                  Cloud Events should be posted by the lifecycle operator
                type: string
              keptnAppCreationRequestTimeoutSeconds:
                default: 30
                description: |-
                  KeptnAppCreationRequestTimeoutSeconds is used to set the interval in which automatic app discovery
                  searches for workload to put into the same auto-generated KeptnApp
                type: integer
              observabilityTimeout:
                default: 5m
                description: |-
                  ObservabilityTimeout specifies the maximum time to observe the deployment phase of KeptnWorkload.
                  If the workload does not deploy successfully within this time frame, it will be
                  considered as failed.
                pattern: ^0|([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$
                type: string
            type: object
          status:
            description: unused field
            type: string
        type: object
    served: true
    storage: true
    subresources:
      status: {}
