Skip to content

fix(k8s): rag-ingest names a Collector Service that is absent #4528

Closed

Description

@dan-petty

Problem Description

The rag-ingest WorkflowTemplate sets OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector.otel.svc.cluster.local:4318 (k8s/devops/workflowtemplate-rag-ingest.yaml). Namespace otel has no Service with that name. The Collector chart makes the Service otel-collector-opentelemetry-collector (release otel-collector, chart opentelemetry-collector). kubectl -n otel get svc -o name lists otel-collector-opentelemetry-collector, tempo and tempo-headless.

devops-cli reads telemetry.endpoint first, and OTEL_EXPORTER_OTLP_ENDPOINT only when the config names no endpoint (docs/TELEMETRY.md, OTLP Exporter). If the mounted config of the step names no endpoint, the step sends its spans and metrics to a host that does not resolve. If the config names one, the variable is dead and wrong.

Reproduction Steps

  1. git grep -n "otel-collector.otel.svc" -- k8s/devops/
  2. kubectl -n otel get svc -o name

Expected vs Actual Behavior

Expected: the step names the Collector Service that exists, or sets no variable when the mounted config names the endpoint. A check of the k8s row of devops ci fails on an OTLP endpoint in k8s/ that names a host in namespace otel other than the Collector Service.

Actual: the step names a Service that does not exist.

Environment Diagnostics

Argo CD devops Application, main branch.

Proposed design

Problem statement

The rag-ingest WorkflowTemplate sends spans and metrics to otel-collector.otel.svc.cluster.local. That host does not resolve. The Collector chart names its Service otel-collector-opentelemetry-collector. When the mounted config names no endpoint, the step exports to the dead host. No check of k8s/ reports an OTLP endpoint in namespace otel that is not the Collector Service.

Acceptance criteria

Requirement: rag-ingest endpoint host

The ingest container of the rag-ingest WorkflowTemplate SHALL set OTEL_EXPORTER_OTLP_ENDPOINT to the Collector Service that exists in namespace otel.

Scenario: The step names the live Collector Service

  • WHEN a test reads the environment of the ingest container in k8s/devops/workflowtemplate-rag-ingest.yaml
  • THEN the value is http://otel-collector-opentelemetry-collector.otel.svc.cluster.local:4318.

Requirement: k8s row OTLP endpoint check

The k8s row of devops ci SHALL fail when a manifest under k8s/ names an OTLP endpoint host in namespace otel other than the Collector Service.

Scenario: A stale Collector host fails

  • WHEN the check reads a manifest that sets OTEL_EXPORTER_OTLP_ENDPOINT to http://otel-collector.otel.svc.cluster.local:4318
  • THEN the check names that host and returns a failure.

Requirement: Live Collector Service passes

The check SHALL pass on an OTLP endpoint that names the Collector Service in namespace otel.

Scenario: The corrected host passes

  • WHEN the check reads a manifest that sets OTEL_EXPORTER_OTLP_ENDPOINT to http://otel-collector-opentelemetry-collector.otel.svc.cluster.local:4318
  • THEN the check reports no problem and returns a pass.

Requirement: Other hosts pass

The check SHALL ignore an OTLP endpoint host outside namespace otel and a workload that sets no OTLP endpoint.

Scenario: Another namespace and no endpoint pass

  • WHEN the check reads one manifest that sets OTEL_EXPORTER_OTLP_ENDPOINT to http://collector.monitoring.svc.cluster.local:4318 and one manifest with no OTLP endpoint
  • THEN the check reports no problem for either manifest.

Requirement: The committed tree passes

Every OTLP endpoint under k8s/ MUST name the Collector Service or a host outside namespace otel.

Scenario: The committed k8s tree passes the check

  • WHEN the check reads the committed k8s/ tree
  • THEN the check reports no problem.

Existing Tool Considered

No alternatives check has run. No open, maintained tool covers the need. kubeconform validates the Kubernetes schema and kube-linter applies pattern rules. Neither resolves a Service host name, and Helm lookup needs a live cluster at install time. The change builds its own check: about 30k tokens to write the module and its tests, about 5k tokens a month to keep and fix it, and about 4 hours of elapsed time.

Key questions

  • Which value does the rag-ingest step set for its OTLP endpoint?: Set OTEL_EXPORTER_OTLP_ENDPOINT to http://otel-collector-opentelemetry-collector.otel.svc.cluster.local:4318. (best practice) [sources: k8s/devops/workflowtemplate-rag-ingest.yaml, docs/TELEMETRY.md, docs/CONFIGURATION.md:147]
    • Chosen: Correct the host in OTEL_EXPORTER_OTLP_ENDPOINT. The variable is correct when the config names no endpoint, and harmless when the config names one.
    • Rejected: Remove OTEL_EXPORTER_OTLP_ENDPOINT. A config that names no endpoint then falls back to http://localhost:4318, which fails inside the pod.
    • Rejected: Set DEVOPS_CLI_TELEMETRY_ENDPOINT instead. It outranks the mounted config, so the step ignores an endpoint that the config sets on purpose.
  • What is the name and the port of the Collector Service in namespace otel?: The Service is otel-collector-opentelemetry-collector, the Helm fullname of release otel-collector and chart opentelemetry-collector. The OTLP HTTP port is 4318. [sources: k8s/otel/values.yaml, tests/gate/k8s_checks/otel_collector.py, k8s/devops/workflowtemplate-rag-ingest.yaml]
  • Where does the new check live?: Add the module tests/gate/k8s_checks/otel_endpoint.py, which the k8s row of devops ci runs. (best practice) [sources: tests/gate/k8s_checks/otel_collector.py, tests/gate/k8s_checks/argocd_apps.py]
    • Chosen: A module under tests/gate/k8s_checks/. The other k8s row checks live there, and the issue asks for a check of that row.
    • Rejected: A test under tests/invariants/. An invariant test runs in another job, so the k8s row would not report the host.
    • Rejected: A kube-linter rule. A kube-linter rule matches a pattern in one manifest and cannot know the Service name.
  • Which manifests and which variables does the check scan?: The check reads every YAML file under k8s/ and each environment name that starts with OTEL_EXPORTER_OTLP and ends with _ENDPOINT. (best practice) [sources: k8s/devops/workflowtemplate-rag-ingest.yaml, docs/TELEMETRY.md]
    • Chosen: All of k8s/ and every OTLP endpoint variable. The issue names k8s/, and the signal-specific variables carry the same defect.
    • Rejected: k8s/devops/ and OTEL_EXPORTER_OTLP_ENDPOINT only. It misses the other directories and the signal-specific variables.
  • How does the check know the Collector Service name?: The module holds one constant for the Service name and the port: otel-collector-opentelemetry-collector and 4318. (best practice) [sources: k8s/otel/values.yaml, tests/gate/k8s_checks/otel_collector.py]
    • Chosen: One constant in the new module. The chart's fullname template is not in this repository, and the check must run offline.
    • Rejected: Derive it from k8s/argocd/apps/otel-collector.yaml. Refine must first confirm that the file holds the release name and the chart name.
    • Rejected: Read the live Service from the cluster. The acceptance criteria must pass or fail with no cluster access.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Alternatives check of 2026-11-11: partly.
