Skip to content

Commit

Permalink
update: adot-operator to v0.102.0 (#246)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaroniscode authored Sep 9, 2024
1 parent 6695774 commit adf0309
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 31 deletions.
4 changes: 2 additions & 2 deletions cmd/install/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package install

import (
"github.com/awslabs/eksdemo/pkg/application"
"github.com/awslabs/eksdemo/pkg/application/adot_operator"
"github.com/awslabs/eksdemo/pkg/application/adot"
"github.com/awslabs/eksdemo/pkg/application/appmesh_controller"
"github.com/awslabs/eksdemo/pkg/application/argo/argo_cd"
"github.com/awslabs/eksdemo/pkg/application/autoscaling/cluster_autoscaler"
Expand Down Expand Up @@ -43,7 +43,7 @@ func NewInstallCmd() *cobra.Command {

cmd.AddCommand(NewInstallAckCmd())
cmd.AddCommand(NewInstallAliasCmds(ackControllers, "ack-")...)
cmd.AddCommand(adot_operator.NewApp().NewInstallCmd())
cmd.AddCommand(adot.NewApp().NewInstallCmd())
cmd.AddCommand(appmesh_controller.NewApp().NewInstallCmd())
cmd.AddCommand(NewInstallArgoCmd())
cmd.AddCommand(NewInstallAliasCmds(argoApps, "argo-")...)
Expand Down
4 changes: 2 additions & 2 deletions cmd/install/uninstall.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package install

import (
"github.com/awslabs/eksdemo/pkg/application"
"github.com/awslabs/eksdemo/pkg/application/adot_operator"
"github.com/awslabs/eksdemo/pkg/application/adot"
"github.com/awslabs/eksdemo/pkg/application/appmesh_controller"
"github.com/awslabs/eksdemo/pkg/application/argo/argo_cd"
"github.com/awslabs/eksdemo/pkg/application/autoscaling/cluster_autoscaler"
Expand Down Expand Up @@ -43,7 +43,7 @@ func NewUninstallCmd() *cobra.Command {

cmd.AddCommand(NewUninstallAckCmd())
cmd.AddCommand(NewUninstallAliasCmds(ackControllers, "ack-")...)
cmd.AddCommand(adot_operator.NewApp().NewUninstallCmd())
cmd.AddCommand(adot.NewApp().NewUninstallCmd())
cmd.AddCommand(appmesh_controller.NewApp().NewUninstallCmd())
cmd.AddCommand(NewUninstallArgoCmd())
cmd.AddCommand(NewUninstallAliasCmds(argoApps, "argo-")...)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package adot_operator
package adot

import (
"github.com/awslabs/eksdemo/pkg/application"
Expand All @@ -11,11 +11,16 @@ import (

// Docs: https://opentelemetry.io/docs/
// Docs: https://github.com/open-telemetry/opentelemetry-operator/blob/main/docs/api.md
// GitHub: https://github.com/open-telemetry/opentelemetry-operator
// GitHub: https://github.com/aws-observability/aws-otel-collector/
// GitHub: https://github.com/open-telemetry/opentelemetry-operator
// Helm: https://github.com/open-telemetry/opentelemetry-helm-charts/tree/main/charts/opentelemetry-operator
// Repo: https://gallery.ecr.aws/aws-observability/adot-operator
// Version: Latest is ADOT Collector v0.30.0, Operator v0.78.0, OTEL Chart 0.31.0, (as of 6/18/23)
// Version: Latest is ADOT v0.40.1, which is OTEL Operator/Collector v0.102.0/v0.102.1 (as of 9/8/24)

// Update process
// 1. Find the latest ADOT Collector version and identify the version of the OTEL Operator/Collector
// 2. Identify OTEL Operator Chart version that matches the OTEL Operator version
// 3. Install the latest ADOT Addon and review Pod flags and upate values.yaml

func NewApp() *application.Application {
options, flags := newOptions()
Expand Down Expand Up @@ -68,44 +73,47 @@ replicaCount: 1
nameOverride: adot-operator
manager:
image:
# Images: gallery.ecr.aws/aws-observability/adot-operator
repository: public.ecr.aws/aws-observability/adot-operator
tag: {{ .Version }}
collectorImage:
# Images: gallery.ecr.aws/aws-observability/aws-otel-collector
repository: public.ecr.aws/aws-observability/aws-otel-collector
tag: v0.30.0
tag: v0.40.1
targetAllocatorImage:
# Docs: https://github.com/open-telemetry/opentelemetry-operator#target-allocator
# Docs: https://github.com/open-telemetry/opentelemetry-operator/blob/main/cmd/otel-allocator/README.md
# Images: gallery.ecr.aws/aws-observability/adot-operator-targetallocator
repository: public.ecr.aws/aws-observability/adot-operator-targetallocator
tag: 0.78.0
tag: 0.102.0
autoInstrumentationImage:
java:
# Images: gallery.ecr.aws/aws-observability/adot-autoinstrumentation-java
repository: public.ecr.aws/aws-observability/adot-autoinstrumentation-java
tag: v1.26.0
tag: v1.32.1
nodejs:
# Images: gallery.ecr.aws/aws-observability/adot-operator-autoinstrumentation-nodejs
repository: public.ecr.aws/aws-observability/adot-operator-autoinstrumentation-nodejs
tag: 0.39.1
tag: 0.51.0
python:
# Images: gallery.ecr.aws/aws-observability/adot-operator-autoinstrumentation-python
repository: public.ecr.aws/aws-observability/adot-operator-autoinstrumentation-python
tag: 0.39b0
tag: 0.45b0
dotnet:
# Images: gallery.ecr.aws/aws-observability/adot-operator-autoinstrumentation-dotnet
repository: public.ecr.aws/aws-observability/adot-operator-autoinstrumentation-dotnet
tag: 0.7.0
tag: 1.2.0
apacheHttpd:
# Images: gallery.ecr.aws/aws-observability/adot-operator-autoinstrumentation-apache-httpd
repository: public.ecr.aws/aws-observability/adot-operator-autoinstrumentation-apache-httpd
tag: 1.0.4
serviceAccount:
name: {{ .ServiceAccount }}
extraArgs:
# Images: gallery.ecr.aws/aws-observability/adot-operator-opamp-bridge
- --operator-opamp-bridge-image=public.ecr.aws/aws-observability/adot-operator-opamp-bridge:0.78.0
- --operator-opamp-bridge-image=public.ecr.aws/aws-observability/adot-operator-opamp-bridge:0.102.0
kubeRBACProxy:
image:
# Images: gallery.ecr.aws/aws-observability/mirror-kube-rbac-proxy
repository: public.ecr.aws/aws-observability/mirror-kube-rbac-proxy
tag: v0.14.1
tag: v0.15.0
`
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package adot_operator
package adot

import (
"github.com/awslabs/eksdemo/pkg/manifest"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package adot_operator
package adot

import (
"github.com/awslabs/eksdemo/pkg/application"
Expand All @@ -14,10 +14,10 @@ func newOptions() (options *AdotOperatorOptions, flags cmd.Flags) {
options = &AdotOperatorOptions{
ApplicationOptions: application.ApplicationOptions{
DefaultVersion: &application.LatestPrevious{
LatestChart: "0.31.0",
Latest: "0.78.0",
PreviousChart: "0.21.4",
Previous: "v0.66.0",
LatestChart: "0.63.2",
Latest: "0.102.0",
PreviousChart: "0.31.0",
Previous: "0.78.0",
},
Namespace: "adot-system",
ServiceAccount: "adot-operator",
Expand Down
1 change: 1 addition & 0 deletions pkg/resource/addon/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ func NewVersionsResource() *resource.Resource {
Command: cmd.Command{
Name: "addon-versions",
Description: "EKS Managed Addon Versions",
Aliases: []string{"addon-version"},
Args: []string{"NAME"},
},

Expand Down
10 changes: 8 additions & 2 deletions pkg/resource/otel/prometheus_cloudwatch.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ import (
"github.com/awslabs/eksdemo/pkg/template"
)

// As of 9/8/24 this is broken, errors with:
//
// Error: failed to resolve config: cannot resolve the configuration: cannot convert the confmap.Conf:
// environment variable "1" has invalid name: must match regex ^[a-zA-Z_][a-zA-Z0-9_]*$
//
// May be fixed in v0.105.0 in PR https://github.com/open-telemetry/opentelemetry-collector/pull/10560
func NewPrometheusCloudWatchCollector() *resource.Resource {
return &resource.Resource{
Command: cmd.Command{
Expand Down Expand Up @@ -37,7 +43,7 @@ const cloudWatchCollectorTemplate = `---
# Metrics pipeline with Prometheus Receiver and Amazon CloudWatch EMF Exporter sending metrics to Amazon CloudWatch
#
---
apiVersion: opentelemetry.io/v1alpha1
apiVersion: opentelemetry.io/v1beta1
kind: OpenTelemetryCollector
metadata:
namespace: {{ .Namespace }}
Expand All @@ -56,7 +62,7 @@ spec:
env:
- name: CLUSTER_NAME
value: {{ .ClusterName }}
config: |
config:
receivers:
#
# Scrape configuration for the Prometheus Receiver
Expand Down
10 changes: 8 additions & 2 deletions pkg/resource/otel/promethus_amp.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ type PrometheusAMPOptions struct {
AmpEndpoint string
}

// As of 9/8/24 this is broken, errors with:
//
// Error: failed to resolve config: cannot resolve the configuration: cannot convert the confmap.Conf:
// environment variable "1" has invalid name: must match regex ^[a-zA-Z_][a-zA-Z0-9_]*$
//
// May be fixed in v0.105.0 in PR https://github.com/open-telemetry/opentelemetry-collector/pull/10560
func NewPrometheusAMPCollector() *resource.Resource {
options := &PrometheusAMPOptions{
CommonOptions: resource.CommonOptions{
Expand Down Expand Up @@ -62,7 +68,7 @@ const promAMPCollectorTemplate = `---
# Metrics pipeline with Prometheus Receiver and Prometheus Remote Write Exporter sending metrics to Amazon Managed Prometheus
#
---
apiVersion: opentelemetry.io/v1alpha1
apiVersion: opentelemetry.io/v1beta1
kind: OpenTelemetryCollector
metadata:
namespace: {{ .Namespace }}
Expand All @@ -78,7 +84,7 @@ spec:
cpu: "1"
limits:
cpu: "1"
config: |
config:
extensions:
sigv4auth:
region: {{ .Region }}
Expand Down
13 changes: 8 additions & 5 deletions pkg/resource/otel/simplest.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"github.com/awslabs/eksdemo/pkg/template"
)

// As of 9/8/24, this doesn't work due to https://github.com/aws-observability/aws-otel-collector/issues/2470
func NewSimplestCollector() *resource.Resource {
return &resource.Resource{
Command: cmd.Command{
Expand All @@ -30,18 +31,20 @@ func NewSimplestCollector() *resource.Resource {

// https://github.com/open-telemetry/opentelemetry-operator#getting-started
const simplestCollectorTemplate = `---
apiVersion: opentelemetry.io/v1alpha1
apiVersion: opentelemetry.io/v1beta1
kind: OpenTelemetryCollector
metadata:
namespace: {{ .Namespace }}
name: {{ .Name }}
spec:
config: |
config:
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
processors:
memory_limiter:
check_interval: 1s
Expand All @@ -52,12 +55,12 @@ spec:
timeout: 10s
exporters:
logging:
debug: {}
service:
pipelines:
traces:
receivers: [otlp]
processors: []
exporters: [logging]
processors: [memory_limiter, batch]
exporters: [debug]
`

0 comments on commit adf0309

Please sign in to comment.