Skip to content

GEP-5075: Move ClusterTrustBundle proposal Experimental - #5272

Merged
kubernetes-prow[bot] merged 8 commits into
kubernetes-sigs:mainfrom
davidesalerno:gep5075exp
Sep 30, 2026
Merged

kubernetes-prow[bot] merged 8 commits into
kubernetes-sigs:mainfrom
davidesalerno:gep5075exp

Conversation

@davidesalerno

Copy link
Copy Markdown
Contributor

What type of PR is this?

/kind gep

What this PR does / why we need it:
The changes in this PR are containing the implementation details needed to move the ClusterTrustBundle proposal from Provisional to Experimental

Which issue(s) this PR fixes:

Fixes #5075

Does this PR introduce a user-facing change?:

NONE

Was AI used in preparing this PR?

/label ail/1
I created the enhancement by hand and used AI in order to improve the wording

@kubernetes-prow kubernetes-prow Bot added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/gep PRs related to Gateway Enhancement Proposal(GEP) ail/1 Categorizes a PR as having AI Influence Level 1 (minor AI assistance) labels Sep 19, 2026
@kubernetes-prow

Copy link
Copy Markdown

This issue is currently awaiting triage.

If Gateway API community members determine this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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.

@kubernetes-prow kubernetes-prow Bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Sep 19, 2026
@kubernetes-prow kubernetes-prow Bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 19, 2026
@kubernetes-prow

Copy link
Copy Markdown

Hi @davidesalerno. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Tip

We noticed you've done this a few times! Consider joining the org to skip this step and gain /lgtm and other bot rights. We recommend asking approvers on your previous PRs to sponsor you.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@kubernetes-prow kubernetes-prow Bot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 19, 2026
@rikatz

rikatz commented Sep 20, 2026

Copy link
Copy Markdown
Member

/cc @snorwin @youngnick @robscott

Comment thread geps/gep-5075/index.md Resolved
Comment thread geps/gep-5075/index.md Resolved
Comment thread geps/gep-5075/index.md Resolved
Comment thread geps/gep-5075/index.md Resolved
Comment thread geps/gep-5075/index.md Resolved
@snorwin

snorwin commented Sep 21, 2026

Copy link
Copy Markdown
Member

/cc

Comment thread geps/gep-5075/index.md Resolved
Comment thread geps/gep-5075/index.md Resolved

@robscott robscott left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @davidesalerno!

/cc @kl52752

Comment thread geps/gep-5075/index.md Resolved
Comment thread geps/gep-5075/index.md Resolved
@kubernetes-prow
kubernetes-prow Bot requested a review from kl52752 September 21, 2026 18:13
@rikatz

rikatz commented Sep 29, 2026

Copy link
Copy Markdown
Member

/ok-to-test

@kubernetes-prow kubernetes-prow Bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 29, 2026
Comment thread pkg/features/gateway.go Resolved
@kubernetes-prow kubernetes-prow Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 29, 2026
Signed-off-by: Davide Salerno <dsalerno@redhat.com>
into the cluster

Signed-off-by: Davide Salerno <dsalerno@redhat.com>
dedicated ClusterTrustBundleObjectRef, ExactlyOneOf validation, move
ClusterTrustBundleFeature to gateway.go, consolidate the two experimental
feature flags into a single ClusterTrustBundle feature, updating tests,
regenerating CRDs, deepcopy, applyconfigurations, and openapi/swagger

