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 ability to label managedclusters... #87

Merged
merged 1 commit into from
Jul 3, 2021

Conversation

ShyamsundarR
Copy link
Member

with their own minikube profile names.

This also lines up with the ocm-ramen-samples and
cluster names used in that repository.

Additionally reduced mirror snapshot time to 2m
from 5m to ease testing delays.

Signed-off-by: Shyamsundar Ranganathan [email protected]

@@ -8,6 +8,9 @@ set -x
set -e
trap 'echo exit value: $?;trap - EXIT' EXIT

# pre-requisites
which jq
Copy link
Member Author

Choose a reason for hiding this comment

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

@hatfieldbrian if you prefer a different means to test tool availability do let me know.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I prefer POSIX's command -v, but which should work.

Copy link
Member Author

Choose a reason for hiding this comment

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

jFYI, I had fixed this to command -v ... as shellcheck caught the same.

with their own minikube profile names.

This also lines up with the ocm-ramen-samples and
cluster names used in that repository.

Additionally reduced mirror snapshot time to 2m
from 5m to ease testing delays.

Signed-off-by: Shyamsundar Ranganathan <[email protected]>
@ShyamsundarR ShyamsundarR force-pushed the label-test-clusters branch from 9bfe4f9 to 87d2a2f Compare July 2, 2021 19:19
@BenamarMk BenamarMk merged commit 2b8b96c into RamenDR:main Jul 3, 2021
@ShyamsundarR ShyamsundarR deleted the label-test-clusters branch July 4, 2021 13:36
@@ -160,6 +163,8 @@ spoke_add()
# Error from server (InternalError): Internal error occurred: failed calling webhook "managedclustermutators.admission.cluster.open-cluster-management.io": the server is currently unable to handle the request
set -e
date
kubectl --context ${hub_cluster_name} patch managedclusters/${1} -p $(jq -cn --arg clname "$1" '{"metadata":{"labels":{"name":$clname}}}') --type=merge
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is also in the ramen script:

kubectl --context ${hub_cluster_name} label managedclusters/${2} name=${2} --overwrite

Based on its inclusion here I presume it is an OCM requirement, more so than a ramen one. And if so, I wonder why OCM does not do it. @BenamarMk any thoughts?

Copy link
Member Author

Choose a reason for hiding this comment

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

OCM upstream does not do it yet, although this is how its placement works.

I did not notice it in the ramen deploy part (had not got that far). It is better in the ocm setup as this is an expectation from the OCM setup phase.

Copy link
Collaborator

Choose a reason for hiding this comment

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

issue tracker to address managedcluster labeling: open-cluster-management-io/multicloud-operators-subscription#16

@@ -160,6 +163,8 @@ spoke_add()
# Error from server (InternalError): Internal error occurred: failed calling webhook "managedclustermutators.admission.cluster.open-cluster-management.io": the server is currently unable to handle the request
set -e
date
kubectl --context ${hub_cluster_name} patch managedclusters/${1} -p $(jq -cn --arg clname "$1" '{"metadata":{"labels":{"name":$clname}}}') --type=merge
date
Copy link
Collaborator

Choose a reason for hiding this comment

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

I put the date commands in to measure how long wait-type commands take.

Copy link
Collaborator

@hatfieldbrian hatfieldbrian left a comment

Choose a reason for hiding this comment

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

I approve. It seems approval is not required though since it is already merged :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants