Conversation
Reviewer's GuideThis PR moves the TLS configurator into the operator repository and image, adds CLI/client/crypto support including optional TLS 1.3 PQC, and changes deployment from a Helm hook Job to a long-running, RBAC-backed reconciler that watches cluster TLS settings and rolls configured workloads at runtime. Sequence diagram for runtime TLS reconciliation and rolloutsequenceDiagram
participant APIServer as APIServer CR
participant Reconciler as TLS Reconciler
participant Deployment as Target Deployment
participant Pods as Workload Pods
Reconciler->>APIServer: WatchAPIServer
APIServer-->>Reconciler: TLS profile change
Reconciler->>APIServer: GetEffectiveTLSProfile
Reconciler->>Deployment: GetDeploymentTLSHash
alt hash differs
Reconciler->>Deployment: SetDeploymentTLSHash
Deployment-->>Pods: Rolling restart
end
Flow diagram for PQC TLS configuration conversionflowchart LR
Profile[OpenShift TLSSecurityProfile]
Convert[ConvertTLSProfileWithPQC]
TLSConfig[crypto/tls.Config]
PQC[EnablePQC]
Groups[X25519MLKEM768 and X25519]
Profile --> Convert
Convert --> TLSConfig
Convert --> PQC
PQC --> TLSConfig
PQC --> Groups
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="pkg/tlsconfigurator/reconcile/reconcile.go" line_range="183-200" />
<code_context>
+ return nil
+}
+
+// TLSConfigHash returns a stable hash of the effective TLS configuration. The
+// PQC flag is part of the hash so that toggling post-quantum forces a rollout.
+func TLSConfigHash(profile *configv1.TLSSecurityProfile, enablePQC bool) (string, error) {
+ payload := struct {
+ Profile *configv1.TLSSecurityProfile `json:"profile"`
+ PQC bool `json:"pqc"`
+ }{
+ Profile: profile,
+ PQC: enablePQC,
+ }
+
+ data, err := json.Marshal(payload)
+ if err != nil {
+ return "", fmt.Errorf("failed to marshal TLS config for hashing: %w", err)
+ }
+
+ sum := sha256.Sum256(data)
+ return fmt.Sprintf("%x", sum), nil
+}
+
</code_context>
<issue_to_address>
**nitpick (bug_risk):** `TLSConfigHash` hashes the raw profile object rather than the effective TLS configuration described by the function comment, so an unset cluster profile and an explicitly configured equivalent Intermediate profile produce different hashes and trigger an unnecessary rolling restart.
**Triggers:** When the cluster changes between an omitted TLS profile and an explicit Intermediate profile with equivalent effective settings.
**Suggested fix:** Resolve the default profile and hash the converted effective TLS configuration, including the PQC setting, rather than hashing the raw API object.
</issue_to_address>Sourcery assessment
Needs a human reviewer. When enabled, the reconciler changes TLS-related workload behavior, cluster RBAC, and rolling restarts, while the one-shot update path can persist TLS policy changes that a code revert would not restore. A faulty TLS or permission decision could expose traffic or grant unintended cluster access, and any rollout outage or policy change would already have occurred before reverting.
Signed-off-by: Max Dessi <mdessi@mdessi-thinkpadp1gen8.rmtit.csb>
6137cd4 to
5b695e8
Compare
Signed-off-by: Max Dessi <mdessi@mdessi-thinkpadp1gen8.rmtit.csb>
Signed-off-by: Max Dessi <mdessi@mdessi-thinkpadp1gen8.rmtit.csb>
Signed-off-by: Max Dessi <mdessi@mdessi-thinkpadp1gen8.rmtit.csb>
|
I’m here—please share the specific question or follow-up you’d like me to address about the review. |
TLS 1.3 Embedded in the Helm Chart Operator
Summary by Sourcery
Embed the TLS configurator in the operator and add optional runtime TLS reconciliation with TLS 1.3 post-quantum support.
New Features:
Enhancements:
Build:
CI:
Documentation:
Tests:
Chores: