From 43f5c7275fbd7deea0560d8c58f81b5326631a6f Mon Sep 17 00:00:00 2001 From: Sebastian Laskawiec Date: Wed, 23 Aug 2017 13:12:32 +0200 Subject: [PATCH] Introduced split_clusters_during_rolling_update Fixes #33 --- README.adoc | 4 +- pom.xml | 7 + .../jgroups/protocols/kubernetes/Client.java | 59 +- .../protocols/kubernetes/KUBE_PING.java | 61 +- .../org/jgroups/protocols/kubernetes/Pod.java | 56 + .../jgroups/ping/kube/test/ClientTest.java | 13 +- .../ping/kube/test/RollingUpdateTest.java | 114 ++ .../ping/kube/test/util/FreePortFinder.java | 17 + .../resources/openshift_rolling_update.json | 1519 +++++++++++++++++ 9 files changed, 1809 insertions(+), 41 deletions(-) create mode 100644 src/main/java/org/jgroups/protocols/kubernetes/Pod.java create mode 100644 src/test/java/org/jgroups/ping/kube/test/RollingUpdateTest.java create mode 100644 src/test/java/org/jgroups/ping/kube/test/util/FreePortFinder.java create mode 100644 src/test/resources/openshift_rolling_update.json diff --git a/README.adoc b/README.adoc index 7c2de67..90b0f0b 100644 --- a/README.adoc +++ b/README.adoc @@ -167,6 +167,8 @@ will be thrown | dump_requests | Dumps all discovery requests and responses to the Kubernetes server to stdout when true +| split_clusters_during_rolling_update | During the Rolling Update, prevents from putting all Pods into a single cluster + |=============== @@ -312,4 +314,4 @@ The commands for running on https://cloud.google.com/container-engine/docs/[Goog as when running locally in https://github.com/kubernetes/minikube[minikube]. The only difference is that on GKE, contrary to minikube, IP multicasting is not available. This means that the `probe.sh` -command has to be run as `probe.sh -addr localhost` instead of simply running `probe.sh`. \ No newline at end of file +command has to be run as `probe.sh -addr localhost` instead of simply running `probe.sh`. diff --git a/pom.xml b/pom.xml index ce0329e..f763e6c 100644 --- a/pom.xml +++ b/pom.xml @@ -56,6 +56,7 @@ 4.0.4.Final 20100527 4.12 + 3.8.0 1.8 1.8 @@ -146,6 +147,12 @@ ${version.junit} test + + org.assertj + assertj-core + ${version.assertj} + test + diff --git a/src/main/java/org/jgroups/protocols/kubernetes/Client.java b/src/main/java/org/jgroups/protocols/kubernetes/Client.java index 8acc580..e0c3004 100644 --- a/src/main/java/org/jgroups/protocols/kubernetes/Client.java +++ b/src/main/java/org/jgroups/protocols/kubernetes/Client.java @@ -1,15 +1,21 @@ package org.jgroups.protocols.kubernetes; -import mjson.Json; +import static org.jgroups.protocols.kubernetes.Utils.openStream; +import static org.jgroups.protocols.kubernetes.Utils.urlencode; + +import java.io.InputStream; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.TreeMap; + import org.jgroups.logging.Log; import org.jgroups.protocols.kubernetes.stream.StreamProvider; import org.jgroups.util.Util; -import java.io.InputStream; -import java.util.*; - -import static org.jgroups.protocols.kubernetes.Utils.openStream; -import static org.jgroups.protocols.kubernetes.Utils.urlencode; +import mjson.Json; /** * @author Ales Justin @@ -71,17 +77,18 @@ protected String fetchFromKubernetes(String op, String namespace, String labels, - public List getPods(String namespace, String labels, boolean dump_requests) throws Exception { + public List getPods(String namespace, String labels, boolean dump_requests) throws Exception { String result=fetchFromKubernetes("pods", namespace, labels, dump_requests); if(result == null) return Collections.emptyList(); return parseJsonResult(result, namespace, labels); } - protected List parseJsonResult(String input, String namespace, String labels) { + protected List parseJsonResult(String input, String namespace, String labels) { if(input == null) return Collections.emptyList(); Json json=Json.read(input); + if(json == null || !json.isObject()) { log.error("JSON is not a map: %s", json); return Collections.emptyList(); @@ -92,22 +99,28 @@ protected List parseJsonResult(String input, String namespace, String la return Collections.emptyList(); } List items=json.at("items").asJsonList(); - List pods=new ArrayList<>(); + List pods=new ArrayList<>(); for(Json obj: items) { - if(obj.isObject() && obj.has("status")) { - Json status=obj.at("status"); - if(status.isObject() && status.has("podIP")) { - String podIP=status.at("podIP").asString(); - if(status.has("phase")) { - Json phase=status.at("phase"); - if(phase != null && phase.isString() && !"Running".equals(phase.asString())) { - log.trace("skipped pod with IP=%s as it is not running (%s)", podIP, phase); - continue; - } - } - if(!pods.contains(podIP)) - pods.add(podIP); - } + String parentDeployment = Optional.ofNullable(obj.at("metadata")) + .map(podMetadata -> podMetadata.at("labels")) + .map(podLabels -> podLabels.at("deployment")) + .map(podDeployment -> podDeployment.asString()) + .orElseGet(() -> null); + String name = Optional.ofNullable(obj.at("metadata")) + .map(podMetadata -> podMetadata.at("name")) + .map(podName -> podName.asString()) + .orElseGet(() -> null); + String podIP = Optional.ofNullable(obj.at("status")) + .map(podStatus -> podStatus.at("podIP")) + .map(podIp -> podIp.asString()) + .orElseGet(() -> null); + if(podIP == null) { + //Previously we did checks on phase. But from my observations, it is extremely rare to have a container + //listed by Kubernetes API with any other status but Running (I might imagine it will hang in scheduled). + //However in both cases, its IP address will be null. So it is much better to stick to that. + log.trace("Skipping pod %s since it has no IP %s", name, podIP); + } else { + pods.add(new Pod(name, podIP, parentDeployment)); } } log.trace("getPods(%s, %s) = %s", namespace, labels, pods); diff --git a/src/main/java/org/jgroups/protocols/kubernetes/KUBE_PING.java b/src/main/java/org/jgroups/protocols/kubernetes/KUBE_PING.java index 1525c9e..35319ea 100644 --- a/src/main/java/org/jgroups/protocols/kubernetes/KUBE_PING.java +++ b/src/main/java/org/jgroups/protocols/kubernetes/KUBE_PING.java @@ -1,6 +1,18 @@ package org.jgroups.protocols.kubernetes; +import static org.jgroups.protocols.kubernetes.Utils.readFileToString; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.stream.Collectors; + import org.jgroups.Address; import org.jgroups.Event; import org.jgroups.Message; @@ -20,11 +32,6 @@ import org.jgroups.util.NameCache; import org.jgroups.util.Responses; -import java.util.*; -import java.util.stream.Collectors; - -import static org.jgroups.protocols.kubernetes.Utils.readFileToString; - /** * Kubernetes based discovery protocol. Uses the Kubernetes master to fetch the IP addresses of all pods that have * been created, then pings each pods separately. The ports are defined by bind_port in TP plus port_range. @@ -101,6 +108,11 @@ public class KUBE_PING extends Discovery { @Property(description="Dumps all discovery requests and responses to the Kubernetes server to stdout when true") protected boolean dump_requests; + @Property(description="The standard behavior during Rolling Update is to put all Pods in the same cluster. In" + + " cases (application level incompatibility) this causes problems. One might decide to split clusters to" + + " 'old' and 'new' during that process") + protected boolean split_clusters_during_rolling_update =false; + protected Client client; protected int tp_bind_port; @@ -168,7 +180,7 @@ public void init() throws Exception { } public void findMembers(List
members, boolean initial_discovery, Responses responses) { - List hosts=readAll(); + List hosts=readAll(); List cluster_members=new ArrayList<>(hosts != null? hosts.size() : 16); PhysicalAddress physical_addr=null; PingData data=null; @@ -185,10 +197,10 @@ public void findMembers(List
members, boolean initial_discovery, Respon if(hosts != null) { if(log.isTraceEnabled()) log.trace("%s: hosts fetched from Kubernetes: %s", local_addr, hosts); - for(String host: hosts) { + for(Pod host: hosts) { for(int i=0; i <= port_range; i++) { try { - IpAddress addr=new IpAddress(host, tp_bind_port + i); + IpAddress addr=new IpAddress(host.getIp(), tp_bind_port + i); if(!cluster_members.contains(addr)) cluster_members.add(addr); } @@ -206,6 +218,33 @@ public void findMembers(List
members, boolean initial_discovery, Respon list.stream().filter(phys_addr -> !cluster_members.contains(phys_addr)).forEach(cluster_members::add); } + if (split_clusters_during_rolling_update) { + if(physical_addr != null) { + String senderIp = ((IpAddress)physical_addr).getIpAddress().getHostAddress(); + String senderParentDeployment = hosts.stream() + .filter(pod -> senderIp.contains(pod.getIp())) + .map(pod -> pod.getParentDeployment()) + .findFirst().orElse(null); + if(senderParentDeployment != null) { + Set allowedAddresses = hosts.stream() + .filter(pod -> senderParentDeployment.equals(pod.getParentDeployment())) + .map(pod -> pod.getIp()) + .collect(Collectors.toSet()); + for(Iterator memberIterator = cluster_members.iterator(); memberIterator.hasNext();) { + IpAddress podAddress = (IpAddress) memberIterator.next(); + if(!allowedAddresses.contains(podAddress.getIpAddress().getHostAddress())) { + log.trace("removing pod %s from cluster members list since its parent domain is different than senders (%s). Allowed hosts: %s", podAddress, senderParentDeployment, allowedAddresses); + memberIterator.remove(); + } + } + } else { + log.warn("split_clusters_during_rolling_update is set to 'true' but can't obtain local node parent deployment. All nodes will be placed in the same cluster."); + } + } else { + log.warn("split_clusters_during_rolling_update is set to 'true' but can't obtain local node IP address. All nodes will be placed in the same cluster."); + } + } + if(log.isTraceEnabled()) log.trace("%s: sending discovery requests to %s", local_addr, cluster_members); PingHeader hdr=new PingHeader(PingHeader.GET_MBRS_REQ).clusterName(cluster_name).initialDiscovery(initial_discovery); @@ -229,12 +268,12 @@ public void findMembers(List
members, boolean initial_discovery, Respon @ManagedOperation(description="Asks Kubernetes for the IP addresses of all pods") public String fetchFromKube() { - List list=readAll(); - return list.stream().collect(Collectors.joining(", ")); + List list=readAll(); + return list.toString(); } - protected List readAll() { + protected List readAll() { if(isClusteringEnabled() && client != null) { try { return client.getPods(namespace, labels, dump_requests); diff --git a/src/main/java/org/jgroups/protocols/kubernetes/Pod.java b/src/main/java/org/jgroups/protocols/kubernetes/Pod.java new file mode 100644 index 0000000..2043159 --- /dev/null +++ b/src/main/java/org/jgroups/protocols/kubernetes/Pod.java @@ -0,0 +1,56 @@ +package org.jgroups.protocols.kubernetes; + +public class Pod { + + private final String name; + private final String ip; + private final String parentDeployment; + + + public Pod(String name, String ip, String parentDeployment) { + this.name = name; + this.ip = ip; + this.parentDeployment = parentDeployment; + } + + public String getName() { + return name; + } + + public String getIp() { + return ip; + } + + public String getParentDeployment() { + return parentDeployment; + } + + @Override + public String toString() { + return "Pod{" + + "name='" + name + '\'' + + ", ip='" + ip + '\'' + + ", parentDeployment='" + parentDeployment + '\'' + + '}'; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + + Pod pod = (Pod) o; + + if (name != null ? !name.equals(pod.name) : pod.name != null) return false; + if (ip != null ? !ip.equals(pod.ip) : pod.ip != null) return false; + return parentDeployment != null ? parentDeployment.equals(pod.parentDeployment) : pod.parentDeployment == null; + } + + @Override + public int hashCode() { + int result = name != null ? name.hashCode() : 0; + result = 31 * result + (ip != null ? ip.hashCode() : 0); + result = 31 * result + (parentDeployment != null ? parentDeployment.hashCode() : 0); + return result; + } +} diff --git a/src/test/java/org/jgroups/ping/kube/test/ClientTest.java b/src/test/java/org/jgroups/ping/kube/test/ClientTest.java index 097f043..bceb45d 100644 --- a/src/test/java/org/jgroups/ping/kube/test/ClientTest.java +++ b/src/test/java/org/jgroups/ping/kube/test/ClientTest.java @@ -1,13 +1,14 @@ package org.jgroups.ping.kube.test; -import org.jgroups.protocols.kubernetes.Client; -import org.junit.Assert; -import org.junit.Test; +import static org.junit.Assert.assertEquals; import java.util.List; -import static org.junit.Assert.assertEquals; +import org.jgroups.protocols.kubernetes.Client; +import org.jgroups.protocols.kubernetes.Pod; +import org.junit.Assert; +import org.junit.Test; /** * @author Ales Justin @@ -17,10 +18,10 @@ public class ClientTest { @Test public void testPods() throws Exception { Client client = new TestClient(); - List pods = client.getPods(null, null, false); + List pods = client.getPods(null, null, false); Assert.assertNotNull(pods); assertEquals(2, pods.size()); - String pod = pods.get(0); + String pod = pods.get(0).getIp(); Assert.assertNotNull(pod); } diff --git a/src/test/java/org/jgroups/ping/kube/test/RollingUpdateTest.java b/src/test/java/org/jgroups/ping/kube/test/RollingUpdateTest.java new file mode 100644 index 0000000..1e7de28 --- /dev/null +++ b/src/test/java/org/jgroups/ping/kube/test/RollingUpdateTest.java @@ -0,0 +1,114 @@ +package org.jgroups.ping.kube.test; + +import static org.jgroups.ping.kube.test.util.FreePortFinder.findFreePort; + +import java.net.InetAddress; +import java.util.ArrayList; +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; + +import org.assertj.core.api.Assertions; +import org.jgroups.JChannel; +import org.jgroups.Message; +import org.jgroups.protocols.TCP; +import org.jgroups.protocols.kubernetes.KUBE_PING; +import org.jgroups.protocols.kubernetes.Pod; +import org.jgroups.protocols.pbcast.GMS; +import org.jgroups.protocols.pbcast.NAKACK2; +import org.jgroups.stack.IpAddress; +import org.junit.Test; + +/** + * Tests Rolling update scenarios. + * + *

+ * The idea of this tests is to mock the Kubernetes API response and check which hosts were queried during + * initial discovery. This way we will know which hosts where put into the cluster. + *

+ */ +public class RollingUpdateTest { + + @Test + public void testPuttingAllNodesInTheSameClusterDuringRollingUpdate() throws Exception { + //given + KUBE_PING_FOR_TESTING testedProtocol = new KUBE_PING_FOR_TESTING("/openshift_rolling_update.json"); + + //when + sendInitialDiscovery(testedProtocol); + Set membersUsedForDiscovery = testedProtocol.getCollectedMessages().stream() + .map(e -> ((IpAddress)e.getDest()).getIpAddress().getHostAddress()) + .collect(Collectors.toSet()); + List allPodsFromKubernetesApi = testedProtocol.getPods().stream() + .map(pod -> pod.getIp()) + .collect(Collectors.toList()); + + //then + Assertions.assertThat(membersUsedForDiscovery).hasSameElementsAs(allPodsFromKubernetesApi); + } + + @Test + public void testPutOnlyNodesWithTheSameParentDuringRollingUpdate() throws Exception { + //given + KUBE_PING_FOR_TESTING testedProtocol = new KUBE_PING_FOR_TESTING("/openshift_rolling_update.json"); + testedProtocol.setValue("split_clusters_during_rolling_update", true); + + //when + sendInitialDiscovery(testedProtocol); + String senderParentDeployment = testedProtocol.getPods().stream() + .filter(pod -> "127.0.0.1".equals(pod.getIp())) + .map(pod -> pod.getParentDeployment()) + .findFirst().get(); + Set membersUsedForDiscovery = testedProtocol.getCollectedMessages().stream() + .map(e -> ((IpAddress)e.getDest()).getIpAddress().getHostAddress()) + .collect(Collectors.toSet()); + List allowedPodsFromKubernetesApi = testedProtocol.getPods().stream() + .filter(pod -> senderParentDeployment.equals(pod.getParentDeployment())) + .map(pod -> pod.getIp()) + .collect(Collectors.toList()); + + //then + Assertions.assertThat(allowedPodsFromKubernetesApi).containsAll(membersUsedForDiscovery); + } + + private void sendInitialDiscovery(KUBE_PING kubePingProtocol) throws Exception { + new JChannel( + new TCP().setValue("bind_addr", InetAddress.getLoopbackAddress()).setValue("bind_port", findFreePort()), + kubePingProtocol, + new NAKACK2(), + new GMS().setValue("join_timeout", 1) + ).connect("RollingUpdateTest").disconnect(); + } + + static class KUBE_PING_FOR_TESTING extends KUBE_PING { + + private final String resourceFile; + private List collectedMessages = new ArrayList<>(); + private List pods; + + public KUBE_PING_FOR_TESTING(String resourceFile) { + this.resourceFile = resourceFile; + } + + @Override + public void init() throws Exception { + super.init(); + client = new TestClient(resourceFile); + pods = client.getPods(namespace, labels, true); + } + + @Override + protected void sendDiscoveryRequest(Message req) { + collectedMessages.add(req); + } + + public List getCollectedMessages() { + return collectedMessages; + } + + public List getPods() { + return pods; + } + } + +} diff --git a/src/test/java/org/jgroups/ping/kube/test/util/FreePortFinder.java b/src/test/java/org/jgroups/ping/kube/test/util/FreePortFinder.java new file mode 100644 index 0000000..9267ead --- /dev/null +++ b/src/test/java/org/jgroups/ping/kube/test/util/FreePortFinder.java @@ -0,0 +1,17 @@ +package org.jgroups.ping.kube.test.util; + +import java.net.ServerSocket; + +public class FreePortFinder { + + public static int DEFAULT_PORT = 13256; + + public static int findFreePort() { + try (ServerSocket socket = new ServerSocket(0)) { + return socket.getLocalPort(); + } catch (Exception e) { + return DEFAULT_PORT; + } + } + +} diff --git a/src/test/resources/openshift_rolling_update.json b/src/test/resources/openshift_rolling_update.json new file mode 100644 index 0000000..39c4fd4 --- /dev/null +++ b/src/test/resources/openshift_rolling_update.json @@ -0,0 +1,1519 @@ +{ + "kind": "PodList", + "apiVersion": "v1", + "metadata": { + "selfLink": "/api/v1/namespaces/myproject/pods", + "resourceVersion": "3135" + }, + "items": [ + { + "metadata": { + "name": "infinispan-app-2-h5xkc", + "generateName": "infinispan-app-2-", + "namespace": "myproject", + "selfLink": "/api/v1/namespaces/myproject/pods/infinispan-app-2-h5xkc", + "uid": "2b311b33-87ca-11e7-bfdb-54ee751d46e3", + "resourceVersion": "3069", + "creationTimestamp": "2017-08-23T06:13:23Z", + "deletionTimestamp": "2017-08-23T07:47:07Z", + "deletionGracePeriodSeconds": 120, + "labels": { + "application": "infinispan-app", + "deployment": "infinispan-app-2", + "deploymentConfig": "infinispan-app", + "deploymentconfig": "infinispan-app" + }, + "annotations": { + "kubernetes.io/created-by": "{\"kind\":\"SerializedReference\",\"apiVersion\":\"v1\",\"reference\":{\"kind\":\"ReplicationController\",\"namespace\":\"myproject\",\"name\":\"infinispan-app-2\",\"uid\":\"1bda1bf8-87ca-11e7-bfdb-54ee751d46e3\",\"apiVersion\":\"v1\",\"resourceVersion\":\"1651\"}}\n", + "openshift.io/deployment-config.latest-version": "2", + "openshift.io/deployment-config.name": "infinispan-app", + "openshift.io/deployment.name": "infinispan-app-2", + "openshift.io/scc": "restricted" + }, + "ownerReferences": [ + { + "apiVersion": "v1", + "kind": "ReplicationController", + "name": "infinispan-app-2", + "uid": "1bda1bf8-87ca-11e7-bfdb-54ee751d46e3", + "controller": true, + "blockOwnerDeletion": true + } + ] + }, + "spec": { + "volumes": [ + { + "name": "infinispan-app-configuration", + "configMap": { + "name": "infinispan-app-configuration", + "defaultMode": 420 + } + }, + { + "name": "infinispan-app-token-gx5nc", + "secret": { + "secretName": "infinispan-app-token-gx5nc", + "defaultMode": 420 + } + } + ], + "containers": [ + { + "name": "infinispan-app", + "image": "jboss/infinispan-server:9.1.0.Final-1", + "args": [ + "custom/cloud-ephemeral.xml", + "-Djboss.default.jgroups.stack=kubernetes", + "--debug" + ], + "ports": [ + { + "name": "http", + "containerPort": 8080, + "protocol": "TCP" + }, + { + "name": "management", + "containerPort": 9990, + "protocol": "TCP" + }, + { + "name": "ping", + "containerPort": 8888, + "protocol": "TCP" + }, + { + "name": "hotrod", + "containerPort": 11222, + "protocol": "TCP" + } + ], + "env": [ + { + "name": "OPENSHIFT_KUBE_PING_LABELS", + "value": "application=infinispan-app" + }, + { + "name": "OPENSHIFT_KUBE_PING_NAMESPACE", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.namespace" + } + } + }, + { + "name": "KUBERNETES_LABELS", + "value": "application=infinispan-app" + }, + { + "name": "KUBERNETES_NAMESPACE", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.namespace" + } + } + }, + { + "name": "MGMT_USER", + "value": "de1KjbNp" + }, + { + "name": "MGMT_PASS", + "value": "Cy0qNj5K" + }, + { + "name": "APP_USER", + "value": "827J6qfR" + }, + { + "name": "APP_PASS", + "value": "u4aCSCWd" + } + ], + "resources": { + "requests": { + "cpu": "500m", + "memory": "512Mi" + } + }, + "volumeMounts": [ + { + "name": "infinispan-app-configuration", + "mountPath": "/opt/jboss/infinispan-server/standalone/configuration/custom" + }, + { + "name": "infinispan-app-token-gx5nc", + "readOnly": true, + "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount" + } + ], + "livenessProbe": { + "exec": { + "command": [ + "/usr/local/bin/is_running.sh" + ] + }, + "initialDelaySeconds": 10, + "timeoutSeconds": 80, + "periodSeconds": 60, + "successThreshold": 1, + "failureThreshold": 5 + }, + "readinessProbe": { + "exec": { + "command": [ + "/usr/local/bin/is_healthy.sh" + ] + }, + "initialDelaySeconds": 10, + "timeoutSeconds": 80, + "periodSeconds": 60, + "successThreshold": 2, + "failureThreshold": 5 + }, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File", + "imagePullPolicy": "IfNotPresent", + "securityContext": { + "capabilities": { + "drop": [ + "KILL", + "MKNOD", + "SETGID", + "SETUID", + "SYS_CHROOT" + ] + }, + "privileged": false, + "seLinuxOptions": { + "level": "s0:c7,c4" + }, + "runAsUser": 1000050000 + } + } + ], + "restartPolicy": "Always", + "terminationGracePeriodSeconds": 120, + "dnsPolicy": "ClusterFirst", + "serviceAccountName": "infinispan-app", + "serviceAccount": "infinispan-app", + "nodeName": "localhost", + "securityContext": { + "seLinuxOptions": { + "level": "s0:c7,c4" + }, + "fsGroup": 1000050000 + }, + "imagePullSecrets": [ + { + "name": "infinispan-app-dockercfg-m1qdc" + } + ], + "schedulerName": "default-scheduler" + }, + "status": { + "phase": "Running", + "conditions": [ + { + "type": "Initialized", + "status": "True", + "lastProbeTime": null, + "lastTransitionTime": "2017-08-23T06:13:23Z" + }, + { + "type": "Ready", + "status": "True", + "lastProbeTime": null, + "lastTransitionTime": "2017-08-23T06:14:24Z" + }, + { + "type": "PodScheduled", + "status": "True", + "lastProbeTime": null, + "lastTransitionTime": "2017-08-23T06:13:23Z" + } + ], + "hostIP": "192.168.0.17", + "podIP": "172.17.0.8", + "startTime": "2017-08-23T06:13:23Z", + "containerStatuses": [ + { + "name": "infinispan-app", + "state": { + "running": { + "startedAt": "2017-08-23T06:13:27Z" + } + }, + "lastState": {}, + "ready": true, + "restartCount": 0, + "image": "docker.io/jboss/infinispan-server:9.1.0.Final-1", + "imageID": "docker-pullable://docker.io/jboss/infinispan-server@sha256:61afc4a719b151cde08a6da2aeb632f273874a624baf12114ef6ef4dc8f54904", + "containerID": "docker://ea67b1200abc5e704ca07c73e353e0550b11a87b39030773fbe368a31ff9b00d" + } + ], + "qosClass": "Burstable" + } + }, + { + "metadata": { + "name": "infinispan-app-2-m1wxf", + "generateName": "infinispan-app-2-", + "namespace": "myproject", + "selfLink": "/api/v1/namespaces/myproject/pods/infinispan-app-2-m1wxf", + "uid": "1ec980ec-87ca-11e7-bfdb-54ee751d46e3", + "resourceVersion": "3135", + "creationTimestamp": "2017-08-23T06:13:02Z", + "deletionTimestamp": "2017-08-23T07:48:07Z", + "deletionGracePeriodSeconds": 120, + "labels": { + "application": "infinispan-app", + "deployment": "infinispan-app-2", + "deploymentConfig": "infinispan-app", + "deploymentconfig": "infinispan-app" + }, + "annotations": { + "kubernetes.io/created-by": "{\"kind\":\"SerializedReference\",\"apiVersion\":\"v1\",\"reference\":{\"kind\":\"ReplicationController\",\"namespace\":\"myproject\",\"name\":\"infinispan-app-2\",\"uid\":\"1bda1bf8-87ca-11e7-bfdb-54ee751d46e3\",\"apiVersion\":\"v1\",\"resourceVersion\":\"1619\"}}\n", + "openshift.io/deployment-config.latest-version": "2", + "openshift.io/deployment-config.name": "infinispan-app", + "openshift.io/deployment.name": "infinispan-app-2", + "openshift.io/scc": "restricted" + }, + "ownerReferences": [ + { + "apiVersion": "v1", + "kind": "ReplicationController", + "name": "infinispan-app-2", + "uid": "1bda1bf8-87ca-11e7-bfdb-54ee751d46e3", + "controller": true, + "blockOwnerDeletion": true + } + ] + }, + "spec": { + "volumes": [ + { + "name": "infinispan-app-configuration", + "configMap": { + "name": "infinispan-app-configuration", + "defaultMode": 420 + } + }, + { + "name": "infinispan-app-token-gx5nc", + "secret": { + "secretName": "infinispan-app-token-gx5nc", + "defaultMode": 420 + } + } + ], + "containers": [ + { + "name": "infinispan-app", + "image": "jboss/infinispan-server:9.1.0.Final-1", + "args": [ + "custom/cloud-ephemeral.xml", + "-Djboss.default.jgroups.stack=kubernetes", + "--debug" + ], + "ports": [ + { + "name": "http", + "containerPort": 8080, + "protocol": "TCP" + }, + { + "name": "management", + "containerPort": 9990, + "protocol": "TCP" + }, + { + "name": "ping", + "containerPort": 8888, + "protocol": "TCP" + }, + { + "name": "hotrod", + "containerPort": 11222, + "protocol": "TCP" + } + ], + "env": [ + { + "name": "OPENSHIFT_KUBE_PING_LABELS", + "value": "application=infinispan-app" + }, + { + "name": "OPENSHIFT_KUBE_PING_NAMESPACE", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.namespace" + } + } + }, + { + "name": "KUBERNETES_LABELS", + "value": "application=infinispan-app" + }, + { + "name": "KUBERNETES_NAMESPACE", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.namespace" + } + } + }, + { + "name": "MGMT_USER", + "value": "de1KjbNp" + }, + { + "name": "MGMT_PASS", + "value": "Cy0qNj5K" + }, + { + "name": "APP_USER", + "value": "827J6qfR" + }, + { + "name": "APP_PASS", + "value": "u4aCSCWd" + } + ], + "resources": { + "requests": { + "cpu": "500m", + "memory": "512Mi" + } + }, + "volumeMounts": [ + { + "name": "infinispan-app-configuration", + "mountPath": "/opt/jboss/infinispan-server/standalone/configuration/custom" + }, + { + "name": "infinispan-app-token-gx5nc", + "readOnly": true, + "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount" + } + ], + "livenessProbe": { + "exec": { + "command": [ + "/usr/local/bin/is_running.sh" + ] + }, + "initialDelaySeconds": 10, + "timeoutSeconds": 80, + "periodSeconds": 60, + "successThreshold": 1, + "failureThreshold": 5 + }, + "readinessProbe": { + "exec": { + "command": [ + "/usr/local/bin/is_healthy.sh" + ] + }, + "initialDelaySeconds": 10, + "timeoutSeconds": 80, + "periodSeconds": 60, + "successThreshold": 2, + "failureThreshold": 5 + }, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File", + "imagePullPolicy": "IfNotPresent", + "securityContext": { + "capabilities": { + "drop": [ + "KILL", + "MKNOD", + "SETGID", + "SETUID", + "SYS_CHROOT" + ] + }, + "privileged": false, + "seLinuxOptions": { + "level": "s0:c7,c4" + }, + "runAsUser": 1000050000 + } + } + ], + "restartPolicy": "Always", + "terminationGracePeriodSeconds": 120, + "dnsPolicy": "ClusterFirst", + "serviceAccountName": "infinispan-app", + "serviceAccount": "infinispan-app", + "nodeName": "localhost", + "securityContext": { + "seLinuxOptions": { + "level": "s0:c7,c4" + }, + "fsGroup": 1000050000 + }, + "imagePullSecrets": [ + { + "name": "infinispan-app-dockercfg-m1qdc" + } + ], + "schedulerName": "default-scheduler" + }, + "status": { + "phase": "Running", + "conditions": [ + { + "type": "Initialized", + "status": "True", + "lastProbeTime": null, + "lastTransitionTime": "2017-08-23T06:13:02Z" + }, + { + "type": "Ready", + "status": "False", + "lastProbeTime": null, + "lastTransitionTime": "2017-08-23T07:46:13Z", + "reason": "ContainersNotReady", + "message": "containers with unready status: [infinispan-app]" + }, + { + "type": "PodScheduled", + "status": "True", + "lastProbeTime": null, + "lastTransitionTime": "2017-08-23T06:13:02Z" + } + ], + "hostIP": "192.168.0.17", + "startTime": "2017-08-23T06:13:02Z", + "containerStatuses": [ + { + "name": "infinispan-app", + "state": { + "terminated": { + "exitCode": 0, + "reason": "Completed", + "startedAt": "2017-08-23T06:13:04Z", + "finishedAt": "2017-08-23T07:46:13Z", + "containerID": "docker://6e0c726f66f4a7293b9731fdbfb92d15e15db61520cf6f166e3321a41089b11b" + } + }, + "lastState": {}, + "ready": false, + "restartCount": 0, + "image": "docker.io/jboss/infinispan-server:9.1.0.Final-1", + "imageID": "docker-pullable://docker.io/jboss/infinispan-server@sha256:61afc4a719b151cde08a6da2aeb632f273874a624baf12114ef6ef4dc8f54904", + "containerID": "docker://6e0c726f66f4a7293b9731fdbfb92d15e15db61520cf6f166e3321a41089b11b" + } + ], + "qosClass": "Burstable" + } + }, + { + "metadata": { + "name": "infinispan-app-3-2tmw3", + "generateName": "infinispan-app-3-", + "namespace": "myproject", + "selfLink": "/api/v1/namespaces/myproject/pods/infinispan-app-3-2tmw3", + "uid": "ef807319-87d6-11e7-bfdb-54ee751d46e3", + "resourceVersion": "3106", + "creationTimestamp": "2017-08-23T07:44:46Z", + "labels": { + "application": "infinispan-app", + "deployment": "infinispan-app-3", + "deploymentConfig": "infinispan-app", + "deploymentconfig": "infinispan-app" + }, + "annotations": { + "kubernetes.io/created-by": "{\"kind\":\"SerializedReference\",\"apiVersion\":\"v1\",\"reference\":{\"kind\":\"ReplicationController\",\"namespace\":\"myproject\",\"name\":\"infinispan-app-3\",\"uid\":\"b5ceba4c-87d6-11e7-bfdb-54ee751d46e3\",\"apiVersion\":\"v1\",\"resourceVersion\":\"3035\"}}\n", + "openshift.io/deployment-config.latest-version": "3", + "openshift.io/deployment-config.name": "infinispan-app", + "openshift.io/deployment.name": "infinispan-app-3", + "openshift.io/scc": "restricted" + }, + "ownerReferences": [ + { + "apiVersion": "v1", + "kind": "ReplicationController", + "name": "infinispan-app-3", + "uid": "b5ceba4c-87d6-11e7-bfdb-54ee751d46e3", + "controller": true, + "blockOwnerDeletion": true + } + ] + }, + "spec": { + "volumes": [ + { + "name": "infinispan-app-configuration", + "configMap": { + "name": "infinispan-app-configuration", + "defaultMode": 420 + } + }, + { + "name": "infinispan-app-token-gx5nc", + "secret": { + "secretName": "infinispan-app-token-gx5nc", + "defaultMode": 420 + } + } + ], + "containers": [ + { + "name": "infinispan-app", + "image": "jboss/infinispan-server:9.1.0.Final-1", + "args": [ + "custom/cloud-ephemeral.xml", + "-Djboss.default.jgroups.stack=kubernetes", + "--debug" + ], + "ports": [ + { + "name": "http", + "containerPort": 8080, + "protocol": "TCP" + }, + { + "name": "management", + "containerPort": 9990, + "protocol": "TCP" + }, + { + "name": "ping", + "containerPort": 8888, + "protocol": "TCP" + }, + { + "name": "hotrod", + "containerPort": 11222, + "protocol": "TCP" + } + ], + "env": [ + { + "name": "OPENSHIFT_KUBE_PING_LABELS", + "value": "application=infinispan-app" + }, + { + "name": "OPENSHIFT_KUBE_PING_NAMESPACE", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.namespace" + } + } + }, + { + "name": "KUBERNETES_LABELS", + "value": "application=infinispan-app" + }, + { + "name": "KUBERNETES_NAMESPACE", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.namespace" + } + } + }, + { + "name": "MGMT_USER", + "value": "de1KjbNp" + }, + { + "name": "MGMT_PASS", + "value": "Cy0qNj5K" + }, + { + "name": "APP_USER", + "value": "827J6qfR" + }, + { + "name": "APP_PASS", + "value": "u4aCSCWd" + } + ], + "resources": { + "requests": { + "cpu": "500m", + "memory": "512Mi" + } + }, + "volumeMounts": [ + { + "name": "infinispan-app-configuration", + "mountPath": "/opt/jboss/infinispan-server/standalone/configuration/custom" + }, + { + "name": "infinispan-app-token-gx5nc", + "readOnly": true, + "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount" + } + ], + "livenessProbe": { + "exec": { + "command": [ + "/usr/local/bin/is_running.sh" + ] + }, + "initialDelaySeconds": 10, + "timeoutSeconds": 80, + "periodSeconds": 60, + "successThreshold": 1, + "failureThreshold": 5 + }, + "readinessProbe": { + "exec": { + "command": [ + "/usr/local/bin/is_healthy.sh" + ] + }, + "initialDelaySeconds": 10, + "timeoutSeconds": 80, + "periodSeconds": 60, + "successThreshold": 2, + "failureThreshold": 5 + }, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File", + "imagePullPolicy": "IfNotPresent", + "securityContext": { + "capabilities": { + "drop": [ + "KILL", + "MKNOD", + "SETGID", + "SETUID", + "SYS_CHROOT" + ] + }, + "privileged": false, + "seLinuxOptions": { + "level": "s0:c7,c4" + }, + "runAsUser": 1000050000 + } + } + ], + "restartPolicy": "Always", + "terminationGracePeriodSeconds": 120, + "dnsPolicy": "ClusterFirst", + "serviceAccountName": "infinispan-app", + "serviceAccount": "infinispan-app", + "nodeName": "localhost", + "securityContext": { + "seLinuxOptions": { + "level": "s0:c7,c4" + }, + "fsGroup": 1000050000 + }, + "imagePullSecrets": [ + { + "name": "infinispan-app-dockercfg-m1qdc" + } + ], + "schedulerName": "default-scheduler" + }, + "status": { + "phase": "Running", + "conditions": [ + { + "type": "Initialized", + "status": "True", + "lastProbeTime": null, + "lastTransitionTime": "2017-08-23T07:44:47Z" + }, + { + "type": "Ready", + "status": "True", + "lastProbeTime": null, + "lastTransitionTime": "2017-08-23T07:45:48Z" + }, + { + "type": "PodScheduled", + "status": "True", + "lastProbeTime": null, + "lastTransitionTime": "2017-08-23T07:44:47Z" + } + ], + "hostIP": "192.168.0.17", + "podIP": "127.0.0.1", + "startTime": "2017-08-23T07:44:47Z", + "containerStatuses": [ + { + "name": "infinispan-app", + "state": { + "running": { + "startedAt": "2017-08-23T07:44:49Z" + } + }, + "lastState": {}, + "ready": true, + "restartCount": 0, + "image": "docker.io/jboss/infinispan-server:9.1.0.Final-1", + "imageID": "docker-pullable://docker.io/jboss/infinispan-server@sha256:61afc4a719b151cde08a6da2aeb632f273874a624baf12114ef6ef4dc8f54904", + "containerID": "docker://a772b4b1986a1a2bf2b206baa876f9373877323aa3adfa20443fe2dc0047a93a" + } + ], + "qosClass": "Burstable" + } + }, + { + "metadata": { + "name": "infinispan-app-3-8h0fx", + "generateName": "infinispan-app-3-", + "namespace": "myproject", + "selfLink": "/api/v1/namespaces/myproject/pods/infinispan-app-3-8h0fx", + "uid": "bf180233-87d6-11e7-bfdb-54ee751d46e3", + "resourceVersion": "3015", + "creationTimestamp": "2017-08-23T07:43:25Z", + "labels": { + "application": "infinispan-app", + "deployment": "infinispan-app-3", + "deploymentConfig": "infinispan-app", + "deploymentconfig": "infinispan-app" + }, + "annotations": { + "kubernetes.io/created-by": "{\"kind\":\"SerializedReference\",\"apiVersion\":\"v1\",\"reference\":{\"kind\":\"ReplicationController\",\"namespace\":\"myproject\",\"name\":\"infinispan-app-3\",\"uid\":\"b5ceba4c-87d6-11e7-bfdb-54ee751d46e3\",\"apiVersion\":\"v1\",\"resourceVersion\":\"2952\"}}\n", + "openshift.io/deployment-config.latest-version": "3", + "openshift.io/deployment-config.name": "infinispan-app", + "openshift.io/deployment.name": "infinispan-app-3", + "openshift.io/scc": "restricted" + }, + "ownerReferences": [ + { + "apiVersion": "v1", + "kind": "ReplicationController", + "name": "infinispan-app-3", + "uid": "b5ceba4c-87d6-11e7-bfdb-54ee751d46e3", + "controller": true, + "blockOwnerDeletion": true + } + ] + }, + "spec": { + "volumes": [ + { + "name": "infinispan-app-configuration", + "configMap": { + "name": "infinispan-app-configuration", + "defaultMode": 420 + } + }, + { + "name": "infinispan-app-token-gx5nc", + "secret": { + "secretName": "infinispan-app-token-gx5nc", + "defaultMode": 420 + } + } + ], + "containers": [ + { + "name": "infinispan-app", + "image": "jboss/infinispan-server:9.1.0.Final-1", + "args": [ + "custom/cloud-ephemeral.xml", + "-Djboss.default.jgroups.stack=kubernetes", + "--debug" + ], + "ports": [ + { + "name": "http", + "containerPort": 8080, + "protocol": "TCP" + }, + { + "name": "management", + "containerPort": 9990, + "protocol": "TCP" + }, + { + "name": "ping", + "containerPort": 8888, + "protocol": "TCP" + }, + { + "name": "hotrod", + "containerPort": 11222, + "protocol": "TCP" + } + ], + "env": [ + { + "name": "OPENSHIFT_KUBE_PING_LABELS", + "value": "application=infinispan-app" + }, + { + "name": "OPENSHIFT_KUBE_PING_NAMESPACE", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.namespace" + } + } + }, + { + "name": "KUBERNETES_LABELS", + "value": "application=infinispan-app" + }, + { + "name": "KUBERNETES_NAMESPACE", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.namespace" + } + } + }, + { + "name": "MGMT_USER", + "value": "de1KjbNp" + }, + { + "name": "MGMT_PASS", + "value": "Cy0qNj5K" + }, + { + "name": "APP_USER", + "value": "827J6qfR" + }, + { + "name": "APP_PASS", + "value": "u4aCSCWd" + } + ], + "resources": { + "requests": { + "cpu": "500m", + "memory": "512Mi" + } + }, + "volumeMounts": [ + { + "name": "infinispan-app-configuration", + "mountPath": "/opt/jboss/infinispan-server/standalone/configuration/custom" + }, + { + "name": "infinispan-app-token-gx5nc", + "readOnly": true, + "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount" + } + ], + "livenessProbe": { + "exec": { + "command": [ + "/usr/local/bin/is_running.sh" + ] + }, + "initialDelaySeconds": 10, + "timeoutSeconds": 80, + "periodSeconds": 60, + "successThreshold": 1, + "failureThreshold": 5 + }, + "readinessProbe": { + "exec": { + "command": [ + "/usr/local/bin/is_healthy.sh" + ] + }, + "initialDelaySeconds": 10, + "timeoutSeconds": 80, + "periodSeconds": 60, + "successThreshold": 2, + "failureThreshold": 5 + }, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File", + "imagePullPolicy": "IfNotPresent", + "securityContext": { + "capabilities": { + "drop": [ + "KILL", + "MKNOD", + "SETGID", + "SETUID", + "SYS_CHROOT" + ] + }, + "privileged": false, + "seLinuxOptions": { + "level": "s0:c7,c4" + }, + "runAsUser": 1000050000 + } + } + ], + "restartPolicy": "Always", + "terminationGracePeriodSeconds": 120, + "dnsPolicy": "ClusterFirst", + "serviceAccountName": "infinispan-app", + "serviceAccount": "infinispan-app", + "nodeName": "localhost", + "securityContext": { + "seLinuxOptions": { + "level": "s0:c7,c4" + }, + "fsGroup": 1000050000 + }, + "imagePullSecrets": [ + { + "name": "infinispan-app-dockercfg-m1qdc" + } + ], + "schedulerName": "default-scheduler" + }, + "status": { + "phase": "Running", + "conditions": [ + { + "type": "Initialized", + "status": "True", + "lastProbeTime": null, + "lastTransitionTime": "2017-08-23T07:43:25Z" + }, + { + "type": "Ready", + "status": "True", + "lastProbeTime": null, + "lastTransitionTime": "2017-08-23T07:44:26Z" + }, + { + "type": "PodScheduled", + "status": "True", + "lastProbeTime": null, + "lastTransitionTime": "2017-08-23T07:43:25Z" + } + ], + "hostIP": "192.168.0.17", + "podIP": "172.17.0.6", + "startTime": "2017-08-23T07:43:25Z", + "containerStatuses": [ + { + "name": "infinispan-app", + "state": { + "running": { + "startedAt": "2017-08-23T07:43:27Z" + } + }, + "lastState": {}, + "ready": true, + "restartCount": 0, + "image": "docker.io/jboss/infinispan-server:9.1.0.Final-1", + "imageID": "docker-pullable://docker.io/jboss/infinispan-server@sha256:61afc4a719b151cde08a6da2aeb632f273874a624baf12114ef6ef4dc8f54904", + "containerID": "docker://2fe2926c9511a84698dcb4925384823c1504d0e918cea5601284c7b270058963" + } + ], + "qosClass": "Burstable" + } + }, + { + "metadata": { + "name": "infinispan-app-3-kt6xq", + "generateName": "infinispan-app-3-", + "namespace": "myproject", + "selfLink": "/api/v1/namespaces/myproject/pods/infinispan-app-3-kt6xq", + "uid": "cb3c38f1-87d6-11e7-bfdb-54ee751d46e3", + "resourceVersion": "3046", + "creationTimestamp": "2017-08-23T07:43:46Z", + "labels": { + "application": "infinispan-app", + "deployment": "infinispan-app-3", + "deploymentConfig": "infinispan-app", + "deploymentconfig": "infinispan-app" + }, + "annotations": { + "kubernetes.io/created-by": "{\"kind\":\"SerializedReference\",\"apiVersion\":\"v1\",\"reference\":{\"kind\":\"ReplicationController\",\"namespace\":\"myproject\",\"name\":\"infinispan-app-3\",\"uid\":\"b5ceba4c-87d6-11e7-bfdb-54ee751d46e3\",\"apiVersion\":\"v1\",\"resourceVersion\":\"2983\"}}\n", + "openshift.io/deployment-config.latest-version": "3", + "openshift.io/deployment-config.name": "infinispan-app", + "openshift.io/deployment.name": "infinispan-app-3", + "openshift.io/scc": "restricted" + }, + "ownerReferences": [ + { + "apiVersion": "v1", + "kind": "ReplicationController", + "name": "infinispan-app-3", + "uid": "b5ceba4c-87d6-11e7-bfdb-54ee751d46e3", + "controller": true, + "blockOwnerDeletion": true + } + ] + }, + "spec": { + "volumes": [ + { + "name": "infinispan-app-configuration", + "configMap": { + "name": "infinispan-app-configuration", + "defaultMode": 420 + } + }, + { + "name": "infinispan-app-token-gx5nc", + "secret": { + "secretName": "infinispan-app-token-gx5nc", + "defaultMode": 420 + } + } + ], + "containers": [ + { + "name": "infinispan-app", + "image": "jboss/infinispan-server:9.1.0.Final-1", + "args": [ + "custom/cloud-ephemeral.xml", + "-Djboss.default.jgroups.stack=kubernetes", + "--debug" + ], + "ports": [ + { + "name": "http", + "containerPort": 8080, + "protocol": "TCP" + }, + { + "name": "management", + "containerPort": 9990, + "protocol": "TCP" + }, + { + "name": "ping", + "containerPort": 8888, + "protocol": "TCP" + }, + { + "name": "hotrod", + "containerPort": 11222, + "protocol": "TCP" + } + ], + "env": [ + { + "name": "OPENSHIFT_KUBE_PING_LABELS", + "value": "application=infinispan-app" + }, + { + "name": "OPENSHIFT_KUBE_PING_NAMESPACE", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.namespace" + } + } + }, + { + "name": "KUBERNETES_LABELS", + "value": "application=infinispan-app" + }, + { + "name": "KUBERNETES_NAMESPACE", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.namespace" + } + } + }, + { + "name": "MGMT_USER", + "value": "de1KjbNp" + }, + { + "name": "MGMT_PASS", + "value": "Cy0qNj5K" + }, + { + "name": "APP_USER", + "value": "827J6qfR" + }, + { + "name": "APP_PASS", + "value": "u4aCSCWd" + } + ], + "resources": { + "requests": { + "cpu": "500m", + "memory": "512Mi" + } + }, + "volumeMounts": [ + { + "name": "infinispan-app-configuration", + "mountPath": "/opt/jboss/infinispan-server/standalone/configuration/custom" + }, + { + "name": "infinispan-app-token-gx5nc", + "readOnly": true, + "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount" + } + ], + "livenessProbe": { + "exec": { + "command": [ + "/usr/local/bin/is_running.sh" + ] + }, + "initialDelaySeconds": 10, + "timeoutSeconds": 80, + "periodSeconds": 60, + "successThreshold": 1, + "failureThreshold": 5 + }, + "readinessProbe": { + "exec": { + "command": [ + "/usr/local/bin/is_healthy.sh" + ] + }, + "initialDelaySeconds": 10, + "timeoutSeconds": 80, + "periodSeconds": 60, + "successThreshold": 2, + "failureThreshold": 5 + }, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File", + "imagePullPolicy": "IfNotPresent", + "securityContext": { + "capabilities": { + "drop": [ + "KILL", + "MKNOD", + "SETGID", + "SETUID", + "SYS_CHROOT" + ] + }, + "privileged": false, + "seLinuxOptions": { + "level": "s0:c7,c4" + }, + "runAsUser": 1000050000 + } + } + ], + "restartPolicy": "Always", + "terminationGracePeriodSeconds": 120, + "dnsPolicy": "ClusterFirst", + "serviceAccountName": "infinispan-app", + "serviceAccount": "infinispan-app", + "nodeName": "localhost", + "securityContext": { + "seLinuxOptions": { + "level": "s0:c7,c4" + }, + "fsGroup": 1000050000 + }, + "imagePullSecrets": [ + { + "name": "infinispan-app-dockercfg-m1qdc" + } + ], + "schedulerName": "default-scheduler" + }, + "status": { + "phase": "Running", + "conditions": [ + { + "type": "Initialized", + "status": "True", + "lastProbeTime": null, + "lastTransitionTime": "2017-08-23T07:43:46Z" + }, + { + "type": "Ready", + "status": "True", + "lastProbeTime": null, + "lastTransitionTime": "2017-08-23T07:44:47Z" + }, + { + "type": "PodScheduled", + "status": "True", + "lastProbeTime": null, + "lastTransitionTime": "2017-08-23T07:43:46Z" + } + ], + "hostIP": "192.168.0.17", + "podIP": "172.17.0.9", + "startTime": "2017-08-23T07:43:46Z", + "containerStatuses": [ + { + "name": "infinispan-app", + "state": { + "running": { + "startedAt": "2017-08-23T07:43:49Z" + } + }, + "lastState": {}, + "ready": true, + "restartCount": 0, + "image": "docker.io/jboss/infinispan-server:9.1.0.Final-1", + "imageID": "docker-pullable://docker.io/jboss/infinispan-server@sha256:61afc4a719b151cde08a6da2aeb632f273874a624baf12114ef6ef4dc8f54904", + "containerID": "docker://23b7564774f728748727e00a99a0cd762186c73e9e515263902164982198d91c" + } + ], + "qosClass": "Burstable" + } + }, + { + "metadata": { + "name": "infinispan-app-3-xzxl7", + "generateName": "infinispan-app-3-", + "namespace": "myproject", + "selfLink": "/api/v1/namespaces/myproject/pods/infinispan-app-3-xzxl7", + "uid": "fbd7e796-87d6-11e7-bfdb-54ee751d46e3", + "resourceVersion": "3127", + "creationTimestamp": "2017-08-23T07:45:07Z", + "labels": { + "application": "infinispan-app", + "deployment": "infinispan-app-3", + "deploymentConfig": "infinispan-app", + "deploymentconfig": "infinispan-app" + }, + "annotations": { + "kubernetes.io/created-by": "{\"kind\":\"SerializedReference\",\"apiVersion\":\"v1\",\"reference\":{\"kind\":\"ReplicationController\",\"namespace\":\"myproject\",\"name\":\"infinispan-app-3\",\"uid\":\"b5ceba4c-87d6-11e7-bfdb-54ee751d46e3\",\"apiVersion\":\"v1\",\"resourceVersion\":\"3077\"}}\n", + "openshift.io/deployment-config.latest-version": "3", + "openshift.io/deployment-config.name": "infinispan-app", + "openshift.io/deployment.name": "infinispan-app-3", + "openshift.io/scc": "restricted" + }, + "ownerReferences": [ + { + "apiVersion": "v1", + "kind": "ReplicationController", + "name": "infinispan-app-3", + "uid": "b5ceba4c-87d6-11e7-bfdb-54ee751d46e3", + "controller": true, + "blockOwnerDeletion": true + } + ] + }, + "spec": { + "volumes": [ + { + "name": "infinispan-app-configuration", + "configMap": { + "name": "infinispan-app-configuration", + "defaultMode": 420 + } + }, + { + "name": "infinispan-app-token-gx5nc", + "secret": { + "secretName": "infinispan-app-token-gx5nc", + "defaultMode": 420 + } + } + ], + "containers": [ + { + "name": "infinispan-app", + "image": "jboss/infinispan-server:9.1.0.Final-1", + "args": [ + "custom/cloud-ephemeral.xml", + "-Djboss.default.jgroups.stack=kubernetes", + "--debug" + ], + "ports": [ + { + "name": "http", + "containerPort": 8080, + "protocol": "TCP" + }, + { + "name": "management", + "containerPort": 9990, + "protocol": "TCP" + }, + { + "name": "ping", + "containerPort": 8888, + "protocol": "TCP" + }, + { + "name": "hotrod", + "containerPort": 11222, + "protocol": "TCP" + } + ], + "env": [ + { + "name": "OPENSHIFT_KUBE_PING_LABELS", + "value": "application=infinispan-app" + }, + { + "name": "OPENSHIFT_KUBE_PING_NAMESPACE", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.namespace" + } + } + }, + { + "name": "KUBERNETES_LABELS", + "value": "application=infinispan-app" + }, + { + "name": "KUBERNETES_NAMESPACE", + "valueFrom": { + "fieldRef": { + "apiVersion": "v1", + "fieldPath": "metadata.namespace" + } + } + }, + { + "name": "MGMT_USER", + "value": "de1KjbNp" + }, + { + "name": "MGMT_PASS", + "value": "Cy0qNj5K" + }, + { + "name": "APP_USER", + "value": "827J6qfR" + }, + { + "name": "APP_PASS", + "value": "u4aCSCWd" + } + ], + "resources": { + "requests": { + "cpu": "500m", + "memory": "512Mi" + } + }, + "volumeMounts": [ + { + "name": "infinispan-app-configuration", + "mountPath": "/opt/jboss/infinispan-server/standalone/configuration/custom" + }, + { + "name": "infinispan-app-token-gx5nc", + "readOnly": true, + "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount" + } + ], + "livenessProbe": { + "exec": { + "command": [ + "/usr/local/bin/is_running.sh" + ] + }, + "initialDelaySeconds": 10, + "timeoutSeconds": 80, + "periodSeconds": 60, + "successThreshold": 1, + "failureThreshold": 5 + }, + "readinessProbe": { + "exec": { + "command": [ + "/usr/local/bin/is_healthy.sh" + ] + }, + "initialDelaySeconds": 10, + "timeoutSeconds": 80, + "periodSeconds": 60, + "successThreshold": 2, + "failureThreshold": 5 + }, + "terminationMessagePath": "/dev/termination-log", + "terminationMessagePolicy": "File", + "imagePullPolicy": "IfNotPresent", + "securityContext": { + "capabilities": { + "drop": [ + "KILL", + "MKNOD", + "SETGID", + "SETUID", + "SYS_CHROOT" + ] + }, + "privileged": false, + "seLinuxOptions": { + "level": "s0:c7,c4" + }, + "runAsUser": 1000050000 + } + } + ], + "restartPolicy": "Always", + "terminationGracePeriodSeconds": 120, + "dnsPolicy": "ClusterFirst", + "serviceAccountName": "infinispan-app", + "serviceAccount": "infinispan-app", + "nodeName": "localhost", + "securityContext": { + "seLinuxOptions": { + "level": "s0:c7,c4" + }, + "fsGroup": 1000050000 + }, + "imagePullSecrets": [ + { + "name": "infinispan-app-dockercfg-m1qdc" + } + ], + "schedulerName": "default-scheduler" + }, + "status": { + "phase": "Running", + "conditions": [ + { + "type": "Initialized", + "status": "True", + "lastProbeTime": null, + "lastTransitionTime": "2017-08-23T07:45:07Z" + }, + { + "type": "Ready", + "status": "True", + "lastProbeTime": null, + "lastTransitionTime": "2017-08-23T07:46:08Z" + }, + { + "type": "PodScheduled", + "status": "True", + "lastProbeTime": null, + "lastTransitionTime": "2017-08-23T07:45:07Z" + } + ], + "hostIP": "192.168.0.17", + "podIP": "172.17.0.7", + "startTime": "2017-08-23T07:45:07Z", + "containerStatuses": [ + { + "name": "infinispan-app", + "state": { + "running": { + "startedAt": "2017-08-23T07:45:10Z" + } + }, + "lastState": {}, + "ready": true, + "restartCount": 0, + "image": "docker.io/jboss/infinispan-server:9.1.0.Final-1", + "imageID": "docker-pullable://docker.io/jboss/infinispan-server@sha256:61afc4a719b151cde08a6da2aeb632f273874a624baf12114ef6ef4dc8f54904", + "containerID": "docker://644070c909751e1e5892fa3d1a3b59479d1aa06344450607ffce4e89546c743c" + } + ], + "qosClass": "Burstable" + } + } + ] +}