Skip to content

Commit

Permalink
feat(kubernetes client): expose original Kubernetes API Client (buehl…
Browse files Browse the repository at this point in the history
  • Loading branch information
Eddie authored and ian-buse committed May 3, 2024
1 parent 60a50c7 commit c9469f2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/KubeOps.KubernetesClient/IKubernetesClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ namespace KubeOps.KubernetesClient;
/// </summary>
public interface IKubernetesClient : IDisposable
{
/// <summary>
/// Represents the "original" kubernetes client from the
/// "KubernetesClient" package.
/// </summary>
IKubernetes ApiClient { get; }

/// <summary>
/// Return the base URI of the currently used KubernetesClient.
/// </summary>
Expand Down
4 changes: 4 additions & 0 deletions src/KubeOps.KubernetesClient/KubernetesClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ public KubernetesClient(KubernetesClientConfiguration clientConfig, IKubernetes
_client = client;
}

/// <inheritdoc />
public IKubernetes ApiClient => _client;

/// <inheritdoc />
public Uri BaseUri => _client.BaseUri;

Expand Down Expand Up @@ -324,6 +327,7 @@ public async Task DeleteAsync<TEntity>(
case not null:
await client.DeleteNamespacedAsync<V1Status>(@namespace, name, cancellationToken);
break;

default:
await client.DeleteAsync<V1Status>(name, cancellationToken);
break;
Expand Down

0 comments on commit c9469f2

Please sign in to comment.