public class PodParameter extends AbstractModel
Constructor and 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.
|
Modifier and Type | Method and 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.
|
any, fromJsonString, getBinaryParams, getMultipartRequestParams, set, setParamArrayObj, setParamArraySimple, setParamObj, setParamSimple, toJsonString
public PodParameter()
public PodParameter(PodParameter source)
public String getClusterId()
public void setClusterId(String ClusterId)
ClusterId
- TKE或EKS集群IDpublic String getConfig()
public void setConfig(String Config)
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"
}
}
]
}public String getParameter()
public void setParameter(String Parameter)
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"
]
}
]
}
]
}
}
}
}
}
}
}Copyright © 2022. All rights reserved.