Signed-off-by: Davide Salerno <dsalerno@redhat.com>
generator,[C regenerating CRDs, deepcopy, applyconfigurations,
and openapi/swagger

Signed-off-by: Davide Salerno <dsalerno@redhat.com>
@kubernetes-prow kubernetes-prow Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 30, 2026
ClusterTrustBundleRef, document exactly-one trust source, regenerating
CRDs and openapi/swagger

Align FrontendTLSValidation.ClusterTrustBundleRef with the BackendTLSPolicy
equivalent by using InvalidKind, and correct the GEP to describe the
ExactlyOneOf trust source constraint instead of a union.
…d bundles

Also fixes the BackendTLSPolicy trust source wording that contradicted the
ExactlyOneOf validation. Conformance tests deferred to a follow-up.

Signed-off-by: Davide Salerno <dsalerno@redhat.com>
…o the standard channel

The `must specify either CACertificateRefs or WellKnownCACertificates` and
`must not contain both CACertificateRefs and WellKnownCACertificates` rules were
emitted into both channels, so the experimental CRD rejected a BackendTLSPolicy
whose only trust source was clusterTrustBundleRef, making the new field unusable.

Move both rules behind `<gateway:standard:validation:XValidation:...>` so the
experimental channel is covered by the ExactlyOneOf rule alone, matching the
channel-scoped rule pattern already used for parentRefs in shared_types.go. The
standard CRDs are unchanged.

ExactlyOneOf only tests field presence, whereas the standard rules also required
`size(caCertificateRefs) > 0`, so add an experimental-only MinItems=1 to keep an
explicitly empty list from counting as a trust source.

Split the channel-divergent CEL cases into backendtlspolicy_standard_test.go and
backendtlspolicy_experimental_test.go, since the two channels now report
different error messages.

Signed-off-by: Davide Salerno <dsalerno@redhat.com>
Replace the BackendTLSPolicyClusterTrustBundle and GatewayClusterTrustBundle
feature names with the single ClusterTrustBundle feature, and include it in both
GatewayExtendedFeatures and BackendTLSPolicyExtendedFeatures.

What an implementation must demonstrate now follows from the other features it
claims: ClusterTrustBundle + BackendTLSPolicy covers clusterTrustBundleRef in
BackendTLSPolicyValidation, and ClusterTrustBundle +
GatewayFrontendClientCertificateValidation covers it in Gateway frontend TLS
validation. This mirrors how the BackendTLSPolicy feature is scoped.

Update the GEP conformance section accordingly.

Signed-off-by: Davide Salerno <dsalerno@redhat.com>

@snorwin snorwin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@davidesalerno thanks.

@kubernetes-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: davidesalerno, robscott, snorwin

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

@snorwin

snorwin commented Sep 30, 2026

Copy link
Copy Markdown
Member

/lgtm

@kubernetes-prow kubernetes-prow Bot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 30, 2026
@rikatz

rikatz commented Sep 30, 2026

Copy link
Copy Markdown
Member

/lgtm
/hold cancel

Thanks @davidesalerno

I am merging this based on a discussion I had with other maintainers yesterday about just fixing the followups (as you did!) + some Slack discussion with Norwin about findings.

@kubernetes-prow kubernetes-prow Bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 30, 2026
@kubernetes-prow
kubernetes-prow Bot merged commit 9087d46 into kubernetes-sigs:main Sep 30, 2026
20 checks passed
//
// <gateway:experimental>
// +optional
ClusterTrustBundleRef *ClusterTrustBundleObjectRef `json:"clusterTrustBundleRef,omitempty"`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I apologize for being late, and am fine if its "too late" - was on PTO for a while.

This seems wrong. caCertificateRefs is meant for exactly this purpose. it makes no sense to have a specific ref here and a generic ref to do the same thing.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I assume the purpose is that one is "cluster scoped" and one is "local namespace". But that is a poor distinction - we already have this same concept already in other APIs in gateway and handle this fine.

We can have a single field with name+kind+no namespace. If its cluster scope, it means "use the cluster scope one" and if its namespaced it means "use the local namespace one"

This is how GatewayClass.spec.parametersRef works

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

there is some confusion here indeed, namespaced vs non namespaced was one case.

The other one that I can think is that initially we were considering about having the selectors that ClusterTrustBundle brings as well, but at some point the idea was missed. I asked Davide to reach by on Slack and we can discuss about it

//
// +optional
// +kubebuilder:default=ClusterTrustBundle
Kind *Kind `json:"kind,omitempty"`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

the type is named ClusterTrustBundleObjectRef. It does not make sense to have

clusterTrustBundleRef:
  kind: NotClusterTrustBundle

That is like an api

configMapRef:
  kind: NotConfigMap

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

Labels

ail/1 Categorizes a PR as having AI Influence Level 1 (minor AI assistance) approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/gep PRs related to Gateway Enhancement Proposal(GEP) lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GEP: Support ClusterTrustBundle as a valid caCertificateRef

7 participants