Skip to content

extended tracing setup by elasticsearch instance #241

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

Merged
merged 6 commits into from
Jun 23, 2022
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
60 changes: 58 additions & 2 deletions resources/services/observatorium-traces-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,34 @@ kind: Template
metadata:
name: observatorium-traces
objects:
- apiVersion: logging.openshift.io/v1
kind: Elasticsearch
metadata:
annotations:
logging.openshift.io/elasticsearch-cert-management: "true"
logging.openshift.io/elasticsearch-cert.curator-${ELASTICSEARCH_NAME}: system.logging.curator
logging.openshift.io/elasticsearch-cert.jaeger-${ELASTICSEARCH_NAME}: user.jaeger
name: ${ELASTICSEARCH_NAME}
namespace: ${NAMESPACE}
spec:
managementState: Managed
nodeSpec:
resources:
limits:
memory: ${ELASTICSEARCH_MEMORY}
requests:
cpu: ${ELASTICSEARCH_REQUEST_CPU}
memory: ${ELASTICSEARCH_MEMORY}
nodes:
- nodeCount: ${{ELASTICSEARCH_NODE_COUNT}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if {{}} is correct

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

proxyResources: {}
resources: {}
roles:
- master
- client
- data
storage: {}
redundancyPolicy: ${ELASTICSEARCH_REDUNDANCY_POLICY}
- apiVersion: jaegertracing.io/v1
kind: Jaeger
metadata:
Expand All @@ -14,7 +42,16 @@ objects:
name: observatorium-jaeger-rhobs
namespace: ${NAMESPACE}
spec:
strategy: allinone
storage:
elasticsearch:
doNotProvision: true
name: ${ELASTICSEARCH_NAME}
useCertManagement: true
options:
es:
index-prefix: rhobs
Comment on lines +50 to +52
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these extra index prefixes working with our present OpenDistro Roles for Jaeger?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the roles are independent of the index-prefix, right?
As far as i understood, all instances gets its own curator and jaeger role certs.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The roles have per se nothing to do with the certs. I am talking about authorization on the OpenDistro level. AFAICS your Jaeger definitions are *jaeger-..*, thus if you prefix your indices with rhobs-jaeger... you should be fine.

type: elasticsearch
strategy: production
- apiVersion: jaegertracing.io/v1
kind: Jaeger
metadata:
Expand All @@ -26,7 +63,16 @@ objects:
name: observatorium-jaeger-telemeter
namespace: ${NAMESPACE}
spec:
strategy: allinone
storage:
elasticsearch:
doNotProvision: true
name: ${ELASTICSEARCH_NAME}
useCertManagement: true
options:
es:
index-prefix: telemeter
type: elasticsearch
strategy: production
- apiVersion: opentelemetry.io/v1alpha1
kind: OpenTelemetryCollector
metadata:
Expand Down Expand Up @@ -83,3 +129,13 @@ parameters:
value: ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib
- name: OPENTELEMETRY_COLLECTOR_IMAGE_TAG
value: 0.46.0
- name: ELASTICSEARCH_MEMORY
value: 4Gi
- name: ELASTICSEARCH_REQUEST_CPU
value: 200m
- name: ELASTICSEARCH_NAME
value: shared-es
- name: ELASTICSEARCH_NODE_COUNT
value: "1"
- name: ELASTICSEARCH_REDUNDANCY_POLICY
value: ZeroRedundancy
7 changes: 7 additions & 0 deletions services/observatorium-traces-template.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ local obs = import 'observatorium.libsonnet';
name: 'observatorium-traces',
},
objects: [
obs.elasticsearch,
] + [
obs.tracing.manifests[name] {
metadata+: {
},
Expand All @@ -16,5 +18,10 @@ local obs = import 'observatorium.libsonnet';
{ name: 'NAMESPACE', value: 'observatorium-traces' },
{ name: 'OPENTELEMETRY_COLLECTOR_IMAGE', value: 'ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib' },
{ name: 'OPENTELEMETRY_COLLECTOR_IMAGE_TAG', value: '0.46.0' },
{ name: 'ELASTICSEARCH_MEMORY', value: '4Gi' },
{ name: 'ELASTICSEARCH_REQUEST_CPU', value: '200m' },
{ name: 'ELASTICSEARCH_NAME', value: 'shared-es' },
{ name: 'ELASTICSEARCH_NODE_COUNT', value: '1' },
{ name: 'ELASTICSEARCH_REDUNDANCY_POLICY', value: 'ZeroRedundancy' },
],
}
52 changes: 51 additions & 1 deletion services/observatorium-traces.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,48 @@ local tracing = (import 'github.com/observatorium/observatorium/configuration/co
{
local obs = self,

elasticsearch:: {
apiVersion: 'logging.openshift.io/v1',
kind: 'Elasticsearch',
metadata: {
annotations: {
'logging.openshift.io/elasticsearch-cert-management': 'true',
'logging.openshift.io/elasticsearch-cert.jaeger-${ELASTICSEARCH_NAME}': 'user.jaeger',
'logging.openshift.io/elasticsearch-cert.curator-${ELASTICSEARCH_NAME}': 'system.logging.curator',
},
name: '${ELASTICSEARCH_NAME}',
namespace: '${NAMESPACE}',
},
spec: {
managementState: 'Managed',
nodeSpec: {
resources: {
limits: {
memory: '${ELASTICSEARCH_MEMORY}',
},
requests: {
cpu: '${ELASTICSEARCH_REQUEST_CPU}',
memory: '${ELASTICSEARCH_MEMORY}',
},
},
},
nodes: [
{
nodeCount: '${{ELASTICSEARCH_NODE_COUNT}}',
proxyResources: {},
resources: {},
roles: [
'master',
'client',
'data',
],
storage: {},
},
],
redundancyPolicy: '${ELASTICSEARCH_REDUNDANCY_POLICY}',
},
},

tracing:: tracing({
name: obs.config.name,
namespace: '${NAMESPACE}',
Expand All @@ -18,7 +60,15 @@ local tracing = (import 'github.com/observatorium/observatorium/configuration/co
otelcolImage: '${OPENTELEMETRY_COLLECTOR_IMAGE}',
otelcolVersion: '${OPENTELEMETRY_COLLECTOR_IMAGE_TAG}',
jaegerSpec: {
strategy: 'allinone',
strategy: 'production',
storage: {
type: 'elasticsearch',
elasticsearch: {
name: '${ELASTICSEARCH_NAME}',
useCertManagement: true,
doNotProvision: true,
},
},
},
}),

Expand Down