Skip to content

Commit 1a3a2c6

Browse files
committed
feat(trait): deprecate prometheus trait
Favour Camel Monitor Operator to perform that level of monitoring instead
1 parent 9257fa3 commit 1a3a2c6

22 files changed

Lines changed: 111 additions & 66 deletions

File tree

docs/modules/ROOT/pages/observability/monitoring.adoc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
[[monitoring]]
2-
= Camel K Monitoring
2+
= Camel K Operator Monitoring
33

4-
The Camel K monitoring architecture relies on https://prometheus.io[Prometheus] and the eponymous operator.
4+
The Camel K Operator monitoring architecture relies on https://prometheus.io[Prometheus] and the eponymous operator.
55

66
The https://prometheus-operator.dev[Prometheus Operator] serves to make running Prometheus on top of Kubernetes as easy as possible, while preserving Kubernetes-native configuration options.
77

8+
NOTE: the Camel K Integration monitoring part is deprecated in favour of xref:observability/dashboard.adoc[Camel Dashboard].
9+
810
[[prerequisites]]
911
== Prerequisites
1012

11-
To take full advantage of the Camel K monitoring capabilities, it is recommended to have a Prometheus Operator instance, that can be configured to integrate the Camel K operator and integrations.
13+
To take full advantage of the Camel K operator monitoring capabilities, it is recommended to have a Prometheus Operator instance, that can be configured to integrate the Camel K operator and integrations.
1214

1315
[[kubernetes]]
1416
=== Kubernetes
@@ -22,7 +24,7 @@ Alternatively, you can quickly deploy the Prometheus operator by running:
2224
$ kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/main/bundle.yaml
2325
----
2426

25-
WARNING: Beware this installs the operator in the `default` namespace. You must download the file locally and replace the `namespace` fields to deploy the resources into another namespace. This also installs the version from the `main` branch, which you can change in the URL by choosing a stable release version.
27+
NOTE: the above script installs the operator in the `default` namespace. You must download the file locally and replace the `namespace` fields to deploy the resources into another namespace. This also installs the version from the `main` branch, which you can change in the URL by choosing a stable release version.
2628

2729
Then, you can create a `Prometheus` resource, that the operator will use as configuration to deploy a managed Prometheus instance:
2830

docs/modules/ROOT/pages/observability/monitoring/integration.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[[integration-monitoring]]
22
= Camel K Integration Monitoring
33

4-
NOTE: The Camel K monitoring architecture relies on https://prometheus.io[Prometheus] and the eponymous operator. Make sure you've checked the xref:observability/monitoring.adoc#prerequisites[Camel K monitoring prerequisites].
4+
WARNING: The Camel K Integration monitoring part is deprecated. Use instead xref:observability/dashboard.adoc[Camel Dashboard] project to provide a deeper level of monitoring to your Camel applications.
55

66
[[instrumentation]]
77
== Instrumentation

docs/modules/ROOT/pages/observability/monitoring/operator.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
[[operator-monitoring]]
22
= Camel K Operator Monitoring
33

4-
NOTE: The Camel K monitoring architecture relies on https://prometheus.io[Prometheus] and the eponymous operator. Make sure you've checked the xref:observability/monitoring.adoc#prerequisites[Camel K monitoring prerequisites].
4+
In this chapter we provide some example how to provide a monitoring based on Prometheus for your Camel K operator main metrics.
5+
6+
WARNING: this is a guide that mostly depends on Prometheus. The goal is to provide some basic example more than an exhaustive guide. Please, refer to Prometheus documentation for a full production configuration.
57

68
[[installation]]
79
== Installation

