Skip to content

Commit 1d0115e

Browse files
committed
Merge branch 'main' into featuregates-into-cli
2 parents 07a2bb8 + eaf998f commit 1d0115e

File tree

71 files changed

+1354
-594
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+1354
-594
lines changed

.github/workflows/continuous-integration.yaml

+7-5
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,15 @@ jobs:
2020

2121
- name: Set up Go
2222
uses: actions/setup-go@v5
23+
id: setup-go
2324
with:
24-
go-version: "~1.22.1"
25+
go-version: "~1.21.1"
2526

2627
- name: Cache tools
2728
uses: actions/cache@v4
2829
with:
2930
path: bin
30-
key: ${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('Makefile') }}
31+
key: ${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('Makefile') }}-${{ steps.setup-go.outputs.go-version }}
3132

3233
- name: Install tools
3334
run: make install-tools
@@ -45,13 +46,14 @@ jobs:
4546
- name: Set up Go
4647
uses: actions/setup-go@v5
4748
with:
48-
go-version: "~1.22.1"
49+
go-version: "~1.21.1"
4950

5051
- name: Cache tools
5152
uses: actions/cache@v4
53+
id: setup-go
5254
with:
5355
path: bin
54-
key: ${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('Makefile') }}
56+
key: ${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('Makefile') }}-${{ steps.setup-go.outputs.go-version }}
5557

5658
- name: Install tools
5759
run: make install-tools
@@ -79,7 +81,7 @@ jobs:
7981
- name: Set up Go
8082
uses: actions/setup-go@v5
8183
with:
82-
go-version: "~1.22.1"
84+
go-version: "~1.21.1"
8385

8486
- name: Initialize CodeQL
8587
uses: github/codeql-action/init@v3

.github/workflows/e2e.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,14 @@ jobs:
4444
uses: actions/checkout@v4
4545
- name: Set up Go
4646
uses: actions/setup-go@v5
47+
id: setup-go
4748
with:
48-
go-version: "~1.22.0"
49+
go-version: "~1.21.3"
4950
- name: Cache tools
5051
uses: actions/cache@v4
5152
with:
5253
path: bin
53-
key: ${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('Makefile') }}
54+
key: ${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('Makefile') }}-${{ steps.setup-go.outputs.go-version }}
5455
- name: Install chainsaw
5556
uses: kyverno/[email protected]
5657
- name: Install tools

.github/workflows/publish-images.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919

2020
- uses: actions/setup-go@v5
2121
with:
22-
go-version: '~1.22.1'
22+
go-version: '~1.21.3'
2323

2424
- name: Unshallow
2525
run: git fetch --prune --unshallow

.github/workflows/publish-operator-opamp-bridge.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323

2424
- uses: actions/setup-go@v5
2525
with:
26-
go-version: '~1.22.1'
26+
go-version: '~1.21.3'
2727

2828
# TODO: We're currently not using this. Should we?
2929
- name: Read version

.github/workflows/publish-target-allocator.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323

2424
- uses: actions/setup-go@v5
2525
with:
26-
go-version: '~1.22.1'
26+
go-version: '~1.21.3'
2727

2828
# TODO: We're currently not using this. Should we?
2929
- name: Read version

.github/workflows/release.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
- name: Set up Go
3737
uses: actions/setup-go@v5
3838
with:
39-
go-version: "~1.22.1"
39+
go-version: "~1.21.1"
4040

4141
- name: "generate release resources"
4242
run: make release-artifacts IMG_PREFIX="ghcr.io/open-telemetry/opentelemetry-operator" VERSION=${DESIRED_VERSION}

.github/workflows/scorecard.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ jobs:
2424

2525
- name: Set up Go
2626
uses: actions/setup-go@v5
27+
id: setup-go
2728
with:
28-
go-version: "~1.22.1"
29+
go-version: "~1.21.1"
2930

3031
- name: Check out code into the Go module directory
3132
uses: actions/checkout@v4
@@ -34,7 +35,7 @@ jobs:
3435
uses: actions/cache@v4
3536
with:
3637
path: bin
37-
key: ${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('Makefile') }}
38+
key: ${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('Makefile') }}-${{ steps.setup-go.outputs.go-version }}
3839

3940
- name: Install tools
4041
run: make install-tools

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/open-telemetry/opentelemetry-operator
22

3-
go 1.22
3+
go 1.21
44

55
retract v1.51.0
66

tests/e2e-instrumentation/instrumentation-apache-httpd/01-assert.yaml

