Skip to content

Commit a3207d6

Browse files
committed
Add importer config in clustermanager
Signed-off-by: Jian Qiu <[email protected]>
1 parent 0ba6809 commit a3207d6

4 files changed

+102
-2
lines changed

operator/v1/0000_01_operator.open-cluster-management.io_clustermanagers.crd.yaml

+56
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,62 @@ spec:
255255
- feature
256256
type: object
257257
type: array
258+
importerConfiguration:
259+
description: |-
260+
ImporterConfiguration is the configuration to import managed clusters from the hub cluster. It applies only when
261+
feature gate ClusterImporter is enabled.
262+
properties:
263+
agentImage:
264+
description: |-
265+
AgentImage is the image of the klusterlet agent. If it is not set, the default image
266+
will be used with the corresponding version.
267+
type: string
268+
imagePullSecrets:
269+
description: ImagePullSecret is the image pull secret for
270+
the klusterlet agent.
271+
properties:
272+
apiVersion:
273+
description: API version of the referent.
274+
type: string
275+
fieldPath:
276+
description: |-
277+
If referring to a piece of an object instead of an entire object, this string
278+
should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2].
279+
For example, if the object reference is to a container within a pod, this would take on a value like:
280+
"spec.containers{name}" (where "name" refers to the name of the container that triggered
281+
the event) or if no container name is specified "spec.containers[2]" (container with
282+
index 2 in this pod). This syntax is chosen only to have some well-defined way of
283+
referencing a part of an object.
284+
TODO: this design is not final and this field is subject to change in the future.
285+
type: string
286+
kind:
287+
description: |-
288+
Kind of the referent.
289+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
290+
type: string
291+
name:
292+
description: |-
293+
Name of the referent.
294+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
295+
type: string
296+
namespace:
297+
description: |-
298+
Namespace of the referent.
299+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
300+
type: string
301+
resourceVersion:
302+
description: |-
303+
Specific resourceVersion to which this reference is made, if any.
304+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
305+
type: string
306+
uid:
307+
description: |-
308+
UID of the referent.
309+
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
310+
type: string
311+
type: object
312+
x-kubernetes-map-type: atomic
313+
type: object
258314
type: object
259315
registrationImagePullSpec:
260316
default: quay.io/open-cluster-management/registration

operator/v1/types_clustermanager.go

+16
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,22 @@ type RegistrationHubConfiguration struct {
108108
// he can set featuregate/Foo=false before upgrading. Let's say the cluster-admin wants featuregate/Foo=false.
109109
// +optional
110110
FeatureGates []FeatureGate `json:"featureGates,omitempty"`
111+
112+
// ImporterConfiguration is the configuration to import managed clusters from the hub cluster. It applies only when
113+
// feature gate ClusterImporter is enabled.
114+
// +optional
115+
ImporterConfiguration ImporterConfiguration `json:"importerConfiguration,omitempty"`
116+
}
117+
118+
type ImporterConfiguration struct {
119+
// AgentImage is the image of the klusterlet agent. If it is not set, the default image
120+
// will be used with the corresponding version.
121+
// +optional
122+
AgentImage string `json:"agentImage,omitempty"`
123+
124+
// ImagePullSecret is the image pull secret for the klusterlet agent.
125+
// +optional
126+
ImagePullSecret v1.ObjectReference `json:"imagePullSecrets,omitempty"`
111127
}
112128

113129
type WorkConfiguration struct {

operator/v1/zz_generated.deepcopy.go

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

operator/v1/zz_generated.swagger_doc_generated.go

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

0 commit comments

Comments
 (0)