From ddf6d1ae6fa117801f68a1577e452aed884e356a Mon Sep 17 00:00:00 2001 From: Rakesh Garimella Date: Mon, 5 Aug 2024 12:47:49 +0200 Subject: [PATCH 1/3] fix: Add a new reason for the pipelines --- docs/user/resources/02-logpipeline.md | 6 +++--- docs/user/resources/04-tracepipeline.md | 6 +++--- docs/user/resources/05-metricpipeline.md | 12 ++++++------ internal/conditions/conditions.go | 1 + internal/reconciler/commonstatus/checker.go | 4 ++-- internal/reconciler/commonstatus/checker_test.go | 8 ++++---- internal/reconciler/logpipeline/reconciler_test.go | 3 +-- .../reconciler/metricpipeline/reconciler_test.go | 4 ++-- internal/reconciler/tracepipeline/reconciler_test.go | 2 +- 9 files changed, 23 insertions(+), 23 deletions(-) diff --git a/docs/user/resources/02-logpipeline.md b/docs/user/resources/02-logpipeline.md index 90c3f3c47..660bd66b8 100644 --- a/docs/user/resources/02-logpipeline.md +++ b/docs/user/resources/02-logpipeline.md @@ -189,12 +189,12 @@ The status of the LogPipeline is determined by the condition types `AgentHealthy | Condition Type | Condition Status | Condition Reason | Condition Message | |------------------------|------------------|-----------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | AgentHealthy | True | AgentReady | Fluent Bit agent DaemonSet is ready | -| AgentHealthy | True | AgentReady | Pods are being started/updated | +| AgentHealthy | True | RolloutInProgress | Pods are being started/updated | | AgentHealthy | False | AgentNotReady | No Pods deployed | | AgentHealthy | False | AgentNotReady | DaemonSet is not yet created | | AgentHealthy | False | AgentNotReady | Failed to get DaemonSet | -| AgentHealthy | False | AgentNotReady | Pod is in the pending state as container: `container name` is not running due to: `reason` | -| AgentHealthy | False | AgentNotReady | Pod is in the failed state due to: `reason` | +| AgentHealthy | False | AgentNotReady | Pod is in the pending state as container: `container name` is not running due to: `reason` | +| AgentHealthy | False | AgentNotReady | Pod is in the failed state due to: `reason` | | ConfigurationGenerated | True | AgentConfigured | LogPipeline specification is successfully applied to the configuration of Fluent Bit agent | | ConfigurationGenerated | True | TLSCertificateAboutToExpire | TLS (CA) certificate is about to expire, configured certificate is valid until YYYY-MM-DD | | ConfigurationGenerated | False | ReferencedSecretMissing | One or more referenced Secrets are missing: Secret 'my-secret' of Namespace 'my-namespace' | diff --git a/docs/user/resources/04-tracepipeline.md b/docs/user/resources/04-tracepipeline.md index d297a6f2b..e6b10d585 100644 --- a/docs/user/resources/04-tracepipeline.md +++ b/docs/user/resources/04-tracepipeline.md @@ -136,13 +136,13 @@ The status of the TracePipeline is determined by the condition types `GatewayHea | Condition Type | Condition Status | Condition Reason | Condition Message | |------------------------|------------------|-----------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | GatewayHealthy | True | GatewayReady | Trace gateway Deployment is ready | -| GatewayHealthy | True | GatewayReady | Pods are being started/updated | +| GatewayHealthy | True | RolloutInProgress | Pods are being started/updated | | GatewayHealthy | False | GatewayNotReady | No Pods deployed | | GatewayHealthy | False | GatewayNotReady | Failed to list ReplicaSets: `reason` | | GatewayHealthy | False | GatewayNotReady | Failed to fetch ReplicaSets: `reason` | | GatewayHealthy | False | GatewayNotReady | Pod is not scheduled: `reason` | -| GatewayHealthy | False | GatewayNotReady | Pod is in the pending state as container: `container name` is not running due to: `reason` | -| GatewayHealthy | False | GatewayNotReady | Pod is in the failed state due to: `reason` | +| GatewayHealthy | False | GatewayNotReady | Pod is in the pending state as container: `container name` is not running due to: `reason` | +| GatewayHealthy | False | GatewayNotReady | Pod is in the failed state due to: `reason` | | GatewayHealthy | False | GatewayNotReady | Deployment is not yet created | | GatewayHealthy | False | GatewayNotReady | Failed to get Deployment | | GatewayHealthy | False | GatewayNotReady | Failed to get latest ReplicaSets | diff --git a/docs/user/resources/05-metricpipeline.md b/docs/user/resources/05-metricpipeline.md index cdbf0213b..fba5465e4 100644 --- a/docs/user/resources/05-metricpipeline.md +++ b/docs/user/resources/05-metricpipeline.md @@ -179,24 +179,24 @@ The status of the MetricPipeline is determined by the condition types `GatewayHe | Condition Type | Condition Status | Condition Reason | Condition Message | |------------------------|------------------|-----------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | GatewayHealthy | True | GatewayReady | Metric gateway Deployment is ready | -| GatewayHealthy | True | GatewayReady | Pods are being started/updated | +| GatewayHealthy | True | RolloutInProgress | Pods are being started/updated | | GatewayHealthy | False | GatewayNotReady | No Pods deployed | | GatewayHealthy | False | GatewayNotReady | Failed to list ReplicaSets: `reason` | | GatewayHealthy | False | GatewayNotReady | Failed to fetch ReplicaSets: `reason` | | GatewayHealthy | False | GatewayNotReady | Pod is not scheduled: `reason` | -| GatewayHealthy | False | GatewayNotReady | Pod is in the pending state as container: `container name` is not running due to: `reason` | -| GatewayHealthy | False | GatewayNotReady | Pod is in the failed state due to: `reason` | +| GatewayHealthy | False | GatewayNotReady | Pod is in the pending state as container: `container name` is not running due to: `reason` | +| GatewayHealthy | False | GatewayNotReady | Pod is in the failed state due to: `reason` | | GatewayHealthy | False | GatewayNotReady | Deployment is not yet created | | GatewayHealthy | False | GatewayNotReady | Failed to get Deployment | | GatewayHealthy | False | GatewayNotReady | Failed to get latest ReplicaSets | | AgentHealthy | True | AgentNotRequired | | | AgentHealthy | True | AgentReady | Metric agent DaemonSet is ready | -| AgentHealthy | True | AgentReady | Pods are being started/updated | +| AgentHealthy | True | RolloutInProgress | Pods are being started/updated | | AgentHealthy | False | AgentNotReady | No Pods deployed | | AgentHealthy | False | AgentNotReady | DaemonSet is not yet created | | AgentHealthy | False | AgentNotReady | Failed to get DaemonSet | -| AgentHealthy | False | AgentNotReady | Pod is in the pending state as container: `container name` is not running due to: `reason` | -| AgentHealthy | False | AgentNotReady | Pod is in the failed state due to: `reason` | +| AgentHealthy | False | AgentNotReady | Pod is in the pending state as container: `container name` is not running due to: `reason` | +| AgentHealthy | False | AgentNotReady | Pod is in the failed state due to: `reason` | | ConfigurationGenerated | True | AgentGatewayConfigured | MetricPipeline specification is successfully applied to the configuration of Metric gateway | | ConfigurationGenerated | True | TLSCertificateAboutToExpire | TLS (CA) certificate is about to expire, configured certificate is valid until YYYY-MM-DD | | ConfigurationGenerated | False | MaxPipelinesExceeded | Maximum pipeline count limit exceeded | diff --git a/internal/conditions/conditions.go b/internal/conditions/conditions.go index 491526057..666c99b6c 100644 --- a/internal/conditions/conditions.go +++ b/internal/conditions/conditions.go @@ -32,6 +32,7 @@ const ( ReasonTLSConfigurationInvalid = "TLSConfigurationInvalid" ReasonGatewayConfigured = "GatewayConfigured" ReasonValidationFailed = "ValidationFailed" + ReasonRolloutInProgress = "RolloutInProgress" // Telemetry reasons ReasonComponentsRunning = "ComponentsRunning" diff --git a/internal/reconciler/commonstatus/checker.go b/internal/reconciler/commonstatus/checker.go index 1e20f20f3..15355fbbf 100644 --- a/internal/reconciler/commonstatus/checker.go +++ b/internal/reconciler/commonstatus/checker.go @@ -49,7 +49,7 @@ func GetGatewayHealthyCondition(ctx context.Context, prober DeploymentProber, na if workloadstatus.IsRolloutInProgressError(err) { status = metav1.ConditionTrue - reason = conditions.ReasonGatewayReady + reason = conditions.ReasonRolloutInProgress msg = errToMsgCon.Convert(err) } @@ -80,7 +80,7 @@ func GetAgentHealthyCondition(ctx context.Context, prober DaemonSetProber, names } if workloadstatus.IsRolloutInProgressError(err) { status = metav1.ConditionTrue - reason = conditions.ReasonAgentReady + reason = conditions.ReasonRolloutInProgress msg = errToMsgCon.Convert(err) } diff --git a/internal/reconciler/commonstatus/checker_test.go b/internal/reconciler/commonstatus/checker_test.go index 969ed747e..c1f1d56d2 100644 --- a/internal/reconciler/commonstatus/checker_test.go +++ b/internal/reconciler/commonstatus/checker_test.go @@ -48,7 +48,7 @@ func TestTracesGetHealthCondition(t *testing.T) { expectedCondition: &metav1.Condition{ Type: conditions.TypeGatewayHealthy, Status: metav1.ConditionTrue, - Reason: conditions.ReasonGatewayReady, + Reason: conditions.ReasonRolloutInProgress, Message: "Pods are being started/updated", }, }, @@ -122,13 +122,13 @@ func TestMetricsGetHealthCondition(t *testing.T) { expectedGatewayCondition: &metav1.Condition{ Type: conditions.TypeGatewayHealthy, Status: metav1.ConditionTrue, - Reason: conditions.ReasonGatewayReady, + Reason: conditions.ReasonRolloutInProgress, Message: "Pods are being started/updated", }, expectedAgentCondition: &metav1.Condition{ Type: conditions.TypeAgentHealthy, Status: metav1.ConditionTrue, - Reason: conditions.ReasonAgentReady, + Reason: conditions.ReasonRolloutInProgress, Message: "Pods are being started/updated", }, }, @@ -199,7 +199,7 @@ func TestLogsGetHealthCondition(t *testing.T) { expectedCondition: &metav1.Condition{ Type: conditions.TypeAgentHealthy, Status: metav1.ConditionTrue, - Reason: conditions.ReasonAgentReady, + Reason: conditions.ReasonRolloutInProgress, Message: "Pods are being started/updated", }, }, diff --git a/internal/reconciler/logpipeline/reconciler_test.go b/internal/reconciler/logpipeline/reconciler_test.go index 25e6074e0..6e24de029 100644 --- a/internal/reconciler/logpipeline/reconciler_test.go +++ b/internal/reconciler/logpipeline/reconciler_test.go @@ -669,7 +669,7 @@ func TestReconcile(t *testing.T) { name: "fluent bit rollout in progress", probeErr: &workloadstatus.RolloutInProgressError{}, expectedStatus: metav1.ConditionTrue, - expectedReason: conditions.ReasonAgentReady, + expectedReason: conditions.ReasonRolloutInProgress, expectedMessage: "Pods are being started/updated", }, } @@ -687,7 +687,6 @@ func TestReconcile(t *testing.T) { pipelineValidatorWithStubs := &Validator{TLSCertValidator: stubs.NewTLSCertValidator(nil), SecretRefValidator: stubs.NewSecretRefValidator(nil)} errToMsgStub := &conditions.ErrorToMessageConverter{} - //errToMsgStub.On("Convert", mock.Anything).Return("") sut := New(fakeClient, testConfig, agentProberStub, flowHealthProberStub, istioStatusCheckerStub, overridesHandlerStub, pipelineValidatorWithStubs, errToMsgStub) _, err := sut.Reconcile(context.Background(), ctrl.Request{NamespacedName: types.NamespacedName{Name: pipeline.Name}}) diff --git a/internal/reconciler/metricpipeline/reconciler_test.go b/internal/reconciler/metricpipeline/reconciler_test.go index 9257b55e2..19f2e02a4 100644 --- a/internal/reconciler/metricpipeline/reconciler_test.go +++ b/internal/reconciler/metricpipeline/reconciler_test.go @@ -1219,7 +1219,7 @@ func TestReconcile(t *testing.T) { { name: "Agent Rollout in progress", expectedStatus: metav1.ConditionTrue, - expectedReason: conditions.ReasonAgentReady, + expectedReason: conditions.ReasonRolloutInProgress, probeAgentErr: &workloadstatus.RolloutInProgressError{}, probeGatewayErr: nil, expectedMessage: "Pods are being started/updated", @@ -1227,7 +1227,7 @@ func TestReconcile(t *testing.T) { { name: "Gateway Rollout in progress", expectedStatus: metav1.ConditionTrue, - expectedReason: conditions.ReasonGatewayReady, + expectedReason: conditions.ReasonRolloutInProgress, probeAgentErr: nil, probeGatewayErr: &workloadstatus.RolloutInProgressError{}, expectedMessage: "Pods are being started/updated", diff --git a/internal/reconciler/tracepipeline/reconciler_test.go b/internal/reconciler/tracepipeline/reconciler_test.go index 3ac0a0827..69f15250a 100644 --- a/internal/reconciler/tracepipeline/reconciler_test.go +++ b/internal/reconciler/tracepipeline/reconciler_test.go @@ -943,7 +943,7 @@ func TestReconcile(t *testing.T) { name: "rollout in progress", probeGatewayErr: &workloadstatus.RolloutInProgressError{}, expectedStatus: metav1.ConditionTrue, - expectedReason: conditions.ReasonGatewayReady, + expectedReason: conditions.ReasonRolloutInProgress, expectedMessage: "Pods are being started/updated", }, } From 49bc37258393e05fd24d6b74eb139fdbe93743df Mon Sep 17 00:00:00 2001 From: Rakesh Garimella Date: Tue, 6 Aug 2024 09:08:23 +0200 Subject: [PATCH 2/3] Apply suggestions from code review Co-authored-by: Nina Hingerl <76950046+NHingerl@users.noreply.github.com> --- docs/user/resources/02-logpipeline.md | 2 +- docs/user/resources/04-tracepipeline.md | 2 +- docs/user/resources/05-metricpipeline.md | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/user/resources/02-logpipeline.md b/docs/user/resources/02-logpipeline.md index 660bd66b8..289f78aa1 100644 --- a/docs/user/resources/02-logpipeline.md +++ b/docs/user/resources/02-logpipeline.md @@ -193,7 +193,7 @@ The status of the LogPipeline is determined by the condition types `AgentHealthy | AgentHealthy | False | AgentNotReady | No Pods deployed | | AgentHealthy | False | AgentNotReady | DaemonSet is not yet created | | AgentHealthy | False | AgentNotReady | Failed to get DaemonSet | -| AgentHealthy | False | AgentNotReady | Pod is in the pending state as container: `container name` is not running due to: `reason` | +| AgentHealthy | False | AgentNotReady | Pod is in the pending state because container: `container name` is not running due to: `reason` | | AgentHealthy | False | AgentNotReady | Pod is in the failed state due to: `reason` | | ConfigurationGenerated | True | AgentConfigured | LogPipeline specification is successfully applied to the configuration of Fluent Bit agent | | ConfigurationGenerated | True | TLSCertificateAboutToExpire | TLS (CA) certificate is about to expire, configured certificate is valid until YYYY-MM-DD | diff --git a/docs/user/resources/04-tracepipeline.md b/docs/user/resources/04-tracepipeline.md index e6b10d585..48e7def0a 100644 --- a/docs/user/resources/04-tracepipeline.md +++ b/docs/user/resources/04-tracepipeline.md @@ -141,7 +141,7 @@ The status of the TracePipeline is determined by the condition types `GatewayHea | GatewayHealthy | False | GatewayNotReady | Failed to list ReplicaSets: `reason` | | GatewayHealthy | False | GatewayNotReady | Failed to fetch ReplicaSets: `reason` | | GatewayHealthy | False | GatewayNotReady | Pod is not scheduled: `reason` | -| GatewayHealthy | False | GatewayNotReady | Pod is in the pending state as container: `container name` is not running due to: `reason` | +| GatewayHealthy | False | GatewayNotReady | Pod is in the pending state because container: `container name` is not running due to: `reason` | | GatewayHealthy | False | GatewayNotReady | Pod is in the failed state due to: `reason` | | GatewayHealthy | False | GatewayNotReady | Deployment is not yet created | | GatewayHealthy | False | GatewayNotReady | Failed to get Deployment | diff --git a/docs/user/resources/05-metricpipeline.md b/docs/user/resources/05-metricpipeline.md index fba5465e4..cfd0a8175 100644 --- a/docs/user/resources/05-metricpipeline.md +++ b/docs/user/resources/05-metricpipeline.md @@ -184,7 +184,7 @@ The status of the MetricPipeline is determined by the condition types `GatewayHe | GatewayHealthy | False | GatewayNotReady | Failed to list ReplicaSets: `reason` | | GatewayHealthy | False | GatewayNotReady | Failed to fetch ReplicaSets: `reason` | | GatewayHealthy | False | GatewayNotReady | Pod is not scheduled: `reason` | -| GatewayHealthy | False | GatewayNotReady | Pod is in the pending state as container: `container name` is not running due to: `reason` | +| GatewayHealthy | False | GatewayNotReady | Pod is in the pending state because container: `container name` is not running due to: `reason` | | GatewayHealthy | False | GatewayNotReady | Pod is in the failed state due to: `reason` | | GatewayHealthy | False | GatewayNotReady | Deployment is not yet created | | GatewayHealthy | False | GatewayNotReady | Failed to get Deployment | @@ -195,7 +195,7 @@ The status of the MetricPipeline is determined by the condition types `GatewayHe | AgentHealthy | False | AgentNotReady | No Pods deployed | | AgentHealthy | False | AgentNotReady | DaemonSet is not yet created | | AgentHealthy | False | AgentNotReady | Failed to get DaemonSet | -| AgentHealthy | False | AgentNotReady | Pod is in the pending state as container: `container name` is not running due to: `reason` | +| AgentHealthy | False | AgentNotReady | Pod is in the pending state because container: `container name` is not running due to: `reason` | | AgentHealthy | False | AgentNotReady | Pod is in the failed state due to: `reason` | | ConfigurationGenerated | True | AgentGatewayConfigured | MetricPipeline specification is successfully applied to the configuration of Metric gateway | | ConfigurationGenerated | True | TLSCertificateAboutToExpire | TLS (CA) certificate is about to expire, configured certificate is valid until YYYY-MM-DD | From 0556d374fe970f1d6b5b560c226e60955743b4c4 Mon Sep 17 00:00:00 2001 From: Rakesh Garimella Date: Tue, 6 Aug 2024 09:24:21 +0200 Subject: [PATCH 3/3] fixes based on review comments --- internal/conditions/conditions.go | 2 +- internal/conditions/error_to_message_test.go | 4 ++-- internal/reconciler/commonstatus/checker_test.go | 4 ++-- internal/reconciler/logparser/status_test.go | 2 +- internal/reconciler/logpipeline/reconciler_test.go | 4 ++-- .../reconciler/metricpipeline/reconciler_test.go | 12 ++++++------ internal/reconciler/tracepipeline/reconciler_test.go | 6 +++--- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/internal/conditions/conditions.go b/internal/conditions/conditions.go index 666c99b6c..fb5cc79e2 100644 --- a/internal/conditions/conditions.go +++ b/internal/conditions/conditions.go @@ -51,7 +51,7 @@ const ( // Error messages const ( podIsNotScheduled = "Pod is not scheduled: %s" - podIsPending = "Pod is in the pending state as container: %s is not running due to: %s" + podIsPending = "Pod is in the pending state because container: %s is not running due to: %s" podIsFailed = "Pod is in the failed state due to: %s" podRolloutInProgress = "Pods are being started/updated" ) diff --git a/internal/conditions/error_to_message_test.go b/internal/conditions/error_to_message_test.go index aaa4b1b5e..c87bafbe5 100644 --- a/internal/conditions/error_to_message_test.go +++ b/internal/conditions/error_to_message_test.go @@ -22,12 +22,12 @@ func TestErrorConverter(t *testing.T) { { name: "PodIsPendingError Without Reason", err: &workloadstatus.PodIsPendingError{ContainerName: "fluent-bit", Message: "Error"}, - want: "Pod is in the pending state as container: fluent-bit is not running due to: Error", + want: "Pod is in the pending state because container: fluent-bit is not running due to: Error", }, { name: "PodIsPendingError With Reason", err: &workloadstatus.PodIsPendingError{ContainerName: "fluent-bit", Reason: "CrashLoopBackOff"}, - want: "Pod is in the pending state as container: fluent-bit is not running due to: CrashLoopBackOff", + want: "Pod is in the pending state because container: fluent-bit is not running due to: CrashLoopBackOff", }, { name: "PodIsFailedError", diff --git a/internal/reconciler/commonstatus/checker_test.go b/internal/reconciler/commonstatus/checker_test.go index c1f1d56d2..24f1799a1 100644 --- a/internal/reconciler/commonstatus/checker_test.go +++ b/internal/reconciler/commonstatus/checker_test.go @@ -59,7 +59,7 @@ func TestTracesGetHealthCondition(t *testing.T) { Type: conditions.TypeGatewayHealthy, Status: metav1.ConditionFalse, Reason: conditions.ReasonGatewayNotReady, - Message: "Pod is in the pending state as container: foo is not running due to: foo", + Message: "Pod is in the pending state because container: foo is not running due to: foo", }, }, } @@ -140,7 +140,7 @@ func TestMetricsGetHealthCondition(t *testing.T) { Type: conditions.TypeGatewayHealthy, Status: metav1.ConditionFalse, Reason: conditions.ReasonGatewayNotReady, - Message: "Pod is in the pending state as container: foo is not running due to: fooMessage", + Message: "Pod is in the pending state because container: foo is not running due to: fooMessage", }, expectedAgentCondition: &metav1.Condition{ Type: conditions.TypeAgentHealthy, diff --git a/internal/reconciler/logparser/status_test.go b/internal/reconciler/logparser/status_test.go index 911b21f6f..9ab0bba46 100644 --- a/internal/reconciler/logparser/status_test.go +++ b/internal/reconciler/logparser/status_test.go @@ -59,7 +59,7 @@ func TestUpdateStatus(t *testing.T) { require.NotNil(t, agentHealthyCond, "could not find condition of type %s", conditions.TypeAgentHealthy) require.Equal(t, metav1.ConditionFalse, agentHealthyCond.Status) require.Equal(t, conditions.ReasonAgentNotReady, agentHealthyCond.Reason) - require.Equal(t, "Pod is in the pending state as container: foo is not running due to: OOMKilled", agentHealthyCond.Message) + require.Equal(t, "Pod is in the pending state because container: foo is not running due to: OOMKilled", agentHealthyCond.Message) require.Equal(t, updatedParser.Generation, agentHealthyCond.ObservedGeneration) require.NotEmpty(t, agentHealthyCond.LastTransitionTime) }) diff --git a/internal/reconciler/logpipeline/reconciler_test.go b/internal/reconciler/logpipeline/reconciler_test.go index 6e24de029..35170eb3e 100644 --- a/internal/reconciler/logpipeline/reconciler_test.go +++ b/internal/reconciler/logpipeline/reconciler_test.go @@ -649,14 +649,14 @@ func TestReconcile(t *testing.T) { probeErr: &workloadstatus.PodIsPendingError{ContainerName: "foo", Reason: "OOMKilled", Message: ""}, expectedStatus: metav1.ConditionFalse, expectedReason: conditions.ReasonAgentNotReady, - expectedMessage: "Pod is in the pending state as container: foo is not running due to: OOMKilled", + expectedMessage: "Pod is in the pending state because container: foo is not running due to: OOMKilled", }, { name: "pod is CrashLoop", probeErr: &workloadstatus.PodIsPendingError{ContainerName: "foo", Message: "Error"}, expectedStatus: metav1.ConditionFalse, expectedReason: conditions.ReasonAgentNotReady, - expectedMessage: "Pod is in the pending state as container: foo is not running due to: Error", + expectedMessage: "Pod is in the pending state because container: foo is not running due to: Error", }, { name: "no Pods deployed", diff --git a/internal/reconciler/metricpipeline/reconciler_test.go b/internal/reconciler/metricpipeline/reconciler_test.go index 19f2e02a4..74bc7f70f 100644 --- a/internal/reconciler/metricpipeline/reconciler_test.go +++ b/internal/reconciler/metricpipeline/reconciler_test.go @@ -123,7 +123,7 @@ func TestReconcile(t *testing.T) { conditions.TypeGatewayHealthy, metav1.ConditionFalse, conditions.ReasonGatewayNotReady, - "Pod is in the pending state as container: foo is not running due to: Error") + "Pod is in the pending state because container: foo is not running due to: Error") gatewayConfigBuilderMock.AssertExpectations(t) }) @@ -308,7 +308,7 @@ func TestReconcile(t *testing.T) { conditions.TypeAgentHealthy, metav1.ConditionFalse, conditions.ReasonAgentNotReady, - "Pod is in the pending state as container: is not running due to: Error") + "Pod is in the pending state because container: is not running due to: Error") agentConfigBuilderMock.AssertExpectations(t) gatewayConfigBuilderMock.AssertExpectations(t) @@ -1182,7 +1182,7 @@ func TestReconcile(t *testing.T) { probeGatewayErr: nil, expectedStatus: metav1.ConditionFalse, expectedReason: conditions.ReasonAgentNotReady, - expectedMessage: "Pod is in the pending state as container: foo is not running due to: OOMKilled", + expectedMessage: "Pod is in the pending state because container: foo is not running due to: OOMKilled", }, { name: "pod is CrashLoop", @@ -1190,7 +1190,7 @@ func TestReconcile(t *testing.T) { probeGatewayErr: nil, expectedStatus: metav1.ConditionFalse, expectedReason: conditions.ReasonAgentNotReady, - expectedMessage: "Pod is in the pending state as container: foo is not running due to: Error", + expectedMessage: "Pod is in the pending state because container: foo is not running due to: Error", }, { name: "no Pods deployed", @@ -1206,7 +1206,7 @@ func TestReconcile(t *testing.T) { probeGatewayErr: &workloadstatus.PodIsPendingError{ContainerName: "foo", Message: "Error"}, expectedStatus: metav1.ConditionFalse, expectedReason: conditions.ReasonGatewayNotReady, - expectedMessage: "Pod is in the pending state as container: foo is not running due to: Error", + expectedMessage: "Pod is in the pending state because container: foo is not running due to: Error", }, { name: "Container is not ready", @@ -1214,7 +1214,7 @@ func TestReconcile(t *testing.T) { expectedReason: conditions.ReasonGatewayNotReady, probeAgentErr: nil, probeGatewayErr: &workloadstatus.PodIsPendingError{ContainerName: "foo", Reason: "OOMKilled"}, - expectedMessage: "Pod is in the pending state as container: foo is not running due to: OOMKilled", + expectedMessage: "Pod is in the pending state because container: foo is not running due to: OOMKilled", }, { name: "Agent Rollout in progress", diff --git a/internal/reconciler/tracepipeline/reconciler_test.go b/internal/reconciler/tracepipeline/reconciler_test.go index 69f15250a..4013aa111 100644 --- a/internal/reconciler/tracepipeline/reconciler_test.go +++ b/internal/reconciler/tracepipeline/reconciler_test.go @@ -166,7 +166,7 @@ func TestReconcile(t *testing.T) { conditions.TypeGatewayHealthy, metav1.ConditionFalse, conditions.ReasonGatewayNotReady, - "Pod is in the pending state as container: foo is not running due to: Error", + "Pod is in the pending state because container: foo is not running due to: Error", ) gatewayConfigBuilderMock.AssertExpectations(t) @@ -916,14 +916,14 @@ func TestReconcile(t *testing.T) { probeGatewayErr: &workloadstatus.PodIsPendingError{ContainerName: "foo", Reason: "OOMKilled"}, expectedStatus: metav1.ConditionFalse, expectedReason: conditions.ReasonGatewayNotReady, - expectedMessage: "Pod is in the pending state as container: foo is not running due to: OOMKilled", + expectedMessage: "Pod is in the pending state because container: foo is not running due to: OOMKilled", }, { name: "pod is craashbackloop", probeGatewayErr: &workloadstatus.PodIsPendingError{ContainerName: "foo", Message: "Error"}, expectedStatus: metav1.ConditionFalse, expectedReason: conditions.ReasonGatewayNotReady, - expectedMessage: "Pod is in the pending state as container: foo is not running due to: Error", + expectedMessage: "Pod is in the pending state because container: foo is not running due to: Error", }, { name: "no Pods deployed",