Skip to content

Commit c419f51

Browse files
committed
Update.
Signed-off-by: xuezhaojun <[email protected]>
1 parent 37e9d57 commit c419f51

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed

operator/v1/0000_00_operator.open-cluster-management.io_klusterlets.crd.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,13 +196,20 @@ spec:
196196
GRPCConfiguration to be set in the ClusterManager on the hub side.
197197
properties:
198198
authentications:
199+
default:
200+
- userToken
199201
description: |-
200202
Authentications defines how the agent authenticates with the cluster.
201-
By default it is `userToken`, but it could also be `impersonation` or both.
203+
If not specified, defaults to ["userToken"].
202204
items:
205+
enum:
206+
- userToken
207+
- impersonation
203208
type: string
204209
type: array
205210
grpcEndpoint:
211+
description: GRPCEndpoint represents the gRPC endpoint configuration
212+
for the proxy connection.
206213
properties:
207214
grpc:
208215
description: grpc represents the configuration for grpc endpoint.
@@ -277,6 +284,8 @@ spec:
277284
required:
278285
- protocol
279286
type: object
287+
required:
288+
- grpcEndpoint
280289
type: object
281290
registrationConfiguration:
282291
description: RegistrationConfiguration contains the configuration

operator/v1/types_klusterlet.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,13 +347,19 @@ const (
347347

348348
// ProxyConfig holds the configuration of klusterlet-proxy.
349349
type ProxyConfig struct {
350-
GRPC *EndpointExposure `json:"grpcEndpoint"`
350+
// GRPCEndpoint represents the gRPC endpoint configuration for the proxy connection.
351+
// +required
352+
// +kubebuilder:validation:Required
353+
GRPCEndpoint *EndpointExposure `json:"grpcEndpoint"`
351354

352355
// Authentications defines how the agent authenticates with the cluster.
353-
// By default it is `userToken`, but it could also be `impersonation` or both.
356+
// If not specified, defaults to ["userToken"].
357+
// +optional
358+
// +kubebuilder:default={userToken}
354359
Authentications []ProxyAuthenticationType `json:"authentications,omitempty"`
355360
}
356361

362+
// +kubebuilder:validation:Enum=userToken;impersonation
357363
type ProxyAuthenticationType string
358364

359365
const (

operator/v1/zz_generated.deepcopy.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)