Skip to content

Commit 8f2c589

Browse files
committed
Set up default value for retention duration
1 parent a82017c commit 8f2c589

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

build-tools/helm/spark-kubernetes-operator/crds/sparkapplications.spark.apache.org-v1.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ spec:
5757
minExecutors:
5858
type: integer
5959
type: object
60-
resourceRetainDurationMillis:
61-
type: integer
6260
resourceRetainPolicy:
6361
enum:
6462
- Always
@@ -8736,8 +8734,6 @@ spec:
87368734
minExecutors:
87378735
type: integer
87388736
type: object
8739-
resourceRetainDurationMillis:
8740-
type: integer
87418737
resourceRetainPolicy:
87428738
enum:
87438739
- Always
@@ -17416,6 +17412,7 @@ spec:
1741617412
type: integer
1741717413
type: object
1741817414
resourceRetainDurationMillis:
17415+
default: -1L
1741917416
type: integer
1742017417
resourceRetainPolicy:
1742117418
enum:

spark-operator-api/src/main/java/org/apache/spark/k8s/operator/spec/ApplicationTolerations.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
2525
import com.fasterxml.jackson.annotation.JsonInclude;
26+
import io.fabric8.generator.annotation.Default;
2627
import lombok.AllArgsConstructor;
2728
import lombok.Builder;
2829
import lombok.Data;
@@ -53,7 +54,9 @@ public class ApplicationTolerations {
5354
* set to a negative value, secondary resources could be retained with the same lifecycle as the
5455
* application according to the retain policy.
5556
*/
56-
@Builder.Default protected Long resourceRetainDurationMillis = -1L;
57+
@Default("-1L")
58+
@Builder.Default
59+
protected Long resourceRetainDurationMillis = -1L;
5760

5861
/**
5962
* Check whether a terminated application has exceeded the resource retain duration at the

0 commit comments

Comments
 (0)