Skip to content

Add TLS to Jaeger dev deployment via OpenShift serving certs#361

Open
vimalk78 wants to merge 1 commit into
openshift:mainfrom
vimalk78:ols-3705-jaeger-tls
Open

Add TLS to Jaeger dev deployment via OpenShift serving certs#361
vimalk78 wants to merge 1 commit into
openshift:mainfrom
vimalk78:ols-3705-jaeger-tls

Conversation

@vimalk78

Copy link
Copy Markdown
Contributor

Summary

  • Configure TLS on Jaeger's OTLP gRPC endpoint using OpenShift serving certs
  • The OTel collector connects with insecure: false, so Jaeger needs a valid TLS cert
  • Annotates jaeger-otlp-grpc service with serving-cert-secret-name for auto-generated certs
  • Mounts cert secret into the pod and sets COLLECTOR_OTLP_GRPC_TLS_* env vars

Test plan

  • Run hack/deploy-jaeger.sh and confirm Jaeger starts with TLS on port 4317
  • Confirm OTel collector can connect to Jaeger without TLS errors

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
📝 Walkthrough

Summary by CodeRabbit

  • New Features
    • Enabled secure OTLP gRPC communication for Jaeger using TLS certificates, with the necessary certificate provisioning and runtime configuration.
    • Updated the displayed Jaeger OTLP gRPC endpoint label to clearly indicate TLS is in use.

Walkthrough

The Jaeger deployment script now provisions an OpenShift serving certificate, configures the OTLP gRPC receiver for TLS, mounts the certificate and generated configuration, and labels the displayed endpoint as TLS-enabled.

Changes

Jaeger OTLP gRPC TLS

Layer / File(s) Summary
Configure Jaeger TLS deployment
hack/deploy-jaeger.sh
The script requests and waits for a serving-certificate secret, generates Jaeger TLS configuration, mounts the configuration and certificate into the deployment, and updates the endpoint output to show (TLS).

Sequence Diagram(s)

sequenceDiagram
  participant deploy-jaeger.sh
  participant OpenShift
  participant Jaeger
  deploy-jaeger.sh->>OpenShift: Annotate jaeger-otlp-grpc for serving certificate
  OpenShift-->>deploy-jaeger.sh: Create serving-certificate secret
  deploy-jaeger.sh->>OpenShift: Apply Jaeger config and mount certificate secret
  OpenShift->>Jaeger: Start TLS-enabled OTLP gRPC receiver
  deploy-jaeger.sh->>OpenShift: Print TLS OTLP gRPC endpoint
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: enabling TLS for Jaeger's dev deployment with OpenShift serving certs.
Description check ✅ Passed The description matches the changeset and objectives, describing TLS setup, serving certs, and collector connectivity.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Comment @coderabbitai help to get the list of available commands.

@openshift-ci
openshift-ci Bot requested review from joshuawilson and raptorsun July 22, 2026 13:04
@openshift-ci

openshift-ci Bot commented Jul 22, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign harche for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@hack/deploy-jaeger.sh`:
- Around line 23-25: Update the oc set volume command in deploy-jaeger.sh so it
no longer suppresses failures with a generic fallback. Before adding the volume,
explicitly detect whether the serving-cert volume already exists and skip the
add only in that case; otherwise propagate failures from oc set volume,
including invalid secrets, permission errors, and mount conflicts.
- Line 45: Update the OTLP gRPC endpoint printed by the deploy script to use the
service-serving certificate hostname `jaeger-otlp-grpc.$NAMESPACE.svc:4317`,
removing `.cluster.local` while preserving the TLS annotation and port.
- Around line 17-21: Update the Jaeger deployment configuration around the
existing oc set env command to either pin jaegertracing/jaeger to a
v1-compatible image tag or migrate the configuration to Jaeger v2 settings.
Ensure the selected approach enables OTLP gRPC TLS and preserves the configured
certificate and key paths from CERT_MOUNT.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 233083b0-f182-4afa-92af-52cfcb3b8151

📥 Commits

Reviewing files that changed from the base of the PR and between e368168 and 5d46892.

📒 Files selected for processing (1)
  • hack/deploy-jaeger.sh
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • openshift/lightspeed-agentic-sandbox (manual)

Comment thread hack/deploy-jaeger.sh Outdated
Comment thread hack/deploy-jaeger.sh Outdated
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Vimal Kumar <vimal78@gmail.com>
@vimalk78
vimalk78 force-pushed the ols-3705-jaeger-tls branch from 5d46892 to 429f5e5 Compare July 22, 2026 13:44

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@hack/deploy-jaeger.sh`:
- Line 72: Update the JSON patch operation in the Jaeger deployment patch
command to use `add` instead of `replace` for
`/spec/template/spec/containers/0/args`, so it creates the missing field on
initial deployment and replaces it safely on reruns.
- Line 83: Update the OTLP gRPC endpoint printed by the deployment script to
include the https:// scheme before the Jaeger service hostname, while preserving
the existing namespace and port values.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 187fd2fd-39ba-43a1-92fc-272acd089c01

