use of io.kubernetes.client.models.V1ObjectMeta in project weblogic-kubernetes-operator by oracle.
the class Main method deleteDomainPresence.
private static void deleteDomainPresence(Domain dom) {
V1ObjectMeta meta = dom.getMetadata();
DomainSpec spec = dom.getSpec();
String namespace = meta.getNamespace();
String domainUID = spec.getDomainUID();
deleteDomainPresence(namespace, domainUID);
}
use of io.kubernetes.client.models.V1ObjectMeta in project weblogic-kubernetes-operator by oracle.
the class Main method dispatchIngressWatch.
private static void dispatchIngressWatch(Watch.Response<V1beta1Ingress> item) {
V1beta1Ingress i = item.object;
if (i != null) {
V1ObjectMeta metadata = i.getMetadata();
String domainUID = metadata.getLabels().get(LabelConstants.DOMAINUID_LABEL);
String clusterName = metadata.getLabels().get(LabelConstants.CLUSTERNAME_LABEL);
if (domainUID != null) {
DomainPresenceInfo info = domains.get(domainUID);
if (info != null && clusterName != null) {
switch(item.type) {
case "ADDED":
info.getIngresses().put(clusterName, i);
break;
case "MODIFIED":
V1beta1Ingress skoIngress = info.getIngresses().get(clusterName);
if (skoIngress != null) {
info.getIngresses().replace(clusterName, skoIngress, i);
}
break;
case "DELETED":
V1beta1Ingress oldIngress = info.getIngresses().remove(clusterName);
if (oldIngress != null) {
// Ingress was deleted, but sko still contained a non-null entry
LOGGER.info(MessageKeys.INGRESS_DELETED, domainUID, metadata.getNamespace(), clusterName);
doCheckAndCreateDomainPresence(info.getDomain(), true);
}
break;
case "ERROR":
default:
}
}
}
}
}
use of io.kubernetes.client.models.V1ObjectMeta in project weblogic-kubernetes-operator by oracle.
the class PodWatcher method getPodServerName.
static String getPodServerName(V1Pod pod) {
V1ObjectMeta meta = pod.getMetadata();
Map<String, String> labels = meta.getLabels();
if (labels != null) {
return labels.get(LabelConstants.SERVERNAME_LABEL);
}
return null;
}
use of io.kubernetes.client.models.V1ObjectMeta in project weblogic-kubernetes-operator by oracle.
the class PodWatcher method getPodDomainUID.
static String getPodDomainUID(V1Pod pod) {
V1ObjectMeta meta = pod.getMetadata();
Map<String, String> labels = meta.getLabels();
if (labels != null) {
return labels.get(LabelConstants.DOMAINUID_LABEL);
}
return null;
}
use of io.kubernetes.client.models.V1ObjectMeta in project weblogic-kubernetes-operator by oracle.
the class ServiceWatcher method getServiceServerName.
static String getServiceServerName(V1Service service) {
V1ObjectMeta meta = service.getMetadata();
Map<String, String> labels = meta.getLabels();
if (labels != null) {
return labels.get(LabelConstants.SERVERNAME_LABEL);
}
return null;
}
Aggregations