Skip to content

feat: gate OTel Helm resources for operator-managed bootstrap - #1665

Merged
pdettori merged 3 commits into
rossoctl:mainfrom
Bobbins228:feat/rhaieng-4905-otel-bootstrap-chart-gate
May 27, 2026
Merged

feat: gate OTel Helm resources for operator-managed bootstrap#1665
pdettori merged 3 commits into
rossoctl:mainfrom
Bobbins228:feat/rhaieng-4905-otel-bootstrap-chart-gate

Conversation

@Bobbins228

Copy link
Copy Markdown
Contributor

Merge after: rossoctl/operator#376

Summary

Adds an otelBootstrap.operatorManaged toggle to the kagenti-deps Helm chart and an --otel-operator-managed flag to the OCP setup script. When enabled, the Helm chart defers OTel collector ConfigMap assembly and ingress CA trust to the kagenti-operator's bootstrap runnable instead of rendering them itself.

Changes

  • charts/kagenti-deps/values.yaml — new otelBootstrap.operatorManaged flag (default false)
  • charts/kagenti-deps/templates/otel-collector.yaml — gate the otel-collector-config ConfigMap behind {{- if not .Values.otelBootstrap.operatorManaged }}
  • charts/kagenti-deps/templates/otel-ingress-ca-job.yaml — gate the entire Job behind the same toggle
  • scripts/ocp/setup-kagenti.sh — new --otel-operator-managed flag that:
    • Skips injecting MLflow OTel values into the Helm args
    • Passes --set otelBootstrap.operatorManaged=true to kagenti-deps
    • Skips the deferred helm upgrade for OTel endpoint wiring
    • MLflow provisioning (DSC, CR, RBAC) remains unchanged

Test Plan

  • helm template renders ConfigMap and Job when otelBootstrap.operatorManaged is unset
  • helm template omits ConfigMap and Job when otelBootstrap.operatorManaged=true
  • setup-kagenti.sh --otel-operator-managed logs skip messages and passes the flag to Helm
  • Full end-to-end: setup script + operator with otelBootstrap.enable=true on OCP cluster

Made with Cursor

Bobbins228 and others added 2 commits May 25, 2026 13:08
Add otelBootstrap.operatorManaged toggle (default: false) so that when
the kagenti-operator handles OTel collector bootstrap,
the Helm-based otel-ingress-ca-job and inline otel-collector-config
ConfigMap are skipped. No behaviour change when toggle is off.

Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Bobbins228 <mcampbel@redhat.com>
When passed, the setup script skips injecting OTel MLflow values into
the kagenti-deps Helm chart and skips the deferred helm upgrade for
the MLflow endpoint. Instead it sets otelBootstrap.operatorManaged=true
so the Helm chart defers ConfigMap assembly and ingress CA trust to
the kagenti-operator's bootstrap runnable.

MLflow provisioning (DSC, CR creation) and RBAC remain unchanged as
the operator expects the MLflow CR to already exist.

Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Bobbins228 <mcampbel@redhat.com>
@Bobbins228
Bobbins228 force-pushed the feat/rhaieng-4905-otel-bootstrap-chart-gate branch from 86d68b1 to 3e3188e Compare May 25, 2026 12:09

@rubambiza rubambiza left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well-scoped PR that introduces an opt-in toggle (otelBootstrap.operatorManaged: false) to defer OTel collector ConfigMap assembly and ingress CA job to the kagenti-operator. Helm template nesting is correct — the new guard only gates the ConfigMap and CA job while leaving Service/Deployment Helm-managed. Shell script logic correctly prioritizes --otel-operator-managed over MLFLOW_TRACES_ENDPOINT with clear log messages at each skip point.

Areas reviewed: Helm templates, Helm values, Shell script
Commits: 2, both signed-off
CI status: All passing

Two non-blocking notes inline.

Assisted-By: Claude Code

port: 8335
targetPort: 8335
type: ClusterIP
{{- if not .Values.otelBootstrap.operatorManaged }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: The new operatorManaged guard gates only the ConfigMap (and the ingress CA job in the other template). The Service and Deployment above still render when operatorManaged=true. This seems intentional (operator manages config not lifecycle), but a one-line comment here like {{- /* ConfigMap is operator-managed when otelBootstrap.operatorManaged=true */}} would make the design choice explicit for future readers.

done

# Build MLflow OTEL flags: enable the pipeline and point it at the DSC-managed endpoint.
# When --otel-operator-managed is set, the operator handles ConfigMap assembly

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: When OTEL_OPERATOR_MANAGED=true AND MLFLOW_TRACES_ENDPOINT is non-empty (user sets both), the operator-managed branch wins silently. Consider emitting a warning like log_warn "--otel-operator-managed set; ignoring MLFLOW_TRACES_ENDPOINT" to make the precedence obvious for operators troubleshooting why their endpoint isn't being used.

- Add Helm comment clarifying that only the ConfigMap is gated by
  operatorManaged; Service and Deployment remain Helm-managed.
- Emit a warning when --otel-operator-managed and MLFLOW_TRACES_ENDPOINT
  are both set, making the precedence explicit.

Signed-off-by: Bobbins228 <mcampbel@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@pdettori
pdettori merged commit d43fe39 into rossoctl:main May 27, 2026
23 of 24 checks passed
@github-project-automation github-project-automation Bot moved this from New /:ToDo to Done in Rossoctl Issue Prioritization May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants