-
Notifications
You must be signed in to change notification settings - Fork 191
Operator: Expose Cluster SP as Condition #1230
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
Conversation
e60402b to
f24f13e
Compare
d88067f to
68dc45f
Compare
mjudeikis
left a comment
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 this is a good start, but we have some structural changes we need to address before we progress. kicked off POC PR how it could look like. Can you take a look and lets discuss this.
|
Please rebase pull request. |
68dc45f to
a57ecdd
Compare
54da84e to
7204bce
Compare
|
@mjudeikis @olga-mir @jim-minter This is ready for review, but there's a few things that need to be changed before the e2e tests pass. I still need to test running the container on a cluster. I tested locally using a kubeconfig, but when attempting to update the image to a custom quay image I am running into a problem with my glibc version of the compiled binary not matching the version in ubi8-min. Additionally, we will need to push this to arointsvc.azurecr.io/aro at some point (and then prod) for the e2e test to pass as the new condition being exposed by the operator won't be present for the installation to succeed until the image is updated. Will work on reconciling the glibc version so I can test locally and then sync up on any additional review items. |
7204bce to
532ad86
Compare
|
Please rebase pull request. |
nilsanderselde
left a comment
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.
looks good, just some nitpicking
|
This PR is marked |
|
Please rebase pull request. |
319724a to
c6ebdbf
Compare
c6ebdbf to
5d1c18b
Compare
|
Please rebase pull request. |
mjudeikis
left a comment
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.
very close :)
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.
Now this call is not needed. Validator initiation with NewValidator is needed to instantiate clients. In this case we dont use clients as we do only ValidateServicePrincipals which gets token inside.
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.
All this could be like this:
// IMPORTANT: We provide authorizer = nil because operator service principal validation do not need any of the clients to be initiated inside validator.
spDynamic, err := dynamic.NewValidator(r.log, &azEnv, resource.SubscriptionID, nil, dynamic.AuthorizerClusterServicePrincipal)
if err != nil {
return 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.
@mjudeikis these are two different endpoints (GraphEndpoint, ResourceManagerEndpoint) we're verifying against which is why there are two aad.GetToken calls: 1 within the validator, 1 within the sp checker.
Do we only need to validate against the graph endpoint now? I thought we needed both graph and resourcemanager endpoints as this is what we're doing in openshiftcluster_validatedynamic.go.
5d1c18b to
29af0ae
Compare
29af0ae to
83dd576
Compare
|
Please rebase pull request. |
83dd576 to
616cb04
Compare
|
Please rebase pull request. |
mjudeikis
left a comment
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.
Would be good to tide this up and merge :)
616cb04 to
70a0d87
Compare
70a0d87 to
444aaca
Compare
Work in progress for some early feedback
Which issue this PR addresses:
Fixes 8858759
What this PR does / why we need it:
Expose the cluster service principal validity as a condition in the ARO cluster CRD through use of the operator.
Test plan for issue:
Unit tests, e2e, manual
Check the Service Principal is Valid
Get Service Principal Information
Get and delete the VNET role assignment
Recheck the Service Principal
Add the Role Assignment Back
Is there any documentation that needs to be updated for this PR?
No