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

Create OpenAPI Kubernetes client integration with OKE #1041

Merged
merged 5 commits into from
Dec 13, 2024

Conversation

andriy-dmytruk
Copy link
Contributor

@andriy-dmytruk andriy-dmytruk commented Dec 12, 2024

Integration the OpenAPI Kubernetes client with OKE that adds:

  • OkeKubeConfigLoader that loads kubeconfig from a specified cluster with the OCI Container Engine client.
  • OkeKuberenetesCredentialLoader that provides token for OKE server requests. The tokens are based on the OCI AuthenticationDetailsProvider

Copy link

❌ Oracle Cloud CI 17 latest failed: https://ge.micronaut.io/s/trxptrkgnqtwc

Copy link

❌ Oracle Cloud CI 17 latest failed: https://ge.micronaut.io/s/ajgx6bmyofemw

@andriy-dmytruk
Copy link
Contributor Author

Strange, it says region provider is missing. But it should not be required if endpoint was set explicitly. I don't even see RegionProvider injected in the ContainerEngineClientFactory.

Path Taken: new KubernetesHttpClientFactory(KubeConfigLoader kubeConfigLoader,KubernetesClientConfiguration kubernetesClientConfiguration,KubernetesPrivateKeyLoader kubernetesPrivateKeyLoader,ResourceResolver resourceResolver,DefaultHttpClientFilterResolver defaultHttpClientFilterResolver) --> new KubernetesHttpClientFactory([KubeConfigLoader kubeConfigLoader],KubernetesClientConfiguration kubernetesClientConfiguration,KubernetesPrivateKeyLoader kubernetesPrivateKeyLoader,ResourceResolver resourceResolver,DefaultHttpClientFilterResolver defaultHttpClientFilterResolver) --> new OkeKubeConfigLoader([ContainerEngineClient containerEngineClient],OkeKubernetesClientConfig config,ResourceResolver resourceResolver) --> ContainerEngineClientFactory.build(Builder clientBuilder,AbstractAuthenticationDetailsProvider authenticationDetailsProvider,[RegionProvider regionProvider])

@andriy-dmytruk
Copy link
Contributor Author

@n0tl3ss Unfortunately it seems like #1040 is breaking this.

Copy link

❌ Oracle Cloud CI 17 latest failed: https://ge.micronaut.io/s/yu7mwl3epdbqq

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
1 New Bugs (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@n0tl3ss
Copy link
Member

n0tl3ss commented Dec 13, 2024

The sonar reports that volatile isn't enough for thread safe code.

@andriy-dmytruk
Copy link
Contributor Author

The sonar reports that volatile isn't enough for thread safe code.

I copied the volatile part from our openapi kubernetes client credential loader implementation. I think it fine, as implementation only uses volatile when getting the token. When it needs to set the token, it uses a synchronized block.

@andriy-dmytruk andriy-dmytruk merged commit 6009a37 into 4.4.x Dec 13, 2024
21 of 22 checks passed
@andriy-dmytruk andriy-dmytruk deleted the andriy/oke-client branch December 13, 2024 21:22
@graemerocher graemerocher added the type: enhancement New feature or request label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants