-
Notifications
You must be signed in to change notification settings - Fork 897
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
Fix creating Kubernetes or OSE with credentials.auth_key
#13317
Fix creating Kubernetes or OSE with credentials.auth_key
#13317
Conversation
LGTM 👍 |
6e2416e
to
73d4490
Compare
I'm working on several PRs that will all depend on / benefit from the extended tests here. |
73d4490
to
243dfae
Compare
@cben can you provide an example of the request that works and the one that is not working but should work? |
Didn't work (
Worked:
CORRECTION: Openshift already worked, changed examples to OpenshiftEnterprise. |
This pull request is not mergeable. Please rebase and repush. |
243dfae
to
a7a74b1
Compare
a7a74b1
to
fb74f8a
Compare
LGTM 👍 |
This pull request is not mergeable. Please rebase and repush. |
…_key` Passing `credentials` containing `auth_key` was failing with: Could not create the new provider - Unsupported credential attributes auth_key specified Worked with Openshift. The recommended way to create Openshift with hawkular metrics is pass `connection_configurations`, which works. But passing hostname/ip, port and `credentials` should work when you don't need a hawkular endpoint (and currently will still attempt metrics if there is hawkular on same hostname with default port 443).
fb74f8a
to
76548ed
Compare
Checked commit cben@76548ed with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
Rebased. @blomquisg @abellotti, this is a tiny fix. |
LGTM 👍 @miq-bot assign blomquisg |
I'm good with API changes. Thanks. |
Passing
credentials
containingauth_key
was failing with:Worked with Openshift.
(The recommended way to create Openshift with hawkular metrics is pass
connection_configurations
, which works.But passing hostname/ip, port and
credentials
should work when you don't need a hawkular endpoint (and currently will still attempt metrics if there is hawkular on same hostname with default port 443).)@miq-bot add-label bug, providers/containers, api
Tests (this part already got merged in #13369)
Extended api/providers_spec.rb to run the container tests for all 3 concrete container manager classes, instead of just
Openshift::ContainerManager
.I also tried using
shared_example
instead of loops, found the results less satisfactory.This file now takes ~17s instead of ~15s. IMO, despite exercising mostly the same mixing code it's well worth it:
Marked that test pending, will address later.
credentials
vsconnection_configurations
, and fallbacks from hawkular endpoint to default endpoint...I find it very hard to reason about, and to even start simplifying it requires test coverage.
P.S. The "schedules a new credentials check if endpoint change" test is known to be a lie, should fail (#13167). Will address in later PR.
@yaacov @dkorn Please review.