Skip to content

Commit 710416a

Browse files
authored
add elasticsearch subscription (#232)
* Add elasticsearch subscription Signed-off-by: Benedikt Bongartz <[email protected]> * seperate subscriptions into own libary Signed-off-by: Benedikt Bongartz <[email protected]> * register rule to generate observatorium-traces-subscriptions-template Signed-off-by: Benedikt Bongartz <[email protected]> * remove subscriptions from traces template Signed-off-by: Benedikt Bongartz <[email protected]> * add subscriptions template Signed-off-by: Benedikt Bongartz <[email protected]> * remove unused tracesub entry Signed-off-by: Benedikt Bongartz <[email protected]> * regenerate Signed-off-by: Benedikt Bongartz <[email protected]>
1 parent 5ec99f5 commit 710416a

7 files changed

+141
-82
lines changed

Makefile

+5-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ whitelisted_metrics: $(GOJSONTOYAML) $(GOJQ)
8888
.PHONY: manifests
8989
manifests: format $(VENDOR_DIR)
9090
manifests: resources/services/telemeter-template.yaml resources/services/jaeger-template.yaml resources/services/parca-template.yaml tests/minio-template.yaml tests/dex-template.yaml
91-
manifests: resources/services/observatorium-template.yaml resources/services/observatorium-metrics-template.yaml resources/services/observatorium-logs-template.yaml resources/services/observatorium-traces-template.yaml
91+
manifests: resources/services/observatorium-template.yaml resources/services/observatorium-metrics-template.yaml resources/services/observatorium-logs-template.yaml resources/services/observatorium-traces-subscriptions-template.yaml resources/services/observatorium-traces-template.yaml
9292
manifests: resources/services/metric-federation-rule-template.yaml
9393
$(MAKE) clean
9494

@@ -129,6 +129,10 @@ resources/services/observatorium-traces-template.yaml: $(wildcard services/obser
129129
@echo ">>>>> Running observatorium-traces templates"
130130
$(JSONNET) -J vendor services/observatorium-traces-template.jsonnet | $(GOJSONTOYAML) > $@
131131

132+
resources/services/observatorium-traces-subscriptions-template.yaml: $(wildcard services/observatorium-traces-*) $(JSONNET) $(GOJSONTOYAML) $(JSONNETFMT)
133+
@echo ">>>>> Running observatorium-traces-subscriptions templates"
134+
$(JSONNET) -J vendor services/observatorium-traces-subscriptions-template.jsonnet | $(GOJSONTOYAML) > $@
135+
132136
resources/services/metric-federation-rule-template.yaml: $(wildcard services/metric-federation-rule*) $(wildcard configuration/observatorium/metric-federation-rule*) $(JSONNET) $(GOJSONTOYAML) $(JSONNETFMT)
133137
@echo ">>>>> Running metric-federation-rule templates"
134138
$(JSONNET) -J vendor services/metric-federation-rule-template.jsonnet | $(GOJSONTOYAML) > $@
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
apiVersion: template.openshift.io/v1
2+
kind: Template
3+
metadata:
4+
name: observatorium-traces-subscriptions
5+
objects:
6+
- apiVersion: operators.coreos.com/v1alpha1
7+
kind: Subscription
8+
metadata:
9+
name: rhobs-opentelemetry
10+
namespace: ${OPENTELEMETRY_OPERATOR_NAMESPACE}
11+
spec:
12+
channel: stable
13+
installPlanApproval: Automatic
14+
name: opentelemetry-product
15+
source: ${OPENTELEMETRY_OPERATOR_SOURCE}
16+
sourceNamespace: openshift-marketplace
17+
startingCSV: opentelemetry-operator.v${OPENTELEMETRY_OPERATOR_VERSION}
18+
- apiVersion: operators.coreos.com/v1alpha1
19+
kind: Subscription
20+
metadata:
21+
name: rhobs-jaeger
22+
namespace: ${JAEGER_OPERATOR_NAMESPACE}
23+
spec:
24+
channel: stable
25+
installPlanApproval: Automatic
26+
name: jaeger-product
27+
source: ${JAEGER_OPERATOR_SOURCE}
28+
sourceNamespace: openshift-marketplace
29+
startingCSV: jaeger-operator.v${JAEGER_OPERATOR_VERSION}
30+
- apiVersion: operators.coreos.com/v1alpha1
31+
kind: Subscription
32+
metadata:
33+
name: rhobs-elasticsearch
34+
namespace: ${ELASTIC_OPERATOR_NAMESPACE}
35+
spec:
36+
channel: stable
37+
installPlanApproval: Automatic
38+
name: elasticsearch-operator
39+
source: ${ELASTICSEARCH_OPERATOR_SOURCE}
40+
sourceNamespace: openshift-marketplace
41+
startingCSV: elasticsearch-operator.${ELASTICSEARCH_OPERATOR_VERSION}
42+
parameters:
43+
- name: OPENTELEMETRY_OPERATOR_VERSION
44+
value: 0.44.1-1
45+
- name: OPENTELEMETRY_OPERATOR_NAMESPACE
46+
value: openshift-operators
47+
- name: OPENTELEMETRY_OPERATOR_SOURCE
48+
value: redhat-operators
49+
- name: JAEGER_OPERATOR_VERSION
50+
value: 1.30.2
51+
- name: JAEGER_OPERATOR_NAMESPACE
52+
value: openshift-operators
53+
- name: JAEGER_OPERATOR_SOURCE
54+
value: redhat-operators
55+
- name: ELASTICSEARCH_OPERATOR_VERSION
56+
value: 5.4.1-24
57+
- name: ELASTICSEARCH_OPERATOR_NAMESPACE
58+
value: openshift-operators
59+
- name: ELASTICSEARCH_OPERATOR_SOURCE
60+
value: redhat-operators

resources/services/observatorium-traces-template.yaml

-36
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,6 @@ kind: Template
33
metadata:
44
name: observatorium-traces
55
objects:
6-
- apiVersion: operators.coreos.com/v1alpha1
7-
kind: Subscription
8-
metadata:
9-
name: rhobs-opentelemetry
10-
namespace: ${OPENTELEMETRY_OPERATOR_NAMESPACE}
11-
spec:
12-
channel: stable
13-
installPlanApproval: Automatic
14-
name: opentelemetry-product
15-
source: ${OPENTELEMETRY_OPERATOR_SOURCE}
16-
sourceNamespace: openshift-marketplace
17-
startingCSV: opentelemetry-operator.v${OPENTELEMETRY_OPERATOR_VERSION}
18-
- apiVersion: operators.coreos.com/v1alpha1
19-
kind: Subscription
20-
metadata:
21-
name: rhobs-jaeger
22-
namespace: ${JAEGER_OPERATOR_NAMESPACE}
23-
spec:
24-
channel: stable
25-
installPlanApproval: Automatic
26-
name: jaeger-product
27-
source: ${JAEGER_OPERATOR_SOURCE}
28-
sourceNamespace: openshift-marketplace
29-
startingCSV: jaeger-operator.v${JAEGER_OPERATOR_VERSION}
306
- apiVersion: jaegertracing.io/v1
317
kind: Jaeger
328
metadata:
@@ -103,19 +79,7 @@ objects:
10379
parameters:
10480
- name: NAMESPACE
10581
value: observatorium-traces
106-
- name: OPENTELEMETRY_OPERATOR_VERSION
107-
value: 0.44.1-1
108-
- name: OPENTELEMETRY_OPERATOR_NAMESPACE
109-
value: openshift-operators
110-
- name: OPENTELEMETRY_OPERATOR_SOURCE
111-
value: redhat-operators
11282
- name: OPENTELEMETRY_COLLECTOR_IMAGE
11383
value: ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib
11484
- name: OPENTELEMETRY_COLLECTOR_IMAGE_TAG
11585
value: 0.46.0
116-
- name: JAEGER_OPERATOR_VERSION
117-
value: 1.30.2
118-
- name: JAEGER_OPERATOR_NAMESPACE
119-
value: openshift-operators
120-
- name: JAEGER_OPERATOR_SOURCE
121-
value: redhat-operators
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
local subscriptions = import 'observatorium-traces-subscriptions.libsonnet';
2+
{
3+
apiVersion: 'template.openshift.io/v1',
4+
kind: 'Template',
5+
metadata: {
6+
name: 'observatorium-traces-subscriptions',
7+
},
8+
objects: [
9+
subscriptions.otelcol,
10+
subscriptions.jaeger,
11+
subscriptions.elasticsearch,
12+
],
13+
parameters: [
14+
{ name: 'OPENTELEMETRY_OPERATOR_VERSION', value: '0.44.1-1' },
15+
{ name: 'OPENTELEMETRY_OPERATOR_NAMESPACE', value: 'openshift-operators' },
16+
{ name: 'OPENTELEMETRY_OPERATOR_SOURCE', value: 'redhat-operators' },
17+
{ name: 'JAEGER_OPERATOR_VERSION', value: '1.30.2' },
18+
{ name: 'JAEGER_OPERATOR_NAMESPACE', value: 'openshift-operators' },
19+
{ name: 'JAEGER_OPERATOR_SOURCE', value: 'redhat-operators' },
20+
{ name: 'ELASTICSEARCH_OPERATOR_VERSION', value: '5.4.1-24' },
21+
{ name: 'ELASTICSEARCH_OPERATOR_NAMESPACE', value: 'openshift-operators' },
22+
{ name: 'ELASTICSEARCH_OPERATOR_SOURCE', value: 'redhat-operators' },
23+
],
24+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
otelcol:: {
3+
apiVersion: 'operators.coreos.com/v1alpha1',
4+
kind: 'Subscription',
5+
metadata: {
6+
name: 'rhobs-opentelemetry',
7+
namespace: '${OPENTELEMETRY_OPERATOR_NAMESPACE}',
8+
},
9+
spec: {
10+
channel: 'stable',
11+
installPlanApproval: 'Automatic',
12+
name: 'opentelemetry-product',
13+
source: '${OPENTELEMETRY_OPERATOR_SOURCE}',
14+
sourceNamespace: 'openshift-marketplace',
15+
startingCSV: 'opentelemetry-operator.v${OPENTELEMETRY_OPERATOR_VERSION}',
16+
},
17+
},
18+
19+
jaeger:: {
20+
apiVersion: 'operators.coreos.com/v1alpha1',
21+
kind: 'Subscription',
22+
metadata: {
23+
name: 'rhobs-jaeger',
24+
namespace: '${JAEGER_OPERATOR_NAMESPACE}',
25+
},
26+
spec: {
27+
channel: 'stable',
28+
installPlanApproval: 'Automatic',
29+
name: 'jaeger-product',
30+
source: '${JAEGER_OPERATOR_SOURCE}',
31+
sourceNamespace: 'openshift-marketplace',
32+
startingCSV: 'jaeger-operator.v${JAEGER_OPERATOR_VERSION}',
33+
},
34+
},
35+
36+
elasticsearch:: {
37+
apiVersion: 'operators.coreos.com/v1alpha1',
38+
kind: 'Subscription',
39+
metadata: {
40+
name: 'rhobs-elasticsearch',
41+
namespace: '${ELASTIC_OPERATOR_NAMESPACE}',
42+
},
43+
spec: {
44+
channel: 'stable',
45+
installPlanApproval: 'Automatic',
46+
name: 'elasticsearch-operator',
47+
source: '${ELASTICSEARCH_OPERATOR_SOURCE}',
48+
sourceNamespace: 'openshift-marketplace',
49+
startingCSV: 'elasticsearch-operator.${ELASTICSEARCH_OPERATOR_VERSION}',
50+
},
51+
},
52+
}

services/observatorium-traces-template.jsonnet

-9
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ local obs = import 'observatorium.libsonnet';
66
name: 'observatorium-traces',
77
},
88
objects: [
9-
obs.tracingsubs.otelcol,
10-
obs.tracingsubs.jaeger,
11-
] + [
129
obs.tracing.manifests[name] {
1310
metadata+: {
1411
},
@@ -17,13 +14,7 @@ local obs = import 'observatorium.libsonnet';
1714
],
1815
parameters: [
1916
{ name: 'NAMESPACE', value: 'observatorium-traces' },
20-
{ name: 'OPENTELEMETRY_OPERATOR_VERSION', value: '0.44.1-1' },
21-
{ name: 'OPENTELEMETRY_OPERATOR_NAMESPACE', value: 'openshift-operators' },
22-
{ name: 'OPENTELEMETRY_OPERATOR_SOURCE', value: 'redhat-operators' },
2317
{ name: 'OPENTELEMETRY_COLLECTOR_IMAGE', value: 'ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib' },
2418
{ name: 'OPENTELEMETRY_COLLECTOR_IMAGE_TAG', value: '0.46.0' },
25-
{ name: 'JAEGER_OPERATOR_VERSION', value: '1.30.2' },
26-
{ name: 'JAEGER_OPERATOR_NAMESPACE', value: 'openshift-operators' },
27-
{ name: 'JAEGER_OPERATOR_SOURCE', value: 'redhat-operators' },
2819
],
2920
}

services/observatorium-traces.libsonnet

-36
Original file line numberDiff line numberDiff line change
@@ -19,40 +19,4 @@ local tracing = (import 'github.com/observatorium/observatorium/configuration/co
1919
otelcolVersion: '${OPENTELEMETRY_COLLECTOR_IMAGE_TAG}',
2020
}),
2121

