← Back to Pull requests

fix(http-add-on): keep per-component keys out of the shared securityContext #931

Closed
unknown closed this pull request without merging on Nov 30, 2026 11:41 UTC
View on GitHub
unknown unknown commented on Nov 10, 2026 06:04 UTC
Author

<!-- Thank you for contributing!

Read more about how you can contribute in our contribution guide:
https://github.com/kedacore/charts/blob/main/CONTRIBUTING.md
-->

In the http-add-on chart, securityContext and podSecurityContext take shared defaults plus optional per-component overrides (operator, scaler, interceptor, commented in values.yaml). Each Deployment uses its own key when present and otherwise falls back to toYaml .Values.securityContext. That fallback dumps the whole map, per-component keys included, so setting an override for one component breaks the other two:

securityContext:
  operator:
    runAsNonRoot: true
podSecurityContext:
  interceptor:
    runAsUser: 2000

renders, for the interceptor container and the scaler pod:

        securityContext:
          allowPrivilegeEscalation: false
          capabilities:
            drop:
            - ALL
          operator:            # <- not a SecurityContext field
            runAsNonRoot: true
...
      securityContext:
        fsGroup: 1000
        interceptor:           # <- not a PodSecurityContext field
          runAsUser: 2000

$ helm template t http-add-on -n keda -f values.yaml | kubeconform -strict -summary -ignore-missing-schemas
Deployment keda-add-ons-http-interceptor is invalid: ... /spec/template/spec/containers/0/securityContext': additional properties 'operator' not allowed
Deployment keda-add-ons-http-external-scaler is invalid: ... additional properties 'operator' not allowed - at '/spec/template/spec/securityContext': additional properties 'interceptor' not allowed
Deployment keda-add-ons-http-controller-manager is invalid: ... '/spec/template/spec/securityContext': additional properties 'interceptor' not allowed
Summary: 23 resources found in 1 file - Valid: 18, Invalid: 3, Errors: 0, Skipped: 2

The fallback now uses omit .Values.securityContext "operator" "scaler" "interceptor" (same for podSecurityContext) in the three Deployments. With the values above the render is valid (Valid: 21, Invalid: 0), and with the default values the output is byte-for-byte the same as on main (checked with diff of helm template). helm lint http-add-on passes. No values or README change.

Checklist

  • I have verified that my change is according to the deprecations & breaking changes policy

  • Commits are signed with Developer Certificate of Origin (DCO - learn more)

  • README is updated with new configuration values (if applicable) learn more

  • A PR is opened to update KEDA core (repo) (if applicable, ie. when deployment manifests are modified)
  • Fixes #

    Diff: 369 lines (+276 / -93) across 4 files Reviewer: linkvt Review duration: 29137m
    All Vouch review confidence checks passed
    Residual risk 0.26 = Change Risk (0.66) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.66 · 369 lines diff across 4 files
    0.66
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.354
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.066
    Real PR Conversation Timeline
    1 comments
    "Review active on #931"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 66.0% (HIGH) · Higher = larger blast radius
    66.0%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 26.1% · Safe to merge
    26.1%