Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve: remove cleanup condition #70

Merged
merged 2 commits into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ public class DependentResourceSpec {
@PreserveUnknownFields
private ConditionSpec condition;

@PreserveUnknownFields
private ConditionSpec deletePostCondition;

public String getName() {
return name;
}
Expand Down Expand Up @@ -76,15 +73,6 @@ public DependentResourceSpec setCondition(ConditionSpec conditionSpec) {
return this;
}

public ConditionSpec getDeletePostCondition() {
return deletePostCondition;
}

public DependentResourceSpec setDeletePostCondition(ConditionSpec deletePostConditionSpec) {
this.deletePostCondition = deletePostConditionSpec;
return this;
}

public String getResourceTemplate() {
return resourceTemplate;
}
Expand All @@ -105,13 +93,11 @@ public boolean equals(Object o) {
&& Objects.equals(resourceTemplate, that.resourceTemplate)
&& Objects.equals(resource, that.resource) && Objects.equals(dependsOn, that.dependsOn)
&& Objects.equals(readyPostCondition, that.readyPostCondition)
&& Objects.equals(condition, that.condition)
&& Objects.equals(deletePostCondition, that.deletePostCondition);
&& Objects.equals(condition, that.condition);
}

@Override
public int hashCode() {
return Objects.hash(name, resourceTemplate, resource, dependsOn, readyPostCondition, condition,
deletePostCondition);
return Objects.hash(name, resourceTemplate, resource, dependsOn, readyPostCondition, condition);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,6 @@ private void createAndAddDependentToWorkflow(Glue primary, Context<Glue> context
.ifPresent(c -> builder.withReadyPostcondition(toCondition(c)));
Optional.ofNullable(spec.getCondition())
.ifPresent(c -> builder.withReconcilePrecondition(toCondition(c)));
Optional.ofNullable(spec.getDeletePostCondition())
.ifPresent(c -> builder.withDeletePostcondition(toCondition(c)));
}

private static GenericDependentResource createDependentResource(DependentResourceSpec spec,
Expand Down
1 change: 0 additions & 1 deletion src/test/resources/sample/webpage/webpage.operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ spec:
apiVersion: resourceglueoperator.sample/v1
kind: WebPage
resources:
# todo add to docs that name must be a valid javascript variable name if used in js condition
- name: htmlconfigmap
resource:
apiVersion: v1
Expand Down
Loading