Skip to content

Commit faffdc0

Browse files
committed
generate codes and add new field ttlSecondsAfterFinishing
Signed-off-by: JetMuffin <[email protected]>
1 parent ea345b2 commit faffdc0

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

kubernetes/docs/V1alpha2TFJobSpec.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**cleanPodPolicy** | **String** | CleanPodPolicy defines the policy to kill pods after TFJob is succeeded. Default to Running. | [optional]
88
**tfReplicaSpecs** | [**Map&lt;String, V1alpha2TFReplicaSpec&gt;**](V1alpha2TFReplicaSpec.md) | TFReplicaSpecs is map of TFReplicaType and TFReplicaSpec specifies the TF replicas to run. For example, { \&quot;PS\&quot;: TFReplicaSpec, \&quot;Worker\&quot;: TFReplicaSpec, } |
9+
**ttlSecondsAfterFinishing** | **Integer** | TTLSecondsAfterFinished is the TTL to clean up tf-jobs (temporary before kubernetes adds the cleanup controller). It may take extra ReconcilePeriod seconds for the cleanup, since reconcile gets called periodically. Default to infinite. | [optional]
910

1011

1112

kubernetes/src/main/java/org/kubeflow/client/models/V1alpha2TFJobSpec.java

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ public class V1alpha2TFJobSpec {
3939
@SerializedName("tfReplicaSpecs")
4040
private Map<String, V1alpha2TFReplicaSpec> tfReplicaSpecs = new HashMap<String, V1alpha2TFReplicaSpec>();
4141

42+
@SerializedName("ttlSecondsAfterFinishing")
43+
private Integer ttlSecondsAfterFinishing = null;
44+
4245
public V1alpha2TFJobSpec cleanPodPolicy(String cleanPodPolicy) {
4346
this.cleanPodPolicy = cleanPodPolicy;
4447
return this;
@@ -80,6 +83,24 @@ public void setTfReplicaSpecs(Map<String, V1alpha2TFReplicaSpec> tfReplicaSpecs)
8083
this.tfReplicaSpecs = tfReplicaSpecs;
8184
}
8285

86+
public V1alpha2TFJobSpec ttlSecondsAfterFinishing(Integer ttlSecondsAfterFinishing) {
87+
this.ttlSecondsAfterFinishing = ttlSecondsAfterFinishing;
88+
return this;
89+
}
90+
91+
/**
92+
* TTLSecondsAfterFinished is the TTL to clean up tf-jobs (temporary before kubernetes adds the cleanup controller). It may take extra ReconcilePeriod seconds for the cleanup, since reconcile gets called periodically. Default to infinite.
93+
* @return ttlSecondsAfterFinishing
94+
**/
95+
@ApiModelProperty(value = "TTLSecondsAfterFinished is the TTL to clean up tf-jobs (temporary before kubernetes adds the cleanup controller). It may take extra ReconcilePeriod seconds for the cleanup, since reconcile gets called periodically. Default to infinite.")
96+
public Integer getTtlSecondsAfterFinishing() {
97+
return ttlSecondsAfterFinishing;
98+
}
99+
100+
public void setTtlSecondsAfterFinishing(Integer ttlSecondsAfterFinishing) {
101+
this.ttlSecondsAfterFinishing = ttlSecondsAfterFinishing;
102+
}
103+
83104

84105
@Override
85106
public boolean equals(java.lang.Object o) {
@@ -91,12 +112,13 @@ public boolean equals(java.lang.Object o) {
91112
}
92113
V1alpha2TFJobSpec v1alpha2TFJobSpec = (V1alpha2TFJobSpec) o;
93114
return Objects.equals(this.cleanPodPolicy, v1alpha2TFJobSpec.cleanPodPolicy) &&
94-
Objects.equals(this.tfReplicaSpecs, v1alpha2TFJobSpec.tfReplicaSpecs);
115+
Objects.equals(this.tfReplicaSpecs, v1alpha2TFJobSpec.tfReplicaSpecs) &&
116+
Objects.equals(this.ttlSecondsAfterFinishing, v1alpha2TFJobSpec.ttlSecondsAfterFinishing);
95117
}
96118

97119
@Override
98120
public int hashCode() {
99-
return Objects.hash(cleanPodPolicy, tfReplicaSpecs);
121+
return Objects.hash(cleanPodPolicy, tfReplicaSpecs, ttlSecondsAfterFinishing);
100122
}
101123

102124

@@ -107,6 +129,7 @@ public String toString() {
107129

108130
sb.append(" cleanPodPolicy: ").append(toIndentedString(cleanPodPolicy)).append("\n");
109131
sb.append(" tfReplicaSpecs: ").append(toIndentedString(tfReplicaSpecs)).append("\n");
132+
sb.append(" ttlSecondsAfterFinishing: ").append(toIndentedString(ttlSecondsAfterFinishing)).append("\n");
110133
sb.append("}");
111134
return sb.toString();
112135
}

0 commit comments

Comments
 (0)