Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing scope fields from object references #882

Merged
merged 1 commit into from
Sep 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions apis/v1alpha2/gatewayclass_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,17 +117,9 @@ type ParametersReference struct {
// +kubebuilder:validation:MaxLength=253
Name string `json:"name"`

// Scope represents if the referent is a Cluster or Namespace scoped resource.
// This may be set to "Cluster" or "Namespace".
//
// +kubebuilder:validation:Enum=Cluster;Namespace
// +kubebuilder:default=Cluster
// +optional
Scope *string `json:"scope,omitempty"`

// Namespace is the namespace of the referent.
// This field is required when scope is set to "Namespace" and must be unset
// when scope is set to "Cluster".
// This field is required when referring to a Namespace-scoped resource and
// MUST be unset when referring to a Cluster-scoped resource.
//
// +optional
Namespace *Namespace `json:"namespace,omitempty"`
Expand Down
16 changes: 1 addition & 15 deletions apis/v1alpha2/shared_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,27 +43,13 @@ type ParentRef struct {
Kind *Kind `json:"kind,omitempty"`

// Namespace is the namespace of the referent. When unspecified (or empty
// string), this will either be:
//
// * local namespace of the route when scope is set to Namespace.
// * no namespace when scope is set to Cluster.
// string), this refers to the local namespace of the Route.
//
// Support: Core
//
// +optional
Namespace *Namespace `json:"namespace,omitempty"`

// Scope represents if this refers to a cluster or namespace scoped
// resource. This may be set to "Cluster" or "Namespace".
//
// Support: Core (Namespace)
// Support: Custom (Cluster)
//
// +kubebuilder:validation:Enum=Cluster;Namespace
// +kubebuilder:default=Namespace
// +optional
Scope *string `json:"scope,omitempty"`

// Name is the name of the referent.
//
// Support: Core
Expand Down
10 changes: 0 additions & 10 deletions apis/v1alpha2/zz_generated.deepcopy.go

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

12 changes: 2 additions & 10 deletions config/crd/v1alpha2/gateway.networking.k8s.io_gatewayclasses.yaml

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

31 changes: 4 additions & 27 deletions config/crd/v1alpha2/gateway.networking.k8s.io_httproutes.yaml

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

31 changes: 4 additions & 27 deletions config/crd/v1alpha2/gateway.networking.k8s.io_tcproutes.yaml

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

31 changes: 4 additions & 27 deletions config/crd/v1alpha2/gateway.networking.k8s.io_tlsroutes.yaml

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

31 changes: 4 additions & 27 deletions config/crd/v1alpha2/gateway.networking.k8s.io_udproutes.yaml

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