diff --git a/src/KubeClient/ResourceClients/PodClientV1.cs b/src/KubeClient/ResourceClients/PodClientV1.cs index 7c969a3..65ff4a0 100644 --- a/src/KubeClient/ResourceClients/PodClientV1.cs +++ b/src/KubeClient/ResourceClients/PodClientV1.cs @@ -144,7 +144,7 @@ public IObservable> WatchAll(string labelSelector = null /// /// A string containing the logs. /// - public async Task Logs(string name, string containerName = null, string kubeNamespace = null, int? limitBytes = null, int? tailLines = null, CancellationToken cancellationToken = default) + public async Task Logs(string name, string containerName = null, string kubeNamespace = null, int? limitBytes = null, int? tailLines = null, bool? previous = null, CancellationToken cancellationToken = default) { if (String.IsNullOrWhiteSpace(name)) throw new ArgumentException("Argument cannot be null, empty, or entirely composed of whitespace: 'name'.", nameof(name)); @@ -156,7 +156,8 @@ public async Task Logs(string name, string containerName = null, string ContainerName = containerName, Namespace = kubeNamespace ?? KubeClient.DefaultNamespace, LimitBytes = limitBytes, - TailLines = tailLines + TailLines = tailLines, + Previous = previous?.ToString().ToLowerInvariant() }), cancellationToken ); @@ -288,7 +289,7 @@ public static class Requests /// /// A get-logs Pod (v1) request. /// - public static readonly HttpRequest Logs = ByName.WithRelativeUri("log?container={ContainerName?}&follow={Follow?}&limitBytes={LimitBytes?}&tailLines={TailLines?}"); + public static readonly HttpRequest Logs = ByName.WithRelativeUri("log?container={ContainerName?}&follow={Follow?}&limitBytes={LimitBytes?}&tailLines={TailLines?}&previous={Previous?}"); } }