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

OCM-5027 | feat: Added KubeletConfigClient and mock to be shared between ROSA and Terraform #24

Conversation

robpblake
Copy link
Contributor

@robpblake robpblake commented Dec 6, 2023

This PR arises as a result of a conversation between @nirarg and myself when discussing terraform-redhat/terraform-provider-rhcs#413

In terraform-redhat/terraform-provider-rhcs#413 I have created KubeletConfigClient interface that wraps the OCM SDK. The purpose of this approach is to make it easier to test implementations that have a dependency on the OCM SDK as we can replace the implementation with a gomock based one in the unit tests.

By moving this into ocm-common, we hope to start a process of using the same approach in both TF and ROSA CLI and gradually expanding the number of clients we support. Consider this PR a "POC" that implements a handful of clients and provides some initial versions of base structs and interfaces to help us build upon this work.

With this PR merged, I will update terraform-redhat/terraform-provider-rhcs#413 to use this approach.

@robpblake robpblake force-pushed the ocm-5027-common-kubeletclient-alternative branch from 6aaf896 to b61384a Compare December 7, 2023 09:38
pkg/ocm/client/testing/mock_model_types.go Outdated Show resolved Hide resolved
pkg/ocm/client/types.go Show resolved Hide resolved
@robpblake robpblake marked this pull request as ready for review December 7, 2023 10:07
@robpblake robpblake force-pushed the ocm-5027-common-kubeletclient-alternative branch from b61384a to 0fd7aec Compare December 7, 2023 14:31
@robpblake robpblake force-pushed the ocm-5027-common-kubeletclient-alternative branch from 0fd7aec to 121e250 Compare December 11, 2023 12:41
@robpblake robpblake changed the title OCM-5027 | feat: Added KubeletConfigClient and mock to be shared between ROSA and Terraform (Alternative) OCM-5027 | feat: Added KubeletConfigClient and mock to be shared between ROSA and Terraform Dec 11, 2023
@gdbranco gdbranco merged commit 2bb7985 into openshift-online:main Dec 11, 2023
5 checks passed
@robpblake robpblake deleted the ocm-5027-common-kubeletclient-alternative branch December 11, 2023 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants