diff --git a/.github/actions/spelling/expect.txt b/.github/actions/spelling/expect.txt index 37ac3027c3..788526dfba 100644 --- a/.github/actions/spelling/expect.txt +++ b/.github/actions/spelling/expect.txt @@ -288,6 +288,10 @@ keda kelseyhightower keptn keptnapp +keptnappcontext +keptnappcontextlist +keptnappcontextspec +keptnappcontextstatus keptnappcreationrequest keptnappcreationrequestlist keptnappcreationrequestspec diff --git a/.github/scripts/.helm-tests/default/result.yaml b/.github/scripts/.helm-tests/default/result.yaml index 0209d2e3ec..d8be05e799 100644 --- a/.github/scripts/.helm-tests/default/result.yaml +++ b/.github/scripts/.helm-tests/default/result.yaml @@ -492,6 +492,92 @@ spec: subresources: status: {} --- +# Source: keptn/charts/lifecycleOperator/templates/keptnappcontext-crd.yaml +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: keptnappcontexts.lifecycle.keptn.sh + annotations: + controller-gen.kubebuilder.io/version: v0.13.0 + cert-manager.io/inject-ca-from: 'helmtests/keptn-certs' + labels: + app.kubernetes.io/part-of: keptn + crdGroup: lifecycle.keptn.sh + keptn.sh/inject-cert: "true" + app.kubernetes.io/instance: keptn-test + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: lifecycle-operator + app.kubernetes.io/version: vmyversion + helm.sh/chart: lifecycle-operator-0.1.0 +spec: + group: lifecycle.keptn.sh + names: + kind: KeptnAppContext + listKind: KeptnAppContextList + plural: keptnappcontexts + singular: keptnappcontext + scope: Namespaced + versions: + - name: v1beta1 + schema: + openAPIV3Schema: + description: KeptnAppContext is the Schema for the keptnappcontexts 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: KeptnAppContextSpec defines the desired state of KeptnAppContext + properties: + metadata: + additionalProperties: + type: string + description: Metadata contains additional key-value pairs for contextual information. + type: object + postDeploymentEvaluations: + description: PostDeploymentEvaluations is a list of all evaluations to be performed during the post-deployment phase of the KeptnApp. The items of this list refer to the names of KeptnEvaluationDefinitions located in the same namespace as the KeptnApp, or in the Keptn namespace. + items: + type: string + type: array + postDeploymentTasks: + description: PostDeploymentTasks is a list of all tasks to be performed during the post-deployment phase of the KeptnApp. The items of this list refer to the names of KeptnTaskDefinitions located in the same namespace as the KeptnApp, or in the Keptn namespace. + items: + type: string + type: array + preDeploymentEvaluations: + description: PreDeploymentEvaluations is a list of all evaluations to be performed during the pre-deployment phase of the KeptnApp. The items of this list refer to the names of KeptnEvaluationDefinitions located in the same namespace as the KeptnApp, or in the Keptn namespace. + items: + type: string + type: array + preDeploymentTasks: + description: PreDeploymentTasks is a list of all tasks to be performed during the pre-deployment phase of the KeptnApp. The items of this list refer to the names of KeptnTaskDefinitions located in the same namespace as the KeptnApp, or in the Keptn namespace. + items: + type: string + type: array + traceLinks: + description: TraceLinks are links to OpenTelemetry span IDs for tracking. These links establish relationships between spans across different services, enabling distributed tracing. For more information on OpenTelemetry span links, refer to the documentation https://opentelemetry.io/docs/concepts/signals/traces/#span-links. + items: + type: string + type: array + type: object + status: + description: KeptnAppContextStatus defines the observed state of KeptnAppContext + properties: + status: + description: unused field + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- # Source: keptn/charts/lifecycleOperator/templates/keptnappcreationrequest-crd.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition diff --git a/.github/scripts/.helm-tests/lifecycle-only/result.yaml b/.github/scripts/.helm-tests/lifecycle-only/result.yaml index 11fc48113f..7b8bd1c527 100644 --- a/.github/scripts/.helm-tests/lifecycle-only/result.yaml +++ b/.github/scripts/.helm-tests/lifecycle-only/result.yaml @@ -438,6 +438,92 @@ spec: subresources: status: {} --- +# Source: keptn/charts/lifecycleOperator/templates/keptnappcontext-crd.yaml +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: keptnappcontexts.lifecycle.keptn.sh + annotations: + controller-gen.kubebuilder.io/version: v0.13.0 + cert-manager.io/inject-ca-from: 'helmtests/keptn-certs' + labels: + app.kubernetes.io/part-of: keptn + crdGroup: lifecycle.keptn.sh + keptn.sh/inject-cert: "true" + app.kubernetes.io/instance: keptn-test + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: lifecycle-operator + app.kubernetes.io/version: vmyversion + helm.sh/chart: lifecycle-operator-0.1.0 +spec: + group: lifecycle.keptn.sh + names: + kind: KeptnAppContext + listKind: KeptnAppContextList + plural: keptnappcontexts + singular: keptnappcontext + scope: Namespaced + versions: + - name: v1beta1 + schema: + openAPIV3Schema: + description: KeptnAppContext is the Schema for the keptnappcontexts 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: KeptnAppContextSpec defines the desired state of KeptnAppContext + properties: + metadata: + additionalProperties: + type: string + description: Metadata contains additional key-value pairs for contextual information. + type: object + postDeploymentEvaluations: + description: PostDeploymentEvaluations is a list of all evaluations to be performed during the post-deployment phase of the KeptnApp. The items of this list refer to the names of KeptnEvaluationDefinitions located in the same namespace as the KeptnApp, or in the Keptn namespace. + items: + type: string + type: array + postDeploymentTasks: + description: PostDeploymentTasks is a list of all tasks to be performed during the post-deployment phase of the KeptnApp. The items of this list refer to the names of KeptnTaskDefinitions located in the same namespace as the KeptnApp, or in the Keptn namespace. + items: + type: string + type: array + preDeploymentEvaluations: + description: PreDeploymentEvaluations is a list of all evaluations to be performed during the pre-deployment phase of the KeptnApp. The items of this list refer to the names of KeptnEvaluationDefinitions located in the same namespace as the KeptnApp, or in the Keptn namespace. + items: + type: string + type: array + preDeploymentTasks: + description: PreDeploymentTasks is a list of all tasks to be performed during the pre-deployment phase of the KeptnApp. The items of this list refer to the names of KeptnTaskDefinitions located in the same namespace as the KeptnApp, or in the Keptn namespace. + items: + type: string + type: array + traceLinks: + description: TraceLinks are links to OpenTelemetry span IDs for tracking. These links establish relationships between spans across different services, enabling distributed tracing. For more information on OpenTelemetry span links, refer to the documentation https://opentelemetry.io/docs/concepts/signals/traces/#span-links. + items: + type: string + type: array + type: object + status: + description: KeptnAppContextStatus defines the observed state of KeptnAppContext + properties: + status: + description: unused field + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- # Source: keptn/charts/lifecycleOperator/templates/keptnappcreationrequest-crd.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition diff --git a/.github/scripts/.helm-tests/lifecycle-with-certs/result.yaml b/.github/scripts/.helm-tests/lifecycle-with-certs/result.yaml index 627128b087..ecbec626bc 100644 --- a/.github/scripts/.helm-tests/lifecycle-with-certs/result.yaml +++ b/.github/scripts/.helm-tests/lifecycle-with-certs/result.yaml @@ -453,6 +453,92 @@ spec: subresources: status: {} --- +# Source: keptn/charts/lifecycleOperator/templates/keptnappcontext-crd.yaml +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: keptnappcontexts.lifecycle.keptn.sh + annotations: + controller-gen.kubebuilder.io/version: v0.13.0 + cert-manager.io/inject-ca-from: 'helmtests/keptn-certs' + labels: + app.kubernetes.io/part-of: keptn + crdGroup: lifecycle.keptn.sh + keptn.sh/inject-cert: "true" + app.kubernetes.io/instance: keptn-test + app.kubernetes.io/managed-by: Helm + app.kubernetes.io/name: lifecycle-operator + app.kubernetes.io/version: vmyversion + helm.sh/chart: lifecycle-operator-0.1.0 +spec: + group: lifecycle.keptn.sh + names: + kind: KeptnAppContext + listKind: KeptnAppContextList + plural: keptnappcontexts + singular: keptnappcontext + scope: Namespaced + versions: + - name: v1beta1 + schema: + openAPIV3Schema: + description: KeptnAppContext is the Schema for the keptnappcontexts 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: KeptnAppContextSpec defines the desired state of KeptnAppContext + properties: + metadata: + additionalProperties: + type: string + description: Metadata contains additional key-value pairs for contextual information. + type: object + postDeploymentEvaluations: + description: PostDeploymentEvaluations is a list of all evaluations to be performed during the post-deployment phase of the KeptnApp. The items of this list refer to the names of KeptnEvaluationDefinitions located in the same namespace as the KeptnApp, or in the Keptn namespace. + items: + type: string + type: array + postDeploymentTasks: + description: PostDeploymentTasks is a list of all tasks to be performed during the post-deployment phase of the KeptnApp. The items of this list refer to the names of KeptnTaskDefinitions located in the same namespace as the KeptnApp, or in the Keptn namespace. + items: + type: string + type: array + preDeploymentEvaluations: + description: PreDeploymentEvaluations is a list of all evaluations to be performed during the pre-deployment phase of the KeptnApp. The items of this list refer to the names of KeptnEvaluationDefinitions located in the same namespace as the KeptnApp, or in the Keptn namespace. + items: + type: string + type: array + preDeploymentTasks: + description: PreDeploymentTasks is a list of all tasks to be performed during the pre-deployment phase of the KeptnApp. The items of this list refer to the names of KeptnTaskDefinitions located in the same namespace as the KeptnApp, or in the Keptn namespace. + items: + type: string + type: array + traceLinks: + description: TraceLinks are links to OpenTelemetry span IDs for tracking. These links establish relationships between spans across different services, enabling distributed tracing. For more information on OpenTelemetry span links, refer to the documentation https://opentelemetry.io/docs/concepts/signals/traces/#span-links. + items: + type: string + type: array + type: object + status: + description: KeptnAppContextStatus defines the observed state of KeptnAppContext + properties: + status: + description: unused field + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- # Source: keptn/charts/lifecycleOperator/templates/keptnappcreationrequest-crd.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition diff --git a/docs-new/docs/reference/api-reference/lifecycle/v1beta1/index.md b/docs-new/docs/reference/api-reference/lifecycle/v1beta1/index.md new file mode 100644 index 0000000000..94bffbb287 --- /dev/null +++ b/docs-new/docs/reference/api-reference/lifecycle/v1beta1/index.md @@ -0,0 +1,1032 @@ +# v1beta1 + +Reference information for lifecycle.keptn.sh/v1beta1 + + + +## Packages +- [lifecycle.keptn.sh/v1beta1](#lifecyclekeptnshv1beta1) + + +## lifecycle.keptn.sh/v1beta1 + +Package v1beta1 contains API Schema definitions for the lifecycle v1beta1 API group + +### Resource Types +- [KeptnApp](#keptnapp) +- [KeptnAppContext](#keptnappcontext) +- [KeptnAppContextList](#keptnappcontextlist) +- [KeptnAppCreationRequest](#keptnappcreationrequest) +- [KeptnAppCreationRequestList](#keptnappcreationrequestlist) +- [KeptnAppList](#keptnapplist) +- [KeptnAppVersion](#keptnappversion) +- [KeptnAppVersionList](#keptnappversionlist) +- [KeptnEvaluation](#keptnevaluation) +- [KeptnEvaluationDefinition](#keptnevaluationdefinition) +- [KeptnEvaluationDefinitionList](#keptnevaluationdefinitionlist) +- [KeptnEvaluationList](#keptnevaluationlist) +- [KeptnTask](#keptntask) +- [KeptnTaskDefinition](#keptntaskdefinition) +- [KeptnTaskDefinitionList](#keptntaskdefinitionlist) +- [KeptnTaskList](#keptntasklist) +- [KeptnWorkload](#keptnworkload) +- [KeptnWorkloadList](#keptnworkloadlist) +- [KeptnWorkloadVersion](#keptnworkloadversion) +- [KeptnWorkloadVersionList](#keptnworkloadversionlist) + + + +#### AutomountServiceAccountTokenSpec + + + + + +_Appears in:_ +- [KeptnTaskDefinitionSpec](#keptntaskdefinitionspec) + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `type` _boolean_ | || x | + + +#### ConfigMapReference + + + + + +_Appears in:_ +- [RuntimeSpec](#runtimespec) + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `name` _string_ | Name is the name of the referenced ConfigMap. || ✓ | + + +#### ContainerSpec + + + + + +_Appears in:_ +- [KeptnTaskDefinitionSpec](#keptntaskdefinitionspec) + + + +#### DeploymentTaskSpec + + + + + +_Appears in:_ +- [KeptnAppContextSpec](#keptnappcontextspec) + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `preDeploymentTasks` _string array_ | PreDeploymentTasks is a list of all tasks to be performed during the pre-deployment phase of the KeptnApp. The items of this list refer to the names of KeptnTaskDefinitions located in the same namespace as the KeptnApp, or in the Keptn namespace. || x | +| `postDeploymentTasks` _string array_ | PostDeploymentTasks is a list of all tasks to be performed during the post-deployment phase of the KeptnApp. The items of this list refer to the names of KeptnTaskDefinitions located in the same namespace as the KeptnApp, or in the Keptn namespace. || x | +| `preDeploymentEvaluations` _string array_ | PreDeploymentEvaluations is a list of all evaluations to be performed during the pre-deployment phase of the KeptnApp. The items of this list refer to the names of KeptnEvaluationDefinitions located in the same namespace as the KeptnApp, or in the Keptn namespace. || x | +| `postDeploymentEvaluations` _string array_ | PostDeploymentEvaluations is a list of all evaluations to be performed during the post-deployment phase of the KeptnApp. The items of this list refer to the names of KeptnEvaluationDefinitions located in the same namespace as the KeptnApp, or in the Keptn namespace. || x | + + +#### EvaluationStatusItem + + + + + +_Appears in:_ +- [KeptnEvaluationStatus](#keptnevaluationstatus) + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `value` _string_ | Value represents the value of the KeptnMetric being evaluated. || x | +| `status` _string_ | Status indicates the status of the objective being evaluated. || x | +| `message` _string_ | Message contains additional information about the evaluation of an objective. This can include explanations about why an evaluation has failed (e.g. due to a missed objective), or if there was any error during the evaluation of the objective. || ✓ | + + +#### FunctionReference + + + + + +_Appears in:_ +- [RuntimeSpec](#runtimespec) + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `name` _string_ | Name is the name of the referenced KeptnTaskDefinition. || ✓ | + + +#### FunctionStatus + + + + + +_Appears in:_ +- [KeptnTaskDefinitionStatus](#keptntaskdefinitionstatus) + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `configMap` _string_ | ConfigMap indicates the ConfigMap in which the function code is stored. || ✓ | + + +#### HttpReference + + + + + +_Appears in:_ +- [RuntimeSpec](#runtimespec) + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `url` _string_ | Url is the URL containing the code of the function. || ✓ | + + +#### Inline + + + + + +_Appears in:_ +- [RuntimeSpec](#runtimespec) + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `code` _string_ | Code contains the code of the function. || ✓ | + + +#### ItemStatus + + + + + +_Appears in:_ +- [KeptnAppVersionStatus](#keptnappversionstatus) +- [KeptnWorkloadVersionStatus](#keptnworkloadversionstatus) + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `definitionName` _string_ | DefinitionName is the name of the EvaluationDefinition/TaskDefinition || ✓ | +| `status` _string_ | |Pending| ✓ | +| `name` _string_ | Name is the name of the Evaluation/Task || ✓ | +| `startTime` _[Time](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#time-v1-meta)_ | StartTime represents the time at which the Item (Evaluation/Task) started. || ✓ | +| `endTime` _[Time](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#time-v1-meta)_ | EndTime represents the time at which the Item (Evaluation/Task) started. || ✓ | + + +#### KeptnApp + + + +KeptnApp is the Schema for the keptnapps API + +_Appears in:_ +- [KeptnAppList](#keptnapplist) + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `apiVersion` _string_ | `lifecycle.keptn.sh/v1beta1` | | | +| `kind` _string_ | `KeptnApp` | | | +| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. || ✓ | +| `spec` _[KeptnAppSpec](#keptnappspec)_ | Spec describes the desired state of the KeptnApp. || ✓ | +| `status` _[KeptnAppStatus](#keptnappstatus)_ | Status describes the current state of the KeptnApp. || ✓ | + + +#### KeptnAppContext + + + +KeptnAppContext is the Schema for the keptnappcontexts API + +_Appears in:_ +- [KeptnAppContextList](#keptnappcontextlist) + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `apiVersion` _string_ | `lifecycle.keptn.sh/v1beta1` | | | +| `kind` _string_ | `KeptnAppContext` | | | +| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. || x | +| `spec` _[KeptnAppContextSpec](#keptnappcontextspec)_ | || x | +| `status` _[KeptnAppContextStatus](#keptnappcontextstatus)_ | || x | + + +#### KeptnAppContextList + + + +KeptnAppContextList contains a list of KeptnAppContext + + + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `apiVersion` _string_ | `lifecycle.keptn.sh/v1beta1` | | | +| `kind` _string_ | `KeptnAppContextList` | | | +| `metadata` _[ListMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#listmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. || x | +| `items` _[KeptnAppContext](#keptnappcontext) array_ | || x | + + +#### KeptnAppContextSpec + + + +KeptnAppContextSpec defines the desired state of KeptnAppContext + +_Appears in:_ +- [KeptnAppContext](#keptnappcontext) + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `preDeploymentTasks` _string array_ | PreDeploymentTasks is a list of all tasks to be performed during the pre-deployment phase of the KeptnApp. The items of this list refer to the names of KeptnTaskDefinitions located in the same namespace as the KeptnApp, or in the Keptn namespace. || x | +| `postDeploymentTasks` _string array_ | PostDeploymentTasks is a list of all tasks to be performed during the post-deployment phase of the KeptnApp. The items of this list refer to the names of KeptnTaskDefinitions located in the same namespace as the KeptnApp, or in the Keptn namespace. || x | +| `preDeploymentEvaluations` _string array_ | PreDeploymentEvaluations is a list of all evaluations to be performed during the pre-deployment phase of the KeptnApp. The items of this list refer to the names of KeptnEvaluationDefinitions located in the same namespace as the KeptnApp, or in the Keptn namespace. || x | +| `postDeploymentEvaluations` _string array_ | PostDeploymentEvaluations is a list of all evaluations to be performed during the post-deployment phase of the KeptnApp. The items of this list refer to the names of KeptnEvaluationDefinitions located in the same namespace as the KeptnApp, or in the Keptn namespace. || x | +| `metadata` _object (keys:string, values:string)_ | Refer to Kubernetes API documentation for fields of `metadata`. || ✓ | +| `traceLinks` _string array_ | TraceLinks are links to trace IDs for tracking. || ✓ | + + +#### KeptnAppContextStatus + + + +KeptnAppContextStatus defines the observed state of KeptnAppContext + +_Appears in:_ +- [KeptnAppContext](#keptnappcontext) + + + +#### KeptnAppCreationRequest + + + +KeptnAppCreationRequest is the Schema for the keptnappcreationrequests API + +_Appears in:_ +- [KeptnAppCreationRequestList](#keptnappcreationrequestlist) + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `apiVersion` _string_ | `lifecycle.keptn.sh/v1beta1` | | | +| `kind` _string_ | `KeptnAppCreationRequest` | | | +| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. || ✓ | +| `spec` _[KeptnAppCreationRequestSpec](#keptnappcreationrequestspec)_ | Spec describes the desired state of the KeptnAppCreationRequest. || ✓ | +| `status` _string_ | Status describes the current state of the KeptnAppCreationRequest. || ✓ | + + +#### KeptnAppCreationRequestList + + + +KeptnAppCreationRequestList contains a list of KeptnAppCreationRequest + + + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `apiVersion` _string_ | `lifecycle.keptn.sh/v1beta1` | | | +| `kind` _string_ | `KeptnAppCreationRequestList` | | | +| `metadata` _[ListMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#listmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. || ✓ | +| `items` _[KeptnAppCreationRequest](#keptnappcreationrequest) array_ | || x | + + +#### KeptnAppCreationRequestSpec + + + +KeptnAppCreationRequestSpec defines the desired state of KeptnAppCreationRequest + +_Appears in:_ +- [KeptnAppCreationRequest](#keptnappcreationrequest) + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `appName` _string_ | AppName is the name of the KeptnApp the KeptnAppCreationRequest should create if no user-defined object with that name is found. || x | + + +#### KeptnAppList + + + +KeptnAppList contains a list of KeptnApp + + + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `apiVersion` _string_ | `lifecycle.keptn.sh/v1beta1` | | | +| `kind` _string_ | `KeptnAppList` | | | +| `metadata` _[ListMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#listmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. || ✓ | +| `items` _[KeptnApp](#keptnapp) array_ | || x | + + +#### KeptnAppSpec + + + +KeptnAppSpec defines the desired state of KeptnApp + +_Appears in:_ +- [KeptnApp](#keptnapp) +- [KeptnAppVersionSpec](#keptnappversionspec) + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `version` _string_ | Version defines the version of the application. For automatically created KeptnApps, the version is a function of all KeptnWorkloads that are part of the KeptnApp. || x | +| `revision` _integer_ | Revision can be modified to trigger another deployment of a KeptnApp of the same version. This can be used for restarting a KeptnApp which failed to deploy, e.g. due to a failed preDeploymentEvaluation/preDeploymentTask. |1| ✓ | +| `workloads` _[KeptnWorkloadRef](#keptnworkloadref) array_ | Workloads is a list of all KeptnWorkloads that are part of the KeptnApp. || ✓ | +| `preDeploymentTasks` _string array_ | PreDeploymentTasks is a list of all tasks to be performed during the pre-deployment phase of the KeptnApp. The items of this list refer to the names of KeptnTaskDefinitions located in the same namespace as the KeptnApp, or in the Keptn namespace. || ✓ | +| `postDeploymentTasks` _string array_ | PostDeploymentTasks is a list of all tasks to be performed during the post-deployment phase of the KeptnApp. The items of this list refer to the names of KeptnTaskDefinitions located in the same namespace as the KeptnApp, or in the Keptn namespace. || ✓ | +| `preDeploymentEvaluations` _string array_ | PreDeploymentEvaluations is a list of all evaluations to be performed during the pre-deployment phase of the KeptnApp. The items of this list refer to the names of KeptnEvaluationDefinitions located in the same namespace as the KeptnApp, or in the Keptn namespace. || ✓ | +| `postDeploymentEvaluations` _string array_ | PostDeploymentEvaluations is a list of all evaluations to be performed during the post-deployment phase of the KeptnApp. The items of this list refer to the names of KeptnEvaluationDefinitions located in the same namespace as the KeptnApp, or in the Keptn namespace. || ✓ | + + +#### KeptnAppStatus + + + +KeptnAppStatus defines the observed state of KeptnApp + +_Appears in:_ +- [KeptnApp](#keptnapp) + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `currentVersion` _string_ | CurrentVersion indicates the version that is currently deployed or being reconciled. || ✓ | + + +#### KeptnAppVersion + + + +KeptnAppVersion is the Schema for the keptnappversions API + +_Appears in:_ +- [KeptnAppVersionList](#keptnappversionlist) + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `apiVersion` _string_ | `lifecycle.keptn.sh/v1beta1` | | | +| `kind` _string_ | `KeptnAppVersion` | | | +| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. || ✓ | +| `spec` _[KeptnAppVersionSpec](#keptnappversionspec)_ | Spec describes the desired state of the KeptnAppVersion. || ✓ | +| `status` _[KeptnAppVersionStatus](#keptnappversionstatus)_ | Status describes the current state of the KeptnAppVersion. || ✓ | + + +#### KeptnAppVersionList + + + +KeptnAppVersionList contains a list of KeptnAppVersion + + + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `apiVersion` _string_ | `lifecycle.keptn.sh/v1beta1` | | | +| `kind` _string_ | `KeptnAppVersionList` | | | +| `metadata` _[ListMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#listmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. || ✓ | +| `items` _[KeptnAppVersion](#keptnappversion) array_ | || x | + + +#### KeptnAppVersionSpec + + + +KeptnAppVersionSpec defines the desired state of KeptnAppVersion + +_Appears in:_ +- [KeptnAppVersion](#keptnappversion) + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `version` _string_ | Version defines the version of the application. For automatically created KeptnApps, the version is a function of all KeptnWorkloads that are part of the KeptnApp. || x | +| `revision` _integer_ | Revision can be modified to trigger another deployment of a KeptnApp of the same version. This can be used for restarting a KeptnApp which failed to deploy, e.g. due to a failed preDeploymentEvaluation/preDeploymentTask. |1| ✓ | +| `workloads` _[KeptnWorkloadRef](#keptnworkloadref) array_ | Workloads is a list of all KeptnWorkloads that are part of the KeptnApp. || ✓ | +| `preDeploymentTasks` _string array_ | PreDeploymentTasks is a list of all tasks to be performed during the pre-deployment phase of the KeptnApp. The items of this list refer to the names of KeptnTaskDefinitions located in the same namespace as the KeptnApp, or in the Keptn namespace. || ✓ | +| `postDeploymentTasks` _string array_ | PostDeploymentTasks is a list of all tasks to be performed during the post-deployment phase of the KeptnApp. The items of this list refer to the names of KeptnTaskDefinitions located in the same namespace as the KeptnApp, or in the Keptn namespace. || ✓ | +| `preDeploymentEvaluations` _string array_ | PreDeploymentEvaluations is a list of all evaluations to be performed during the pre-deployment phase of the KeptnApp. The items of this list refer to the names of KeptnEvaluationDefinitions located in the same namespace as the KeptnApp, or in the Keptn namespace. || ✓ | +| `postDeploymentEvaluations` _string array_ | PostDeploymentEvaluations is a list of all evaluations to be performed during the post-deployment phase of the KeptnApp. The items of this list refer to the names of KeptnEvaluationDefinitions located in the same namespace as the KeptnApp, or in the Keptn namespace. || ✓ | +| `appName` _string_ | AppName is the name of the KeptnApp. || x | +| `previousVersion` _string_ | PreviousVersion is the version of the KeptnApp that has been deployed prior to this version. || ✓ | +| `traceId` _object (keys:string, values:string)_ | TraceId contains the OpenTelemetry trace ID. || ✓ | + + +#### KeptnAppVersionStatus + + + +KeptnAppVersionStatus defines the observed state of KeptnAppVersion + +_Appears in:_ +- [KeptnAppVersion](#keptnappversion) + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `preDeploymentStatus` _string_ | PreDeploymentStatus indicates the current status of the KeptnAppVersion's PreDeployment phase. |Pending| ✓ | +| `postDeploymentStatus` _string_ | PostDeploymentStatus indicates the current status of the KeptnAppVersion's PostDeployment phase. |Pending| ✓ | +| `preDeploymentEvaluationStatus` _string_ | PreDeploymentEvaluationStatus indicates the current status of the KeptnAppVersion's PreDeploymentEvaluation phase. |Pending| ✓ | +| `postDeploymentEvaluationStatus` _string_ | PostDeploymentEvaluationStatus indicates the current status of the KeptnAppVersion's PostDeploymentEvaluation phase. |Pending| ✓ | +| `workloadOverallStatus` _string_ | WorkloadOverallStatus indicates the current status of the KeptnAppVersion's Workload deployment phase. |Pending| ✓ | +| `workloadStatus` _[WorkloadStatus](#workloadstatus) array_ | WorkloadStatus contains the current status of each KeptnWorkload that is part of the KeptnAppVersion. || ✓ | +| `currentPhase` _string_ | CurrentPhase indicates the current phase of the KeptnAppVersion. || ✓ | +| `preDeploymentTaskStatus` _[ItemStatus](#itemstatus) array_ | PreDeploymentTaskStatus indicates the current state of each preDeploymentTask of the KeptnAppVersion. || ✓ | +| `postDeploymentTaskStatus` _[ItemStatus](#itemstatus) array_ | PostDeploymentTaskStatus indicates the current state of each postDeploymentTask of the KeptnAppVersion. || ✓ | +| `preDeploymentEvaluationTaskStatus` _[ItemStatus](#itemstatus) array_ | PreDeploymentEvaluationTaskStatus indicates the current state of each preDeploymentEvaluation of the KeptnAppVersion. || ✓ | +| `postDeploymentEvaluationTaskStatus` _[ItemStatus](#itemstatus) array_ | PostDeploymentEvaluationTaskStatus indicates the current state of each postDeploymentEvaluation of the KeptnAppVersion. || ✓ | +| `phaseTraceIDs` _[MapCarrier](https://pkg.go.dev/go.opentelemetry.io/otel/propagation#MapCarrier)_ | PhaseTraceIDs contains the trace IDs of the OpenTelemetry spans of each phase of the KeptnAppVersion. || ✓ | +| `status` _string_ | Status represents the overall status of the KeptnAppVersion. |Pending| ✓ | +| `startTime` _[Time](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#time-v1-meta)_ | StartTime represents the time at which the deployment of the KeptnAppVersion started. || ✓ | +| `endTime` _[Time](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#time-v1-meta)_ | EndTime represents the time at which the deployment of the KeptnAppVersion finished. || ✓ | + + +#### KeptnEvaluation + + + +KeptnEvaluation is the Schema for the keptnevaluations API + +_Appears in:_ +- [KeptnEvaluationList](#keptnevaluationlist) + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `apiVersion` _string_ | `lifecycle.keptn.sh/v1beta1` | | | +| `kind` _string_ | `KeptnEvaluation` | | | +| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. || ✓ | +| `spec` _[KeptnEvaluationSpec](#keptnevaluationspec)_ | Spec describes the desired state of the KeptnEvaluation. || ✓ | +| `status` _[KeptnEvaluationStatus](#keptnevaluationstatus)_ | Status describes the current state of the KeptnEvaluation. || ✓ | + + +#### KeptnEvaluationDefinition + + + +KeptnEvaluationDefinition is the Schema for the keptnevaluationdefinitions API + +_Appears in:_ +- [KeptnEvaluationDefinitionList](#keptnevaluationdefinitionlist) + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `apiVersion` _string_ | `lifecycle.keptn.sh/v1beta1` | | | +| `kind` _string_ | `KeptnEvaluationDefinition` | | | +| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. || ✓ | +| `spec` _[KeptnEvaluationDefinitionSpec](#keptnevaluationdefinitionspec)_ | Spec describes the desired state of the KeptnEvaluationDefinition. || ✓ | +| `status` _string_ | unused field || ✓ | + + +#### KeptnEvaluationDefinitionList + + + +KeptnEvaluationDefinitionList contains a list of KeptnEvaluationDefinition + + + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `apiVersion` _string_ | `lifecycle.keptn.sh/v1beta1` | | | +| `kind` _string_ | `KeptnEvaluationDefinitionList` | | | +| `metadata` _[ListMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#listmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. || ✓ | +| `items` _[KeptnEvaluationDefinition](#keptnevaluationdefinition) array_ | || x | + + +#### KeptnEvaluationDefinitionSpec + + + +KeptnEvaluationDefinitionSpec defines the desired state of KeptnEvaluationDefinition + +_Appears in:_ +- [KeptnEvaluationDefinition](#keptnevaluationdefinition) + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `objectives` _[Objective](#objective) array_ | Objectives is a list of objectives that have to be met for a KeptnEvaluation referencing this KeptnEvaluationDefinition to be successful. || x | + + +#### KeptnEvaluationList + + + +KeptnEvaluationList contains a list of KeptnEvaluation + + + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `apiVersion` _string_ | `lifecycle.keptn.sh/v1beta1` | | | +| `kind` _string_ | `KeptnEvaluationList` | | | +| `metadata` _[ListMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#listmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. || ✓ | +| `items` _[KeptnEvaluation](#keptnevaluation) array_ | || x | + + +#### KeptnEvaluationSpec + + + +KeptnEvaluationSpec defines the desired state of KeptnEvaluation + +_Appears in:_ +- [KeptnEvaluation](#keptnevaluation) + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `workload` _string_ | Workload defines the KeptnWorkload for which the KeptnEvaluation is done. || ✓ | +| `workloadVersion` _string_ | WorkloadVersion defines the version of the KeptnWorkload for which the KeptnEvaluation is done. || x | +| `appName` _string_ | AppName defines the KeptnApp for which the KeptnEvaluation is done. || ✓ | +| `appVersion` _string_ | AppVersion defines the version of the KeptnApp for which the KeptnEvaluation is done. || ✓ | +| `evaluationDefinition` _string_ | EvaluationDefinition refers to the name of the KeptnEvaluationDefinition which includes the objectives for the KeptnEvaluation. The KeptnEvaluationDefinition can be located in the same namespace as the KeptnEvaluation, or in the Keptn namespace. || x | +| `retries` _integer_ | Retries indicates how many times the KeptnEvaluation can be attempted in the case of an error or missed evaluation objective, before considering the KeptnEvaluation to be failed. |10| ✓ | +| `retryInterval` _[Duration](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#duration-v1-meta)_ | RetryInterval specifies the interval at which the KeptnEvaluation is retried in the case of an error or a missed objective. |5s| ✓ | +| `failAction` _string_ | || ✓ | +| `checkType` _string_ | Type indicates whether the KeptnEvaluation is part of the pre- or postDeployment phase. || ✓ | + + +#### KeptnEvaluationStatus + + + +KeptnEvaluationStatus defines the observed state of KeptnEvaluation + +_Appears in:_ +- [KeptnEvaluation](#keptnevaluation) + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `retryCount` _integer_ | RetryCount indicates how many times the KeptnEvaluation has been attempted already. |0| x | +| `evaluationStatus` _object (keys:string, values:[EvaluationStatusItem](#evaluationstatusitem))_ | EvaluationStatus describes the status of each objective of the KeptnEvaluationDefinition referenced by the KeptnEvaluation. || x | +| `overallStatus` _string_ | OverallStatus describes the overall status of the KeptnEvaluation. The Overall status is derived from the status of the individual objectives of the KeptnEvaluationDefinition referenced by the KeptnEvaluation. |Pending| x | +| `startTime` _[Time](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#time-v1-meta)_ | StartTime represents the time at which the KeptnEvaluation started. || ✓ | +| `endTime` _[Time](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#time-v1-meta)_ | EndTime represents the time at which the KeptnEvaluation finished. || ✓ | + + +#### KeptnMetricReference + + + + + +_Appears in:_ +- [Objective](#objective) + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `name` _string_ | Name is the name of the referenced KeptnMetric. || x | +| `namespace` _string_ | Namespace is the namespace where the referenced KeptnMetric is located. || ✓ | + + +#### KeptnTask + + + +KeptnTask is the Schema for the keptntasks API + +_Appears in:_ +- [KeptnTaskList](#keptntasklist) + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `apiVersion` _string_ | `lifecycle.keptn.sh/v1beta1` | | | +| `kind` _string_ | `KeptnTask` | | | +| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. || ✓ | +| `spec` _[KeptnTaskSpec](#keptntaskspec)_ | Spec describes the desired state of the KeptnTask. || ✓ | +| `status` _[KeptnTaskStatus](#keptntaskstatus)_ | Status describes the current state of the KeptnTask. || ✓ | + + +#### KeptnTaskDefinition + + + +KeptnTaskDefinition is the Schema for the keptntaskdefinitions API + +_Appears in:_ +- [KeptnTaskDefinitionList](#keptntaskdefinitionlist) + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `apiVersion` _string_ | `lifecycle.keptn.sh/v1beta1` | | | +| `kind` _string_ | `KeptnTaskDefinition` | | | +| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. || ✓ | +| `spec` _[KeptnTaskDefinitionSpec](#keptntaskdefinitionspec)_ | Spec describes the desired state of the KeptnTaskDefinition. || ✓ | +| `status` _[KeptnTaskDefinitionStatus](#keptntaskdefinitionstatus)_ | Status describes the current state of the KeptnTaskDefinition. || ✓ | + + +#### KeptnTaskDefinitionList + + + +KeptnTaskDefinitionList contains a list of KeptnTaskDefinition + + + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `apiVersion` _string_ | `lifecycle.keptn.sh/v1beta1` | | | +| `kind` _string_ | `KeptnTaskDefinitionList` | | | +| `metadata` _[ListMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#listmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. || ✓ | +| `items` _[KeptnTaskDefinition](#keptntaskdefinition) array_ | || x | + + +#### KeptnTaskDefinitionSpec + + + +KeptnTaskDefinitionSpec defines the desired state of KeptnTaskDefinition + +_Appears in:_ +- [KeptnTaskDefinition](#keptntaskdefinition) + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `function` _[RuntimeSpec](#runtimespec)_ | Deprecated Function contains the definition for the function that is to be executed in KeptnTasks based on the KeptnTaskDefinitions. || ✓ | +| `python` _[RuntimeSpec](#runtimespec)_ | Python contains the definition for the python function that is to be executed in KeptnTasks based on the KeptnTaskDefinitions. || ✓ | +| `deno` _[RuntimeSpec](#runtimespec)_ | Deno contains the definition for the Deno function that is to be executed in KeptnTasks based on the KeptnTaskDefinitions. || ✓ | +| `container` _[ContainerSpec](#containerspec)_ | Container contains the definition for the container that is to be used in Job based on the KeptnTaskDefinitions. || ✓ | +| `retries` _integer_ | Retries specifies how many times a job executing the KeptnTaskDefinition should be restarted in the case of an unsuccessful attempt. |10| ✓ | +| `timeout` _[Duration](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#duration-v1-meta)_ | Timeout specifies the maximum time to wait for the task to be completed successfully. If the task does not complete successfully within this time frame, it will be considered to be failed. |5m| ✓ | +| `serviceAccount` _[ServiceAccountSpec](#serviceaccountspec)_ | ServiceAccount specifies the service account to be used in jobs to authenticate with the Kubernetes API and access cluster resources. || ✓ | +| `automountServiceAccountToken` _[AutomountServiceAccountTokenSpec](#automountserviceaccounttokenspec)_ | AutomountServiceAccountToken allows to enable K8s to assign cluster API credentials to a pod, if set to false the pod will decline the service account || ✓ | +| `ttlSecondsAfterFinished` _integer_ | TTLSecondsAfterFinished controller makes a job eligible to be cleaned up after it is finished. The timer starts when the status shows up to be Complete or Failed. |300| ✓ | +| `imagePullSecrets` _[LocalObjectReference](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#localobjectreference-v1-core) array_ | ImagePullSecrets is an optional field to specify the names of secrets to use for pulling container images || ✓ | + + +#### KeptnTaskDefinitionStatus + + + +KeptnTaskDefinitionStatus defines the observed state of KeptnTaskDefinition + +_Appears in:_ +- [KeptnTaskDefinition](#keptntaskdefinition) + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `function` _[FunctionStatus](#functionstatus)_ | Function contains status information of the function definition for the task. || ✓ | + + +#### KeptnTaskList + + + +KeptnTaskList contains a list of KeptnTask + + + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `apiVersion` _string_ | `lifecycle.keptn.sh/v1beta1` | | | +| `kind` _string_ | `KeptnTaskList` | | | +| `metadata` _[ListMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#listmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. || ✓ | +| `items` _[KeptnTask](#keptntask) array_ | || x | + + +#### KeptnTaskSpec + + + +KeptnTaskSpec defines the desired state of KeptnTask + +_Appears in:_ +- [KeptnTask](#keptntask) + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `taskDefinition` _string_ | TaskDefinition refers to the name of the KeptnTaskDefinition which includes the specification for the task to be performed. The KeptnTaskDefinition can be located in the same namespace as the KeptnTask, or in the Keptn namespace. || x | +| `context` _[TaskContext](#taskcontext)_ | Context contains contextual information about the task execution. || ✓ | +| `parameters` _[TaskParameters](#taskparameters)_ | Parameters contains parameters that will be passed to the job that executes the task. || ✓ | +| `secureParameters` _[SecureParameters](#secureparameters)_ | SecureParameters contains secure parameters that will be passed to the job that executes the task. These will be stored and accessed as secrets in the cluster. || ✓ | +| `checkType` _string_ | Type indicates whether the KeptnTask is part of the pre- or postDeployment phase. || ✓ | +| `retries` _integer_ | Retries indicates how many times the KeptnTask can be attempted in the case of an error before considering the KeptnTask to be failed. |10| ✓ | +| `timeout` _[Duration](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#duration-v1-meta)_ | Timeout specifies the maximum time to wait for the task to be completed successfully. If the task does not complete successfully within this time frame, it will be considered to be failed. |5m| ✓ | + + +#### KeptnTaskStatus + + + +KeptnTaskStatus defines the observed state of KeptnTask + +_Appears in:_ +- [KeptnTask](#keptntask) + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `jobName` _string_ | JobName is the name of the Job executing the Task. || ✓ | +| `status` _string_ | Status represents the overall state of the KeptnTask. |Pending| ✓ | +| `message` _string_ | Message contains information about unexpected errors encountered during the execution of the KeptnTask. || ✓ | +| `startTime` _[Time](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#time-v1-meta)_ | StartTime represents the time at which the KeptnTask started. || ✓ | +| `endTime` _[Time](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#time-v1-meta)_ | EndTime represents the time at which the KeptnTask finished. || ✓ | +| `reason` _string_ | Reason contains more information about the reason for the last transition of the Job executing the KeptnTask. || ✓ | + + +#### KeptnWorkload + + + +KeptnWorkload is the Schema for the keptnworkloads API + +_Appears in:_ +- [KeptnWorkloadList](#keptnworkloadlist) + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `apiVersion` _string_ | `lifecycle.keptn.sh/v1beta1` | | | +| `kind` _string_ | `KeptnWorkload` | | | +| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. || ✓ | +| `spec` _[KeptnWorkloadSpec](#keptnworkloadspec)_ | Spec describes the desired state of the KeptnWorkload. || ✓ | +| `status` _[KeptnWorkloadStatus](#keptnworkloadstatus)_ | Status describes the current state of the KeptnWorkload. || ✓ | + + +#### KeptnWorkloadList + + + +KeptnWorkloadList contains a list of KeptnWorkload + + + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `apiVersion` _string_ | `lifecycle.keptn.sh/v1beta1` | | | +| `kind` _string_ | `KeptnWorkloadList` | | | +| `metadata` _[ListMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#listmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. || ✓ | +| `items` _[KeptnWorkload](#keptnworkload) array_ | || x | + + +#### KeptnWorkloadRef + + + +KeptnWorkloadRef refers to a KeptnWorkload that is part of a KeptnApp + +_Appears in:_ +- [KeptnAppSpec](#keptnappspec) +- [KeptnAppVersionSpec](#keptnappversionspec) +- [WorkloadStatus](#workloadstatus) + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `name` _string_ | Name is the name of the KeptnWorkload. || x | +| `version` _string_ | Version is the version of the KeptnWorkload. || x | + + +#### KeptnWorkloadSpec + + + +KeptnWorkloadSpec defines the desired state of KeptnWorkload + +_Appears in:_ +- [KeptnWorkload](#keptnworkload) +- [KeptnWorkloadVersionSpec](#keptnworkloadversionspec) + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `app` _string_ | AppName is the name of the KeptnApp containing the KeptnWorkload. || x | +| `version` _string_ | Version defines the version of the KeptnWorkload. || x | +| `preDeploymentTasks` _string array_ | PreDeploymentTasks is a list of all tasks to be performed during the pre-deployment phase of the KeptnWorkload. The items of this list refer to the names of KeptnTaskDefinitions located in the same namespace as the KeptnApp, or in the Keptn namespace. || ✓ | +| `postDeploymentTasks` _string array_ | PostDeploymentTasks is a list of all tasks to be performed during the post-deployment phase of the KeptnWorkload. The items of this list refer to the names of KeptnTaskDefinitions located in the same namespace as the KeptnWorkload, or in the Keptn namespace. || ✓ | +| `preDeploymentEvaluations` _string array_ | PreDeploymentEvaluations is a list of all evaluations to be performed during the pre-deployment phase of the KeptnWorkload. The items of this list refer to the names of KeptnEvaluationDefinitions located in the same namespace as the KeptnWorkload, or in the Keptn namespace. || ✓ | +| `postDeploymentEvaluations` _string array_ | PostDeploymentEvaluations is a list of all evaluations to be performed during the post-deployment phase of the KeptnWorkload. The items of this list refer to the names of KeptnEvaluationDefinitions located in the same namespace as the KeptnWorkload, or in the Keptn namespace. || ✓ | +| `resourceReference` _[ResourceReference](#resourcereference)_ | ResourceReference is a reference to the Kubernetes resource (Deployment, DaemonSet, StatefulSet or ReplicaSet) the KeptnWorkload is representing. || x | + + +#### KeptnWorkloadStatus + + + +KeptnWorkloadStatus defines the observed state of KeptnWorkload + +_Appears in:_ +- [KeptnWorkload](#keptnworkload) + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `currentVersion` _string_ | CurrentVersion indicates the version that is currently deployed or being reconciled. || ✓ | + + +#### KeptnWorkloadVersion + + + +KeptnWorkloadVersion is the Schema for the keptnworkloadversions API + +_Appears in:_ +- [KeptnWorkloadVersionList](#keptnworkloadversionlist) + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `apiVersion` _string_ | `lifecycle.keptn.sh/v1beta1` | | | +| `kind` _string_ | `KeptnWorkloadVersion` | | | +| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. || ✓ | +| `spec` _[KeptnWorkloadVersionSpec](#keptnworkloadversionspec)_ | Spec describes the desired state of the KeptnWorkloadVersion. || ✓ | +| `status` _[KeptnWorkloadVersionStatus](#keptnworkloadversionstatus)_ | Status describes the current state of the KeptnWorkloadVersion. || ✓ | + + +#### KeptnWorkloadVersionList + + + +KeptnWorkloadVersionList contains a list of KeptnWorkloadVersion + + + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `apiVersion` _string_ | `lifecycle.keptn.sh/v1beta1` | | | +| `kind` _string_ | `KeptnWorkloadVersionList` | | | +| `metadata` _[ListMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#listmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. || ✓ | +| `items` _[KeptnWorkloadVersion](#keptnworkloadversion) array_ | || x | + + +#### KeptnWorkloadVersionSpec + + + +KeptnWorkloadVersionSpec defines the desired state of KeptnWorkloadVersion + +_Appears in:_ +- [KeptnWorkloadVersion](#keptnworkloadversion) + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `app` _string_ | AppName is the name of the KeptnApp containing the KeptnWorkload. || x | +| `version` _string_ | Version defines the version of the KeptnWorkload. || x | +| `preDeploymentTasks` _string array_ | PreDeploymentTasks is a list of all tasks to be performed during the pre-deployment phase of the KeptnWorkload. The items of this list refer to the names of KeptnTaskDefinitions located in the same namespace as the KeptnApp, or in the Keptn namespace. || ✓ | +| `postDeploymentTasks` _string array_ | PostDeploymentTasks is a list of all tasks to be performed during the post-deployment phase of the KeptnWorkload. The items of this list refer to the names of KeptnTaskDefinitions located in the same namespace as the KeptnWorkload, or in the Keptn namespace. || ✓ | +| `preDeploymentEvaluations` _string array_ | PreDeploymentEvaluations is a list of all evaluations to be performed during the pre-deployment phase of the KeptnWorkload. The items of this list refer to the names of KeptnEvaluationDefinitions located in the same namespace as the KeptnWorkload, or in the Keptn namespace. || ✓ | +| `postDeploymentEvaluations` _string array_ | PostDeploymentEvaluations is a list of all evaluations to be performed during the post-deployment phase of the KeptnWorkload. The items of this list refer to the names of KeptnEvaluationDefinitions located in the same namespace as the KeptnWorkload, or in the Keptn namespace. || ✓ | +| `resourceReference` _[ResourceReference](#resourcereference)_ | ResourceReference is a reference to the Kubernetes resource (Deployment, DaemonSet, StatefulSet or ReplicaSet) the KeptnWorkload is representing. || x | +| `workloadName` _string_ | WorkloadName is the name of the KeptnWorkload. || x | +| `previousVersion` _string_ | PreviousVersion is the version of the KeptnWorkload that has been deployed prior to this version. || ✓ | +| `traceId` _object (keys:string, values:string)_ | TraceId contains the OpenTelemetry trace ID. || ✓ | + + +#### KeptnWorkloadVersionStatus + + + +KeptnWorkloadVersionStatus defines the observed state of KeptnWorkloadVersion + +_Appears in:_ +- [KeptnWorkloadVersion](#keptnworkloadversion) + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `preDeploymentStatus` _string_ | PreDeploymentStatus indicates the current status of the KeptnWorkloadVersion's PreDeployment phase. |Pending| ✓ | +| `deploymentStatus` _string_ | DeploymentStatus indicates the current status of the KeptnWorkloadVersion's Deployment phase. |Pending| ✓ | +| `preDeploymentEvaluationStatus` _string_ | PreDeploymentEvaluationStatus indicates the current status of the KeptnWorkloadVersion's PreDeploymentEvaluation phase. |Pending| ✓ | +| `postDeploymentEvaluationStatus` _string_ | PostDeploymentEvaluationStatus indicates the current status of the KeptnWorkloadVersion's PostDeploymentEvaluation phase. |Pending| ✓ | +| `postDeploymentStatus` _string_ | PostDeploymentStatus indicates the current status of the KeptnWorkloadVersion's PostDeployment phase. |Pending| ✓ | +| `preDeploymentTaskStatus` _[ItemStatus](#itemstatus) array_ | PreDeploymentTaskStatus indicates the current state of each preDeploymentTask of the KeptnWorkloadVersion. || ✓ | +| `postDeploymentTaskStatus` _[ItemStatus](#itemstatus) array_ | PostDeploymentTaskStatus indicates the current state of each postDeploymentTask of the KeptnWorkloadVersion. || ✓ | +| `preDeploymentEvaluationTaskStatus` _[ItemStatus](#itemstatus) array_ | PreDeploymentEvaluationTaskStatus indicates the current state of each preDeploymentEvaluation of the KeptnWorkloadVersion. || ✓ | +| `postDeploymentEvaluationTaskStatus` _[ItemStatus](#itemstatus) array_ | PostDeploymentEvaluationTaskStatus indicates the current state of each postDeploymentEvaluation of the KeptnWorkloadVersion. || ✓ | +| `startTime` _[Time](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#time-v1-meta)_ | StartTime represents the time at which the deployment of the KeptnWorkloadVersion started. || ✓ | +| `endTime` _[Time](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#time-v1-meta)_ | EndTime represents the time at which the deployment of the KeptnWorkloadVersion finished. || ✓ | +| `currentPhase` _string_ | CurrentPhase indicates the current phase of the KeptnWorkloadVersion. This can be: - PreDeploymentTasks - PreDeploymentEvaluations - Deployment - PostDeploymentTasks - PostDeploymentEvaluations || ✓ | +| `phaseTraceIDs` _[MapCarrier](https://pkg.go.dev/go.opentelemetry.io/otel/propagation#MapCarrier)_ | PhaseTraceIDs contains the trace IDs of the OpenTelemetry spans of each phase of the KeptnWorkloadVersion || ✓ | +| `status` _string_ | Status represents the overall status of the KeptnWorkloadVersion. |Pending| ✓ | + + +#### Objective + + + + + +_Appears in:_ +- [KeptnEvaluationDefinitionSpec](#keptnevaluationdefinitionspec) + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `keptnMetricRef` _[KeptnMetricReference](#keptnmetricreference)_ | KeptnMetricRef references the KeptnMetric that should be evaluated. || x | +| `evaluationTarget` _string_ | EvaluationTarget specifies the target value for the references KeptnMetric. Needs to start with either '<' or '>', followed by the target value (e.g. '<10'). || x | + + +#### ResourceReference + + + +ResourceReference represents the parent resource of Workload + +_Appears in:_ +- [KeptnWorkloadSpec](#keptnworkloadspec) +- [KeptnWorkloadVersionSpec](#keptnworkloadversionspec) + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `uid` _string_ | || x | +| `kind` _string_ | || x | +| `name` _string_ | || x | + + +#### RuntimeSpec + + + + + +_Appears in:_ +- [KeptnTaskDefinitionSpec](#keptntaskdefinitionspec) + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `functionRef` _[FunctionReference](#functionreference)_ | FunctionReference allows to reference another KeptnTaskDefinition which contains the source code of the function to be executes for KeptnTasks based on this KeptnTaskDefinition. This can be useful when you have multiple KeptnTaskDefinitions that should execute the same logic, but each with different parameters. || ✓ | +| `inline` _[Inline](#inline)_ | Inline allows to specify the code that should be executed directly in the KeptnTaskDefinition, as a multi-line string. || ✓ | +| `httpRef` _[HttpReference](#httpreference)_ | HttpReference allows to point to an HTTP URL containing the code of the function. || ✓ | +| `configMapRef` _[ConfigMapReference](#configmapreference)_ | ConfigMapReference allows to reference a ConfigMap containing the code of the function. When referencing a ConfigMap, the code of the function must be available as a value of the 'code' key of the referenced ConfigMap. || ✓ | +| `parameters` _[TaskParameters](#taskparameters)_ | Parameters contains parameters that will be passed to the job that executes the task as env variables. || ✓ | +| `secureParameters` _[SecureParameters](#secureparameters)_ | SecureParameters contains secure parameters that will be passed to the job that executes the task. These will be stored and accessed as secrets in the cluster. || ✓ | +| `cmdParameters` _string_ | CmdParameters contains parameters that will be passed to the command || ✓ | + + +#### SecureParameters + + + + + +_Appears in:_ +- [KeptnTaskSpec](#keptntaskspec) +- [RuntimeSpec](#runtimespec) + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `secret` _string_ | Secret contains the parameters that will be made available to the job executing the KeptnTask via the 'SECRET_DATA' environment variable. The 'SECRET_DATA' environment variable's content will the same as value of the 'SECRET_DATA' key of the referenced secret. || ✓ | + + +#### ServiceAccountSpec + + + + + +_Appears in:_ +- [KeptnTaskDefinitionSpec](#keptntaskdefinitionspec) + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `name` _string_ | || x | + + +#### TaskContext + + + + + +_Appears in:_ +- [KeptnTaskSpec](#keptntaskspec) + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `workloadName` _string_ | WorkloadName the name of the KeptnWorkload the KeptnTask is being executed for. || ✓ | +| `appName` _string_ | AppName the name of the KeptnApp the KeptnTask is being executed for. || ✓ | +| `appVersion` _string_ | AppVersion the version of the KeptnApp the KeptnTask is being executed for. || ✓ | +| `workloadVersion` _string_ | WorkloadVersion the version of the KeptnWorkload the KeptnTask is being executed for. || ✓ | +| `taskType` _string_ | TaskType indicates whether the KeptnTask is part of the pre- or postDeployment phase. || ✓ | +| `objectType` _string_ | ObjectType indicates whether the KeptnTask is being executed for a KeptnApp or KeptnWorkload. || ✓ | + + +#### TaskParameters + + + + + +_Appears in:_ +- [KeptnTaskSpec](#keptntaskspec) +- [RuntimeSpec](#runtimespec) + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `map` _object (keys:string, values:string)_ | Inline contains the parameters that will be made available to the job executing the KeptnTask via the 'DATA' environment variable. The 'DATA' environment variable's content will be a json encoded string containing all properties of the map provided. || ✓ | + + +#### WorkloadStatus + + + + + +_Appears in:_ +- [KeptnAppVersionStatus](#keptnappversionstatus) + +| Field | Description | Default | Optional | +| --- | --- | --- | --- | +| `workload` _[KeptnWorkloadRef](#keptnworkloadref)_ | Workload refers to a KeptnWorkload that is part of the KeptnAppVersion. || ✓ | +| `status` _string_ | Status indicates the current status of the KeptnWorkload. |Pending| ✓ | + + diff --git a/lifecycle-operator/PROJECT b/lifecycle-operator/PROJECT index 2e4a0b42bf..8f54eed54a 100644 --- a/lifecycle-operator/PROJECT +++ b/lifecycle-operator/PROJECT @@ -1,3 +1,7 @@ +# Code generated by tool. DO NOT EDIT. +# This file is used to track the info used to scaffold your project +# and allow the plugins properly work. +# More info: https://book.kubebuilder.io/reference/project-config.html domain: keptn.sh layout: - go.kubebuilder.io/v3 @@ -354,4 +358,12 @@ resources: kind: KeptnWorkloadVersion path: github.com/keptn/lifecycle-toolkit/lifecycle-operator/apis/lifecycle/v1beta1 version: v1beta1 +- api: + crdVersion: v1 + namespaced: true + domain: keptn.sh + group: lifecycle + kind: KeptnAppContext + path: github.com/keptn/lifecycle-toolkit/lifecycle-operator/apis/lifecycle/v1beta1 + version: v1beta1 version: "3" diff --git a/lifecycle-operator/apis/lifecycle/v1beta1/keptnappcontext_types.go b/lifecycle-operator/apis/lifecycle/v1beta1/keptnappcontext_types.go new file mode 100644 index 0000000000..09ca90c133 --- /dev/null +++ b/lifecycle-operator/apis/lifecycle/v1beta1/keptnappcontext_types.go @@ -0,0 +1,88 @@ +/* +Copyright 2022. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1beta1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +type DeploymentTaskSpec struct { + // PreDeploymentTasks is a list of all tasks to be performed during the pre-deployment phase of the KeptnApp. + // The items of this list refer to the names of KeptnTaskDefinitions + // located in the same namespace as the KeptnApp, or in the Keptn namespace. + PreDeploymentTasks []string `json:"preDeploymentTasks,omitempty"` + // PostDeploymentTasks is a list of all tasks to be performed during the post-deployment phase of the KeptnApp. + // The items of this list refer to the names of KeptnTaskDefinitions + // located in the same namespace as the KeptnApp, or in the Keptn namespace. + PostDeploymentTasks []string `json:"postDeploymentTasks,omitempty"` + // PreDeploymentEvaluations is a list of all evaluations to be performed + // during the pre-deployment phase of the KeptnApp. + // The items of this list refer to the names of KeptnEvaluationDefinitions + // located in the same namespace as the KeptnApp, or in the Keptn namespace. + PreDeploymentEvaluations []string `json:"preDeploymentEvaluations,omitempty"` + // PostDeploymentEvaluations is a list of all evaluations to be performed + // during the post-deployment phase of the KeptnApp. + // The items of this list refer to the names of KeptnEvaluationDefinitions + // located in the same namespace as the KeptnApp, or in the Keptn namespace. + PostDeploymentEvaluations []string `json:"postDeploymentEvaluations,omitempty"` +} + +// KeptnAppContextSpec defines the desired state of KeptnAppContext +type KeptnAppContextSpec struct { + DeploymentTaskSpec `json:",inline"` + + // +optional + // Metadata contains additional key-value pairs for contextual information. + Metadata map[string]string `json:"metadata,omitempty"` + + // +optional + // TraceLinks are links to OpenTelemetry span IDs for tracking. These links establish relationships between spans across different services, enabling distributed tracing. + // For more information on OpenTelemetry span links, refer to the documentation: https://opentelemetry.io/docs/concepts/signals/traces/#span-links + TraceLinks []string `json:"traceLinks,omitempty"` +} + +// KeptnAppContextStatus defines the observed state of KeptnAppContext +type KeptnAppContextStatus struct { + // unused field + // +optional + Status string `json:"status,omitempty"` +} + +//+kubebuilder:object:root=true +//+kubebuilder:subresource:status + +// KeptnAppContext is the Schema for the keptnappcontexts API +type KeptnAppContext struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + + Spec KeptnAppContextSpec `json:"spec,omitempty"` + Status KeptnAppContextStatus `json:"status,omitempty"` +} + +//+kubebuilder:object:root=true + +// KeptnAppContextList contains a list of KeptnAppContext +type KeptnAppContextList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []KeptnAppContext `json:"items"` +} + +func init() { + SchemeBuilder.Register(&KeptnAppContext{}, &KeptnAppContextList{}) +} diff --git a/lifecycle-operator/apis/lifecycle/v1beta1/zz_generated.deepcopy.go b/lifecycle-operator/apis/lifecycle/v1beta1/zz_generated.deepcopy.go index d5802b22e4..2cc991a277 100644 --- a/lifecycle-operator/apis/lifecycle/v1beta1/zz_generated.deepcopy.go +++ b/lifecycle-operator/apis/lifecycle/v1beta1/zz_generated.deepcopy.go @@ -201,6 +201,95 @@ func (in *KeptnApp) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KeptnAppContext) DeepCopyInto(out *KeptnAppContext) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.Spec = in.Spec + out.Status = in.Status +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeptnAppContext. +func (in *KeptnAppContext) DeepCopy() *KeptnAppContext { + if in == nil { + return nil + } + out := new(KeptnAppContext) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *KeptnAppContext) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KeptnAppContextList) DeepCopyInto(out *KeptnAppContextList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]KeptnAppContext, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeptnAppContextList. +func (in *KeptnAppContextList) DeepCopy() *KeptnAppContextList { + if in == nil { + return nil + } + out := new(KeptnAppContextList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *KeptnAppContextList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KeptnAppContextSpec) DeepCopyInto(out *KeptnAppContextSpec) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeptnAppContextSpec. +func (in *KeptnAppContextSpec) DeepCopy() *KeptnAppContextSpec { + if in == nil { + return nil + } + out := new(KeptnAppContextSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KeptnAppContextStatus) DeepCopyInto(out *KeptnAppContextStatus) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeptnAppContextStatus. +func (in *KeptnAppContextStatus) DeepCopy() *KeptnAppContextStatus { + if in == nil { + return nil + } + out := new(KeptnAppContextStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *KeptnAppCreationRequest) DeepCopyInto(out *KeptnAppCreationRequest) { *out = *in diff --git a/lifecycle-operator/chart/templates/keptnappcontext-crd.yaml b/lifecycle-operator/chart/templates/keptnappcontext-crd.yaml new file mode 100644 index 0000000000..bd7c8123ea --- /dev/null +++ b/lifecycle-operator/chart/templates/keptnappcontext-crd.yaml @@ -0,0 +1,81 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: keptnappcontexts.lifecycle.keptn.sh + annotations: + controller-gen.kubebuilder.io/version: v0.13.0 + cert-manager.io/inject-ca-from: '{{ .Release.Namespace }}/keptn-certs' + labels: + app.kubernetes.io/part-of: keptn + crdGroup: lifecycle.keptn.sh + keptn.sh/inject-cert: "true" +{{- include "common.labels.standard" ( dict "context" . ) | nindent 4 }} +{{- include "common.annotations" ( dict "context" . ) }} +spec: + group: lifecycle.keptn.sh + names: + kind: KeptnAppContext + listKind: KeptnAppContextList + plural: keptnappcontexts + singular: keptnappcontext + scope: Namespaced + versions: + - name: v1beta1 + schema: + openAPIV3Schema: + description: KeptnAppContext is the Schema for the keptnappcontexts 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: KeptnAppContextSpec defines the desired state of KeptnAppContext + properties: + metadata: + additionalProperties: + type: string + description: Metadata contains additional key-value pairs for contextual information. + type: object + postDeploymentEvaluations: + description: PostDeploymentEvaluations is a list of all evaluations to be performed during the post-deployment phase of the KeptnApp. The items of this list refer to the names of KeptnEvaluationDefinitions located in the same namespace as the KeptnApp, or in the Keptn namespace. + items: + type: string + type: array + postDeploymentTasks: + description: PostDeploymentTasks is a list of all tasks to be performed during the post-deployment phase of the KeptnApp. The items of this list refer to the names of KeptnTaskDefinitions located in the same namespace as the KeptnApp, or in the Keptn namespace. + items: + type: string + type: array + preDeploymentEvaluations: + description: PreDeploymentEvaluations is a list of all evaluations to be performed during the pre-deployment phase of the KeptnApp. The items of this list refer to the names of KeptnEvaluationDefinitions located in the same namespace as the KeptnApp, or in the Keptn namespace. + items: + type: string + type: array + preDeploymentTasks: + description: PreDeploymentTasks is a list of all tasks to be performed during the pre-deployment phase of the KeptnApp. The items of this list refer to the names of KeptnTaskDefinitions located in the same namespace as the KeptnApp, or in the Keptn namespace. + items: + type: string + type: array + traceLinks: + description: TraceLinks are links to OpenTelemetry span IDs for tracking. These links establish relationships between spans across different services, enabling distributed tracing. For more information on OpenTelemetry span links, refer to the documentation https://opentelemetry.io/docs/concepts/signals/traces/#span-links. + items: + type: string + type: array + type: object + status: + description: KeptnAppContextStatus defines the observed state of KeptnAppContext + properties: + status: + description: unused field + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/lifecycle-operator/config/crd/bases/lifecycle.keptn.sh_keptnappcontexts.yaml b/lifecycle-operator/config/crd/bases/lifecycle.keptn.sh_keptnappcontexts.yaml new file mode 100644 index 0000000000..4dfb25058f --- /dev/null +++ b/lifecycle-operator/config/crd/bases/lifecycle.keptn.sh_keptnappcontexts.yaml @@ -0,0 +1,95 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.13.0 + name: keptnappcontexts.lifecycle.keptn.sh +spec: + group: lifecycle.keptn.sh + names: + kind: KeptnAppContext + listKind: KeptnAppContextList + plural: keptnappcontexts + singular: keptnappcontext + scope: Namespaced + versions: + - name: v1beta1 + schema: + openAPIV3Schema: + description: KeptnAppContext is the Schema for the keptnappcontexts 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: KeptnAppContextSpec defines the desired state of KeptnAppContext + properties: + metadata: + additionalProperties: + type: string + description: Metadata contains additional key-value pairs for contextual + information. + type: object + postDeploymentEvaluations: + description: PostDeploymentEvaluations is a list of all evaluations + to be performed during the post-deployment phase of the KeptnApp. + The items of this list refer to the names of KeptnEvaluationDefinitions + located in the same namespace as the KeptnApp, or in the Keptn namespace. + items: + type: string + type: array + postDeploymentTasks: + description: PostDeploymentTasks is a list of all tasks to be performed + during the post-deployment phase of the KeptnApp. The items of this + list refer to the names of KeptnTaskDefinitions located in the same + namespace as the KeptnApp, or in the Keptn namespace. + items: + type: string + type: array + preDeploymentEvaluations: + description: PreDeploymentEvaluations is a list of all evaluations + to be performed during the pre-deployment phase of the KeptnApp. + The items of this list refer to the names of KeptnEvaluationDefinitions + located in the same namespace as the KeptnApp, or in the Keptn namespace. + items: + type: string + type: array + preDeploymentTasks: + description: PreDeploymentTasks is a list of all tasks to be performed + during the pre-deployment phase of the KeptnApp. The items of this + list refer to the names of KeptnTaskDefinitions located in the same + namespace as the KeptnApp, or in the Keptn namespace. + items: + type: string + type: array + traceLinks: + description: 'TraceLinks are links to OpenTelemetry span IDs for tracking. + These links establish relationships between spans across different + services, enabling distributed tracing. For more information on + OpenTelemetry span links, refer to the documentation: https://opentelemetry.io/docs/concepts/signals/traces/#span-links' + items: + type: string + type: array + type: object + status: + description: KeptnAppContextStatus defines the observed state of KeptnAppContext + properties: + status: + description: unused field + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/lifecycle-operator/config/crd/kustomization.yaml b/lifecycle-operator/config/crd/kustomization.yaml index 6dd871233b..a702e83915 100644 --- a/lifecycle-operator/config/crd/kustomization.yaml +++ b/lifecycle-operator/config/crd/kustomization.yaml @@ -14,6 +14,7 @@ resources: - bases/options.keptn.sh_keptnconfigs.yaml - bases/lifecycle.keptn.sh_keptnappcreationrequests.yaml - bases/lifecycle.keptn.sh_keptnworkloadversions.yaml + - bases/lifecycle.keptn.sh_keptnappcontexts.yaml # +kubebuilder:scaffold:crdkustomizeresource # the following config is for teaching kustomize how to do kustomization for CRDs. configurations: @@ -41,4 +42,5 @@ patches: # - path: patches/webhook_in_lifecycle_keptnevaluations.yaml # - path: patches/webhook_in_options_keptnconfigs.yaml # - path: patches/webhook_in_keptnappcreationrequests.yaml +# - path: patches/webhook_in_lifecycle_keptnappcontexts.yaml # +kubebuilder:scaffold:crdkustomizewebhookpatch diff --git a/lifecycle-operator/config/crd/patches/webhook_in_lifecycle_keptnappcontexts.yaml b/lifecycle-operator/config/crd/patches/webhook_in_lifecycle_keptnappcontexts.yaml new file mode 100644 index 0000000000..71d892d318 --- /dev/null +++ b/lifecycle-operator/config/crd/patches/webhook_in_lifecycle_keptnappcontexts.yaml @@ -0,0 +1,16 @@ +# The following patch enables a conversion webhook for the CRD +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: keptnappcontexts.lifecycle.keptn.sh +spec: + conversion: + strategy: Webhook + webhook: + clientConfig: + service: + namespace: system + name: webhook-service + path: /convert + conversionReviewVersions: + - v1 diff --git a/lifecycle-operator/config/rbac/lifecycle_keptnappcontext_editor_role.yaml b/lifecycle-operator/config/rbac/lifecycle_keptnappcontext_editor_role.yaml new file mode 100644 index 0000000000..b53a116702 --- /dev/null +++ b/lifecycle-operator/config/rbac/lifecycle_keptnappcontext_editor_role.yaml @@ -0,0 +1,31 @@ +# permissions for end users to edit keptnappcontexts. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/name: clusterrole + app.kubernetes.io/instance: keptnappcontext-editor-role + app.kubernetes.io/component: rbac + app.kubernetes.io/created-by: lifecycle-operator + app.kubernetes.io/part-of: lifecycle-operator + app.kubernetes.io/managed-by: kustomize + name: keptnappcontext-editor-role +rules: + - apiGroups: + - lifecycle.keptn.sh + resources: + - keptnappcontexts + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - lifecycle.keptn.sh + resources: + - keptnappcontexts/status + verbs: + - get diff --git a/lifecycle-operator/config/rbac/lifecycle_keptnappcontext_viewer_role.yaml b/lifecycle-operator/config/rbac/lifecycle_keptnappcontext_viewer_role.yaml new file mode 100644 index 0000000000..1210908b49 --- /dev/null +++ b/lifecycle-operator/config/rbac/lifecycle_keptnappcontext_viewer_role.yaml @@ -0,0 +1,27 @@ +# permissions for end users to view keptnappcontexts. +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRole +metadata: + labels: + app.kubernetes.io/name: clusterrole + app.kubernetes.io/instance: keptnappcontext-viewer-role + app.kubernetes.io/component: rbac + app.kubernetes.io/created-by: lifecycle-operator + app.kubernetes.io/part-of: lifecycle-operator + app.kubernetes.io/managed-by: kustomize + name: keptnappcontext-viewer-role +rules: + - apiGroups: + - lifecycle.keptn.sh + resources: + - keptnappcontexts + verbs: + - get + - list + - watch + - apiGroups: + - lifecycle.keptn.sh + resources: + - keptnappcontexts/status + verbs: + - get diff --git a/lifecycle-operator/config/samples/lifecycle_v1beta1_keptnappcontext.yaml b/lifecycle-operator/config/samples/lifecycle_v1beta1_keptnappcontext.yaml new file mode 100644 index 0000000000..05ac790ebb --- /dev/null +++ b/lifecycle-operator/config/samples/lifecycle_v1beta1_keptnappcontext.yaml @@ -0,0 +1,28 @@ +apiVersion: lifecycle.keptn.sh/v1beta1 +kind: KeptnAppContext +metadata: + labels: + app.kubernetes.io/name: keptnappcontext + app.kubernetes.io/instance: keptnappcontext-sample + app.kubernetes.io/part-of: lifecycle-operator + app.kubernetes.io/managed-by: kustomize + app.kubernetes.io/created-by: lifecycle-operator + name: keptnappcontext-sample +spec: + preDeploymentTasks: + - task1 + - task2 + postDeploymentTasks: + - task1 + - task2 + preDeploymentEvaluations: + - eval1 + - eval2 + postDeploymentEvaluations: + - eval1 + - eval2 + metadata: + - key: abc123 + traceLinks: + - "w3c trace id1" + - "w3c trace id2" diff --git a/test/integration/podtato-head-application-keptnappcontext/00-assert.yaml b/test/integration/podtato-head-application-keptnappcontext/00-assert.yaml new file mode 100644 index 0000000000..27a7c5ed02 --- /dev/null +++ b/test/integration/podtato-head-application-keptnappcontext/00-assert.yaml @@ -0,0 +1,11 @@ +apiVersion: lifecycle.keptn.sh/v1beta1 +kind: KeptnAppContext +metadata: + name: podtato-head +spec: + metadata: + context: "context-hello" + preDeploymentTasks: + - pre-deployment-hello + postDeploymentTasks: + - post-deployment-hello diff --git a/test/integration/podtato-head-application-keptnappcontext/00-install.yaml b/test/integration/podtato-head-application-keptnappcontext/00-install.yaml new file mode 100644 index 0000000000..27a7c5ed02 --- /dev/null +++ b/test/integration/podtato-head-application-keptnappcontext/00-install.yaml @@ -0,0 +1,11 @@ +apiVersion: lifecycle.keptn.sh/v1beta1 +kind: KeptnAppContext +metadata: + name: podtato-head +spec: + metadata: + context: "context-hello" + preDeploymentTasks: + - pre-deployment-hello + postDeploymentTasks: + - post-deployment-hello diff --git a/test/integration/podtato-head-application-keptnappcontext/00-teststep.yaml b/test/integration/podtato-head-application-keptnappcontext/00-teststep.yaml new file mode 100644 index 0000000000..ad4f1d95d5 --- /dev/null +++ b/test/integration/podtato-head-application-keptnappcontext/00-teststep.yaml @@ -0,0 +1,4 @@ +apiVersion: kuttl.dev/v1 +kind: TestStep +commands: + - script: kubectl annotate ns $NAMESPACE keptn.sh/lifecycle-toolkit='enabled'