You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Gateway CRD accepts both credentialName and tlsCertificates in server TLS settings #3821
The ServerTLSSettings CEL rule with the message only one of credentialName or tlsCertificates can be set checks the wrong field:
// +kubebuilder:validation:XValidation:message="only one of credentialName or tlsCertificates can be set",rule="oneof(self.credentialNames, self.tlsCertificates)"
It checks credentialNames (plural), which duplicates the first rule (credentialNames or tlsCertificates). The generated CRDs for Gateway and Sidecar (v1alpha3, v1beta1, v1) carry the same expression.
The CRD schema accepts a server that sets both credentialName and tlsCertificates.
Affected product area (please put an X in all that apply)
[ ] Configuration Infrastructure
[ ] Docs
[ ] Installation
[x] Networking
[ ] Performance and Scalability
[ ] Policies and Telemetry
[ ] Security
[ ] Test and Release
[x] User Experience
Expected behavior
The API server rejects the object with only one of credentialName or tlsCertificates can be set, matching the field documentation and the istiod webhook (only one of credential_name, credential_names, server_certificate/private_key, tls_certificates should be specified).
Steps to reproduce the bug
Apply this Gateway to a cluster with the Istio CRDs and without the istiod validation webhook (or validate it against kubernetes/customresourcedefinitions.gen.yaml):
Activity