Class KubernetesCreationInfo

java.lang.Object
com.illumon.iris.db.tables.remotequery.process.kubernetes.KubernetesCreationInfo

public class KubernetesCreationInfo extends Object
Simple container class with Jackson properties for serialization and deserialization.
  • Constructor Details

    • KubernetesCreationInfo

      public KubernetesCreationInfo(Double cpuShares, String containerImage, String podTemplate)
  • Method Details

    • getCpuShares

      public Double getCpuShares()
    • getContainerImage

      public String getContainerImage()
    • getPodTemplate

      public String getPodTemplate()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toJson

      public io.deephaven.shadow.jackson.com.fasterxml.jackson.databind.JsonNode toJson() throws io.deephaven.shadow.jackson.com.fasterxml.jackson.core.JsonProcessingException
      Throws:
      io.deephaven.shadow.jackson.com.fasterxml.jackson.core.JsonProcessingException
    • fromJson

      public static KubernetesCreationInfo fromJson(String kubernetesCreationJson) throws IOException
      Throws:
      IOException
    • fromJson

      public static KubernetesCreationInfo fromJson(io.deephaven.shadow.jackson.com.fasterxml.jackson.databind.JsonNode kubernetesCreationJson)
    • fromJsonNested

      public static KubernetesCreationInfo fromJsonNested(String kubernetesCreationJson, String key)
      Used when KubernetesCreationInfo object is under a key in the json:
       {
           "someKey": {
             "cpuShares": 0.5,
             "containerImage": "my-image:latest"
             "podTemplate: "my-template.yaml"
           }
       }
       
      Parameters:
      kubernetesCreationJson - Json string that may contain an object with k8s creation info.
      key - The key in the Json object under which the object is found
      Returns:
      KubernetesCreationInfo object with values given in json string, or an empty KCI if it is not present in the json.
      Throws:
      IllegalArgumentException - if kubernetesCreationJson cannot be parsed