+14-6
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,19 @@ spec:
4141
- --config=env:OTEL_CONFIG
4242
name: otc-container
4343
initContainers:
44-
- args:
45-
- cp -r /usr/local/apache2/conf/* /opt/opentelemetry-webserver/source-conf
46-
name: otel-agent-source-container-clone
47-
- args:
48-
- cp -r /opt/opentelemetry/* /opt/opentelemetry-webserver/agent && export agentLogDir=$(echo "/opt/opentelemetry-webserver/agent/logs" | sed 's,/,\\/,g') && cat /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml.template | sed 's/__agent_log_dir__/'${agentLogDir}'/g' > /opt/opentelemetry-webserver/agent/conf/appdynamics_sdk_log4cxx.xml &&echo "$OTEL_APACHE_AGENT_CONF" > /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && sed -i 's/<<SID-PLACEHOLDER>>/'${APACHE_SERVICE_INSTANCE_ID}'/g' /opt/opentelemetry-webserver/source-conf/opentemetry_agent.conf && echo 'Include /usr/local/apache2/conf/opentemetry_agent.conf' >> /opt/opentelemetry-webserver/source-conf/httpd.conf
49-
name: otel-agent-attach-apache
44+
- name: otel-agent-source-container-clone
45+
- name: otel-agent-attach-apache
5046
status:
47+
containerStatuses:
48+
- name: myapp
49+
ready: true
50+
started: true
51+
- name: otc-container
52+
ready: true
53+
started: true
54+
initContainerStatuses:
55+
- name: otel-agent-source-container-clone
56+
ready: true
57+
- name: otel-agent-attach-apache
58+
ready: true
5159
phase: Running

tests/e2e-instrumentation/instrumentation-apache-httpd/chainsaw-test.yaml

+4-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ spec:
2222
- annotate
2323
- namespace
2424
- ${NAMESPACE}
25-
- openshift.io/sa.scc.supplemental-groups=3000/1000
25+
- openshift.io/sa.scc.supplemental-groups=3000/3000
2626
- --overwrite
2727
- apply:
2828
file: 00-install-collector.yaml
@@ -34,3 +34,6 @@ spec:
3434
file: 01-install-app.yaml
3535
- assert:
3636
file: 01-assert.yaml
37+
catch:
38+
- podLogs:
39+
selector: app=my-apache
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,80 @@
1-
# skipping test, see https://github.com/open-telemetry/opentelemetry-operator/issues/1936
21
apiVersion: v1
32
kind: Pod
43
metadata:
54
annotations:
6-
sidecar.opentelemetry.io/inject: "true"
5+
instrumentation.opentelemetry.io/container-names: myapp,myrabbit
76
instrumentation.opentelemetry.io/inject-apache-httpd: "true"
8-
instrumentation.opentelemetry.io/container-names: "myapp,myrabbit"
7+
sidecar.opentelemetry.io/inject: "true"
98
labels:
10-
app: my-apache
9+
app: my-apache-multi
1110
spec:
1211
containers:
13-
- env:
14-
- name: OTEL_SERVICE_NAME
15-
value: my-apache
16-
- name: OTEL_EXPORTER_OTLP_ENDPOINT
17-
value: http://localhost:4317
18-
- name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME
19-
valueFrom:
20-
fieldRef:
21-
apiVersion: v1
22-
fieldPath: metadata.name
23-
- name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME
24-
valueFrom:
25-
fieldRef:
26-
apiVersion: v1
27-
fieldPath: spec.nodeName
28-
- name: OTEL_PROPAGATORS
29-
value: jaeger,b3
30-
- name: OTEL_TRACES_SAMPLER
31-
value: parentbased_traceidratio
32-
- name: OTEL_TRACES_SAMPLER_ARG
33-
value: "0.25"
34-
- name: OTEL_RESOURCE_ATTRIBUTES
35-
name: myapp
36-
volumeMounts:
37-
- mountPath: /var/run/secrets/kubernetes.io/serviceaccount
38-
- mountPath: /opt/opentelemetry-webserver/agent
39-
name: otel-apache-agent
40-
- mountPath: /usr/local/apache2/conf
41-
name: otel-apache-conf-dir
42-
- env:
43-
- name: OTEL_SERVICE_NAME
44-
value: my-apache
45-
- name: OTEL_EXPORTER_OTLP_ENDPOINT
46-
value: http://localhost:4317
47-
- name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME
48-
valueFrom:
49-
fieldRef:
50-
apiVersion: v1
51-
fieldPath: metadata.name
52-
- name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME
53-
valueFrom:
54-
fieldRef:
55-
apiVersion: v1
56-
fieldPath: spec.nodeName
57-
- name: OTEL_PROPAGATORS
58-
value: jaeger,b3
59-
- name: OTEL_TRACES_SAMPLER
60-
value: parentbased_traceidratio
61-
- name: OTEL_TRACES_SAMPLER_ARG
62-
value: "0.25"
63-
- name: OTEL_RESOURCE_ATTRIBUTES
64-
name: myrabbit
65-
volumeMounts:
66-
- mountPath: /var/run/secrets/kubernetes.io/serviceaccount
67-
- args:
68-
- --config=env:OTEL_CONFIG
69-
name: otc-container
12+
- env:
13+
- name: OTEL_SERVICE_NAME
14+
value: my-apache-multi
15+
- name: OTEL_EXPORTER_OTLP_ENDPOINT
16+
value: http://localhost:4317
17+
- name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME
18+
valueFrom:
19+
fieldRef:
20+
apiVersion: v1
21+
fieldPath: metadata.name
22+
- name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME
23+
valueFrom:
24+
fieldRef:
25+
apiVersion: v1
26+
fieldPath: spec.nodeName
27+
- name: OTEL_PROPAGATORS
28+
value: jaeger,b3
29+
- name: OTEL_TRACES_SAMPLER
30+
value: parentbased_traceidratio
31+
- name: OTEL_TRACES_SAMPLER_ARG
32+
value: "0.25"
33+
- name: OTEL_RESOURCE_ATTRIBUTES
34+
name: myapp
35+
- env:
36+
- name: OTEL_SERVICE_NAME
37+
value: my-apache-multi
38+
- name: OTEL_EXPORTER_OTLP_ENDPOINT
39+
value: http://localhost:4317
40+
- name: OTEL_RESOURCE_ATTRIBUTES_POD_NAME
41+
valueFrom:
42+
fieldRef:
43+
apiVersion: v1
44+
fieldPath: metadata.name
45+
- name: OTEL_RESOURCE_ATTRIBUTES_NODE_NAME
46+
valueFrom:
47+
fieldRef:
48+
apiVersion: v1
49+
fieldPath: spec.nodeName
50+
- name: OTEL_PROPAGATORS
51+
value: jaeger,b3
52+
- name: OTEL_TRACES_SAMPLER
53+
value: parentbased_traceidratio
54+
- name: OTEL_TRACES_SAMPLER_ARG
55+
value: "0.25"
56+
- name: OTEL_RESOURCE_ATTRIBUTES
57+
name: myrabbit
58+
- args:
59+
- --config=env:OTEL_CONFIG
60+
name: otc-container
61+
initContainers:
62+
- name: otel-agent-source-container-clone
63+
- name: otel-agent-attach-apache
7064
status:
65+
containerStatuses:
66+
- name: myapp
67+
ready: true
68+
started: true
69+
- name: myrabbit
70+
ready: true
71+
started: true
72+
- name: otc-container
73+
ready: true
74+
started: true
75+
initContainerStatuses:
76+
- name: otel-agent-source-container-clone
77+
ready: true
78+
- name: otel-agent-attach-apache
79+
ready: true
7180
phase: Running
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
1-
# skipping test, see https://github.com/open-telemetry/opentelemetry-operator/issues/1936
21
apiVersion: apps/v1
32
kind: Deployment
43
metadata:
5-
name: my-apache
4+
name: my-apache-multi
65
spec:
76
selector:
87
matchLabels:
9-
app: my-apache
8+
app: my-apache-multi
109
replicas: 1
1110
template:
1211
metadata:
1312
labels:
14-
app: my-apache
13+
app: my-apache-multi
1514
annotations:
1615
sidecar.opentelemetry.io/inject: "true"
1716
instrumentation.opentelemetry.io/inject-apache-httpd: "true"
1817
instrumentation.opentelemetry.io/container-names: "myapp,myrabbit"
1918
spec:
19+
securityContext:
20+
runAsUser: 1000
21+
runAsGroup: 3000
22+
fsGroup: 3000
2023
containers:
2124
- name: myapp
22-
image: docker.io/chrlic/apache-test@sha256:fad58c6ce7a4f477b455bece2a1980741fa6f81cef1e1093a3b72f9b2ffa7b8e
23-
# image source at https://github.com/cisco-open/appdynamics-k8s-webhook-instrumentor/tree/main/testWorkloads/apache-httpd
24-
# licensed under Apache 2.0
25+
image: ghcr.io/open-telemetry/opentelemetry-operator/e2e-test-app-apache-httpd:main
2526
imagePullPolicy: Always
2627
ports:
2728
- containerPort: 8080
@@ -32,5 +33,13 @@ spec:
3233
requests:
3334
cpu: 250m
3435
memory: 100Mi
36+
securityContext:
37+
allowPrivilegeEscalation: false
38+
capabilities:
39+
drop: ["ALL"]
3540
- name: myrabbit
3641
image: rabbitmq
42+
securityContext:
43+
allowPrivilegeEscalation: false
44+
capabilities:
45+
drop: ["ALL"]

0 commit comments

Comments
 (0)