Class KubernetesContext
java.lang.Object
org.springframework.cloud.servicebroker.model.Context
org.springframework.cloud.servicebroker.model.KubernetesContext
Kubernetes specific contextual information under which the service instance is to be
provisioned or updated.
- Author:
- Scott Frederick, Roy Clarkson
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Builder class for KubernetesContext.Nested classes/interfaces inherited from class org.springframework.cloud.servicebroker.model.Context
Context.ContextBaseBuilder<R extends Context,
B extends Context.ContextBaseBuilder<R, B>> -
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Kubernetes Cluster ID key.static final String
Kubernetes Instance Annotations key.static final String
Kubernetes Instance Name.static final String
Kubernetes platform name.static final String
Kubernetes Namespace Annotations key.static final String
Kubernetes Namespace key.Fields inherited from class org.springframework.cloud.servicebroker.model.Context
platform, PLATFORM_KEY, properties
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Create a builder that provides a fluent API for constructing a KubernetesContext.Retrieve the kubernetes clusterid from the collection of platform properties.Retrieve the kubernetes instance annotations from the collection of platform properties.Retrieve the kubernetes instance name from the collection of platform properties.Retrieve the kubernetes namespace from the collection of platform properties.Retrieve the kubernetes namespace annotations from the collection of platform properties.Avoid polluting the serialized context with duplicated keys.Methods inherited from class org.springframework.cloud.servicebroker.model.Context
canEqual, equals, getMapProperty, getPlatform, getProperties, getProperty, getStringProperty, hashCode, setMapProperty, setProperties, setStringProperty, toString
-
Field Details
-
KUBERNETES_PLATFORM
Kubernetes platform name.- See Also:
-
NAMESPACE_KEY
Kubernetes Namespace key.- See Also:
-
NAMESPACE_ANNOTATIONS_KEY
Kubernetes Namespace Annotations key.- See Also:
-
INSTANCE_ANNOTATIONS_KEY
Kubernetes Instance Annotations key.- See Also:
-
INSTANCE_NAME_KEY
Kubernetes Instance Name.- See Also:
-
CLUSTERID_KEY
Kubernetes Cluster ID key.- See Also:
-
-
Constructor Details
-
KubernetesContext
Create a new KubernetesContext.- Parameters:
namespace
- the kubernetes namespaceclusterid
- the kubernetes clusteridproperties
- a collection of properties
-
KubernetesContext
public KubernetesContext(String namespace, String clusterid, String instanceName, Map<String, Object> namespaceAnnotations, Map<String, Object> instanceAnnotations, Map<String, Object> properties) Create a new KubernetesContext.- Parameters:
namespace
- the kubernetes namespaceinstanceName
- the service instance namenamespaceAnnotations
- the annotations attached to the namespace in which the Service Instance will be visibleinstanceAnnotations
- the annotations attached to the service instanceclusterid
- the kubernetes clusteridproperties
- a collection of properties
-
-
Method Details
-
getSerializableProperties
Avoid polluting the serialized context with duplicated keys.- Returns:
- properties
-
getNamespace
Retrieve the kubernetes namespace from the collection of platform properties.- Returns:
- the namespace
-
getClusterid
Retrieve the kubernetes clusterid from the collection of platform properties.- Returns:
- the clusterid
-
getInstanceName
Retrieve the kubernetes instance name from the collection of platform properties.- Returns:
- the instance name
-
getNamespaceAnnotations
Retrieve the kubernetes namespace annotations from the collection of platform properties.- Returns:
- the namespace annotations
-
getInstanceAnnotations
Retrieve the kubernetes instance annotations from the collection of platform properties.- Returns:
- the instance annotations
-
builder
Create a builder that provides a fluent API for constructing a KubernetesContext.- Returns:
- the builder
-