Skip to content

Commit ce48d31

Browse files
committed
Add ClientCertAdditionalData.
Signed-off-by: xuezhaojun <[email protected]>
1 parent 29e1b1d commit ce48d31

3 files changed

+33
-3
lines changed

addon/v1alpha1/0000_01_addon.open-cluster-management.io_managedclusteraddons.crd.yaml

+16
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,22 @@ spec:
309309
addon agent to register to hub. The Klusterlet agent will create
310310
a csr for the addon agent with the registrationConfig.
311311
properties:
312+
clientCertAdditionalData:
313+
additionalProperties:
314+
type: string
315+
description: The signed CSR client certificates will be stored
316+
in the secret on the agent, clientCertAdditionalData is the
317+
additional data that will stored with the client certificate
318+
secret. Also, the change of the additional data will trigger
319+
the CSR renewal.
320+
type: object
321+
hubSensitive:
322+
default: true
323+
description: HubSensitive is a flag to indicate whether the
324+
registrationConfig is sensitive to the hub. If it is set to
325+
true, the renewal of the CSR will be triggered when the hub
326+
is changed.
327+
type: boolean
312328
signerName:
313329
description: signerName is the name of signer that addon agent
314330
will use to create csr.

addon/v1alpha1/types_managedclusteraddon.go

+12
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,18 @@ type RegistrationConfig struct {
6868
//
6969
// +optional
7070
Subject Subject `json:"subject,omitempty"`
71+
72+
// HubSensitive is a flag to indicate whether the registrationConfig is sensitive to the hub.
73+
// If it is set to true, the renewal of the CSR will be triggered when the hub is changed.
74+
// +optional
75+
// +kubebuilder:default=true
76+
HubSensitive bool `json:"hubSensitive,omitempty"`
77+
78+
// The signed CSR client certificates will be stored in the secret on the agent, clientCertAdditionalData
79+
// is the additional data that will stored with the client certificate secret.
80+
// Also, the change of the additional data will trigger the CSR renewal.
81+
// +optional
82+
ClientCertAdditionalData map[string]string `json:"clientCertAdditionalData,omitempty"`
7183
}
7284

7385
type AddOnConfig struct {

addon/v1alpha1/zz_generated.swagger_doc_generated.go

+5-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)