Skip to content

Commit

Permalink
Merge branch 'main' into 3370
Browse files Browse the repository at this point in the history
  • Loading branch information
iblancasa authored Oct 24, 2024
2 parents 218c258 + 22e8c06 commit cb85320
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 16 deletions.
16 changes: 16 additions & 0 deletions .chloggen/ta-no-root.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: bug_fix

# The name of the component, or a single word describing the area of concern, (e.g. collector, target allocator, auto-instrumentation, opamp, github action)
component: target allocator

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Change docker image to run as non-root

# One or more tracking issues related to the change
issues: [3378]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
3 changes: 0 additions & 3 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,3 @@

# AutoInstrumentation owners
# TBD

# Target Allocator owners
cmd/otel-allocator @open-telemetry/operator-ta-maintainers
9 changes: 0 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -860,15 +860,6 @@ Emeritus Approvers:
- [Owais Lone](https://github.com/owais), Splunk
- [Pablo Baeyens](https://github.com/mx-psi), DataDog

Target Allocator Maintainers ([@open-telemetry/operator-ta-maintainers](https://github.com/orgs/open-telemetry/teams/operator-ta-maintainers)):

- [Sebastian Poxhofer](https://github.com/secustor)

Emeritus Target Allocator Maintainers

- [Anthony Mirabella](https://github.com/Aneurysm9), AWS
- [Kristina Pathak](https://github.com/kristinapathak), Lightstep

Maintainers ([@open-telemetry/operator-maintainers](https://github.com/orgs/open-telemetry/teams/operator-maintainers)):

- [Jacob Aronoff](https://github.com/jaronoff97), Lightstep
Expand Down
6 changes: 4 additions & 2 deletions cmd/otel-allocator/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Get CA certificates from the Alpine package repo
FROM alpine:3.20 as certificates
FROM alpine:3.20 AS certificates

RUN apk --no-cache add ca-certificates

Expand All @@ -8,12 +8,14 @@ FROM scratch

ARG TARGETARCH

WORKDIR /root/
WORKDIR /

# Copy the certs
COPY --from=certificates /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt

# Copy binary built on the host
COPY bin/targetallocator_${TARGETARCH} ./main

USER 65532:65532

ENTRYPOINT ["./main"]
26 changes: 25 additions & 1 deletion tests/e2e-openshift/monitoring/chainsaw-test.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/kyverno/chainsaw/main/.schemas/json/test-chainsaw-v1alpha1.json
apiVersion: chainsaw.kyverno.io/v1alpha1
kind: Test
metadata:
Expand All @@ -14,6 +13,31 @@ spec:
file: 00-workload-monitoring.yaml
- assert:
file: 00-assert.yaml
- name: Enable OpenShift platform monitoring on the OpenTelemetry operator namespace
try:
- command:
entrypoint: oc
args:
- get
- pods
- -A
- -l control-plane=controller-manager
- -l app.kubernetes.io/name=opentelemetry-operator
- -o
- jsonpath={.items[0].metadata.namespace}
outputs:
- name: OTEL_NAMESPACE
value: ($stdout)
- command:
env:
- name: otelnamespace
value: ($OTEL_NAMESPACE)
entrypoint: oc
args:
- label
- namespace
- $otelnamespace
- openshift.io/cluster-monitoring=true
- name: step-01
try:
- apply:
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e-openshift/monitoring/check_metrics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ TOKEN=$(oc create token prometheus-user-workload -n openshift-user-workload-moni
THANOS_QUERIER_HOST=$(oc get route thanos-querier -n openshift-monitoring -o json | jq -r '.spec.host')

#Check metrics for OpenTelemetry collector instance.
metrics="otelcol_process_uptime otelcol_process_runtime_total_sys_memory_bytes otelcol_process_memory_rss otelcol_exporter_sent_spans otelcol_process_cpu_seconds otelcol_process_memory_rss otelcol_process_runtime_heap_alloc_bytes otelcol_process_runtime_total_alloc_bytes otelcol_process_runtime_total_sys_memory_bytes otelcol_process_uptime otelcol_receiver_accepted_spans otelcol_receiver_refused_spans"
metrics="otelcol_process_uptime otelcol_process_runtime_total_sys_memory_bytes otelcol_process_memory_rss otelcol_exporter_sent_spans otelcol_process_cpu_seconds otelcol_process_memory_rss otelcol_process_runtime_heap_alloc_bytes otelcol_process_runtime_total_alloc_bytes otelcol_process_runtime_total_sys_memory_bytes otelcol_process_uptime otelcol_receiver_accepted_spans otelcol_receiver_refused_spans opentelemetry_collector_info opentelemetry_collector_exporters opentelemetry_collector_receivers"

for metric in $metrics; do
query="$metric"
Expand Down

0 comments on commit cb85320

Please sign in to comment.