Skip to content

Commit

Permalink
Merge pull request #964 from robscott/reference-policy-fix
Browse files Browse the repository at this point in the history
Fixing bug where namespace could be unspecified in ReferencePolicy
  • Loading branch information
k8s-ci-robot authored Dec 14, 2021
2 parents 9a916f7 + 07a5f2a commit 1deb7bc
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion apis/v1alpha2/referencepolicy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ type ReferencePolicyFrom struct {
// Namespace is the namespace of the referent.
//
// Support: Core
Namespace Namespace `json:"namespace,omitempty"`
Namespace Namespace `json:"namespace"`
}

// ReferencePolicyTo describes what Kinds are allowed as targets of the
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions hack/invalid-examples/v1alpha2/referencepolicy/missing-ns.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: ReferencePolicy
metadata:
name: missing-ns
spec:
to:
- group: ""
kind: "Service"
from:
- group: "gateway.networking.k8s.io"
kind: "HTTPRoute"

0 comments on commit 1deb7bc

Please sign in to comment.