docs/modules/ROOT/partials/apis/camel-k-crds.adoc

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2498,7 +2498,9 @@ A human-readable message indicating details about the transition.
24982498
|
24992499
25002500
2501-
Pods collect health and conditions information from the owned PODs
2501+
DeprecatedPods collect health and conditions information from the owned PODs
2502+
2503+
Deprecated: may be removed in future releases.
25022504
25032505
25042506
|===
@@ -5107,7 +5109,7 @@ PluginProperties -- .
51075109
* <<#_camel_apache_org_v1_IntegrationCondition, IntegrationCondition>>
51085110
* <<#_camel_apache_org_v1_PipeCondition, PipeCondition>>
51095111
5110-
5112+
Deprecated: may be removed in future releases.
51115113
51125114
[cols="2,2a",options="header"]
51135115
|===
@@ -9057,7 +9059,7 @@ Deprecated: no longer in use.
90579059
* <<#_camel_apache_org_v1_Traits, Traits>>
90589060
90599061
WARNING: The Pod trait is **deprecated** and will removed in future release versions:
9060-
use InitContainers trait istead.
9062+
use InitContainers trait instead.
90619063
90629064
The pod trait allows the customization of the Integration pods.
90639065
It applies the `PodSpecTemplate` struct contained in the Integration `.spec.podTemplate` field,
@@ -9089,6 +9091,9 @@ by using the `integration` container name.
90899091
90909092
* <<#_camel_apache_org_v1_Traits, Traits>>
90919093
9094+
WARNING: The Prometheus trait is **deprecated** and will removed in future release versions:
9095+
use Camel Monitor operator (https://camel-tooling.github.io/camel-dashboard/docs/installation-guide/advanced/operator/) instead.
9096+
90929097
The Prometheus trait configures a Prometheus-compatible endpoint. It also creates a `PodMonitor` resource,
90939098
so that the endpoint can be scraped automatically, when using the Prometheus operator.
90949099

docs/modules/traits/pages/pod.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// End of autogenerated code - DO NOT EDIT! (badges)
77
// Start of autogenerated code - DO NOT EDIT! (description)
88
WARNING: The Pod trait is **deprecated** and will removed in future release versions:
9-
use InitContainers trait istead.
9+
use InitContainers trait instead.
1010

1111
The pod trait allows the customization of the Integration pods.
1212
It applies the `PodSpecTemplate` struct contained in the Integration `.spec.podTemplate` field,

docs/modules/traits/pages/prometheus.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
= Prometheus Trait
22

33
// Start of autogenerated code - DO NOT EDIT! (badges)
4+
[.badges]
5+
[.badge-key]##Deprecated since##[.badge-unsupported]##2.11.0##
46
// End of autogenerated code - DO NOT EDIT! (badges)
57
// Start of autogenerated code - DO NOT EDIT! (description)
8+
WARNING: The Prometheus trait is **deprecated** and will removed in future release versions:
9+
use Camel Monitor operator (https://camel-tooling.github.io/camel-dashboard/docs/installation-guide/advanced/operator/) instead.
10+
611
The Prometheus trait configures a Prometheus-compatible endpoint. It also creates a `PodMonitor` resource,
712
so that the endpoint can be scraped automatically, when using the Prometheus operator.
813

e2e/common/traits/health_test.go

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,13 @@ func TestHealthTrait(t *testing.T) {
107107
if c.Status != corev1.ConditionFalse {
108108
return false
109109
}
110-
if len(c.Pods) != 3 {
110+
if len(c.DeprecatedPods) != 3 {
111111
return false
112112
}
113113

114114
var r *v1.HealthCheckResponse
115115

116-
for _, pod := range c.Pods {
116+
for _, pod := range c.DeprecatedPods {
117117
for h := range pod.Health {
118118
if pod.Health[h].Name == "camel-routes" {
119119
r = &pod.Health[h]
@@ -201,15 +201,15 @@ func TestHealthTrait(t *testing.T) {
201201
if c.Status != corev1.ConditionFalse {
202202
return false
203203
}
204-
if len(c.Pods) != 1 {
204+
if len(c.DeprecatedPods) != 1 {
205205
return false
206206
}
207207

208208
var r *v1.HealthCheckResponse
209209

210-
for h := range c.Pods[0].Health {
211-
if c.Pods[0].Health[h].Name == "camel-routes" {
212-
r = &c.Pods[0].Health[h]
210+
for h := range c.DeprecatedPods[0].Health {
211+
if c.DeprecatedPods[0].Health[h].Name == "camel-routes" {
212+
r = &c.DeprecatedPods[0].Health[h]
213213
}
214214
}
215215

@@ -288,15 +288,15 @@ func TestHealthTrait(t *testing.T) {
288288
if c.Status != corev1.ConditionFalse {
289289
return false
290290
}
291-
if len(c.Pods) != 1 {
291+
if len(c.DeprecatedPods) != 1 {
292292
return false
293293
}
294294

295295
var r *v1.HealthCheckResponse
296296

297-
for h := range c.Pods[0].Health {
298-
if c.Pods[0].Health[h].Name == "camel-routes" {
299-
r = &c.Pods[0].Health[h]
297+
for h := range c.DeprecatedPods[0].Health {
298+
if c.DeprecatedPods[0].Health[h].Name == "camel-routes" {
299+
r = &c.DeprecatedPods[0].Health[h]
300300
}
301301
}
302302

@@ -374,15 +374,15 @@ func TestHealthTrait(t *testing.T) {
374374
if c.Status != corev1.ConditionFalse {
375375
return false
376376
}
377-
if len(c.Pods) != 1 {
377+
if len(c.DeprecatedPods) != 1 {
378378
return false
379379
}
380380

381381
var r *v1.HealthCheckResponse
382382

383-
for h := range c.Pods[0].Health {
384-
if c.Pods[0].Health[h].Name == "never-ready" {
385-
r = &c.Pods[0].Health[h]
383+
for h := range c.DeprecatedPods[0].Health {
384+
if c.DeprecatedPods[0].Health[h].Name == "never-ready" {
385+
r = &c.DeprecatedPods[0].Health[h]
386386
}
387387
}
388388

@@ -426,15 +426,15 @@ func TestHealthTrait(t *testing.T) {
426426
if c.Status != corev1.ConditionFalse {
427427
return false
428428
}
429-
if len(c.Pods) != 1 {
429+
if len(c.DeprecatedPods) != 1 {
430430
return false
431431
}
432432

433433
var r *v1.HealthCheckResponse
434434

435-
for h := range c.Pods[0].Health {
436-
if c.Pods[0].Health[h].Name == "never-ready" && c.Pods[0].Health[h].Status == "DOWN" {
437-
r = &c.Pods[0].Health[h]
435+
for h := range c.DeprecatedPods[0].Health {
436+
if c.DeprecatedPods[0].Health[h].Name == "never-ready" && c.DeprecatedPods[0].Health[h].Status == "DOWN" {
437+
r = &c.DeprecatedPods[0].Health[h]
438438
}
439439
}
440440

e2e/support/test_support.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -748,14 +748,14 @@ func HealthCheckResponse(podRegexp string, healthName string) func(*v1.Integrati
748748
return nil
749749
}
750750

751-
for p := range c.Pods {
752-
if re.MatchString(c.Pods[p].Name) {
751+
for p := range c.DeprecatedPods {
752+
if re.MatchString(c.DeprecatedPods[p].Name) {
753753
continue
754754
}
755755

756-
for h := range c.Pods[p].Health {
757-
if c.Pods[p].Health[h].Name == healthName {
758-
return &c.Pods[p].Health[h]
756+
for h := range c.DeprecatedPods[p].Health {
757+
if c.DeprecatedPods[p].Health[h].Name == healthName {
758+
return &c.DeprecatedPods[p].Health[h]
759759
}
760760
}
761761

helm/camel-k/crds/camel-k-crds.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22518,9 +22518,12 @@ spec:
2251822518
the transition.
2251922519
type: string
2252022520
pods:
22521-
description: Pods collect health and conditions information
22522-
from the owned PODs
22521+
description: |-
22522+
DeprecatedPods collect health and conditions information from the owned PODs
22523+
22524+
Deprecated: may be removed in future releases.
2252322525
items:
22526+
description: 'Deprecated: may be removed in future releases.'
2252422527
properties:
2252522528
condition:
2252622529
description: PodCondition contains details for the current
@@ -37786,6 +37789,7 @@ spec:
3778637789
description: Pods collect health and conditions information
3778737790
from the owned PODs
3778837791
items:
37792+
description: 'Deprecated: may be removed in future releases.'
3778937793
properties:
3779037794
condition:
3779137795
description: PodCondition contains details for the current

pkg/apis/camel/v1/integration_types.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,10 @@ type IntegrationCondition struct {
307307
Reason string `json:"reason,omitempty"`
308308
// A human-readable message indicating details about the transition.
309309
Message string `json:"message,omitempty"`
310-
// Pods collect health and conditions information from the owned PODs
311-
Pods []PodCondition `json:"pods,omitempty"`
310+
// DeprecatedPods collect health and conditions information from the owned PODs
311+
//
312+
// Deprecated: may be removed in future releases.
313+
DeprecatedPods []PodCondition `json:"pods,omitempty"`
312314
}
313315

314316
// PodSpecTemplate represent a template used to deploy an Integration `Pod`.
@@ -349,6 +351,7 @@ type PodSpec struct {
349351
SecurityContext corev1.PodSecurityContext `json:"securityContext,omitempty" protobuf:"bytes,34,opt,name=securityContext"`
350352
}
351353

354+
// Deprecated: may be removed in future releases.
352355
type PodCondition struct {
353356
Name string `json:"name,omitempty" yaml:"name,omitempty"`
354357
Condition corev1.PodCondition `json:"condition" yaml:"condition"`

0 commit comments

Comments
 (0)