Skip to content

Commit

Permalink
Add explicit argument for maximumObjectLength indirectly used in watc…
Browse files Browse the repository at this point in the history
…hWithOptions as bufsize
  • Loading branch information
NicolasRouquette committed Jul 21, 2019
1 parent b46e2b1 commit 1c87d8d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@ trait KubernetesClient {
* @param watchContinuouslyRequestTimeout the delay for continuously monitoring the pod progress
* @param deletionMonitorRepeatDelay the delay for continuously monitoring the job deletion
* @param pool a skuber pool to reuse, if any, or to create otherwise
* @param bufSize optional buffer size for received object updates, normally the default is more than enough
* @return A future consisting of a triple of the following:
* - the skuber pool suitable for subsequently executing other jobs on the same server
* - the akka host connection pool that can be shutdown when no further jobs need to be executed on the same server
Expand All @@ -393,7 +394,8 @@ trait KubernetesClient {
podCompletion: WatchEvent[Pod] => Future[Unit],
watchContinuouslyRequestTimeout: Duration,
deletionMonitorRepeatDelay: FiniteDuration,
pool: Option[Pool[WatchSource.Start[Pod]]])(implicit jfmt: Format[Job], pfmt: Format[Pod], jrd: ResourceDefinition[Job], prd: ResourceDefinition[Pod]):
pool: Option[Pool[WatchSource.Start[Pod]]],
bufSize: Int = 10000)(implicit jfmt: Format[Job], pfmt: Format[Pod], jrd: ResourceDefinition[Job], prd: ResourceDefinition[Pod]):
Future[(Pool[WatchSource.Start[Pod]], Option[Http.HostConnectionPool], WatchEvent[Pod])]

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,8 @@ class KubernetesClientImpl private[client] (
podCompletion: WatchEvent[Pod] => Future[Unit],
watchContinuouslyRequestTimeout: Duration,
deletionMonitorRepeatDelay: FiniteDuration,
pool: Option[Pool[WatchSource.Start[Pod]]])(implicit jfmt: Format[Job], pfmt: Format[Pod], jrd: ResourceDefinition[Job], prd: ResourceDefinition[Pod])
pool: Option[Pool[WatchSource.Start[Pod]]],
bufSize: Int = 10000)(implicit jfmt: Format[Job], pfmt: Format[Pod], jrd: ResourceDefinition[Job], prd: ResourceDefinition[Pod])
: Future[(Pool[WatchSource.Start[Pod]], Option[Http.HostConnectionPool], WatchEvent[Pod])] =
for {
j <- create(job)
Expand All @@ -652,6 +653,7 @@ class KubernetesClientImpl private[client] (
labelSelector = Some(labelSelector),
timeoutSeconds = Some(watchContinuouslyRequestTimeout.toSeconds)
),
bufsize = bufSize,
pool = pool
)
.takeWhile(podProgress, inclusive = true)
Expand Down

0 comments on commit 1c87d8d

Please sign in to comment.