api icon indicating copy to clipboard operation
api copied to clipboard

Power VS: Use IBMCloudServiceEndpoint for PowerVSServiceEndpoint

Open mjturek opened this issue 1 year ago • 8 comments

mjturek avatar Jun 12 '24 22:06 mjturek

Hello @mjturek! Some important instructions when contributing to openshift/api: API design plays an important part in the user experience of OpenShift and as such API PRs are subject to a high level of scrutiny to ensure they follow our best practices. If you haven't already done so, please review the OpenShift API Conventions and ensure that your proposed changes are compliant. Following these conventions will help expedite the api review process for your PR.

openshift-ci[bot] avatar Jun 12 '24 22:06 openshift-ci[bot]

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

The full list of commands accepted by this bot can be found 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

openshift-ci[bot] avatar Jun 12 '24 22:06 openshift-ci[bot]

@mjturek whats the main reason for using IBMCloudServiceEndpoint for both IBM and PowerVS?

Karthik-K-N avatar Jun 19 '24 12:06 Karthik-K-N

@mjturek whats the main reason for using IBMCloudServiceEndpoint for both IBM and PowerVS?

@Karthik-K-N See this example in the ingress-operator. Because of the validations in the API, this check does not work. In the install-config you'd need to set your service endpoint name for CIS to cis rather than CIS so that it passed validation. However, once it reaches the linked portion of the operator, it won't be used because "cis" != "CIS"

We could instead patch this and all other occurrences to ignore case, but a well defined set of endpoints is already available in the API, why not use them.

mjturek avatar Jun 22 '24 00:06 mjturek

@mjturek whats the main reason for using IBMCloudServiceEndpoint for both IBM and PowerVS?

@Karthik-K-N See this example in the ingress-operator. Because of the validations in the API, this check does not work. In the install-config you'd need to set your service endpoint name for CIS to cis rather than CIS so that it passed validation. However, once it reaches the linked portion of the operator, it won't be used because "cis" != "CIS"

We could instead patch this and all other occurrences to ignore case, but a well defined set of endpoints is already available in the API, why not use them.

Got it, But instead of combining the types, Isn't it good to remove the kubebuilder validation if required.

Karthik-K-N avatar Jun 24 '24 15:06 Karthik-K-N

I don't understand why casing is an issue here? OpenShift APIs should use PascalCase, no matter what the underlying API uses. We control where we are using this code and can translate (toLower) the values when we need to.

It looks like the checks in the ingress operator aren't working because the existing API for power is not following conventions, you'll probably want to fix that by including the correct versions, but handling in the code the old versions since they will existing for existing clusters

JoelSpeed avatar Jun 24 '24 15:06 JoelSpeed

@mjturek: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/verify b8ac16f75cc1ba3a07f81b761e9eedb46778a3ba link true /test verify
ci/prow/e2e-aws-ovn-techpreview b8ac16f75cc1ba3a07f81b761e9eedb46778a3ba link true /test e2e-aws-ovn-techpreview
ci/prow/e2e-aws-ovn-hypershift b8ac16f75cc1ba3a07f81b761e9eedb46778a3ba link true /test e2e-aws-ovn-hypershift
ci/prow/e2e-aws-serial b8ac16f75cc1ba3a07f81b761e9eedb46778a3ba link true /test e2e-aws-serial
ci/prow/e2e-aws-serial-techpreview b8ac16f75cc1ba3a07f81b761e9eedb46778a3ba link true /test e2e-aws-serial-techpreview
ci/prow/e2e-upgrade-minor b8ac16f75cc1ba3a07f81b761e9eedb46778a3ba link true /test e2e-upgrade-minor
ci/prow/e2e-aws-ovn b8ac16f75cc1ba3a07f81b761e9eedb46778a3ba link true /test e2e-aws-ovn
ci/prow/e2e-upgrade b8ac16f75cc1ba3a07f81b761e9eedb46778a3ba link true /test e2e-upgrade

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

openshift-ci[bot] avatar Jul 11 '24 16:07 openshift-ci[bot]

Alternative here https://github.com/openshift/api/pull/1965/

mjturek avatar Jul 18 '24 15:07 mjturek