@@ -346,8 +346,7 @@ class DeployConfigReader {
346
346
if (networkConfig?. external?. external) {
347
347
if (networkConfig?. external?. name) {
348
348
return networkConfig. external. name
349
- }
350
- else {
349
+ } else {
351
350
return networkName
352
351
}
353
352
}
@@ -403,10 +402,9 @@ class DeployConfigReader {
403
402
if (healthcheck. startPeriod) {
404
403
startPeriod = parseDuration(healthcheck. startPeriod). toNanos()
405
404
}
406
- // TODO add this one
407
- // if (healthcheck.startInterval) {
408
- // startInterval = parseDuration(healthcheck.startInterval).toNanos()
409
- // }
405
+ if (healthcheck. startInterval) {
406
+ startInterval = parseDuration(healthcheck. startInterval). toNanos()
407
+ }
410
408
411
409
return new HealthConfig (
412
410
healthcheck. test. parts,
@@ -504,8 +502,7 @@ class DeployConfigReader {
504
502
default :
505
503
throw new IllegalArgumentException (" unknown restart policy: ${ restart} " )
506
504
}
507
- }
508
- else {
505
+ } else {
509
506
Long delay = null
510
507
if (restartPolicy. delay) {
511
508
delay = parseDuration(restartPolicy. delay). toNanos()
@@ -564,8 +561,7 @@ class DeployConfigReader {
564
561
if (limits. nanoCpus. contains(' /' )) {
565
562
// TODO
566
563
throw new UnsupportedOperationException (" not supported, yet" )
567
- }
568
- else {
564
+ } else {
569
565
return new Limit (
570
566
(parseDouble(limits. nanoCpus) * nanoMultiplier). longValue(),
571
567
parseLong(limits. memory),
@@ -588,8 +584,7 @@ class DeployConfigReader {
588
584
if (reservations. nanoCpus. contains(' /' )) {
589
585
// TODO
590
586
throw new UnsupportedOperationException (" not supported, yet" )
591
- }
592
- else {
587
+ } else {
593
588
return new ResourceObject (
594
589
(parseDouble(reservations. nanoCpus) * nanoMultiplier). longValue(),
595
590
parseLong(reservations. memory),
@@ -653,8 +648,7 @@ class DeployConfigReader {
653
648
null ,
654
649
null )
655
650
source = stackVolume. external. name
656
- }
657
- else {
651
+ } else {
658
652
Map<String , String > labels = stackVolume?. labels?. entries ?: [:]
659
653
labels[(ManageStackClient.LabelNamespace )] = namespace
660
654
volumeOptions = new MountVolumeOptions (
@@ -701,8 +695,7 @@ class DeployConfigReader {
701
695
MountBindOptions getBindOptions (ServiceVolumeBind bind ) {
702
696
if (bind?. propagation) {
703
697
return new MountBindOptions (MountBindOptions.Propagation . values(). find { MountBindOptions.Propagation propagation -> propagation. getValue() == bind. propagation }, null )
704
- }
705
- else {
698
+ } else {
706
699
return null
707
700
}
708
701
}
@@ -760,11 +753,9 @@ class DeployConfigReader {
760
753
null ,
761
754
getLabels(namespace, null )
762
755
)
763
- }
764
- else if (network?. external?. external) {
756
+ } else if (network?. external?. external) {
765
757
externalNetworkNames << (network. external. name ?: internalName)
766
- }
767
- else {
758
+ } else {
768
759
networkSpec[internalName] = new NetworkCreateRequest (
769
760
internalName,
770
761
true ,
0 commit comments