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

fix: upgrade clusterset clustersetbinding to v1beta2 #81

Conversation

haoqing0110
Copy link
Member

@haoqing0110 haoqing0110 commented Oct 18, 2023

Refer to open-cluster-management-io/api#266, the ClusterSet ClusterSetBinding API version v1beta1 has been removed, need to upgrade the API to v1beta2.

Screenshot 2023-10-25 at 17 31 22

---
apiVersion: cluster.open-cluster-management.io/v1beta2
kind: ManagedClusterSet
metadata:
  name: clusterset-test
---
apiVersion: cluster.open-cluster-management.io/v1beta2
kind: ManagedClusterSetBinding
metadata:
  name: clusterset-test # should be identical to the underlying ManagedClusterSet
  namespace: clusterset-test-ns
spec:
  clusterSet: clusterset-test
➜  test-workspace git:(br_clusterset-v1beta2) kubectl create -f mcs.yaml 
managedclusterset.cluster.open-cluster-management.io/clusterset-test created
managedclustersetbinding.cluster.open-cluster-management.io/clusterset-test created

➜  test-workspace git:(br_clusterset-v1beta2) kubectl get managedclusterset clusterset-test -oyaml
apiVersion: cluster.open-cluster-management.io/v1beta2
kind: ManagedClusterSet
metadata:
  creationTimestamp: "2023-10-25T09:27:40Z"
  generation: 1
  name: clusterset-test
  resourceVersion: "646001"
  uid: 328fd86b-3270-47ec-985f-71af31f90620
spec:
  clusterSelector:
    selectorType: ExclusiveClusterSetLabel
status:
  conditions:
  - lastTransitionTime: "2023-10-25T09:27:40Z"
    message: No ManagedCluster selected
    reason: NoClusterMatched
    status: "True"
    type: ClusterSetEmpty

➜  test-workspace git:(br_clusterset-v1beta2) kubectl get managedclustersetbinding -n clusterset-test-ns clusterset-test -oyaml
apiVersion: cluster.open-cluster-management.io/v1beta2
kind: ManagedClusterSetBinding
metadata:
  creationTimestamp: "2023-10-25T09:27:40Z"
  generation: 1
  name: clusterset-test
  namespace: clusterset-test-ns
  resourceVersion: "646003"
  uid: 6840b2fb-cada-4dd6-ae5c-d35637094fad
spec:
  clusterSet: clusterset-test
status:
  conditions:
  - lastTransitionTime: "2023-10-25T09:27:40Z"
    message: ""
    reason: ClusterSetBound
    status: "True"
    type: Bound

@ilan-pinto
Copy link
Member

@haoqing0110 it seems that you only changed the API version without modifying other fields, is that the case?
have you tested it. to confirm ?

@haoqing0110
Copy link
Member Author

Hello @ilan-pinto it looks like the *.json files I'm updating only have a spec.clusterSet field defined, this part does not change in v1beta2. I have tested the code with vscode debug, not sure if more testing needed?

@ilan-pinto
Copy link
Member

@haoqing0110 try to apply it on a local cluster to confirm

@TomerFi TomerFi linked an issue Oct 23, 2023 that may be closed by this pull request
@haoqing0110
Copy link
Member Author

@ilan-pinto thanks for providing some comments, plz see my testing result in the above, the v1beta2 works.

@haoqing0110
Copy link
Member Author

hello @ilan-pinto , could you help to tag this PR?

@TomerFi
Copy link
Member

TomerFi commented Jul 17, 2024

@haoqing0110 Sorry for the delay; I will take a look at this.

@TomerFi
Copy link
Member

TomerFi commented Aug 2, 2024

/approve
/lgtm

Copy link

openshift-ci bot commented Aug 2, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: haoqing0110, TomerFi

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-ci openshift-ci bot added the approved label Aug 2, 2024
@TomerFi
Copy link
Member

TomerFi commented Aug 2, 2024

@haoqing0110 Thank you very much! I apologize for the delays.

@openshift-merge-bot openshift-merge-bot bot merged commit cf2653c into open-cluster-management-io:main Aug 2, 2024
1 check passed
@TomerFi
Copy link
Member

TomerFi commented Aug 2, 2024

Releasing is currently blocked, fixed in #82.

@TomerFi
Copy link
Member

TomerFi commented Aug 14, 2024

Finally, early-access version released.
I'll release full version tomorrow.

@haoqing0110 haoqing0110 deleted the br_clusterset-v1beta2 branch August 15, 2024 06:49
@TomerFi
Copy link
Member

TomerFi commented Oct 29, 2024

Sorry for the delay, we had an issue with our api key and I missed a message with our new one.
All is working now, version 1.3.0 released.

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.

Upgrade ClusterSet and ClusterSetBinding API usage to v1beta2
3 participants