From 0f8a11bc7b4c81f4baa0cc23cffd30e0c745e2fb Mon Sep 17 00:00:00 2001 From: Joe Reuter Date: Tue, 29 Oct 2024 13:15:18 +0100 Subject: [PATCH 1/6] adjustments --- .../otel_kubernetes/otel_kubernetes_panel.tsx | 41 ++++++++++++------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/otel_kubernetes/otel_kubernetes_panel.tsx b/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/otel_kubernetes/otel_kubernetes_panel.tsx index 6cbfe740fa784..93321f61c6caa 100644 --- a/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/otel_kubernetes/otel_kubernetes_panel.tsx +++ b/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/otel_kubernetes/otel_kubernetes_panel.tsx @@ -101,7 +101,7 @@ helm install opentelemetry-kube-stack open-telemetry/opentelemetry-kube-stack \\

), + doc: ( + + {i18n.translate( + 'xpack.observability_onboarding.otelKubernetesPanel.certmanagerDocsLinkLabel', + { defaultMessage: 'in our documentation' } + )} + + ), }} />{' '} @@ -213,17 +225,18 @@ helm install opentelemetry-kube-stack open-telemetry/opentelemetry-kube-stack \\ ]} /> - - {`apiVersion: v1 -kind: Pod -metadata: - name: my-app - annotations: - instrumentation.opentelemetry.io/inject-${idSelected}: "${namespace}/elastic-instrumentation" -spec: - containers: - - name: my-app - image: my-app:latest`} + + {`# To annotate a specific deployment +kubectl annotate deployment my-deployment -n my-namespace instrumentation.opentelemetry.io/inject-${idSelected}="${namespace}/elastic-instrumentation" + +# To annotate all resources in a namespace +kubectl annotate namespace my-namespace instrumentation.opentelemetry.io/inject-${idSelected}="${namespace}/elastic-instrumentation" + +# Restart your deployment +kubectl rollout restart deployment my-deployment -n my-namespace + +# Check whether annotations have been applied correctly +kubectl describe deployment my-deployment -n my-namespace`} From 6a328fece665a8b978df6c23504f6992c64ce15d Mon Sep 17 00:00:00 2001 From: Joe Reuter Date: Tue, 29 Oct 2024 14:49:14 +0100 Subject: [PATCH 2/6] adjustments --- .../otel_kubernetes/otel_kubernetes_panel.tsx | 32 +++++++++++-------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/otel_kubernetes/otel_kubernetes_panel.tsx b/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/otel_kubernetes/otel_kubernetes_panel.tsx index 93321f61c6caa..f46e7838e3008 100644 --- a/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/otel_kubernetes/otel_kubernetes_panel.tsx +++ b/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/otel_kubernetes/otel_kubernetes_panel.tsx @@ -187,7 +187,7 @@ helm install opentelemetry-kube-stack open-telemetry/opentelemetry-kube-stack \\ 'xpack.observability_onboarding.otelKubernetesPanel.theOperatorAutomatesTheLabel', { defaultMessage: - 'Enable automatic instrumentation for your applications by annotating the resource that manages their pods, such as a deployment, or by annotating the entire namespace.', + 'Enable automatic instrumentation for your applications by annotating the pods template (spec.template.metadata.annotations) in your Deployment or relevant workload object (StatefulSet, Job, CronJob, etc.)', } )}

