-
Notifications
You must be signed in to change notification settings - Fork 168
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
To detect and show the unsupported conditions on the console banner #2166
Conversation
d822f9d
to
6c72199
Compare
Please rebase pull request. |
6c72199
to
54a8296
Compare
2c809b7
to
71c3f6f
Compare
@xiaoyu74 I think this is looking good so far. |
before you spend more time on it, I think we should have a discussion about it with PMs. I had a talk with Jerome regarding some openshift version out-of-support notification and I am afraid what he told me also applies here (that we should only do AZComms). I will start a thread on slack with everyone involved |
8796f67
to
2535b49
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A little flow simplification and then it's good for me 🚀
pkg/operator/controllers/checker/unsupportedconditionchecker.go
Outdated
Show resolved
Hide resolved
2535b49
to
9ea158d
Compare
Please rebase pull request. |
9ea158d
to
a85944c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I missed something during my last review :(
I think there is a little error in the logic when you create the banner
pkg/operator/controllers/checkers/internetchecker/unsupportconditionchecker.go
Outdated
Show resolved
Hide resolved
6254e10
to
3a2515a
Compare
3a2515a
to
c14e28f
Compare
there might be a |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
|
||
func (ucc *UnsupportedConditionChecker) addConsoleBanner(ctx context.Context, consoleText string) error { | ||
notification, err := ucc.consolecli.ConsoleV1().ConsoleNotifications().Get(ctx, consoleBannerName, metav1.GetOptions{}) | ||
if kerrors.IsNotFound(err) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this control flow is clean and easy to understand, thank you 🚀
Which issue this PR addresses:
To proactively detect the unsupported conditions of the ARO Cluster and show the notifications on the console banner for the end-user. The detailed description is in the task ADO-7551905
What this PR does / why we need it:
To implement an ARO operator checker to detect "unsupported conditions" and displaying the notifications on the console banner automatically. Then, make the operator marked as
upgradable=False
.We haven't considered all the unsupported conditions; this PR will mainly focus on the conditions below:
less than 3 worker nodes
Default route
is configured in the ClusterCustom Network Security Group
is configured in the ClusterWe will constantly update with more conditions based on the opinions/discussions/suggestions from the team
Test plan for issue:
Testing with an ARO dev cluster to confirm the new checker is working and the notification is shown on the banner as expected.
Deploy an ARO dev cluster
In your local ARO-RP repo, run the ARO operator locally to test the new ARO checker:
oc scale -n openshift-azure-operator deployment/aro-operator-master --replicas=0
CLUSTER=cluster-name go run -tags aro,containers_image_openpgp ./cmd/aro operator master
Testing the checker with the first unsupported condition which is too less worker nodes
oc scale --replicas=<number-of-replicas> machineset/<machineset-name> -n openshift-machine-api
oc scale --replicas=0 machineset/shawn-dev-mbcp2-worker-australiaeast3 -n openshift-machine-api
Then, check if the notification is shown on the cluster console banner as expected. Also, the ARO operator upgradable status is set as "False"
Scale up the worker node to 3 or more and the notification should be removed from the banner
Is there any documentation that needs to be updated for this PR?
N/A - This is a new ADO task, and I will document it after the task completed and test passed.