feat: gate OTel Helm resources for operator-managed bootstrap - #1665
Conversation
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>
86d68b1 to
3e3188e
Compare
rubambiza
left a comment
There was a problem hiding this comment.
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 }} |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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>
Summary
Adds an
otelBootstrap.operatorManagedtoggle to thekagenti-depsHelm chart and an--otel-operator-managedflag 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— newotelBootstrap.operatorManagedflag (defaultfalse)charts/kagenti-deps/templates/otel-collector.yaml— gate theotel-collector-configConfigMap behind{{- if not .Values.otelBootstrap.operatorManaged }}charts/kagenti-deps/templates/otel-ingress-ca-job.yaml— gate the entire Job behind the same togglescripts/ocp/setup-kagenti.sh— new--otel-operator-managedflag that:--set otelBootstrap.operatorManaged=truetokagenti-depshelm upgradefor OTel endpoint wiringTest Plan
helm templaterenders ConfigMap and Job whenotelBootstrap.operatorManagedis unsethelm templateomits ConfigMap and Job whenotelBootstrap.operatorManaged=truesetup-kagenti.sh --otel-operator-managedlogs skip messages and passes the flag to HelmotelBootstrap.enable=trueon OCP clusterMade with Cursor