Tool: open-policy-agent/conftest (https://github.com/open-policy-agent/conftest), NOASSERTION, last activity 2026-11-11, maintained.

Activity

  1. added
    source/agent
    type/bug
    scope/k8s
    status/new
    value/medium
    effort/low
    on Nov 11, 2026
  2. dan-petty commented on Nov 11, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/bug. The fix prefix of the title gives the type.
    • Scope: scope/k8s. The (k8s) scope of the title gives the scope.
    • Priority: P2-Medium. Telemetry is silently lost for rag-ingest, but the service still runs and no data is corrupted.
    • Value: Medium. Users lose observability for rag-ingest spans and metrics, which hinders debugging and SLO tracking.
    • Effort: Low. The fix is a one-line correction of the Service name or removal of the variable.
    • Related: feat(k8s): enable telemetry for roadmap-service and k8s services #1197, which asks for a different change. Both set the OTLP endpoint for k8s workloads, but #1197 enables telemetry for roadmap-service with the correct name while the candidate fixes the wrong name in rag-ingest.
  3. added
    priority/p2-medium
    on Nov 11, 2026
  4. added
    status/ready
    and removed
    status/new
    on Nov 11, 2026
  5. devops-cli-service commented on Nov 11, 2026

    @devops-cli-service
    Contributor

    Status set to Ready at 5f75d25 (see proposed design in issue body).

  6. devops-cli-service commented on Nov 11, 2026

    @devops-cli-service
    Contributor

    Alternatives check: partly

    Reason: The searches and repository facts turned up Conftest (Open Policy Agent's policy-test harness) as the one open, maintained tool that can express this check: it parses and combines all manifests under k8s/, so a Rego rule can gather the Service names in namespace otel and fail any OTLP endpoint host that is not the Collector Service. It covers only the checking half of the issue — no tool fixes the wrong host in the WorkflowTemplate, and Conftest ships no OTLP or Service-reference rule, so the policy itself must still be written.

    Tool: open-policy-agent/conftest (https://github.com/open-policy-agent/conftest)

    • License: NOASSERTION
    • Last activity: 2026-11-11
    • Maintained: yes

    Covers:

    • Runs declarative Rego policies over Kubernetes YAML in CI and returns a non-zero exit status on a failure
    • Combines every file under k8s/ into one document set, so one rule can compare an OTLP endpoint host with the Service names declared in the same tree
    • Matches env var names of the form OTEL_EXPORTER_OTLP*_ENDPOINT and host patterns, which is the shape the issue asks the k8s row to check

    Lacks:

    • Ships no OTLP endpoint or Service-reference rule; the project still writes and keeps the policy and its test cases
    • Does not correct OTEL_EXPORTER_OTLP_ENDPOINT in k8s/devops/workflowtemplate-rag-ingest.yaml; the manifest edit stays manual
    • Knows no cluster state, so the expected Collector Service name must be held as a constant in the rule, as the proposed design already does
    • Is a new external tool to add to the gate rather than a module under tests/gate/k8s_checks/

    Tools considered:

    Searches run:

    • conftest rego combine manifests validate service reference exists, results: 5
    • open source tool check kubernetes manifest environment variable references existing Service name, results: 5
    • kube-linter dangling service cross-resource checks list, results: 5
    • conftest opa kubernetes manifest policy testing, results: 5
    • kube-linter, results: 5
    • kube-linter built-in checks list env-var template documentation, results: 5
    • OpenTelemetry Operator auto-instrumentation injects OTEL_EXPORTER_OTLP_ENDPOINT collector service, results: 5
    • kubevious validation rules cross manifest service reference missing, results: 5
    • conftest combine all yaml files one policy check documentation, results: 5
    • conftest.dev policy testing for Kubernetes configuration, results: 5

    Sources:

    Checked on 2026-11-11. A person decides what this means for the item. The check changes no label and closes no issue.

  7. added
    status/in-progress
    and removed
    status/ready
    on Nov 15, 2026
  8. added
    status/in-review
    and removed
    status/in-progress
    on Nov 15, 2026
  9. removed
    status/in-review
    on Nov 15, 2026
  10. devops-cli-service commented on Nov 15, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-15 23:51 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p2-mediumscope/k8ssource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions