Class KubernetesContext

java.lang.Object
org.springframework.cloud.servicebroker.model.Context
org.springframework.cloud.servicebroker.model.KubernetesContext

public final class KubernetesContext extends Context
Kubernetes specific contextual information under which the service instance is to be provisioned or updated.
Author:
Scott Frederick, Roy Clarkson
  • Field Details

  • Constructor Details

    • KubernetesContext

      public KubernetesContext(String namespace, String clusterid, Map<String,Object> properties)
      Create a new KubernetesContext.
      Parameters:
      namespace - the kubernetes namespace
      clusterid - the kubernetes clusterid
      properties - 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 namespace
      instanceName - the service instance name
      namespaceAnnotations - the annotations attached to the namespace in which the Service Instance will be visible
      instanceAnnotations - the annotations attached to the service instance
      clusterid - the kubernetes clusterid
      properties - a collection of properties
  • Method Details

    • getSerializableProperties

      public Map<String,Object> getSerializableProperties()
      Avoid polluting the serialized context with duplicated keys.
      Returns:
      properties
    • getNamespace

      public String getNamespace()
      Retrieve the kubernetes namespace from the collection of platform properties.
      Returns:
      the namespace
    • getClusterid

      public String getClusterid()
      Retrieve the kubernetes clusterid from the collection of platform properties.
      Returns:
      the clusterid
    • getInstanceName

      public String getInstanceName()
      Retrieve the kubernetes instance name from the collection of platform properties.
      Returns:
      the instance name
    • getNamespaceAnnotations

      public Map<String,Object> getNamespaceAnnotations()
      Retrieve the kubernetes namespace annotations from the collection of platform properties.
      Returns:
      the namespace annotations
    • getInstanceAnnotations

      public Map<String,Object> 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