@@ -122,7 +122,7 @@ type RegistrationDriverHub struct {
122122 // Type of the authentication used by hub to initialize the Hub cluster. Possible values are csr and awsirsa.
123123 // +required
124124 // +kubebuilder:default:=csr
125- // +kubebuilder:validation:Enum=csr;awsirsa
125+ // +kubebuilder:validation:Enum=csr;awsirsa;grpc
126126 AuthType string `json:"authType,omitempty"`
127127
128128 // CSR represents the configuration for csr driver.
@@ -132,8 +132,56 @@ type RegistrationDriverHub struct {
132132 // AwsIrsa represents the configuration for awsirsa driver.
133133 // +optional
134134 AwsIrsa * AwsIrsaConfig `json:"awsirsa,omitempty"`
135+
136+ // GRPC represents the configuration for gRPC driver.
137+ // +optional
138+ GRPC * GRPCConfig `json:"grpc,omitempty"`
139+ }
140+
141+ // GRPC represents the configuration for gRPC driver.
142+ type GRPCConfig struct {
143+ // ImagePullSpec represents the desired image of the gRPC broker installed on hub.
144+ // +optional
145+ // +kubebuilder:default=quay.io/open-cluster-management/registration
146+ ImagePullSpec string `json:"imagePullSpec,omitempty"`
147+
148+ // EndpointExposure represents the configuration for endpoint exposure.
149+ // +optional
150+ EndpointExposure * GRPCEndpointExposure `json:"endpointExposure,omitempty"`
151+
152+ // AutoApprovedIdentities represent a list of approved arn patterns
153+ // +optional
154+ AutoApprovedIdentities []string `json:"autoApprovedIdentities,omitempty"`
135155}
136156
157+ type GRPCEndpointExposure struct {
158+ // Type specifies how the gRPC endpoint is exposed.
159+ // You may need to apply an object to expose the gRPC endpoint, for example: a route.
160+ // TODO: support loadbalancer.
161+ // +kubebuilder:default:=hostname
162+ // +kubebuilder:validation:Enum=hostname
163+ // +required
164+ Type GRPCEndpointExposureType `json:"type,omitempty"`
165+
166+ // Hostname points to a fixed hostname for serving agents' handshakes.
167+ // +optional
168+ Hostname * HostnameConfig `json:"hostname,omitempty"`
169+ }
170+
171+ // HostnameConfig references a fixed hostname.
172+ type HostnameConfig struct {
173+ // +required
174+ Value string `json:"value"`
175+ }
176+
177+ // GRPCEndpointExposureType represents the type of endpoint exposure for gRPC.
178+ type GRPCEndpointExposureType string
179+
180+ const (
181+ // GRPCEndpointTypeHostname is the gRPC endpoint exposure type for hostname.
182+ GRPCEndpointTypeHostname GRPCEndpointExposureType = "hostname"
183+ )
184+
137185type CSRConfig struct {
138186 // AutoApprovedIdentities represent a list of approved users
139187 // +optional
0 commit comments