Search in sources :

Example 1 with NamespaceDouble

use of org.entando.kubernetes.controller.support.client.doubles.NamespaceDouble in project entando-k8s-controller-coordinator by entando-k8s.

the class SimpleKubernetesClientDouble method updatePhase.

@Override
public SerializedEntandoResource updatePhase(SerializedEntandoResource resource, EntandoDeploymentPhase phase) {
    final NamespaceDouble namespace = getNamespace(resource);
    final Map<String, SerializedEntandoResource> customResources = namespace.getCustomResources(resource.getKind());
    final SerializedEntandoResource existingCustomResource = customResources.get(resource.getMetadata().getName());
    existingCustomResource.getStatus().updateDeploymentPhase(phase, resource.getMetadata().getGeneration());
    return getCluster().getResourceProcessor().processResource(customResources, existingCustomResource);
}
Also used : SerializedEntandoResource(org.entando.kubernetes.controller.spi.client.SerializedEntandoResource) NamespaceDouble(org.entando.kubernetes.controller.support.client.doubles.NamespaceDouble)

Aggregations

SerializedEntandoResource (org.entando.kubernetes.controller.spi.client.SerializedEntandoResource)1 NamespaceDouble (org.entando.kubernetes.controller.support.client.doubles.NamespaceDouble)1