Folllow on changes to CONSOLE-2919#612
Folllow on changes to CONSOLE-2919#612TheRealJon wants to merge 3 commits intoopenshift:master-multi-cluster-featurefrom
Conversation
a7ca31e to
82891d3
Compare
|
/retest |
1 similar comment
|
/retest |
|
@TheRealJon It looks good to me, but I'm giving @florkbr a chance to take a look before I tag it. |
| opt := metav1.CreateOptions{} | ||
| mca, err := c.dynamicClient.Resource(api.ManagedClusterActionGroupVersionResource).Namespace(managedClusterName).Create(ctx, required, opt) | ||
| if err != nil && apierrors.IsAlreadyExists(err) { | ||
| mca, err = c.dynamicClient.Resource(api.ManagedClusterActionGroupVersionResource).Namespace(managedClusterName).Get(ctx, required.GetName(), metav1.GetOptions{}) |
There was a problem hiding this comment.
What happens if the console public hostname changes after the managed cluster OAuth client is created? Is the redirect URL updated?
There was a problem hiding this comment.
No, I think we will have to add some special logic to patch the spoke cluster OAuth client if the hostname changes.
82891d3 to
dbcead1
Compare
spadgett
left a comment
There was a problem hiding this comment.
/lgtm
Thanks @TheRealJon. Let's open a follow up issue for handling console hostname changes.
|
/retest-required Please review the full test history for this PR and help us cut down flakes. |
15 similar comments
|
/retest-required Please review the full test history for this PR and help us cut down flakes. |
|
/retest-required Please review the full test history for this PR and help us cut down flakes. |
|
/retest-required Please review the full test history for this PR and help us cut down flakes. |
|
/retest-required Please review the full test history for this PR and help us cut down flakes. |
|
/retest-required Please review the full test history for this PR and help us cut down flakes. |
|
/retest-required Please review the full test history for this PR and help us cut down flakes. |
|
/retest-required Please review the full test history for this PR and help us cut down flakes. |
|
/retest-required Please review the full test history for this PR and help us cut down flakes. |
|
/retest-required Please review the full test history for this PR and help us cut down flakes. |
|
/retest-required Please review the full test history for this PR and help us cut down flakes. |
|
/retest-required Please review the full test history for this PR and help us cut down flakes. |
|
/retest-required Please review the full test history for this PR and help us cut down flakes. |
|
/retest-required Please review the full test history for this PR and help us cut down flakes. |
|
/retest-required Please review the full test history for this PR and help us cut down flakes. |
|
/retest-required Please review the full test history for this PR and help us cut down flakes. |
|
/retest |
3 similar comments
|
/retest |
|
/retest |
|
/retest |
jhadvig
left a comment
There was a problem hiding this comment.
@TheRealJon I see really nice work here! Adding couple of comments.
|
|
|
/retest |
- Create managed cluster oauth cert configmap in openshift-console namespace - Only set managed cluster config file on console config if the managed cluster config map is present - Remove all multicluster related resources when no managed clusters exist or the API is not present. - Simplify some variable and file names - Get rid of a few magic strings and static values (moved to the api package) - Update managed cluster controller to stop syncing if no local oauth client is found. - Update ManagedClusterController.getValidManagedClusters to ManagedClusterController.SyncManagedClusterList for consistency - Add new config map volumes and volume mounts for oauth certs to console operator deployment - Update managed cluster controller to build managed cluster config with oauth data - Add FeatureGate logic to managed cluster controller
04557e3 to
241bc05
Compare
|
@TheRealJon: TheRealJon unauthorized: /override is restricted to Repo administrators, approvers in top level OWNERS file. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
- Reorder managed cluster controller sync helper func return values so that errors are last - Use generic console configmap bindata to generate all console configmaps - Remove update verb from MCA and MCV RBAC rules - Add error handling for unstructured SetNested... calls
7a34ad1 to
5c44b47
Compare
|
/retest |
| required := managedclusterviewsub.DefaultOAuthClientView(managedCluster.Name) | ||
| mcv, err := c.dynamicClient.Resource(api.ManagedClusterViewGroupVersionResource).Namespace(managedCluster.Name).Create(ctx, required, metav1.CreateOptions{}) | ||
| if err != nil && apierrors.IsAlreadyExists(err) { | ||
| mcvName, _ := managedclusterviewsub.GetName(required) | ||
| mcv, err = c.dynamicClient.Resource(api.ManagedClusterViewGroupVersionResource).Namespace(managedCluster.Name).Get(ctx, mcvName, metav1.GetOptions{}) | ||
| mcv, err := c.dynamicClient.Resource(api.ManagedClusterViewGroupVersionResource).Namespace(managedCluster.Name).Get(ctx, api.OAuthClientManagedClusterViewName, metav1.GetOptions{}) | ||
| if apierrors.IsNotFound(err) { | ||
| required, err := managedclusterviewsub.DefaultOAuthClientView(managedCluster.Name) | ||
| if err != nil { | ||
| errs = append(errs, fmt.Sprintf("Error initializing oauth client ManagedClusterView for cluster %s: %v", managedCluster.Name, err)) | ||
| continue | ||
| } | ||
| mcv, err = c.dynamicClient.Resource(api.ManagedClusterViewGroupVersionResource).Namespace(managedCluster.Name).Create(ctx, required, metav1.CreateOptions{}) |
There was a problem hiding this comment.
Since we have to do error checking on initializing the required MCV, the logic needed to be switched around here. Instead of trying to create the resource, then handling the case where it already exists, we check to see if it already exists, then create it if not.
|
/retest |
jhadvig
left a comment
There was a problem hiding this comment.
@TheRealJon found a few additional inconsistencies, PTAL
|
@jhadvig I've addressed your feedback, let me know if this looks good and I'll squash |
52cb5b6 to
19ced6d
Compare
|
/override ci/prow/e2e-aws-single-node Overriding statuses since this is a PR against a feature branch. We will make sure it passes CI before merging to master. |
|
@spadgett: Overrode contexts on behalf of spadgett: ci/prow/e2e-agnostic-upgrade, ci/prow/e2e-aws-operator, ci/prow/e2e-aws-single-node DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
@TheRealJon: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jhadvig, spadgett, TheRealJon The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Closing as all of these changes are included in #630 |
Addresses my feedback to @florkbr 's PR #602 plus a little bit more polishing.
ManagedClusterController.getValidManagedClusterstoManagedClusterController.SyncManagedClusterListfor consistency