Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Remove legacy Running and Pending conditions #1214

Merged
merged 8 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .testcoverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ override:
path: ^internal/istiostatus$
- threshold: 86
path: ^internal/otelcollector/config/otlpexporter$
- threshold: 74
- threshold: 73
path: ^internal/reconciler/logpipeline$
- threshold: 77
path: ^internal/reconciler/metricpipeline$
- threshold: 60
path: ^internal/reconciler/telemetry$
- threshold: 76
- threshold: 74
path: ^internal/reconciler/tracepipeline$
- threshold: 82
path: ^internal/resources/otelcollector$
Expand Down
4 changes: 2 additions & 2 deletions config/busola/logpipeline_busola_extension_cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ data:
critical:
- 'true'
body:
- source: $filter(status.conditions, function ($v) { $v.type != "Pending" and $v.type != "Running" })
- source: status.conditions
widget: Table
name: Reconciliation Conditions
children:
Expand Down Expand Up @@ -434,7 +434,7 @@ data:
critical:
- 'true'
- name: Status
source: $filter(status.conditions, function ($v) { $v.type != "Pending" and $v.type != "Running" })
source: status.conditions
widget: Columns
children:
- name: Type
Expand Down
4 changes: 2 additions & 2 deletions config/busola/tracepipeline_busola_extension_cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ data:
isSelected: true
widget: Text
body:
- source: $filter(status.conditions, function ($v) { $v.type != "Pending" and $v.type != "Running" })
- source: status.conditions
widget: Table
name: Reconciliation Conditions
children:
Expand Down Expand Up @@ -369,7 +369,7 @@ data:
isSelected: true
widget: Text
- name: Status
source: $filter(status.conditions, function ($v) { $v.type != "Pending" and $v.type != "Running" })
source: status.conditions
widget: Columns
children:
- name: Type
Expand Down
14 changes: 0 additions & 14 deletions docs/user/resources/02-logpipeline.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,6 @@ status:
reason: ConfigurationGenerated
status: "True"
type: ConfigurationGenerated
- lastTransitionTime: "2024-02-28T22:48:24Z"
message: '[NOTE: The "Pending" type is deprecated] Fluent Bit DaemonSet is not ready'
observedGeneration: 2
reason: FluentBitDaemonSetNotReady
status: "False"
type: Pending
- lastTransitionTime: "2024-02-28T22:48:24Z"
message: '[NOTE: The "Running" type is deprecated] Fluent Bit DaemonSet is ready'
observedGeneration: 2
reason: FluentBitDaemonSetReady
status: "True"
type: Running
```

For further examples, see the [samples](https://github.com/kyma-project/telemetry-manager/tree/main/config/samples) directory.
Expand Down Expand Up @@ -197,8 +185,6 @@ For details, see the [LogPipeline specification file](https://github.com/kyma-pr

The status of the LogPipeline is determined by the condition types `AgentHealthy`, `ConfigurationGenerated`, and `TelemetryFlowHealthy`:

> **NOTE:** The condition types `Running` and `Pending` are deprecated and will be removed soon from the status conditions.

| Condition Type | Condition Status | Condition Reason | Condition Message |
|------------------------|------------------|-----------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| AgentHealthy | True | AgentReady | Fluent Bit agent DaemonSet is ready |
Expand Down
15 changes: 0 additions & 15 deletions docs/user/resources/03-logparser.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,6 @@ status:
reason: DaemonSetReady
status: "True"
type: AgentHealthy
- lastTransitionTime: "2024-02-29T01:27:08Z"
message: '[NOTE: The "Pending" type is deprecated] Fluent Bit DaemonSet is not
ready'
observedGeneration: 1
reason: FluentBitDaemonSetNotReady
status: "False"
type: Pending
- lastTransitionTime: "2024-02-29T01:27:08Z"
message: '[NOTE: The "Running" type is deprecated] Fluent Bit DaemonSet is ready'
observedGeneration: 1
reason: FluentBitDaemonSetReady
status: "True"
type: Running
```

