From e2d83f2c4302ca48f8a91555db70be71bc20ca6a Mon Sep 17 00:00:00 2001 From: odubajDT Date: Thu, 29 Feb 2024 15:05:40 +0100 Subject: [PATCH] rename to observabilityTimeout Signed-off-by: odubajDT --- .github/scripts/.helm-tests/default/result.yaml | 16 ++++++++-------- .../.helm-tests/lifecycle-only/result.yaml | 16 ++++++++-------- .../.helm-tests/lifecycle-with-certs/result.yaml | 16 ++++++++-------- .../api-reference/options/v1alpha1/index.md | 2 +- docs/docs/reference/crd-reference/config.md | 9 +++++++++ .../apis/options/v1alpha1/keptnconfig_types.go | 4 ++-- .../options/v1alpha1/zz_generated.deepcopy.go | 2 +- .../chart/templates/keptnconfig-crd.yaml | 16 ++++++++-------- .../crd/bases/options.keptn.sh_keptnconfigs.yaml | 16 ++++++++-------- .../samples/options_v1alpha1_keptnconfig.yaml | 2 ++ 10 files changed, 55 insertions(+), 44 deletions(-) diff --git a/.github/scripts/.helm-tests/default/result.yaml b/.github/scripts/.helm-tests/default/result.yaml index 55910490f5..90c45f8c2b 100644 --- a/.github/scripts/.helm-tests/default/result.yaml +++ b/.github/scripts/.helm-tests/default/result.yaml @@ -2050,20 +2050,20 @@ spec: description: CloudEventsEndpoint can be used to set the endpoint where Cloud Events should be posted by the lifecycle operator type: string - deploymentTimeout: - default: 5m - description: |- - DeploymentTimeout specifies the maximum time to wait for the deployment to be in Running state. - 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 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 diff --git a/.github/scripts/.helm-tests/lifecycle-only/result.yaml b/.github/scripts/.helm-tests/lifecycle-only/result.yaml index 4f421bcf53..123c9432a2 100644 --- a/.github/scripts/.helm-tests/lifecycle-only/result.yaml +++ b/.github/scripts/.helm-tests/lifecycle-only/result.yaml @@ -1996,20 +1996,20 @@ spec: description: CloudEventsEndpoint can be used to set the endpoint where Cloud Events should be posted by the lifecycle operator type: string - deploymentTimeout: - default: 5m - description: |- - DeploymentTimeout specifies the maximum time to wait for the deployment to be in Running state. - 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 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 diff --git a/.github/scripts/.helm-tests/lifecycle-with-certs/result.yaml b/.github/scripts/.helm-tests/lifecycle-with-certs/result.yaml index 50ca26d10d..8548c39e6f 100644 --- a/.github/scripts/.helm-tests/lifecycle-with-certs/result.yaml +++ b/.github/scripts/.helm-tests/lifecycle-with-certs/result.yaml @@ -2025,20 +2025,20 @@ spec: description: CloudEventsEndpoint can be used to set the endpoint where Cloud Events should be posted by the lifecycle operator type: string - deploymentTimeout: - default: 5m - description: |- - DeploymentTimeout specifies the maximum time to wait for the deployment to be in Running state. - 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 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 diff --git a/docs/docs/reference/api-reference/options/v1alpha1/index.md b/docs/docs/reference/api-reference/options/v1alpha1/index.md index 975cfdd677..b637780174 100644 --- a/docs/docs/reference/api-reference/options/v1alpha1/index.md +++ b/docs/docs/reference/api-reference/options/v1alpha1/index.md @@ -67,6 +67,6 @@ _Appears in:_ | `keptnAppCreationRequestTimeoutSeconds` _integer_ | KeptnAppCreationRequestTimeoutSeconds is used to set the interval in which automatic app discovery searches for workload to put into the same auto-generated KeptnApp |30| ✓ | | `cloudEventsEndpoint` _string_ | CloudEventsEndpoint can be used to set the endpoint where Cloud Events should be posted by the lifecycle operator || ✓ | | `blockDeployment` _boolean_ | BlockDeployment is used to block the deployment of the application until the pre-deployment tasks and evaluations succeed |true| ✓ | -| `deploymentTimeout` _[Duration](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#duration-v1-meta)_ | DeploymentTimeout specifies the maximum time to wait for the deployment to be in Running state. If the workload does not deploy successfully within this time frame, it will be considered as failed. |5m| ✓ | +| `observabilityTimeout` _[Duration](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.28/#duration-v1-meta)_ | 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. |5m| ✓ | diff --git a/docs/docs/reference/crd-reference/config.md b/docs/docs/reference/crd-reference/config.md index c088e2530b..1fd82dc7ba 100644 --- a/docs/docs/reference/crd-reference/config.md +++ b/docs/docs/reference/crd-reference/config.md @@ -18,6 +18,7 @@ spec: keptnAppCreationRequestTimeoutSeconds: <#-seconds> cloudEventsEndpoint: blockDeployment: true | false + observabilityTimeout: ``` ## Fields @@ -48,6 +49,13 @@ spec: even if the pre-deployment tasks and/or evaluations fail. For more information see the [non-blocking deployment section](../../components/lifecycle-operator/keptn-non-blocking.md). + * **observabilityTimeout** -- specifies the maximum time + to observe the deployment phase of + [KeptnWorkload](../api-reference/lifecycle/v1beta1/index.md). + The value supplied should specify the unit of measurement; + for example, `5m` indicates 5 minutes and `1h` indicates 1 hour. + If the workload is not deployed successfully within this time frame, + it is considered to be failed. ## Usage @@ -73,6 +81,7 @@ spec: keptnAppCreationRequestTimeoutSeconds: 40 cloudEventsEndpoint: 'http://endpoint.com' blockDeployment: false + observabilityTimeout: 10m ``` ## Files diff --git a/lifecycle-operator/apis/options/v1alpha1/keptnconfig_types.go b/lifecycle-operator/apis/options/v1alpha1/keptnconfig_types.go index 10e85d9735..7c64ef4542 100644 --- a/lifecycle-operator/apis/options/v1alpha1/keptnconfig_types.go +++ b/lifecycle-operator/apis/options/v1alpha1/keptnconfig_types.go @@ -48,14 +48,14 @@ type KeptnConfigSpec struct { // +optional BlockDeployment bool `json:"blockDeployment,omitempty"` - // DeploymentTimeout specifies the maximum time to wait for the deployment to be in Running state. + // 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. // +kubebuilder:default:="5m" // +kubebuilder:validation:Pattern="^0|([0-9]+(\\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$" // +kubebuilder:validation:Type:=string // +optional - DeploymentTimeout metav1.Duration `json:"deploymentTimeout,omitempty"` + ObservabilityTimeout metav1.Duration `json:"observabilityTimeout,omitempty"` } // +kubebuilder:object:root=true diff --git a/lifecycle-operator/apis/options/v1alpha1/zz_generated.deepcopy.go b/lifecycle-operator/apis/options/v1alpha1/zz_generated.deepcopy.go index 05dafb21b0..4b042c7fc1 100644 --- a/lifecycle-operator/apis/options/v1alpha1/zz_generated.deepcopy.go +++ b/lifecycle-operator/apis/options/v1alpha1/zz_generated.deepcopy.go @@ -85,7 +85,7 @@ func (in *KeptnConfigList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *KeptnConfigSpec) DeepCopyInto(out *KeptnConfigSpec) { *out = *in - out.DeploymentTimeout = in.DeploymentTimeout + out.ObservabilityTimeout = in.ObservabilityTimeout } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeptnConfigSpec. diff --git a/lifecycle-operator/chart/templates/keptnconfig-crd.yaml b/lifecycle-operator/chart/templates/keptnconfig-crd.yaml index 6b46284638..1978a0b7a6 100644 --- a/lifecycle-operator/chart/templates/keptnconfig-crd.yaml +++ b/lifecycle-operator/chart/templates/keptnconfig-crd.yaml @@ -61,20 +61,20 @@ spec: description: CloudEventsEndpoint can be used to set the endpoint where Cloud Events should be posted by the lifecycle operator type: string - deploymentTimeout: - default: 5m - description: |- - DeploymentTimeout specifies the maximum time to wait for the deployment to be in Running state. - 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 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 diff --git a/lifecycle-operator/config/crd/bases/options.keptn.sh_keptnconfigs.yaml b/lifecycle-operator/config/crd/bases/options.keptn.sh_keptnconfigs.yaml index 569e5123c9..69a19b549a 100644 --- a/lifecycle-operator/config/crd/bases/options.keptn.sh_keptnconfigs.yaml +++ b/lifecycle-operator/config/crd/bases/options.keptn.sh_keptnconfigs.yaml @@ -53,20 +53,20 @@ spec: description: CloudEventsEndpoint can be used to set the endpoint where Cloud Events should be posted by the lifecycle operator type: string - deploymentTimeout: - default: 5m - description: |- - DeploymentTimeout specifies the maximum time to wait for the deployment to be in Running state. - 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 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 diff --git a/lifecycle-operator/config/samples/options_v1alpha1_keptnconfig.yaml b/lifecycle-operator/config/samples/options_v1alpha1_keptnconfig.yaml index 95f1e9dac6..440c7740f5 100644 --- a/lifecycle-operator/config/samples/options_v1alpha1_keptnconfig.yaml +++ b/lifecycle-operator/config/samples/options_v1alpha1_keptnconfig.yaml @@ -12,3 +12,5 @@ metadata: spec: OTelCollectorUrl: 'otel-collector:4317' keptnAppCreationRequestTimeoutSeconds: 30 + blockDeployment: true + observabilityTimeout: 5m