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

VM actions should use cluster-proxy Service instead of Route #4198

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

zlayne
Copy link
Contributor

@zlayne zlayne commented Jan 16, 2025

No description provided.

Copy link

openshift-ci bot commented Jan 16, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: zlayne

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

The pull request process is described here

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

@zlayne
Copy link
Contributor Author

zlayne commented Jan 16, 2025

/retest

@zlayne zlayne requested a review from KevinFCormier January 17, 2025 18:39
// req.url is one of: /virtualmachines/<action> OR /virtualmachineinstances/<action>
// the VM name is needed between the kind and action for the correct api url.
const splitURL = req.url.split('/')
const joinedURL = `${splitURL[1]}/${body.vmName}/${splitURL[2]}`
const path = `${proxyServer}/${body.managedCluster}/apis/subresources.kubevirt.io/v1/namespaces/${body.vmNamespace}/${joinedURL}`
const proxyService = 'https://cluster-proxy-addon-user.multicluster-engine.svc.cluster.local:9092'
Copy link
Contributor

Choose a reason for hiding this comment

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

Namespace can be customized by customers, and should not be hardcoded. See https://github.com/stolostron/console/blob/main/backend/src/routes/aggregators/utils.ts#L100 for example.

The other parts of the service addressed being hardcoded is OK, as they won't change in a given released version.

@zlayne
Copy link
Contributor Author

zlayne commented Jan 17, 2025

@KevinFCormier I am actually receiving the error getaddrinfo ENOTFOUND when running requests against cluster-proxy-addon-user service on managed cluster VMs.
I'm trying to debug why this service would work differently compared to how we do it for search-api.

@zlayne
Copy link
Contributor Author

zlayne commented Jan 20, 2025

/test unit-tests-sonarcloud

@zlayne
Copy link
Contributor Author

zlayne commented Jan 21, 2025

/test unit-tests-sonarcloud

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