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

Setting quota limits fails with certificate error #532

Merged
merged 1 commit into from
May 23, 2024

Conversation

fmount
Copy link
Contributor

@fmount fmount commented May 17, 2024

This patch fixes the interaction with keystone when quota is registered. As in [1], this change solves the problem by getting a scoped client from keystone.

Fixes: OSPRH-6766

[1]https://github.com/openstack-k8s-operators/keystone-operator/blob/main/api/v1beta1/keystoneapi.go#L143

@fmount
Copy link
Contributor Author

fmount commented May 17, 2024

/hold beta freeze

Copy link
Contributor

@stuggi stuggi left a comment

Choose a reason for hiding this comment

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

do we need the GetAdminServiceClient() in here? can we just use the GetScopedAdminServiceClient() from keystone? openstack-k8s-operators/keystone-operator#417 will add cert validation for the client connection.

@fmount
Copy link
Contributor Author

fmount commented May 17, 2024

do we need the GetAdminServiceClient() in here? can we just use the GetScopedAdminServiceClient() from keystone? openstack-k8s-operators/keystone-operator#417 will add cert validation for the client connection.

Interesting, I didn't know about that function, especially that we can pass the scope! I will try that and it would simplify the code here in the operator, and we won't have to worry about the tls parameter (and duplicating such code).
I'll update the patch to follow that pattern.

@fmount fmount force-pushed the quota_tls branch 2 times, most recently from 773f128 to f05321b Compare May 17, 2024 13:35
@fmount
Copy link
Contributor Author

fmount commented May 17, 2024

@stuggi thank you this was a great hint! I can pass the scope I need and get a client from keystone. I just tested it and works as expected!

@fmount
Copy link
Contributor Author

fmount commented May 17, 2024

/test glance-operator-build-deploy-kuttl

This patch fixes the interaction with keystone when quota is registered
or updated.
As per [1], this change solves the problem by getting a client from
keystone and passing the right scope.

Jira: [OSPRH-6766](https://issues.redhat.com/browse/OSPRH-6766)

[1]https://github.com/openstack-k8s-operators/keystone-operator/blob/main/api/v1beta1/keystoneapi.go#L143

Signed-off-by: Francesco Pantano <fpantano@redhat.com>
Copy link
Contributor

@stuggi stuggi left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link
Contributor

openshift-ci bot commented May 23, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fmount, konan-abhi, stuggi

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:
  • OWNERS [fmount,konan-abhi,stuggi]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit 33be9d7 into openstack-k8s-operators:main May 23, 2024
7 checks passed
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.

None yet

3 participants