io.quarkiverse.operatorsdk.runtime.QuarkusManagedWorkflow Maven / Gradle / Ivy
package io.quarkiverse.operatorsdk.runtime;
import java.util.List;
import io.fabric8.kubernetes.api.model.HasMetadata;
import io.fabric8.kubernetes.client.KubernetesClient;
import io.javaoperatorsdk.operator.api.config.ControllerConfiguration;
import io.javaoperatorsdk.operator.api.config.dependent.DependentResourceSpec;
import io.javaoperatorsdk.operator.processing.dependent.workflow.DefaultManagedWorkflow;
import io.javaoperatorsdk.operator.processing.dependent.workflow.ManagedWorkflow;
import io.javaoperatorsdk.operator.processing.dependent.workflow.Workflow;
import io.quarkus.runtime.annotations.RecordableConstructor;
@SuppressWarnings("rawtypes")
public class QuarkusManagedWorkflow extends DefaultManagedWorkflow
{
public static final Workflow noOpWorkflow = new NoOpWorkflow();
public static final ManagedWorkflow noOpManagedWorkflow = new NoOpManagedWorkflow();
public static class NoOpWorkflow
implements Workflow
{
}
public static class NoOpManagedWorkflow
implements ManagedWorkflow
{
@Override
@SuppressWarnings("unchecked")
public Workflow
resolve(KubernetesClient kubernetesClient,
ControllerConfiguration
controllerConfiguration) {
return noOpWorkflow;
}
}
@RecordableConstructor
public QuarkusManagedWorkflow(List orderedSpecs,
boolean hasCleaner) {
super(orderedSpecs, hasCleaner);
}
// Needed for the recordable constructor
@SuppressWarnings("unused")
public boolean isHasCleaner() {
return hasCleaner();
}
}