📥 Commits

Reviewing files that changed from the base of the PR and between 5d46892 and 429f5e5.

📒 Files selected for processing (1)
  • hack/deploy-jaeger.sh
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • openshift/lightspeed-agentic-sandbox (manual)

Comment thread hack/deploy-jaeger.sh
oc set volume deployment/jaeger -n "$NAMESPACE" --add --overwrite --name=config --type=configmap --configmap-name="$CONFIG_CM" --mount-path=/etc/jaeger
oc set volume deployment/jaeger -n "$NAMESPACE" --add --overwrite --name=serving-cert --type=secret --secret-name="$CERT_SECRET" --mount-path="$CERT_MOUNT" --read-only

oc patch deployment jaeger -n "$NAMESPACE" --type=json -p '[{"op":"replace","path":"/spec/template/spec/containers/0/args","value":["--config","/etc/jaeger/config.yaml"]}]'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win

Use JSON Patch add for container arguments.

A deployment created on line 16 has no containers[0].args, so replace fails and aborts the script. add creates the field and also replaces it on reruns.

Proposed fix
-oc patch deployment jaeger -n "$NAMESPACE" --type=json -p '[{"op":"replace","path":"/spec/template/spec/containers/0/args","value":["--config","/etc/jaeger/config.yaml"]}]'
+oc patch deployment jaeger -n "$NAMESPACE" --type=json -p '[{"op":"add","path":"/spec/template/spec/containers/0/args","value":["--config","/etc/jaeger/config.yaml"]}]'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
oc patch deployment jaeger -n "$NAMESPACE" --type=json -p '[{"op":"replace","path":"/spec/template/spec/containers/0/args","value":["--config","/etc/jaeger/config.yaml"]}]'
oc patch deployment jaeger -n "$NAMESPACE" --type=json -p '[{"op":"add","path":"/spec/template/spec/containers/0/args","value":["--config","/etc/jaeger/config.yaml"]}]'
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@hack/deploy-jaeger.sh` at line 72, Update the JSON patch operation in the
Jaeger deployment patch command to use `add` instead of `replace` for
`/spec/template/spec/containers/0/args`, so it creates the missing field on
initial deployment and replaces it safely on reruns.

Comment thread hack/deploy-jaeger.sh
echo ""
echo "Jaeger UI: http://$ROUTE"
echo "OTLP gRPC: jaeger-otlp-grpc.$NAMESPACE.svc.cluster.local:4317"
echo "OTLP gRPC: jaeger-otlp-grpc.$NAMESPACE.svc.cluster.local:4317 (TLS)"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Publish an https:// OTLP endpoint.

The linked tracing client enables TLS only when OTEL_EXPORTER_OTLP_ENDPOINT starts with https; copying this bare endpoint produces a plaintext connection attempt against the TLS listener.

-echo "OTLP gRPC:   jaeger-otlp-grpc.$NAMESPACE.svc.cluster.local:4317 (TLS)"
+echo "OTLP gRPC:   https://jaeger-otlp-grpc.$NAMESPACE.svc.cluster.local:4317 (TLS)"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
echo "OTLP gRPC: jaeger-otlp-grpc.$NAMESPACE.svc.cluster.local:4317 (TLS)"
echo "OTLP gRPC: https://jaeger-otlp-grpc.$NAMESPACE.svc.cluster.local:4317 (TLS)"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@hack/deploy-jaeger.sh` at line 83, Update the OTLP gRPC endpoint printed by
the deployment script to include the https:// scheme before the Jaeger service
hostname, while preserving the existing namespace and port values.

Source: Linked repositories

@openshift-ci

openshift-ci Bot commented Jul 22, 2026

Copy link
Copy Markdown

@vimalk78: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant