, ReferenceResolverAware {
+
+ private AbstractKubernetesAction.Builder, ?> builder;
+
+ private String description;
+ private String actor;
+
+ private String kubernetesClient;
+ private String namespace;
+
+ private ReferenceResolver referenceResolver;
+
+ @XmlElement
+ public Kubernetes setDescription(String value) {
+ this.description = description;
+ return this;
+ }
+
+ @XmlAttribute
+ public Kubernetes setActor(String actor) {
+ this.actor = actor;
+ return this;
+ }
+
+ @XmlAttribute
+ public Kubernetes setNamespace(String namespace) {
+ this.namespace = namespace;
+ return this;
+ }
+
+ @XmlAttribute
+ public Kubernetes setClient(String client) {
+ this.kubernetesClient = client;
+ return this;
+ }
+
+ @XmlElement(name = "create-service")
+ public void setCreateService(CreateService builder) {
+ this.builder = builder;
+ }
+
+ @XmlElement(name = "create-secret")
+ public void setCreateSecret(CreateSecret builder) {
+ this.builder = builder;
+ }
+
+ @XmlElement(name = "create-config-map")
+ public void setCreateConfigMap(CreateConfigMap builder) {
+ this.builder = builder;
+ }
+
+ @XmlElement(name = "create-resource")
+ public void setCreateResource(CreateResource builder) {
+ this.builder = builder;
+ }
+
+ @XmlElement(name = "create-custom-resource")
+ public void setCreateCustomResource(CreateCustomResource builder) {
+ this.builder = builder;
+ }
+
+ @XmlElement(name = "create-labels")
+ public void setCreateLabels(CreateLabels builder) {
+ this.builder = builder;
+ }
+
+ @XmlElement(name = "create-annotations")
+ public void setCreateAnnotations(CreateAnnotations builder) {
+ this.builder = builder;
+ }
+
+ @XmlElement(name = "delete-service")
+ public void setDeleteService(DeleteService builder) {
+ this.builder = builder;
+ }
+
+ @XmlElement(name = "delete-secret")
+ public void setDeleteSecret(DeleteSecret builder) {
+ this.builder = builder;
+ }
+
+ @XmlElement(name = "delete-config-map")
+ public void setDeleteConfigMap(DeleteConfigMap builder) {
+ this.builder = builder;
+ }
+
+ @XmlElement(name = "delete-resource")
+ public void setDeleteResource(DeleteResource builder) {
+ this.builder = builder;
+ }
+
+ @XmlElement(name = "delete-custom-resource")
+ public void setDeleteCustomResource(DeleteCustomResource builder) {
+ this.builder = builder;
+ }
+
+ @XmlElement(name = "verify-pod")
+ public void setVerifyPod(VerifyPod builder) {
+ this.builder = builder;
+ }
+
+ @XmlElement(name = "verify-custom-resource")
+ public void setVerifyCustomResource(VerifyCustomResource builder) {
+ this.builder = builder;
+ }
+
+ @XmlElement(name = "watch-pod-logs")
+ public void setWatchPodLogs(WatchPodLogs builder) {
+ this.builder = builder;
+ }
+
+ @Override
+ public KubernetesAction build() {
+ if (builder == null) {
+ throw new CitrusRuntimeException("Missing Kubernetes action - please provide proper action details");
+ }
+
+ if (builder instanceof TestActionContainerBuilder,?>) {
+ ((TestActionContainerBuilder,?>) builder).getActions().stream()
+ .filter(action -> action instanceof ReferenceResolverAware)
+ .forEach(action -> ((ReferenceResolverAware) action).setReferenceResolver(referenceResolver));
+ }
+
+ if (builder instanceof ReferenceResolverAware) {
+ ((ReferenceResolverAware) builder).setReferenceResolver(referenceResolver);
+ }
+
+ builder.description(description);
+ builder.inNamespace(namespace);
+
+ if (referenceResolver != null) {
+ if (kubernetesClient != null) {
+ builder.client(referenceResolver.resolve(kubernetesClient, KubernetesClient.class));
+ }
+
+ if (actor != null) {
+ builder.actor(referenceResolver.resolve(actor, TestActor.class));
+ }
+ }
+
+ return builder.build();
+ }
+
+ @Override
+ public void setReferenceResolver(ReferenceResolver referenceResolver) {
+ this.referenceResolver = referenceResolver;
+ }
+}
diff --git a/connectors/citrus-kubernetes/src/main/java/org/citrusframework/kubernetes/xml/ObjectFactory.java b/connectors/citrus-kubernetes/src/main/java/org/citrusframework/kubernetes/xml/ObjectFactory.java
new file mode 100644
index 0000000000..b75e061abd
--- /dev/null
+++ b/connectors/citrus-kubernetes/src/main/java/org/citrusframework/kubernetes/xml/ObjectFactory.java
@@ -0,0 +1,52 @@
+/*
+ * Copyright the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.citrusframework.kubernetes.xml;
+
+import jakarta.xml.bind.annotation.XmlRegistry;
+
+/**
+ * This object contains factory methods for each
+ * Java content interface and Java element interface
+ * generated in the org.citrusframework.ftp.model package.
+ * An ObjectFactory allows you to programatically
+ * construct new instances of the Java representation
+ * for XML content. The Java representation of XML
+ * content can consist of schema derived interfaces
+ * and classes representing the binding of schema
+ * type definitions, element declarations and model
+ * groups. Factory methods for each of these are
+ * provided in this class.
+ *
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+ /**
+ * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.citrusframework.xml.actions
+ *
+ */
+ public ObjectFactory() {
+ }
+
+ /**
+ * Create an instance of {@link Kubernetes }
+ *
+ */
+ public Kubernetes createKubernetes() {
+ return new Kubernetes();
+ }
+}
diff --git a/connectors/citrus-kubernetes/src/main/java/org/citrusframework/kubernetes/xml/VerifyCustomResource.java b/connectors/citrus-kubernetes/src/main/java/org/citrusframework/kubernetes/xml/VerifyCustomResource.java
new file mode 100644
index 0000000000..e334aa16d5
--- /dev/null
+++ b/connectors/citrus-kubernetes/src/main/java/org/citrusframework/kubernetes/xml/VerifyCustomResource.java
@@ -0,0 +1,115 @@
+/*
+ * Copyright the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.citrusframework.kubernetes.xml;
+
+import io.fabric8.kubernetes.client.CustomResource;
+import io.fabric8.kubernetes.client.KubernetesClient;
+import jakarta.xml.bind.annotation.XmlAttribute;
+import jakarta.xml.bind.annotation.XmlRootElement;
+import org.citrusframework.TestActor;
+import org.citrusframework.kubernetes.actions.AbstractKubernetesAction;
+import org.citrusframework.kubernetes.actions.VerifyCustomResourceAction;
+
+@XmlRootElement(name = "verify-custom-resource")
+public class VerifyCustomResource extends AbstractKubernetesAction.Builder {
+
+ private final VerifyCustomResourceAction.Builder delegate = new VerifyCustomResourceAction.Builder();
+
+ @XmlAttribute
+ public void setName(String name) {
+ this.delegate.resourceName(name);
+ }
+
+ @XmlAttribute
+ public void setType(String resourceType) {
+ try {
+ delegate.resourceType((Class>) Class.forName(resourceType));
+ } catch(ClassNotFoundException | ClassCastException e) {
+ delegate.type(resourceType);
+ }
+ }
+
+ @XmlAttribute
+ public void setKind(String kind) {
+ delegate.kind(kind);
+ }
+
+ @XmlAttribute
+ public void setGroup(String group) {
+ delegate.group(group);
+ }
+
+ @XmlAttribute
+ public void setVersion(String version) {
+ delegate.version(version);
+ }
+
+ @XmlAttribute(name = "api-version")
+ public void setApiVersion(String apiVersion) {
+ delegate.apiVersion(apiVersion);
+ }
+
+ @XmlAttribute(required = true)
+ public void setCondition(String value) {
+ this.delegate.condition(value);
+ }
+
+ @XmlAttribute
+ public void setLabel(String labelExpression) {
+ String[] tokens = labelExpression.split("=", 2);
+ this.delegate.label(tokens[0].trim(), tokens[1].trim());
+ }
+
+ @XmlAttribute(name = "max-attempts")
+ public void setMaxAttempts(int maxAttempts) {
+ this.delegate.maxAttempts(maxAttempts);
+ }
+
+ @XmlAttribute(name = "delay-between-attempts")
+ public void setDelayBetweenAttempts(long delayBetweenAttempts) {
+ this.delegate.delayBetweenAttempts(delayBetweenAttempts);
+ }
+
+ @Override
+ public VerifyCustomResource description(String description) {
+ delegate.description(description);
+ return this;
+ }
+
+ @Override
+ public VerifyCustomResource actor(TestActor actor) {
+ delegate.actor(actor);
+ return this;
+ }
+
+ @Override
+ public VerifyCustomResource client(KubernetesClient client) {
+ delegate.client(client);
+ return this;
+ }
+
+ @Override
+ public VerifyCustomResource inNamespace(String namespace) {
+ this.delegate.inNamespace(namespace);
+ return this;
+ }
+
+ @Override
+ public VerifyCustomResourceAction doBuild() {
+ return delegate.build();
+ }
+}
diff --git a/connectors/citrus-kubernetes/src/main/java/org/citrusframework/kubernetes/xml/VerifyPod.java b/connectors/citrus-kubernetes/src/main/java/org/citrusframework/kubernetes/xml/VerifyPod.java
new file mode 100644
index 0000000000..d786200c13
--- /dev/null
+++ b/connectors/citrus-kubernetes/src/main/java/org/citrusframework/kubernetes/xml/VerifyPod.java
@@ -0,0 +1,152 @@
+/*
+ * Copyright the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.citrusframework.kubernetes.xml;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import io.fabric8.kubernetes.client.KubernetesClient;
+import jakarta.xml.bind.annotation.XmlAccessType;
+import jakarta.xml.bind.annotation.XmlAccessorType;
+import jakarta.xml.bind.annotation.XmlAttribute;
+import jakarta.xml.bind.annotation.XmlElement;
+import jakarta.xml.bind.annotation.XmlRootElement;
+import jakarta.xml.bind.annotation.XmlType;
+import org.citrusframework.TestActor;
+import org.citrusframework.kubernetes.actions.AbstractKubernetesAction;
+import org.citrusframework.kubernetes.actions.VerifyPodAction;
+
+@XmlRootElement(name = "verify-pod")
+public class VerifyPod extends AbstractKubernetesAction.Builder {
+
+ private final VerifyPodAction.Builder delegate = new VerifyPodAction.Builder();
+
+ @XmlAttribute
+ public void setName(String name) {
+ this.delegate.podName(name);
+ }
+
+ @XmlElement
+ public void setLabels(Labels labels) {
+ labels.getLabels().forEach(
+ label -> this.delegate.label(label.getName(), label.getValue()));
+ }
+
+ @XmlAttribute
+ public void setLabel(String labelExpression) {
+ String[] tokens = labelExpression.split("=", 2);
+ this.delegate.label(tokens[0].trim(), tokens[1].trim());
+ }
+
+ @XmlAttribute
+ public void setPhase(String phase) {
+ this.delegate.phase(phase);
+ }
+
+ @XmlAttribute(name = "log-message")
+ public void setLogMessage(String message) {
+ this.delegate.waitForLogMessage(message);
+ }
+
+ @XmlAttribute(name = "print-logs")
+ public void setPrintLogs(boolean printLogs) {
+ this.delegate.printLogs(printLogs);
+ }
+
+ @XmlAttribute(name = "max-attempts")
+ public void setMaxAttempts(int maxAttempts) {
+ this.delegate.maxAttempts(maxAttempts);
+ }
+
+ @XmlAttribute(name = "delay-between-attempts")
+ public void setDelayBetweenAttempts(long delayBetweenAttempts) {
+ this.delegate.delayBetweenAttempts(delayBetweenAttempts);
+ }
+
+ @Override
+ public VerifyPod description(String description) {
+ delegate.description(description);
+ return this;
+ }
+
+ @Override
+ public VerifyPod actor(TestActor actor) {
+ delegate.actor(actor);
+ return this;
+ }
+
+ @Override
+ public VerifyPod client(KubernetesClient client) {
+ delegate.client(client);
+ return this;
+ }
+
+ @Override
+ public VerifyPod inNamespace(String namespace) {
+ this.delegate.inNamespace(namespace);
+ return this;
+ }
+
+ @Override
+ public VerifyPodAction doBuild() {
+ return delegate.build();
+ }
+
+ @XmlAccessorType(XmlAccessType.FIELD)
+ @XmlType(name = "", propOrder = {
+ "labels"
+ })
+ public static class Labels {
+
+ @XmlElement(name = "label", required = true)
+ protected List