Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cluster annotations. #252

Conversation

xuezhaojun
Copy link
Member

No description provided.

@xuezhaojun xuezhaojun force-pushed the add-initcluster-annotations-and-labels branch from 1dc5360 to 40e0f49 Compare July 13, 2023 03:45
@xuezhaojun xuezhaojun marked this pull request as ready for review July 13, 2023 03:45
@openshift-ci openshift-ci bot requested review from deads2k and mdelder July 13, 2023 03:45
@xuezhaojun
Copy link
Member Author

/assign @qiujian16

operator/v1/types.go Outdated Show resolved Hide resolved
@xuezhaojun xuezhaojun force-pushed the add-initcluster-annotations-and-labels branch 2 times, most recently from 95cf570 to cc34a46 Compare July 25, 2023 03:31
@xuezhaojun xuezhaojun changed the title Add init cluster annotations and labels Add cluster annotations and labels Jul 25, 2023
@xuezhaojun xuezhaojun force-pushed the add-initcluster-annotations-and-labels branch from cc34a46 to b73df11 Compare July 25, 2023 07:58
@xuezhaojun xuezhaojun changed the title Add cluster annotations and labels Add cluster annotations. Jul 25, 2023
operator/v1/types.go Outdated Show resolved Hide resolved
@@ -107,6 +107,13 @@ type RegistrationConfiguration 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"`

// ClusterAnnotations is a set of annotations that agent used when creating a managed cluster.
// After the managed cluster is created, modify this field won't affect the managed cluster any more.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also need a const definition of this annotationPrefix

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, adding one now...

Copy link
Member Author

@xuezhaojun xuezhaojun Jul 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the ClusterAnnotationsKeyPrefix , PTAL.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After the managed cluster is created, modify this field won''t affect the managed cluster any more. But if the managed cluster is deleted from the hub, it will be used again when agent attempt to create a managed cluster. The annotations must has prefix: "agent.open-cluster-management.io", otherwise, it will be ignored.'

I do not think you still need these.

Copy link
Member Author

@xuezhaojun xuezhaojun Jul 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, the content deleted. PTAL.

@xuezhaojun xuezhaojun force-pushed the add-initcluster-annotations-and-labels branch from acdb7fb to 5bd04fa Compare July 25, 2023 08:13
Signed-off-by: xuezhaojun <zxue@redhat.com>
@xuezhaojun xuezhaojun force-pushed the add-initcluster-annotations-and-labels branch from 5bd04fa to c875c3b Compare July 25, 2023 10:36
Copy link
Member

@qiujian16 qiujian16 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve
/lgtm

@openshift-ci openshift-ci bot added the lgtm label Jul 25, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 25, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: qiujian16, xuezhaojun

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit c0c9fb5 into open-cluster-management-io:main Jul 25, 2023
7 checks passed
@xuezhaojun xuezhaojun deleted the add-initcluster-annotations-and-labels branch July 25, 2023 14:16
haoqing0110 pushed a commit to haoqing0110/api that referenced this pull request Jul 28, 2023
haoqing0110 pushed a commit to haoqing0110/api that referenced this pull request Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants