public class KubernetesUtils extends Object
| Constructor and Description |
|---|
KubernetesUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
formatTimestamp(long timestamp) |
static io.fabric8.kubernetes.client.KubernetesClient |
getKubernetesClient() |
static io.fabric8.kubernetes.client.KubernetesClient |
getKubernetesClient(String server,
GlobalPluginConfiguration config) |
static String |
getNamespaceOrUseDefault(String configuredNamespace,
io.fabric8.kubernetes.client.KubernetesClient client)
Gets the current namespace running Jenkins inside or returns a reasonable default
|
protected static io.fabric8.kubernetes.client.KubernetesClient |
initializeKubernetesClient(String serverUrl)
Initializes an
KubernetesClient |
static long |
parseResourceVersion(String resourceVersion) |
static void |
shutdownKubernetesClient() |
protected static io.fabric8.kubernetes.client.KubernetesClient initializeKubernetesClient(String serverUrl)
KubernetesClientserverUrl - the optional URL of where the OpenShift cluster API server is runningpublic static io.fabric8.kubernetes.client.KubernetesClient getKubernetesClient()
public static io.fabric8.kubernetes.client.KubernetesClient getKubernetesClient(String server, GlobalPluginConfiguration config)
public static void shutdownKubernetesClient()
public static String getNamespaceOrUseDefault(String configuredNamespace, io.fabric8.kubernetes.client.KubernetesClient client)
configuredNamespace - the optional configured namespaceclient - the OpenShift clientpublic static long parseResourceVersion(String resourceVersion)
public static String formatTimestamp(long timestamp)
Copyright © 2016–2019. All rights reserved.