For further examples, see the [samples](https://github.com/kyma-project/telemetry-manager/tree/main/config/samples) directory.
Expand Down Expand Up @@ -82,8 +69,6 @@ For details, see the [LogParser specification file](https://github.com/kyma-proj

The status of the LogParser is determined by the condition type `AgentHealthy`:

> **NOTE:** The condition types `Running` and `Pending` are deprecated and will be removed soon from the status conditions.

| Condition Type | Condition Status | Condition Reason | Condition Message |
|----------------|------------------|-------------------|-----------------------------------|
| AgentHealthy | True | DaemonSetReady | Fluent Bit DaemonSet is ready |
Expand Down
14 changes: 0 additions & 14 deletions docs/user/resources/04-tracepipeline.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,6 @@ status:
reason: ConfigurationGenerated
status: "True"
type: ConfigurationGenerated
- lastTransitionTime: "2024-02-29T01:18:28Z"
message: '[NOTE: The "Pending" type is deprecated] Trace gateway Deployment is not ready'
observedGeneration: 1
reason: TraceGatewayDeploymentNotReady
status: "False"
type: Pending
- lastTransitionTime: "2024-02-29T01:18:28Z"
message: '[NOTE: The "Running" type is deprecated] Trace gateway Deployment is ready'
observedGeneration: 1
reason: TraceGatewayDeploymentReady
status: "True"
type: Running
```

For further examples, see the [samples](https://github.com/kyma-project/telemetry-manager/tree/main/config/samples) directory.
Expand Down Expand Up @@ -145,8 +133,6 @@ For details, see the [TracePipeline specification file](https://github.com/kyma-

The status of the TracePipeline is determined by the condition types `GatewayHealthy`, `ConfigurationGenerated`, and `TelemetryFlowHealthy`:

> **NOTE:** The condition types `Running` and `Pending` are deprecated and will be removed soon from the status conditions.

| Condition Type | Condition Status | Condition Reason | Condition Message |
| ---------------------- | ---------------- |-----------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| GatewayHealthy | True | GatewayReady | Trace gateway Deployment is ready |
Expand Down
40 changes: 9 additions & 31 deletions internal/conditions/conditions.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,6 @@ const (
TypeLogComponentsHealthy = "LogComponentsHealthy"
TypeMetricComponentsHealthy = "MetricComponentsHealthy"
TypeTraceComponentsHealthy = "TraceComponentsHealthy"

// NOTE: The "Running" and "Pending" types are deprecated
// Check https://github.com/kyma-project/telemetry-manager/blob/main/docs/contributor/arch/004-consolidate-pipeline-statuses.md#decision
TypeRunning = "Running"
TypePending = "Pending"
)

const (
RunningTypeDeprecationMsg = "[NOTE: The \"Running\" type is deprecated] "
PendingTypeDeprecationMsg = "[NOTE: The \"Pending\" type is deprecated] "
)

const (
Expand Down Expand Up @@ -52,14 +42,6 @@ const (

// MetricPipeline reasons
ReasonMetricAgentNotRequired = "AgentNotRequired"

// NOTE: The "FluentBitDaemonSetNotReady", "FluentBitDaemonSetReady", "TraceGatewayDeploymentNotReady" and "TraceGatewayDeploymentReady" reasons are deprecated.
// They will be removed when the "Running" and "Pending" types are removed
// Check https://github.com/kyma-project/telemetry-manager/blob/main/docs/contributor/arch/004-consolidate-pipeline-statuses.md#decision
ReasonFluentBitDSNotReady = "FluentBitDaemonSetNotReady"
ReasonFluentBitDSReady = "FluentBitDaemonSetReady"
ReasonTraceGatewayDeploymentNotReady = "TraceGatewayDeploymentNotReady"
ReasonTraceGatewayDeploymentReady = "TraceGatewayDeploymentReady"
)

var commonMessages = map[string]string{
Expand All @@ -75,8 +57,6 @@ var logPipelineMessages = map[string]string{
ReasonAgentNotReady: "Fluent Bit agent DaemonSet is not ready",
ReasonAgentReady: "Fluent Bit agent DaemonSet is ready",
ReasonComponentsRunning: "All log components are running",
ReasonFluentBitDSNotReady: "Fluent Bit DaemonSet is not ready",
ReasonFluentBitDSReady: "Fluent Bit DaemonSet is ready",
ReasonSelfMonAllDataDropped: "Backend is not reachable or rejecting logs. All logs are dropped. See troubleshooting: https://kyma-project.io/#/telemetry-manager/user/02-logs?id=no-logs-arrive-at-the-backend",
ReasonSelfMonBufferFillingUp: "Buffer nearing capacity. Incoming log rate exceeds export rate. See troubleshooting: https://kyma-project.io/#/telemetry-manager/user/02-logs?id=agent-buffer-filling-up",
ReasonSelfMonNoLogsDelivered: "Backend is not reachable or rejecting logs. Logs are buffered and not yet dropped. See troubleshooting: https://kyma-project.io/#/telemetry-manager/user/02-logs?id=no-logs-arrive-at-the-backend",
Expand All @@ -86,17 +66,15 @@ var logPipelineMessages = map[string]string{
}

var tracePipelineMessages = map[string]string{
ReasonGatewayConfigured: "TracePipeline specification is successfully applied to the configuration of Trace gateway",
ReasonComponentsRunning: "All trace components are running",
ReasonGatewayNotReady: "Trace gateway Deployment is not ready",
ReasonGatewayReady: "Trace gateway Deployment is ready",
ReasonSelfMonAllDataDropped: "Backend is not reachable or rejecting spans. All spans are dropped. See troubleshooting: https://kyma-project.io/#/telemetry-manager/user/03-traces?id=no-spans-arrive-at-the-backend",
ReasonSelfMonBufferFillingUp: "Buffer nearing capacity. Incoming span rate exceeds export rate. See troubleshooting: https://kyma-project.io/#/telemetry-manager/user/03-traces?id=gateway-buffer-filling-up",
ReasonSelfMonGatewayThrottling: "Trace gateway is unable to receive spans at current rate. See troubleshooting: https://kyma-project.io/#/telemetry-manager/user/03-traces?id=gateway-throttling",
ReasonSelfMonSomeDataDropped: "Backend is reachable, but rejecting spans. Some spans are dropped. See troubleshooting: https://kyma-project.io/#/telemetry-manager/user/03-traces?id=not-all-spans-arrive-at-the-backend",
ReasonSelfMonConfigNotGenerated: "No spans delivered to backend because TracePipeline specification is not applied to the configuration of Trace gateway. Check the 'ConfigurationGenerated' condition for more details",
ReasonTraceGatewayDeploymentNotReady: "Trace gateway Deployment is not ready",
ReasonTraceGatewayDeploymentReady: "Trace gateway Deployment is ready",
ReasonGatewayConfigured: "TracePipeline specification is successfully applied to the configuration of Trace gateway",
ReasonComponentsRunning: "All trace components are running",
ReasonGatewayNotReady: "Trace gateway Deployment is not ready",
ReasonGatewayReady: "Trace gateway Deployment is ready",
ReasonSelfMonAllDataDropped: "Backend is not reachable or rejecting spans. All spans are dropped. See troubleshooting: https://kyma-project.io/#/telemetry-manager/user/03-traces?id=no-spans-arrive-at-the-backend",
ReasonSelfMonBufferFillingUp: "Buffer nearing capacity. Incoming span rate exceeds export rate. See troubleshooting: https://kyma-project.io/#/telemetry-manager/user/03-traces?id=gateway-buffer-filling-up",
ReasonSelfMonGatewayThrottling: "Trace gateway is unable to receive spans at current rate. See troubleshooting: https://kyma-project.io/#/telemetry-manager/user/03-traces?id=gateway-throttling",
ReasonSelfMonSomeDataDropped: "Backend is reachable, but rejecting spans. Some spans are dropped. See troubleshooting: https://kyma-project.io/#/telemetry-manager/user/03-traces?id=not-all-spans-arrive-at-the-backend",
ReasonSelfMonConfigNotGenerated: "No spans delivered to backend because TracePipeline specification is not applied to the configuration of Trace gateway. Check the 'ConfigurationGenerated' condition for more details",
}

var metricPipelineMessages = map[string]string{
Expand Down
46 changes: 0 additions & 46 deletions internal/conditions/legacy.go

This file was deleted.

140 changes: 0 additions & 140 deletions internal/conditions/legacy_test.go

This file was deleted.

Loading
Loading