Skip to content

Commit

Permalink
Merge branch 'main' into api/ext-auth-backendref
Browse files Browse the repository at this point in the history
  • Loading branch information
zirain authored May 27, 2024
2 parents 01e64de + 3f7767f commit d883162
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions internal/gatewayapi/envoyextensionpolicy.go
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@ func (t *Translator) buildExtProc(
if err = t.validateExtServiceBackendReference(
&extProc.BackendRefs[i].BackendObjectReference,
policyNamespacedName.Namespace,
egv1a1.KindEnvoyExtensionPolicy,
resources); err != nil {
return nil, err
}
Expand Down
1 change: 1 addition & 0 deletions internal/gatewayapi/securitypolicy.go
Original file line number Diff line number Diff line change
Expand Up @@ -795,6 +795,7 @@ func (t *Translator) buildExtAuth(policy *egv1a1.SecurityPolicy, resources *Reso
if err = t.validateExtServiceBackendReference(
backendRef,
policy.Namespace,
KindSecurityPolicy,
resources); err != nil {
return nil, err
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ referenceGrants:
spec:
from:
- group: gateway.envoyproxy.io
kind: SecurityPolicy
kind: EnvoyExtensionPolicy
namespace: default
to:
- group: ''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ referenceGrants:
spec:
from:
- group: gateway.envoyproxy.io
kind: SecurityPolicy
kind: EnvoyExtensionPolicy
namespace: default
to:
- group: ''
Expand Down
3 changes: 2 additions & 1 deletion internal/gatewayapi/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -936,6 +936,7 @@ func (t *Translator) validateSecretObjectRef(
func (t *Translator) validateExtServiceBackendReference(
backendRef *gwapiv1.BackendObjectReference,
ownerNamespace string,
policyKind string,
resources *Resources,
) error {
// These are sanity checks, they should never happen because the API server
Expand Down Expand Up @@ -985,7 +986,7 @@ func (t *Translator) validateExtServiceBackendReference(
if !t.validateCrossNamespaceRef(
crossNamespaceFrom{
group: egv1a1.GroupName,
kind: KindSecurityPolicy,
kind: policyKind,
namespace: ownerNamespace,
},
crossNamespaceTo{
Expand Down
1 change: 1 addition & 0 deletions test/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ func TestE2E(t *testing.T) {
SkipTests: []string{
tests.ClientTimeoutTest.ShortName, // https://github.com/envoyproxy/gateway/issues/2720
tests.GatewayInfraResourceTest.ShortName, // https://github.com/envoyproxy/gateway/issues/3191
tests.UseClientProtocolTest.ShortName, // https://github.com/envoyproxy/gateway/issues/3473
},
})
if err != nil {
Expand Down

0 comments on commit d883162

Please sign in to comment.