Class PodParameter

    • Constructor Summary

      Constructors 
      Constructor Description
      PodParameter()  
      PodParameter​(PodParameter source)
      NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy, and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      String getClusterId()
      Get TKE或EKS集群ID
      String getConfig()
      Get 自定义权限 如: { "apiVersion": "v1", "clusters": [ { "cluster": { "certificate-authority-data": "xxxxxx==", "server": "https://xxxxx.com" }, "name": "cls-xxxxx" } ], "contexts": [ { "context": { "cluster": "cls-xxxxx", "user": "100014xxxxx" }, "name": "cls-a44yhcxxxxxxxxxx" } ], "current-context": "cls-a4xxxx-context-default", "kind": "Config", "preferences": {}, "users": [ { "name": "100014xxxxx", "user": { "client-certificate-data": "xxxxxx", "client-key-data": "xxxxxx" } } ] }
      String getParameter()
      Get 自定义参数 如: { "apiVersion": "apps/v1", "kind": "Deployment", "metadata": { "name": "test-deployment", "labels": { "app": "test" } }, "spec": { "replicas": 3, "selector": { "matchLabels": { "app": "test-app" } }, "template": { "metadata": { "annotations": { "your-organization.com/department-v1": "test-example-v1", "your-organization.com/department-v2": "test-example-v2" }, "labels": { "app": "test-app", "environment": "production" } }, "spec": { "nodeSelector": { "your-organization/node-test": "test-node" }, "containers": [ { "name": "nginx", "image": "nginx:1.14.2", "ports": [ { "containerPort": 80 } ] } ], "affinity": { "nodeAffinity": { "requiredDuringSchedulingIgnoredDuringExecution": { "nodeSelectorTerms": [ { "matchExpressions": [ { "key": "disk-type", "operator": "In", "values": [ "ssd", "sas" ] }, { "key": "cpu-num", "operator": "Gt", "values": [ "6" ] } ] } ] } } } } } } }
      void setClusterId​(String ClusterId)
      Set TKE或EKS集群ID
      void setConfig​(String Config)
      Set 自定义权限 如: { "apiVersion": "v1", "clusters": [ { "cluster": { "certificate-authority-data": "xxxxxx==", "server": "https://xxxxx.com" }, "name": "cls-xxxxx" } ], "contexts": [ { "context": { "cluster": "cls-xxxxx", "user": "100014xxxxx" }, "name": "cls-a44yhcxxxxxxxxxx" } ], "current-context": "cls-a4xxxx-context-default", "kind": "Config", "preferences": {}, "users": [ { "name": "100014xxxxx", "user": { "client-certificate-data": "xxxxxx", "client-key-data": "xxxxxx" } } ] }
      void setParameter​(String Parameter)
      Set 自定义参数 如: { "apiVersion": "apps/v1", "kind": "Deployment", "metadata": { "name": "test-deployment", "labels": { "app": "test" } }, "spec": { "replicas": 3, "selector": { "matchLabels": { "app": "test-app" } }, "template": { "metadata": { "annotations": { "your-organization.com/department-v1": "test-example-v1", "your-organization.com/department-v2": "test-example-v2" }, "labels": { "app": "test-app", "environment": "production" } }, "spec": { "nodeSelector": { "your-organization/node-test": "test-node" }, "containers": [ { "name": "nginx", "image": "nginx:1.14.2", "ports": [ { "containerPort": 80 } ] } ], "affinity": { "nodeAffinity": { "requiredDuringSchedulingIgnoredDuringExecution": { "nodeSelectorTerms": [ { "matchExpressions": [ { "key": "disk-type", "operator": "In", "values": [ "ssd", "sas" ] }, { "key": "cpu-num", "operator": "Gt", "values": [ "6" ] } ] } ] } } } } } } }
      void toMap​(HashMap<String,​String> map, String prefix)
      Internal implementation, normal users should not use it.
    • Constructor Detail

      • PodParameter

        public PodParameter()
      • PodParameter

        public PodParameter​(PodParameter source)
        NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy, and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
    • Method Detail

      • getClusterId

        public String getClusterId()
        Get TKE或EKS集群ID
        Returns:
        ClusterId TKE或EKS集群ID
      • setClusterId

        public void setClusterId​(String ClusterId)
        Set TKE或EKS集群ID
        Parameters:
        ClusterId - TKE或EKS集群ID
      • getConfig

        public String getConfig()
        Get 自定义权限 如: { "apiVersion": "v1", "clusters": [ { "cluster": { "certificate-authority-data": "xxxxxx==", "server": "https://xxxxx.com" }, "name": "cls-xxxxx" } ], "contexts": [ { "context": { "cluster": "cls-xxxxx", "user": "100014xxxxx" }, "name": "cls-a44yhcxxxxxxxxxx" } ], "current-context": "cls-a4xxxx-context-default", "kind": "Config", "preferences": {}, "users": [ { "name": "100014xxxxx", "user": { "client-certificate-data": "xxxxxx", "client-key-data": "xxxxxx" } } ] }
        Returns:
        Config 自定义权限 如: { "apiVersion": "v1", "clusters": [ { "cluster": { "certificate-authority-data": "xxxxxx==", "server": "https://xxxxx.com" }, "name": "cls-xxxxx" } ], "contexts": [ { "context": { "cluster": "cls-xxxxx", "user": "100014xxxxx" }, "name": "cls-a44yhcxxxxxxxxxx" } ], "current-context": "cls-a4xxxx-context-default", "kind": "Config", "preferences": {}, "users": [ { "name": "100014xxxxx", "user": { "client-certificate-data": "xxxxxx", "client-key-data": "xxxxxx" } } ] }
      • setConfig

        public void setConfig​(String Config)
        Set 自定义权限 如: { "apiVersion": "v1", "clusters": [ { "cluster": { "certificate-authority-data": "xxxxxx==", "server": "https://xxxxx.com" }, "name": "cls-xxxxx" } ], "contexts": [ { "context": { "cluster": "cls-xxxxx", "user": "100014xxxxx" }, "name": "cls-a44yhcxxxxxxxxxx" } ], "current-context": "cls-a4xxxx-context-default", "kind": "Config", "preferences": {}, "users": [ { "name": "100014xxxxx", "user": { "client-certificate-data": "xxxxxx", "client-key-data": "xxxxxx" } } ] }
        Parameters:
        Config - 自定义权限 如: { "apiVersion": "v1", "clusters": [ { "cluster": { "certificate-authority-data": "xxxxxx==", "server": "https://xxxxx.com" }, "name": "cls-xxxxx" } ], "contexts": [ { "context": { "cluster": "cls-xxxxx", "user": "100014xxxxx" }, "name": "cls-a44yhcxxxxxxxxxx" } ], "current-context": "cls-a4xxxx-context-default", "kind": "Config", "preferences": {}, "users": [ { "name": "100014xxxxx", "user": { "client-certificate-data": "xxxxxx", "client-key-data": "xxxxxx" } } ] }
      • getParameter

        public String getParameter()
        Get 自定义参数 如: { "apiVersion": "apps/v1", "kind": "Deployment", "metadata": { "name": "test-deployment", "labels": { "app": "test" } }, "spec": { "replicas": 3, "selector": { "matchLabels": { "app": "test-app" } }, "template": { "metadata": { "annotations": { "your-organization.com/department-v1": "test-example-v1", "your-organization.com/department-v2": "test-example-v2" }, "labels": { "app": "test-app", "environment": "production" } }, "spec": { "nodeSelector": { "your-organization/node-test": "test-node" }, "containers": [ { "name": "nginx", "image": "nginx:1.14.2", "ports": [ { "containerPort": 80 } ] } ], "affinity": { "nodeAffinity": { "requiredDuringSchedulingIgnoredDuringExecution": { "nodeSelectorTerms": [ { "matchExpressions": [ { "key": "disk-type", "operator": "In", "values": [ "ssd", "sas" ] }, { "key": "cpu-num", "operator": "Gt", "values": [ "6" ] } ] } ] } } } } } } }
        Returns:
        Parameter 自定义参数 如: { "apiVersion": "apps/v1", "kind": "Deployment", "metadata": { "name": "test-deployment", "labels": { "app": "test" } }, "spec": { "replicas": 3, "selector": { "matchLabels": { "app": "test-app" } }, "template": { "metadata": { "annotations": { "your-organization.com/department-v1": "test-example-v1", "your-organization.com/department-v2": "test-example-v2" }, "labels": { "app": "test-app", "environment": "production" } }, "spec": { "nodeSelector": { "your-organization/node-test": "test-node" }, "containers": [ { "name": "nginx", "image": "nginx:1.14.2", "ports": [ { "containerPort": 80 } ] } ], "affinity": { "nodeAffinity": { "requiredDuringSchedulingIgnoredDuringExecution": { "nodeSelectorTerms": [ { "matchExpressions": [ { "key": "disk-type", "operator": "In", "values": [ "ssd", "sas" ] }, { "key": "cpu-num", "operator": "Gt", "values": [ "6" ] } ] } ] } } } } } } }
      • setParameter

        public void setParameter​(String Parameter)
        Set 自定义参数 如: { "apiVersion": "apps/v1", "kind": "Deployment", "metadata": { "name": "test-deployment", "labels": { "app": "test" } }, "spec": { "replicas": 3, "selector": { "matchLabels": { "app": "test-app" } }, "template": { "metadata": { "annotations": { "your-organization.com/department-v1": "test-example-v1", "your-organization.com/department-v2": "test-example-v2" }, "labels": { "app": "test-app", "environment": "production" } }, "spec": { "nodeSelector": { "your-organization/node-test": "test-node" }, "containers": [ { "name": "nginx", "image": "nginx:1.14.2", "ports": [ { "containerPort": 80 } ] } ], "affinity": { "nodeAffinity": { "requiredDuringSchedulingIgnoredDuringExecution": { "nodeSelectorTerms": [ { "matchExpressions": [ { "key": "disk-type", "operator": "In", "values": [ "ssd", "sas" ] }, { "key": "cpu-num", "operator": "Gt", "values": [ "6" ] } ] } ] } } } } } } }
        Parameters:
        Parameter - 自定义参数 如: { "apiVersion": "apps/v1", "kind": "Deployment", "metadata": { "name": "test-deployment", "labels": { "app": "test" } }, "spec": { "replicas": 3, "selector": { "matchLabels": { "app": "test-app" } }, "template": { "metadata": { "annotations": { "your-organization.com/department-v1": "test-example-v1", "your-organization.com/department-v2": "test-example-v2" }, "labels": { "app": "test-app", "environment": "production" } }, "spec": { "nodeSelector": { "your-organization/node-test": "test-node" }, "containers": [ { "name": "nginx", "image": "nginx:1.14.2", "ports": [ { "containerPort": 80 } ] } ], "affinity": { "nodeAffinity": { "requiredDuringSchedulingIgnoredDuringExecution": { "nodeSelectorTerms": [ { "matchExpressions": [ { "key": "disk-type", "operator": "In", "values": [ "ssd", "sas" ] }, { "key": "cpu-num", "operator": "Gt", "values": [ "6" ] } ] } ] } } } } } } }