Skip to content

Commit

Permalink
Merge pull request #882 from robscott/no-scope
Browse files Browse the repository at this point in the history
Removing scope fields from object references
  • Loading branch information
k8s-ci-robot authored Sep 28, 2021
2 parents b088c14 + 7314699 commit a015247
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 153 deletions.
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.

0 comments on commit a015247

Please sign in to comment.