Skip to content

fix useFleetK8sAPIPath throwing errors#4746

Closed
upalatucci wants to merge 1 commit intostolostron:mainfrom
upalatucci:fix-useFleetK8sAPIPath
Closed

fix useFleetK8sAPIPath throwing errors#4746
upalatucci wants to merge 1 commit intostolostron:mainfrom
upalatucci:fix-useFleetK8sAPIPath

Conversation

@upalatucci
Copy link
Copy Markdown
Contributor

@upalatucci upalatucci commented Jul 10, 2025

We have to guard if the cluster that we are running does not have ManagedCluster CRD installed (as it does not have acm maybe)

If no cluster provided there is no need to fire requests and waiting. We already know that its the local cluster.

Other fixes are typescripts complains during build

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Jul 10, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: upalatucci
Once this PR has been reviewed and has the lgtm label, please assign edewit for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details 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
Copy link
Copy Markdown

openshift-ci Bot commented Jul 10, 2025

Hi @upalatucci. Thanks for your PR.

I'm waiting for a stolostron member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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-sigs/prow repository.

Signed-off-by: Ugo Palatucci <upalatuc@redhat.com>
@upalatucci upalatucci force-pushed the fix-useFleetK8sAPIPath branch from 90d81ee to 4375c01 Compare July 10, 2025 09:24
@KevinFCormier
Copy link
Copy Markdown
Contributor

@upalatucci We are in the process of rewriting the hub name detection anyway, because accessing the ManagedCluster resources directly is not RBAC-friendly.

@nitin-dhevar Can you make sure that for useHubClusterName, we check useIsFleetAvailable. If we don't have multicluster SDK support from ACM, I'm not sure if we should return "local-cluster", undefined, or an error.

@jeswanke Can you make sure that useFleetK8sAPIPath returns the default when ACM is not available?

@vishsanghishetty Can you review the changes for event stream and get them merged?

@upalatucci
Copy link
Copy Markdown
Contributor Author

@KevinFCormier @jeswanke we should also make sure to return the default k8s api when no cluster is provided :D as i forgot

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.

2 participants