22-
23-
tracingsubs:: {
24-
otelcol:: {
25-
apiVersion: 'operators.coreos.com/v1alpha1',
26-
kind: 'Subscription',
27-
metadata: {
28-
name: 'rhobs-opentelemetry',
29-
namespace: '${OPENTELEMETRY_OPERATOR_NAMESPACE}',
30-
},
31-
spec: {
32-
channel: 'stable',
33-
installPlanApproval: 'Automatic',
34-
name: 'opentelemetry-product',
35-
source: '${OPENTELEMETRY_OPERATOR_SOURCE}',
36-
sourceNamespace: 'openshift-marketplace',
37-
startingCSV: 'opentelemetry-operator.v${OPENTELEMETRY_OPERATOR_VERSION}',
38-
},
39-
},
40-
41-
jaeger:: {
42-
apiVersion: 'operators.coreos.com/v1alpha1',
43-
kind: 'Subscription',
44-
metadata: {
45-
name: 'rhobs-jaeger',
46-
namespace: '${JAEGER_OPERATOR_NAMESPACE}',
47-
},
48-
spec: {
49-
channel: 'stable',
50-
installPlanApproval: 'Automatic',
51-
name: 'jaeger-product',
52-
source: '${JAEGER_OPERATOR_SOURCE}',
53-
sourceNamespace: 'openshift-marketplace',
54-
startingCSV: 'jaeger-operator.v${JAEGER_OPERATOR_VERSION}',
55-
},
56-
},
57-
},
5822
}

0 commit comments

Comments
 (0)