Skip to content

Commit

Permalink
Add importer config in clustermanager
Browse files Browse the repository at this point in the history
Signed-off-by: Jian Qiu <[email protected]>
  • Loading branch information
qiujian16 committed Dec 17, 2024
1 parent 0ba6809 commit a3207d6
Show file tree
Hide file tree
Showing 4 changed files with 102 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,62 @@ spec:
- feature
type: object
type: array
importerConfiguration:
description: |-
ImporterConfiguration is the configuration to import managed clusters from the hub cluster. It applies only when
feature gate ClusterImporter is enabled.
properties:
agentImage:
description: |-
AgentImage is the image of the klusterlet agent. If it is not set, the default image
will be used with the corresponding version.
type: string
imagePullSecrets:
description: ImagePullSecret is the image pull secret for
the klusterlet agent.
properties:
apiVersion:
description: API version of the referent.
type: string
fieldPath:
description: |-
If referring to a piece of an object instead of an entire object, this string
should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2].
For example, if the object reference is to a container within a pod, this would take on a value like:
"spec.containers{name}" (where "name" refers to the name of the container that triggered
the event) or if no container name is specified "spec.containers[2]" (container with
index 2 in this pod). This syntax is chosen only to have some well-defined way of
referencing a part of an object.
TODO: this design is not final and this field is subject to change in the future.
type: string
kind:
description: |-
Kind of the referent.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
name:
description: |-
Name of the referent.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
type: string
namespace:
description: |-
Namespace of the referent.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
type: string
resourceVersion:
description: |-
Specific resourceVersion to which this reference is made, if any.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency
type: string
uid:
description: |-
UID of the referent.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids
type: string
type: object
x-kubernetes-map-type: atomic
type: object
type: object
registrationImagePullSpec:
default: quay.io/open-cluster-management/registration
Expand Down
16 changes: 16 additions & 0 deletions operator/v1/types_clustermanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,22 @@ type RegistrationHubConfiguration struct {
// he can set featuregate/Foo=false before upgrading. Let's say the cluster-admin wants featuregate/Foo=false.
// +optional
FeatureGates []FeatureGate `json:"featureGates,omitempty"`

// ImporterConfiguration is the configuration to import managed clusters from the hub cluster. It applies only when
// feature gate ClusterImporter is enabled.
// +optional
ImporterConfiguration ImporterConfiguration `json:"importerConfiguration,omitempty"`
}

type ImporterConfiguration struct {
// AgentImage is the image of the klusterlet agent. If it is not set, the default image
// will be used with the corresponding version.
// +optional
AgentImage string `json:"agentImage,omitempty"`

// ImagePullSecret is the image pull secret for the klusterlet agent.
// +optional
ImagePullSecret v1.ObjectReference `json:"imagePullSecrets,omitempty"`
}

type WorkConfiguration struct {
Expand Down
18 changes: 18 additions & 0 deletions operator/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 12 additions & 2 deletions operator/v1/zz_generated.swagger_doc_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a3207d6

Please sign in to comment.