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

Add provider form fields revisit for DDF conversion #383

Closed
skateman opened this issue Jun 26, 2020 · 10 comments
Closed

Add provider form fields revisit for DDF conversion #383

skateman opened this issue Jun 26, 2020 · 10 comments
Assignees
Labels

Comments

@skateman
Copy link
Member

skateman commented Jun 26, 2020

I'm trying to convert the add-provider form for containers to DDF and there are some inconsistencies. All the endpoints use the same token for authentication, this is solved by copying the default record. This would not be a problem, it is all sorted out on the model-level. However, the virtualization requires a separate token and on my setup I was able to use the same token as for the default endpoint.

Is the separate token option really necessary? It would help me a lot if it would just use the same mechanism as any other endpoint.

Parent issue: ManageIQ/manageiq#18818

@agrare
Copy link
Member

agrare commented Jun 27, 2020

If I had to guess its because it is in its own repo and isn't only added as a child manager. Doesn't make it a good reason and I'm open to changing it 😄

If we don't expect to ever have kubevirt as a standalone manager without tying it to a kube/ocp (which seems reasonable) we can change that provider to delegate its auth to a parent_manager.

@cben
Copy link
Contributor

cben commented Jun 28, 2020

Yeah, kubevirt is custom resources accessed over same apiserver, I'm pretty certain it has same authN
EDIT: I was wrong

From what i remember, the way containers child managers update child Endpoints/Auth records in rails hooks when parent manager changes (or something like that) was a horrible kludge that bit us in subtle ways :-(

IIRC @masayag tried to apply this pattern to kubevirt and had issues with it (?)

@skateman
Copy link
Member Author

If that's okay, I'd like to get rid of that token field for kubevirt, it would not need any special handling on the backend after converting the form to DDF.

@masayag
Copy link
Contributor

masayag commented Jun 28, 2020

KubeVirt is an add-on for kubernetes which requires different roles to fully-operate than the roles that are needed for the container manager.
Therefore, the admin has the ability to provide a specific token to be used for the virtualization purpose.

That's the main reason why we added a specific token for the virtualization endpoint.

@skateman
Copy link
Member Author

skateman commented Jul 2, 2020

Thank you @masayag @cben, in this case there's one additional issue: the kubevirt hostname/port/protocol fields can't be auto-copied from the default endpoint. A possible solution I see is to not show them at all and just solve the storing on the model leve. Would that be okay with you?

Screenshot from 2020-07-02 14-21-14

@masayag
Copy link
Contributor

masayag commented Jul 2, 2020

@skateman that sounds reasonable to me. So eventually the 'virtualization' sub-tab will contain only the token field and validate button ?

@skateman
Copy link
Member Author

skateman commented Jul 2, 2020

@skateman that sounds reasonable to me. So eventually the 'virtualization' sub-tab will contain only the token field and validate button ?

Yes, as that's the only editable field there...

@skateman
Copy link
Member Author

@agrare there are similar delegation problems here as we had in configuration management.

@agrare
Copy link
Member

agrare commented Jul 13, 2020

Well that's "fun"

@gtanzillo
Copy link
Member

Closing since the question was answered

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants