Skip to content

OCPNETUI-63: Support custom TLS settings in the Helm charts - #467

Closed
rszwajko wants to merge 1 commit into
openshift:mainfrom
rszwajko:helmCharts
Closed

OCPNETUI-63: Support custom TLS settings in the Helm charts#467
rszwajko wants to merge 1 commit into
openshift:mainfrom
rszwajko:helmCharts

Conversation

@rszwajko

@rszwajko rszwajko commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Provide default values based on tlsref.org intermediate config.

Reference-Url: https://configurator.tlsref.org/#server=nginx&version=1.27.3&config=intermediate&openssl=4.0.1&hsts&guideline=6.0
Reference-Url: openshift/cluster-network-operator#3043

Summary by CodeRabbit

  • New Features
    • Added configurable TLS protocol versions and cipher suites for the plugin.
    • Added support for prioritizing server-selected ciphers.
    • TLS settings are applied only when configured.

Provide default values based on tlsref.org intermediate config.

Reference-Url: https://configurator.tlsref.org/#server=nginx&version=1.27.3&config=intermediate&openssl=4.0.1&hsts&guideline=6.0
Reference-Url: openshift/cluster-network-operator#3043
Signed-off-by: Radoslaw Szwajkowski <rszwajko@redhat.com>
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Aug 11, 2026
@openshift-ci openshift-ci Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 11, 2026
@openshift-ci

openshift-ci Bot commented Aug 11, 2026

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci-robot

openshift-ci-robot commented Aug 11, 2026

Copy link
Copy Markdown

@rszwajko: This pull request references OCPNETUI-63 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the sub-task to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Provide default values based on tlsref.org intermediate config.

Reference-Url: https://configurator.tlsref.org/#server=nginx&version=1.27.3&config=intermediate&openssl=4.0.1&hsts&guideline=6.0
Reference-Url: openshift/cluster-network-operator#3043

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 openshift-eng/jira-lifecycle-plugin repository.

@rszwajko rszwajko self-assigned this Aug 11, 2026
@openshift-ci

openshift-ci Bot commented Aug 11, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rszwajko

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

The pull request process is described 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

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 11, 2026
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Walkthrough

The Helm chart adds plugin TLS protocol, cipher, and server-cipher-preference values. The NGINX ConfigMap renders the related directives when values are set. Several scalar values now use single quotes.

Changes

Plugin TLS configuration

Layer / File(s) Summary
TLS values and NGINX rendering
charts/openshift-console-plugin/values.yaml, charts/openshift-console-plugin/templates/configmap.yaml
The chart defines TLS protocols, cipher suites, and server cipher preference. The ConfigMap conditionally renders the related NGINX directives. Changed scalar values use single quotes.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding custom TLS settings to the Helm charts.
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.
Stable And Deterministic Test Names ✅ Passed The commit changes only two Helm YAML files. No test declarations changed, and the existing Cypress titles are static string literals.
Test Structure And Quality ✅ Passed The patch changes only two Helm YAML files and adds no Ginkgo tests, cluster operations, waits, or assertions; this test-structure check is not applicable.
Microshift Test Compatibility ✅ Passed The pull request changes only two YAML Helm chart files and adds no Ginkgo e2e tests, so MicroShift test compatibility checks do not apply.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The pull request changes only two Helm YAML files; the commit adds no Ginkgo e2e tests or other test-like paths, so SNO test compatibility is not applicable.
Topology-Aware Scheduling Compatibility ✅ Passed The change adds only TLS ConfigMap directives and Helm values. It adds no topology, affinity, replica, node selector, toleration, spread, or PDB scheduling constraints.
Ote Binary Stdout Contract ✅ Passed The commit changes only two Helm YAML files; the repository has zero Go files and no OTE or Ginkgo entry points, so the OTE stdout contract is not applicable.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The commit changes only two Helm YAML files and adds no Ginkgo e2e tests, so IPv6 and disconnected-network test compatibility is not applicable.
No-Weak-Crypto ✅ Passed The diff enables TLS 1.2/1.3 and AES-GCM or CHACHA20-POLY1305 suites with SHA-256/384; it adds no flagged algorithms, custom crypto, or secret comparisons.
Container-Privileges ✅ Passed The patch adds only TLS values and NGINX directives. It adds no privileged, host namespace, SYS_ADMIN, root, or privilege-escalation settings; existing contexts enforce non-root and drop all capabi...
No-Sensitive-Data-In-Logs ✅ Passed The diff adds only TLS directives and static TLS values; it adds no logging statements or sensitive values, and existing NGINX logs contain no secret fields.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@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: 1