@@ -225,18 +225,24 @@ helm install opentelemetry-kube-stack open-telemetry/opentelemetry-kube-stack \\ ]} /> - - {`# To annotate a specific deployment -kubectl annotate deployment my-deployment -n my-namespace instrumentation.opentelemetry.io/inject-${idSelected}="${namespace}/elastic-instrumentation" - -# To annotate all resources in a namespace -kubectl annotate namespace my-namespace instrumentation.opentelemetry.io/inject-${idSelected}="${namespace}/elastic-instrumentation" - -# Restart your deployment -kubectl rollout restart deployment my-deployment -n my-namespace - -# Check whether annotations have been applied correctly -kubectl describe deployment my-deployment -n my-namespace`} + + {`apiVersion: apps/v1 +kind: Deployment +metadata: + name: myapp +spec: + ... + template: + metadata: + annotations: + instrumentation.opentelemetry.io/inject-${idSelected}: "${namespace}/elastic-instrumentation" + ... + spec: + containers: + - image: myapplication-image + name: app + ... +`} Date: Tue, 29 Oct 2024 15:02:21 +0100 Subject: [PATCH 3/6] adjustments --- .../otel_kubernetes/otel_kubernetes_panel.tsx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/otel_kubernetes/otel_kubernetes_panel.tsx b/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/otel_kubernetes/otel_kubernetes_panel.tsx index f46e7838e3008..8dccbfd086b5b 100644 --- a/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/otel_kubernetes/otel_kubernetes_panel.tsx +++ b/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/otel_kubernetes/otel_kubernetes_panel.tsx @@ -226,7 +226,8 @@ helm install opentelemetry-kube-stack open-telemetry/opentelemetry-kube-stack \\ /> - {`apiVersion: apps/v1 + {`# To annotate specific deployment Pods modify its manifest +apiVersion: apps/v1 kind: Deployment metadata: name: myapp @@ -242,7 +243,15 @@ spec: - image: myapplication-image name: app ... -`} + +# To annotate all resources in a namespace +kubectl annotate namespace my-namespace instrumentation.opentelemetry.io/inject-${idSelected}: "${namespace}/elastic-instrumentation" + +# Restart your deployment +kubectl rollout restart deployment myapp -n my-namespace + +# Check annotations have been applied correctly +kubectl describe deployment myapp -n my-namespace`} Date: Tue, 29 Oct 2024 18:00:11 +0100 Subject: [PATCH 4/6] Update x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/otel_kubernetes/otel_kubernetes_panel.tsx Co-authored-by: Mykola Harmash --- .../quickstart_flows/otel_kubernetes/otel_kubernetes_panel.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/otel_kubernetes/otel_kubernetes_panel.tsx b/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/otel_kubernetes/otel_kubernetes_panel.tsx index 8dccbfd086b5b..4bdc5c67413c8 100644 --- a/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/otel_kubernetes/otel_kubernetes_panel.tsx +++ b/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/otel_kubernetes/otel_kubernetes_panel.tsx @@ -101,7 +101,7 @@ helm install opentelemetry-kube-stack open-telemetry/opentelemetry-kube-stack \\

Date: Wed, 30 Oct 2024 08:31:54 +0100 Subject: [PATCH 5/6] adjustments --- .../quickstart_flows/otel_kubernetes/otel_kubernetes_panel.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/otel_kubernetes/otel_kubernetes_panel.tsx b/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/otel_kubernetes/otel_kubernetes_panel.tsx index 8dccbfd086b5b..db6451a912669 100644 --- a/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/otel_kubernetes/otel_kubernetes_panel.tsx +++ b/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/otel_kubernetes/otel_kubernetes_panel.tsx @@ -251,7 +251,7 @@ kubectl annotate namespace my-namespace instrumentation.opentelemetry.io/inject- kubectl rollout restart deployment myapp -n my-namespace # Check annotations have been applied correctly -kubectl describe deployment myapp -n my-namespace`} +kubectl describe pod -n my-namespace`} Date: Wed, 30 Oct 2024 08:36:51 +0100 Subject: [PATCH 6/6] adjustments --- .../quickstart_flows/otel_kubernetes/otel_kubernetes_panel.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/otel_kubernetes/otel_kubernetes_panel.tsx b/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/otel_kubernetes/otel_kubernetes_panel.tsx index ed70343202dfa..42acd159b73cc 100644 --- a/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/otel_kubernetes/otel_kubernetes_panel.tsx +++ b/x-pack/plugins/observability_solution/observability_onboarding/public/application/quickstart_flows/otel_kubernetes/otel_kubernetes_panel.tsx @@ -250,7 +250,7 @@ kubectl annotate namespace my-namespace instrumentation.opentelemetry.io/inject- # Restart your deployment kubectl rollout restart deployment myapp -n my-namespace -# Check annotations have been applied correctly +# Check annotations have been applied correctly and auto-instrumentation library is injected kubectl describe pod -n my-namespace`}