NE-1402: Add service endpoint override capability to IBM DNS provider#990
Conversation
|
Hi @marcsello. Thanks for your PR. I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
cef226d to
9e58915
Compare
|
/retitle NE-1402: Add service endpoint override capability to IBM DNS provider |
|
@marcsello: This pull request references NE-1402 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.15.0" version, but no target version was set. 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. |
Miciah
left a comment
There was a problem hiding this comment.
Please copy the description from the PR to the commit message, and add a reference to https://issues.redhat.com/browse/NE-1402 in commit message as well.
I have some other comments inline, mostly trivial suggestions, but we should codify the service endpoint names in openshift/api if they aren't already defined somewhere.
It's unfortunate that we don't have E2E for IBM Cloud or Power VS, but we can at least make sure verify, unit tests, etc. pass and that nothing breaks on other platforms.
/ok-to-test
| // Read custom service endpoints from the infra status and set when configured | ||
| // When none configured, the provider will use the default values | ||
| var serviceEndpointOverrides ibm.ServiceEndpointOverrides | ||
| for _, endpointConfig := range infraStatus.PlatformStatus.PowerVS.ServiceEndpoints { | ||
| switch endpointConfig.Name { | ||
| case "cis": | ||
| serviceEndpointOverrides.CIS = endpointConfig.URL | ||
| case "dnsservices": | ||
| serviceEndpointOverrides.DNS = endpointConfig.URL | ||
| case "iam": | ||
| serviceEndpointOverrides.IAM = endpointConfig.URL | ||
| } | ||
| } |
There was a problem hiding this comment.
I was going to suggest writing a helper using Go generics, but it turns out that generics isn't flexible enough for this case (see golang/go#48522). Given that, I'll just note that the comment here should be updated per my earlier suggestion.
|
Oh, and thanks for the PR! It looks good overall, aside from some trivial things as I mentioned. |
|
Incorporating the changes to the I will run some regression tests for Public, Private, and BYON with these changes and report back this week. Regression tests completed, everything appears fine. |
|
@marcsello: This pull request references NE-1402 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.15.0" version, but no target version was set. 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. |
61b6c82 to
4900812
Compare
|
Thank you for all comments! I've fixed most of them. One exception is the named constants, I'll wait for what the outcome of @cjschaef's PR openshift/library-go#1612 with that. Regarding the failing test, I can not see any relation to my changes, I'll try re-running the test to see if it was an intermittent issue. /retest |
|
This time different, unrelated tests have failed. /retest |
|
Looks like this revert has caused us to lose the necessary So we no longer have access to the |
4900812 to
f8e81bb
Compare
|
I have rebased my commit off master, and added a new commit to update the |
|
There seems to be a temporarily issue with the build. /retest |
|
It seems like unrelated tests have failed again. /retest |
|
/retest |
1 similar comment
|
/retest |
e3df281 to
10b74db
Compare
|
/retest |
Miciah
left a comment
There was a problem hiding this comment.
A few additional comments:
- Please put the openshift/api bump commit first and the implementation commit second. The goal is that every commit should build and pass tests (this is helpful to anyone using
git bisectin the future, for example). - Please mention in the bump commit message that the purpose of the bump is to get the IBM Cloud service override API.
- Would you mind adding the
go getcommands that you used to bump the vendored packages to the commit message for the openshift/api bump? See e501577 for an example. (Sorry for adding this chore; this is a relatively new expectation regarding commit messages that the team has agreed on.)
|
Thanks for the feedback @Miciah! I'll try to sort all this out by today. |
10b74db to
6ceb97d
Compare
…1402) Bump the vendored github.com/openshift/api to v0.0.0-20231113114413-39964e6af314 and it's peer dependencies in order to be able to implement the IBM Cloud service override API for NE-1402 This commit updates k8s.io/client-go as well, (and k8s.io/apiextensions-apiserver and k8s.io/apiserver as well) because the previous version is incompatible with the dependencies of the new api version go mod edit -replace github.com/openshift/api=github.com/openshift/api@v0.0.0-20231113114413-39964e6af314 go mod edit -replace k8s.io/client-go=k8s.io/client-go@v0.28.0 go get k8s.io/apiextensions-apiserver@v0.28.0 go get k8s.io/apiserver@v0.28.0 go mod tidy go mod vendor * go.mod: Bump. * go.sum: * vendor/*: Regenerate.
This PR adds the ability for custom service endpoints to be configured and used by the IBM DNS provider. If no overrides configured, it falls back to the default endpoints it used before. The overrides are read from the cluster's `Infrastrucutre` configuration (Specifically from `.status.platformStatus.ibmcloud.serviceEndpoints`): https://github.com/openshift/cluster-ingress-operator/blob/dev-add-service-overrides/vendor/github.com/openshift/api/config/v1/types_infrastructure.go#L1218 Since PowerVS uses IBM DNS provider, and uses the same configuration format, this capability is implemented for it as well. Jira reference: https://issues.redhat.com/browse/NE-1402
6ceb97d to
21971b4
Compare
|
Excellent! Thank you very much! |
|
The bot must be having a bad case of the Mondays! |
|
@Miciah: Where does Napoleon keep his armies? In his sleevies. 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. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Miciah 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 |
|
/retest-required |
|
Other than the vendored packages, all of the changes in this PR are specific to IBM Cloud. Moreover, |
|
@Miciah: Overrode contexts on behalf of Miciah: ci/prow/e2e-gcp-operator 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. |
|
@marcsello: The following tests failed, say
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. |
|
[ART PR BUILD NOTIFIER] This PR has been included in build ose-cluster-ingress-operator-container-v4.15.0-202311280332.p0.g30833ad.assembly.stream for distgit ose-cluster-ingress-operator. |
|
I just saw this, and it is very useful for us. Thank you!! |
This PR adds the ability for custom service endpoints to be configured and used by the IBM DNS provider. If no overrides configured, it falls back to the default endpoints it used before.
The overrides are read from the cluster's
Infrastrucutreconfiguration (Specifically from.status.platformStatus.ibmcloud.serviceEndpoints): https://github.com/openshift/cluster-ingress-operator/blob/dev-add-service-overrides/vendor/github.com/openshift/api/config/v1/types_infrastructure.go#L1218Since PowerVS uses IBM DNS provider, and uses the same configuration format, this capability is implemented for it as well.
Jira reference: https://issues.redhat.com/browse/NE-1402