🤖 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 `@charts/openshift-console-plugin/templates/configmap.yaml`:
- Around line 22-30: Update the TLS configuration block to read protocols,
ciphers, and preferServerCiphers from .Values.plugin.tls instead of .Values.tls,
preserving the existing conditional rendering and NGINX directives.
🪄 Autofix

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: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 5b1e0a58-a7a7-4132-9cf5-cc6be0cfbef2

📥 Commits

Reviewing files that changed from the base of the PR and between 3378840 and 2c2ed07.

📒 Files selected for processing (2)
  • charts/openshift-console-plugin/templates/configmap.yaml
  • charts/openshift-console-plugin/values.yaml

Comment on lines +22 to +30
{{- if .Values.tls.protocols }}
ssl_protocols {{ .Values.tls.protocols }};
{{- end }}
{{- if .Values.tls.ciphers }}
ssl_ciphers {{ .Values.tls.ciphers }};
{{- end }}
{{- if .Values.tls.preferServerCiphers }}
ssl_prefer_server_ciphers {{ .Values.tls.preferServerCiphers }};
{{- end }}

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

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -eu

printf '%s\n' '--- chart files ---'
git ls-files charts/openshift-console-plugin | sed -n '1,120p'

printf '%s\n' '--- values.yaml ---'
cat -n charts/openshift-console-plugin/values.yaml

printf '%s\n' '--- configmap.yaml ---'
cat -n charts/openshift-console-plugin/templates/configmap.yaml

printf '%s\n' '--- TLS references in the chart ---'
rg -n --glob '*.yaml' --glob '*.yml' --glob '*.tpl' 'tls|ssl_protocols|ssl_ciphers|ssl_prefer_server_ciphers' charts/openshift-console-plugin

Repository: openshift/networking-console-plugin

Length of output: 5157


🏁 Script executed:

#!/bin/bash
set -eu

printf '%s\n' '--- all chart value and TLS references ---'
rg -n --hidden --glob '!charts/openshift-console-plugin/templates/configmap.yaml' \
  --glob '!charts/openshift-console-plugin/.helmignore' \
  '(^|[[:space:]])tls([.:]|:|$)|preferServerCiphers|ssl_protocols|ssl_ciphers|ssl_prefer_server_ciphers' .

printf '%s\n' '--- chart metadata and documentation files ---'
cat -n charts/openshift-console-plugin/Chart.yaml
git ls-files | rg '(^|/)(README|values)([^/]*)?$|charts/openshift-console-plugin'

printf '%s\n' '--- default-value path probe ---'
python3 - <<'PY'
from pathlib import Path

values = Path("charts/openshift-console-plugin/values.yaml").read_text()
paths = []
stack = []
for line in values.splitlines():
    if not line.strip() or line.lstrip().startswith("#") or line.strip() == "---":
        continue
    indent = len(line) - len(line.lstrip())
    key, sep, value = line.strip().partition(":")
    if not sep:
        continue
    while stack and stack[-1][0] >= indent:
        stack.pop()
    path = ".".join([item[1] for item in stack] + [key])
    if value.strip():
        paths.append(path)
    else:
        stack.append((indent, key))

template = Path("charts/openshift-console-plugin/templates/configmap.yaml").read_text()
for path in (
    "tls.protocols",
    "tls.ciphers",
    "tls.preferServerCiphers",
    "plugin.tls.protocols",
    "plugin.tls.ciphers",
    "plugin.tls.preferServerCiphers",
):
    print(f"{path}: {'defined' if path in paths else 'undefined'}")

print("template paths:")
for line in template.splitlines():
    if ".Values." in line and ("tls" in line or "ssl_" in line):
        print(line.strip())
PY

Repository: openshift/networking-console-plugin

Length of output: 2133


Read TLS values from the plugin scope.

The default values and user overrides are defined under .Values.plugin.tls, but these conditions and directives use .Values.tls.*. The rendered NGINX configuration therefore omits all three TLS settings. Change each reference to .Values.plugin.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 `@charts/openshift-console-plugin/templates/configmap.yaml` around lines 22 -
30, Update the TLS configuration block to read protocols, ciphers, and
preferServerCiphers from .Values.plugin.tls instead of .Values.tls, preserving
the existing conditional rendering and NGINX directives.

@rszwajko rszwajko closed this Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants