in src/Azure.Deployments.Extensibility.Extensions.Kubernetes/Client/K8sClient.cs [120:134]
public async Task<T?> GetClusterScopedObjectAsync<T>(string? group, string version, string plural, string objectName, CancellationToken cancellationToken)
{
try
{
return await this.kubernetes.CustomObjects.GetClusterCustomObjectAsync<T>(group, version, plural, objectName, cancellationToken: cancellationToken);
}
catch (HttpOperationException exception) when (exception.Response.StatusCode == HttpStatusCode.NotFound)
{
return default;
}
catch (HttpOperationException exception)
{
throw ConvertToErrorResponseException(exception);
}
}