@@ -62,20 +62,59 @@ type GatewayClassSpec struct {
62
62
// +kubebuilder:validation:MaxLength=253
63
63
Controller string `json:"controller"`
64
64
65
- // ParametersRef is a controller-specific resource containing the
66
- // configuration parameters corresponding to this class . This is optional if
67
- // the controller does not require any additional configuration.
65
+ // ParametersRef is a reference to a resource that contains the configuration
66
+ // parameters corresponding to the GatewayClass . This is optional if the
67
+ // controller does not require any additional configuration.
68
68
//
69
- // Parameters resources are implementation specific custom resources. These
70
- // resources must be cluster-scoped.
69
+ // ParametersRef can reference a standard Kubernetes resource, i.e. ConfigMap,
70
+ // or an implementation-specific custom resource. The resource can be
71
+ // cluster-scoped or namespace-scoped.
71
72
//
72
73
// If the referent cannot be found, the GatewayClass's "InvalidParameters"
73
74
// status condition will be true.
74
75
//
75
76
// Support: Custom
76
77
//
77
78
// +optional
78
- ParametersRef * LocalObjectReference `json:"parametersRef,omitempty"`
79
+ ParametersRef * ParametersReference `json:"parametersRef,omitempty"`
80
+ }
81
+
82
+ // ParametersReference identifies an API object containing controller-specific
83
+ // configuration resource within the cluster.
84
+ type ParametersReference struct {
85
+ // Group is the group of the referent.
86
+ //
87
+ // +kubebuilder:validation:MinLength=1
88
+ // +kubebuilder:validation:MaxLength=253
89
+ Group string `json:"group"`
90
+
91
+ // Kind is kind of the referent.
92
+ //
93
+ // +kubebuilder:validation:MinLength=1
94
+ // +kubebuilder:validation:MaxLength=253
95
+ Kind string `json:"kind"`
96
+
97
+ // Name is the name of the referent.
98
+ //
99
+ // +kubebuilder:validation:MinLength=1
100
+ // +kubebuilder:validation:MaxLength=253
101
+ Name string `json:"name"`
102
+
103
+ // Scope represents if the referent is a Cluster or Namespace scoped resource.
104
+ // This may be set to "Cluster" or "Namespace".
105
+ // +kubebuilder:validation:Enum=Cluster;Namespace
106
+ // +kubebuilder:default=Cluster
107
+ // +optional
108
+ Scope string `json:"scope,omitempty"`
109
+
110
+ // Namespace is the namespace of the referent.
111
+ // This field is required when scope is set to "Namespace" and ignored when
112
+ // scope is set to "Cluster".
113
+ //
114
+ // +kubebuilder:validation:MinLength=1
115
+ // +kubebuilder:validation:MaxLength=253
116
+ // +optional
117
+ Namespace string `json:"namespace,omitempty"`
79
118
}
80
119
81
120
// GatewayClassConditionType is the type of status conditions. This
0 commit comments