Skip to content

Commit 8c796ab

Browse files
committed
improve: remove cleanup condition (#70)
Signed-off-by: Attila Mészáros <[email protected]>
1 parent 0c0c472 commit 8c796ab

File tree

3 files changed

+2
-19
lines changed

3 files changed

+2
-19
lines changed

src/main/java/io/csviri/operator/resourceglue/customresource/glue/DependentResourceSpec.java

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ public class DependentResourceSpec {
2727
@PreserveUnknownFields
2828
private ConditionSpec condition;
2929

30-
@PreserveUnknownFields
31-
private ConditionSpec deletePostCondition;
32-
3330
public String getName() {
3431
return name;
3532
}
@@ -76,15 +73,6 @@ public DependentResourceSpec setCondition(ConditionSpec conditionSpec) {
7673
return this;
7774
}
7875

79-
public ConditionSpec getDeletePostCondition() {
80-
return deletePostCondition;
81-
}
82-
83-
public DependentResourceSpec setDeletePostCondition(ConditionSpec deletePostConditionSpec) {
84-
this.deletePostCondition = deletePostConditionSpec;
85-
return this;
86-
}
87-
8876
public String getResourceTemplate() {
8977
return resourceTemplate;
9078
}
@@ -105,13 +93,11 @@ public boolean equals(Object o) {
10593
&& Objects.equals(resourceTemplate, that.resourceTemplate)
10694
&& Objects.equals(resource, that.resource) && Objects.equals(dependsOn, that.dependsOn)
10795
&& Objects.equals(readyPostCondition, that.readyPostCondition)
108-
&& Objects.equals(condition, that.condition)
109-
&& Objects.equals(deletePostCondition, that.deletePostCondition);
96+
&& Objects.equals(condition, that.condition);
11097
}
11198

11299
@Override
113100
public int hashCode() {
114-
return Objects.hash(name, resourceTemplate, resource, dependsOn, readyPostCondition, condition,
115-
deletePostCondition);
101+
return Objects.hash(name, resourceTemplate, resource, dependsOn, readyPostCondition, condition);
116102
}
117103
}

src/main/java/io/csviri/operator/resourceglue/reconciler/glue/GlueReconciler.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,6 @@ private void createAndAddDependentToWorkflow(Glue primary, Context<Glue> context
179179
.ifPresent(c -> builder.withReadyPostcondition(toCondition(c)));
180180
Optional.ofNullable(spec.getCondition())
181181
.ifPresent(c -> builder.withReconcilePrecondition(toCondition(c)));
182-
Optional.ofNullable(spec.getDeletePostCondition())
183-
.ifPresent(c -> builder.withDeletePostcondition(toCondition(c)));
184182
}
185183

186184
private static GenericDependentResource createDependentResource(DependentResourceSpec spec,

src/test/resources/sample/webpage/webpage.operator.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ spec:
77
apiVersion: resourceglueoperator.sample/v1
88
kind: WebPage
99
resources:
10-
# todo add to docs that name must be a valid javascript variable name if used in js condition
1110
- name: htmlconfigmap
1211
resource:
1312
apiVersion: v1

0 commit comments

Comments
 (0)