From 401e8f26e922ae242b2855de68263008b425c71d Mon Sep 17 00:00:00 2001 From: Kagashino Date: Fri, 8 Oct 2021 17:05:33 +0800 Subject: [PATCH] feat: tke - cluster support authentication options. --- go.mod | 4 +- go.sum | 4 + .../resource_tc_kubernetes_cluster.go | 65 + tencentcloud/service_tencentcloud_tke.go | 44 + .../tencentcloud/common/http/request.go | 2 +- .../tencentcloud/tke/v20180525/client.go | 379 +++++ .../tencentcloud/tke/v20180525/errors.go | 18 + .../tencentcloud/tke/v20180525/models.go | 1323 ++++++++++++++++- vendor/modules.txt | 4 +- .../docs/r/kubernetes_cluster.html.markdown | 7 + 10 files changed, 1797 insertions(+), 53 deletions(-) diff --git a/go.mod b/go.mod index fefda2d27d..f167effbe5 100644 --- a/go.mod +++ b/go.mod @@ -27,7 +27,7 @@ require ( github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ckafka v1.0.199 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/clb v1.0.199 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cloudaudit v1.0.199 - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.234 + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.264 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm v1.0.199 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cynosdb v1.0.199 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dayu v1.0.199 @@ -47,7 +47,7 @@ require ( github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tag v1.0.199 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tcaplusdb v1.0.199 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tcr v1.0.199 - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.0.234 + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.0.264 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vod v1.0.199 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc v1.0.199 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/wss v1.0.199 diff --git a/go.sum b/go.sum index b2498092fa..8503fcbcb7 100644 --- a/go.sum +++ b/go.sum @@ -469,6 +469,8 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cloudaudit v1.0.199/go. github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.194/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.234 h1:yAtw4jVBsQZ/KcM2nMHRzcpIfSXRw0Alt7wVTR9OodM= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.234/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.264 h1:USf7I8ohzoqCwAcCHz5rz0hD57mmNXZgrLfxFLx1WmA= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.264/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm v1.0.199 h1:ajgJogYSIQ5u1PIbiV5nsvr5K0fYpm1/T7Dy+mxEM6U= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm v1.0.199/go.mod h1:AqyM/ZZMD7q5mHBqNY9YImbSpEpoEe7E/vrTbUWX+po= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cynosdb v1.0.199 h1:L0twFkJMOZzLkX08w8S14nX6oanD8YxMQDIaYXVim6A= @@ -510,6 +512,8 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tcr v1.0.199 h1:ku4oDXW github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tcr v1.0.199/go.mod h1:SEUO10oGtg+4AGCfpJDn9ynf47P+ZiyvhzOyXLt0mOY= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.0.234 h1:bJU0a3yEir4BHTiIHgLvsVqDAFeuHe/r3PML3V92R/o= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.0.234/go.mod h1:ij3CHdPvqI2aSMcl7+jdI0yCO7oOiywKTAa55qmO2iI= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.0.264 h1:nKf15bAypO5ZY8cF4qNvU3ttgaiquuniK5WEhFt36X8= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.0.264/go.mod h1:ij3CHdPvqI2aSMcl7+jdI0yCO7oOiywKTAa55qmO2iI= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vod v1.0.199 h1:6Yt74l4pA5QtzhwMNIEUt0spXdSBKH744DDqTHJOCP0= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vod v1.0.199/go.mod h1:Yw6OQ33z3s4k0HVYTNSffB12qOzEJ2Zf1Vj4+5S3sRs= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc v1.0.199 h1:UDZ59pvaqjDy2QIsMsv9hxm0BEJLmPIbHF1ms0MqaRk= diff --git a/tencentcloud/resource_tc_kubernetes_cluster.go b/tencentcloud/resource_tc_kubernetes_cluster.go index a6d2fa624a..9051ee8980 100644 --- a/tencentcloud/resource_tc_kubernetes_cluster.go +++ b/tencentcloud/resource_tc_kubernetes_cluster.go @@ -1118,6 +1118,32 @@ func resourceTencentCloudTkeCluster() *schema.Resource { }, Description: "create tke cluster by existed instances.", }, + "auth_options": { + Type: schema.TypeList, + Optional: true, + MaxItems: 1, + Elem: &schema.Resource{ + Schema: map[string]*schema.Schema{ + "jwks_uri": { + Type: schema.TypeString, + Optional: true, + Description: "Specify service-account-jwks-uri.", + }, + "issuer": { + Type: schema.TypeString, + Optional: true, + Description: "Specify service-account-issuer.", + }, + "auto_create_discovery_anonymous_auth": { + Type: schema.TypeBool, + Optional: true, + Description: "If set to `true`, the rbac rule will be created automatically which allow anonymous user to access '/.well-known/openid-configuration' and '/openid/v1/jwks'.", + }, + + }, + }, + Description: "Specify cluster authentication configuration. Only available for managed cluster and `cluster_version` >= 1.20.", + }, "tags": { Type: schema.TypeMap, Optional: true, @@ -1518,6 +1544,37 @@ func tkeGetNodePoolGlobalConfig(d *schema.ResourceData) *tke.ModifyClusterAsGrou return request } +func tkeGetAuthOptions (d *schema.ResourceData) *tke.ModifyClusterAuthenticationOptionsRequest { + raw, ok := d.GetOk("auth_options") + options := raw.([]interface{}) + + if !ok || len(options) == 0 { + return nil + } + + option := options[0].(map[string]interface{}) + request := tke.NewModifyClusterAuthenticationOptionsRequest() + request.ClusterId = helper.String(d.Id()) + + request.ServiceAccounts = &tke.ServiceAccountAuthenticationOptions{ + AutoCreateDiscoveryAnonymousAuth: helper.Bool(false), + } + + if v, ok := option["auto_create_discovery_anonymous_auth"]; ok { + request.ServiceAccounts.AutoCreateDiscoveryAnonymousAuth = helper.Bool(v.(bool)) + } + + if v, ok := option["issuer"]; ok { + request.ServiceAccounts.Issuer = helper.String(v.(string)) + } + + if v, ok := option["jwks_uri"]; ok { + request.ServiceAccounts.JWKSURI = helper.String(v.(string)) + } + + return request +} + // upgradeClusterInstances upgrade instances, upgrade type try seq:major, hot. func upgradeClusterInstances(tkeService TkeService, ctx context.Context, id string) error { // get all available instances for upgrade @@ -2551,6 +2608,14 @@ func resourceTencentCloudTkeClusterUpdate(d *schema.ResourceData, meta interface d.SetPartial("node_pool_global_config") } + if d.HasChange("auth_options") { + request := tkeGetAuthOptions(d) + if err := tkeService.ModifyClusterAuthenticationOptions(ctx, request); err != nil { + return err + } + d.SetPartial("auth_options") + } + d.Partial(false) if err := resourceTencentCloudTkeClusterRead(d, meta); err != nil { log.Printf("[WARN]%s resource.kubernetes_cluster.read after update fail , %s", logId, err.Error()) diff --git a/tencentcloud/service_tencentcloud_tke.go b/tencentcloud/service_tencentcloud_tke.go index 76f0c04193..07c06bb418 100644 --- a/tencentcloud/service_tencentcloud_tke.go +++ b/tencentcloud/service_tencentcloud_tke.go @@ -1380,3 +1380,47 @@ func (me *TkeService) DescribeClusterNodePoolGlobalConfig(ctx context.Context, c return } + +// DescribeClusterAuthenticationOptions +// Field `ServiceAccounts.AutoCreateDiscoveryAnonymousAuth` will always return null by design +// For argument consistency, we will not fetch this options when tf reading tke cluster resource +func (me *TkeService) DescribeClusterAuthenticationOptions(ctx context.Context, id string) (options *tke.ServiceAccountAuthenticationOptions, state string, errRet error) { + logId := getLogId(ctx) + request := tke.NewDescribeClusterAuthenticationOptionsRequest() + request.ClusterId = helper.String(id) + defer func() { + if errRet != nil { + log.Printf("[CRITAL]%s api[%s] fail, reason[%s]\n", logId, request.GetAction(), errRet.Error()) + } + }() + + ratelimit.Check(request.GetAction()) + res, err := me.client.UseTkeClient().DescribeClusterAuthenticationOptions(request) + if err != nil { + errRet = err + } + + if res.Response != nil { + state = *res.Response.LatestOperationState + options = res.Response.ServiceAccounts + } + + return +} + + +func (me *TkeService) ModifyClusterAuthenticationOptions(ctx context.Context, request *tke.ModifyClusterAuthenticationOptionsRequest) (errRet error) { + logId := getLogId(ctx) + defer func() { + if errRet != nil { + log.Printf("[CRITAL]%s api[%s] fail, reason[%s]\n", logId, request.GetAction(), errRet.Error()) + } + }() + + ratelimit.Check(request.GetAction()) + _, err := me.client.UseTkeClient().ModifyClusterAuthenticationOptions(request) + if err != nil { + errRet = err + } + return +} \ No newline at end of file diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go index b783d677c1..d7e6966b75 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http/request.go @@ -192,7 +192,7 @@ func CompleteCommonParams(request Request, region string) { params["Action"] = request.GetAction() params["Timestamp"] = strconv.FormatInt(time.Now().Unix(), 10) params["Nonce"] = strconv.Itoa(rand.Int()) - params["RequestClient"] = "SDK_GO_1.0.234" + params["RequestClient"] = "SDK_GO_1.0.264" } func ConstructParams(req Request) (err error) { diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/client.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/client.go index de29575773..db3a5a0cf1 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/client.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/client.go @@ -715,6 +715,41 @@ func (c *Client) CreateEKSCluster(request *CreateEKSClusterRequest) (response *C return } +func NewCreateEKSContainerInstancesRequest() (request *CreateEKSContainerInstancesRequest) { + request = &CreateEKSContainerInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "CreateEKSContainerInstances") + return +} + +func NewCreateEKSContainerInstancesResponse() (response *CreateEKSContainerInstancesResponse) { + response = &CreateEKSContainerInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// CreateEKSContainerInstances +// 创建容器实例 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_CMDTIMEOUT = "InternalError.CmdTimeout" +// INTERNALERROR_PARAM = "InternalError.Param" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER = "InvalidParameter" +func (c *Client) CreateEKSContainerInstances(request *CreateEKSContainerInstancesRequest) (response *CreateEKSContainerInstancesResponse, err error) { + if request == nil { + request = NewCreateEKSContainerInstancesRequest() + } + response = NewCreateEKSContainerInstancesResponse() + err = c.Send(request, response) + return +} + func NewCreatePrometheusAlertRuleRequest() (request *CreatePrometheusAlertRuleRequest) { request = &CreatePrometheusAlertRuleRequest{ BaseRequest: &tchttp.BaseRequest{}, @@ -1169,6 +1204,42 @@ func (c *Client) DeleteEKSCluster(request *DeleteEKSClusterRequest) (response *D return } +func NewDeleteEKSContainerInstancesRequest() (request *DeleteEKSContainerInstancesRequest) { + request = &DeleteEKSContainerInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DeleteEKSContainerInstances") + return +} + +func NewDeleteEKSContainerInstancesResponse() (response *DeleteEKSContainerInstancesResponse) { + response = &DeleteEKSContainerInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DeleteEKSContainerInstances +// 删除容器实例,可批量删除 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_CONTAINERNOTFOUND = "InternalError.ContainerNotFound" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER = "InvalidParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DeleteEKSContainerInstances(request *DeleteEKSContainerInstancesRequest) (response *DeleteEKSContainerInstancesResponse, err error) { + if request == nil { + request = NewDeleteEKSContainerInstancesRequest() + } + response = NewDeleteEKSContainerInstancesResponse() + err = c.Send(request, response) + return +} + func NewDeletePrometheusAlertRuleRequest() (request *DeletePrometheusAlertRuleRequest) { request = &DeletePrometheusAlertRuleRequest{ BaseRequest: &tchttp.BaseRequest{}, @@ -1383,6 +1454,38 @@ func (c *Client) DescribeClusterAsGroups(request *DescribeClusterAsGroupsRequest return } +func NewDescribeClusterAuthenticationOptionsRequest() (request *DescribeClusterAuthenticationOptionsRequest) { + request = &DescribeClusterAuthenticationOptionsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeClusterAuthenticationOptions") + return +} + +func NewDescribeClusterAuthenticationOptionsResponse() (response *DescribeClusterAuthenticationOptionsResponse) { + response = &DescribeClusterAuthenticationOptionsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeClusterAuthenticationOptions +// 查看集群认证配置 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// OPERATIONDENIED = "OperationDenied" +// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" +func (c *Client) DescribeClusterAuthenticationOptions(request *DescribeClusterAuthenticationOptionsRequest) (response *DescribeClusterAuthenticationOptionsResponse, err error) { + if request == nil { + request = NewDescribeClusterAuthenticationOptionsRequest() + } + response = NewDescribeClusterAuthenticationOptionsResponse() + err = c.Send(request, response) + return +} + func NewDescribeClusterCommonNamesRequest() (request *DescribeClusterCommonNamesRequest) { request = &DescribeClusterCommonNamesRequest{ BaseRequest: &tchttp.BaseRequest{}, @@ -1931,6 +2034,144 @@ func (c *Client) DescribeEKSClusters(request *DescribeEKSClustersRequest) (respo return } +func NewDescribeEKSContainerInstanceEventRequest() (request *DescribeEKSContainerInstanceEventRequest) { + request = &DescribeEKSContainerInstanceEventRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeEKSContainerInstanceEvent") + return +} + +func NewDescribeEKSContainerInstanceEventResponse() (response *DescribeEKSContainerInstanceEventResponse) { + response = &DescribeEKSContainerInstanceEventResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeEKSContainerInstanceEvent +// 查询容器实例的事件 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// LIMITEXCEEDED = "LimitExceeded" +// RESOURCEINSUFFICIENT = "ResourceInsufficient" +// RESOURCEUNAVAILABLE = "ResourceUnavailable" +// RESOURCESSOLDOUT = "ResourcesSoldOut" +// UNKNOWNPARAMETER = "UnknownParameter" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) DescribeEKSContainerInstanceEvent(request *DescribeEKSContainerInstanceEventRequest) (response *DescribeEKSContainerInstanceEventResponse, err error) { + if request == nil { + request = NewDescribeEKSContainerInstanceEventRequest() + } + response = NewDescribeEKSContainerInstanceEventResponse() + err = c.Send(request, response) + return +} + +func NewDescribeEKSContainerInstanceRegionsRequest() (request *DescribeEKSContainerInstanceRegionsRequest) { + request = &DescribeEKSContainerInstanceRegionsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeEKSContainerInstanceRegions") + return +} + +func NewDescribeEKSContainerInstanceRegionsResponse() (response *DescribeEKSContainerInstanceRegionsResponse) { + response = &DescribeEKSContainerInstanceRegionsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeEKSContainerInstanceRegions +// 查询容器实例支持的地域 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// INTERNALERROR = "InternalError" +// INTERNALERROR_ACCOUNTUSERNOTAUTHENTICATED = "InternalError.AccountUserNotAuthenticated" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_PARAM = "InternalError.Param" +// INVALIDPARAMETER = "InvalidParameter" +func (c *Client) DescribeEKSContainerInstanceRegions(request *DescribeEKSContainerInstanceRegionsRequest) (response *DescribeEKSContainerInstanceRegionsResponse, err error) { + if request == nil { + request = NewDescribeEKSContainerInstanceRegionsRequest() + } + response = NewDescribeEKSContainerInstanceRegionsResponse() + err = c.Send(request, response) + return +} + +func NewDescribeEKSContainerInstancesRequest() (request *DescribeEKSContainerInstancesRequest) { + request = &DescribeEKSContainerInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeEKSContainerInstances") + return +} + +func NewDescribeEKSContainerInstancesResponse() (response *DescribeEKSContainerInstancesResponse) { + response = &DescribeEKSContainerInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeEKSContainerInstances +// 查询容器实例 +// +// 可能返回的错误码: +// FAILEDOPERATION = "FailedOperation" +// FAILEDOPERATION_RBACFORBIDDEN = "FailedOperation.RBACForbidden" +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) DescribeEKSContainerInstances(request *DescribeEKSContainerInstancesRequest) (response *DescribeEKSContainerInstancesResponse, err error) { + if request == nil { + request = NewDescribeEKSContainerInstancesRequest() + } + response = NewDescribeEKSContainerInstancesResponse() + err = c.Send(request, response) + return +} + +func NewDescribeEksContainerInstanceLogRequest() (request *DescribeEksContainerInstanceLogRequest) { + request = &DescribeEksContainerInstanceLogRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeEksContainerInstanceLog") + return +} + +func NewDescribeEksContainerInstanceLogResponse() (response *DescribeEksContainerInstanceLogResponse) { + response = &DescribeEksContainerInstanceLogResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeEksContainerInstanceLog +// 查询容器实例中容器日志 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_CONTAINERNOTFOUND = "InternalError.ContainerNotFound" +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// RESOURCENOTFOUND = "ResourceNotFound" +// RESOURCEUNAVAILABLE_EKSCONTAINERSTATUS = "ResourceUnavailable.EksContainerStatus" +func (c *Client) DescribeEksContainerInstanceLog(request *DescribeEksContainerInstanceLogRequest) (response *DescribeEksContainerInstanceLogResponse, err error) { + if request == nil { + request = NewDescribeEksContainerInstanceLogRequest() + } + response = NewDescribeEksContainerInstanceLogResponse() + err = c.Send(request, response) + return +} + func NewDescribeEnableVpcCniProgressRequest() (request *DescribeEnableVpcCniProgressRequest) { request = &DescribeEnableVpcCniProgressRequest{ BaseRequest: &tchttp.BaseRequest{}, @@ -2017,6 +2258,48 @@ func (c *Client) DescribeExistedInstances(request *DescribeExistedInstancesReque return } +func NewDescribeExternalClusterSpecRequest() (request *DescribeExternalClusterSpecRequest) { + request = &DescribeExternalClusterSpecRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "DescribeExternalClusterSpec") + return +} + +func NewDescribeExternalClusterSpecResponse() (response *DescribeExternalClusterSpecResponse) { + response = &DescribeExternalClusterSpecResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// DescribeExternalClusterSpec +// 获取导入第三方集群YAML定义 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INTERNALERROR_CAMNOAUTH = "InternalError.CamNoAuth" +// INTERNALERROR_DB = "InternalError.Db" +// INTERNALERROR_KUBERNETESCLIENTBUILDERROR = "InternalError.KubernetesClientBuildError" +// INTERNALERROR_KUBERNETESCREATEOPERATIONERROR = "InternalError.KubernetesCreateOperationError" +// INTERNALERROR_KUBERNETESDELETEOPERATIONERROR = "InternalError.KubernetesDeleteOperationError" +// INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" +// INTERNALERROR_WHITELISTUNEXPECTEDERROR = "InternalError.WhitelistUnexpectedError" +// INVALIDPARAMETER = "InvalidParameter" +// INVALIDPARAMETER_CLUSTERNOTFOUND = "InvalidParameter.ClusterNotFound" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND_CLUSTERNOTFOUND = "ResourceNotFound.ClusterNotFound" +// RESOURCENOTFOUND_KUBERNETESRESOURCENOTFOUND = "ResourceNotFound.KubernetesResourceNotFound" +// UNAUTHORIZEDOPERATION_CAMNOAUTH = "UnauthorizedOperation.CamNoAuth" +func (c *Client) DescribeExternalClusterSpec(request *DescribeExternalClusterSpecRequest) (response *DescribeExternalClusterSpecResponse, err error) { + if request == nil { + request = NewDescribeExternalClusterSpecRequest() + } + response = NewDescribeExternalClusterSpecResponse() + err = c.Send(request, response) + return +} + func NewDescribeImagesRequest() (request *DescribeImagesRequest) { request = &DescribeImagesRequest{ BaseRequest: &tchttp.BaseRequest{}, @@ -2752,6 +3035,38 @@ func (c *Client) ModifyClusterAttribute(request *ModifyClusterAttributeRequest) return } +func NewModifyClusterAuthenticationOptionsRequest() (request *ModifyClusterAuthenticationOptionsRequest) { + request = &ModifyClusterAuthenticationOptionsRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "ModifyClusterAuthenticationOptions") + return +} + +func NewModifyClusterAuthenticationOptionsResponse() (response *ModifyClusterAuthenticationOptionsResponse) { + response = &ModifyClusterAuthenticationOptionsResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// ModifyClusterAuthenticationOptions +// 修改集群认证配置 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER = "InvalidParameter" +// OPERATIONDENIED = "OperationDenied" +// RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" +func (c *Client) ModifyClusterAuthenticationOptions(request *ModifyClusterAuthenticationOptionsRequest) (response *ModifyClusterAuthenticationOptionsResponse, err error) { + if request == nil { + request = NewModifyClusterAuthenticationOptionsRequest() + } + response = NewModifyClusterAuthenticationOptionsResponse() + err = c.Send(request, response) + return +} + func NewModifyClusterEndpointSPRequest() (request *ModifyClusterEndpointSPRequest) { request = &ModifyClusterEndpointSPRequest{ BaseRequest: &tchttp.BaseRequest{}, @@ -2784,6 +3099,7 @@ func NewModifyClusterEndpointSPResponse() (response *ModifyClusterEndpointSPResp // INVALIDPARAMETER_PARAM = "InvalidParameter.Param" // LIMITEXCEEDED = "LimitExceeded" // MISSINGPARAMETER = "MissingParameter" +// OPERATIONDENIED = "OperationDenied" // RESOURCEINUSE = "ResourceInUse" // RESOURCENOTFOUND = "ResourceNotFound" // RESOURCEUNAVAILABLE = "ResourceUnavailable" @@ -3003,6 +3319,37 @@ func (c *Client) RemoveNodeFromNodePool(request *RemoveNodeFromNodePoolRequest) return } +func NewRestartEKSContainerInstancesRequest() (request *RestartEKSContainerInstancesRequest) { + request = &RestartEKSContainerInstancesRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "RestartEKSContainerInstances") + return +} + +func NewRestartEKSContainerInstancesResponse() (response *RestartEKSContainerInstancesResponse) { + response = &RestartEKSContainerInstancesResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// RestartEKSContainerInstances +// 重启弹性容器实例,支持批量操作 +// +// 可能返回的错误码: +// INTERNALERROR_UNEXCEPTEDINTERNAL = "InternalError.UnexceptedInternal" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// RESOURCENOTFOUND = "ResourceNotFound" +func (c *Client) RestartEKSContainerInstances(request *RestartEKSContainerInstancesRequest) (response *RestartEKSContainerInstancesResponse, err error) { + if request == nil { + request = NewRestartEKSContainerInstancesRequest() + } + response = NewRestartEKSContainerInstancesResponse() + err = c.Send(request, response) + return +} + func NewSetNodePoolNodeProtectionRequest() (request *SetNodePoolNodeProtectionRequest) { request = &SetNodePoolNodeProtectionRequest{ BaseRequest: &tchttp.BaseRequest{}, @@ -3064,6 +3411,7 @@ func NewSyncPrometheusTemplateResponse() (response *SyncPrometheusTemplateRespon // INTERNALERROR_PARAM = "InternalError.Param" // INTERNALERROR_UNEXPECTEDINTERNAL = "InternalError.UnexpectedInternal" // INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// INVALIDPARAMETER_PROMCLUSTERNOTFOUND = "InvalidParameter.PromClusterNotFound" // INVALIDPARAMETER_PROMINSTANCENOTFOUND = "InvalidParameter.PromInstanceNotFound" // INVALIDPARAMETER_RESOURCENOTFOUND = "InvalidParameter.ResourceNotFound" func (c *Client) SyncPrometheusTemplate(request *SyncPrometheusTemplateRequest) (response *SyncPrometheusTemplateResponse, err error) { @@ -3150,6 +3498,37 @@ func (c *Client) UpdateEKSCluster(request *UpdateEKSClusterRequest) (response *U return } +func NewUpdateEKSContainerInstanceRequest() (request *UpdateEKSContainerInstanceRequest) { + request = &UpdateEKSContainerInstanceRequest{ + BaseRequest: &tchttp.BaseRequest{}, + } + request.Init().WithApiInfo("tke", APIVersion, "UpdateEKSContainerInstance") + return +} + +func NewUpdateEKSContainerInstanceResponse() (response *UpdateEKSContainerInstanceResponse) { + response = &UpdateEKSContainerInstanceResponse{ + BaseResponse: &tchttp.BaseResponse{}, + } + return +} + +// UpdateEKSContainerInstance +// 更新容器实例 +// +// 可能返回的错误码: +// INTERNALERROR = "InternalError" +// INVALIDPARAMETER_PARAM = "InvalidParameter.Param" +// UNSUPPORTEDOPERATION = "UnsupportedOperation" +func (c *Client) UpdateEKSContainerInstance(request *UpdateEKSContainerInstanceRequest) (response *UpdateEKSContainerInstanceResponse, err error) { + if request == nil { + request = NewUpdateEKSContainerInstanceRequest() + } + response = NewUpdateEKSContainerInstanceResponse() + err = c.Send(request, response) + return +} + func NewUpgradeClusterInstancesRequest() (request *UpgradeClusterInstancesRequest) { request = &UpgradeClusterInstancesRequest{ BaseRequest: &tchttp.BaseRequest{}, diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/errors.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/errors.go index fc7ec16991..b89dc1c0d3 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/errors.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/errors.go @@ -20,6 +20,9 @@ const ( // 操作失败。 FAILEDOPERATION = "FailedOperation" + // 子账户RBAC权限不足。 + FAILEDOPERATION_RBACFORBIDDEN = "FailedOperation.RBACForbidden" + // 内部错误。 INTERNALERROR = "InternalError" @@ -65,12 +68,18 @@ const ( // 集群节点版本过低。 INTERNALERROR_CLUSTERUPGRADENODEVERSION = "InternalError.ClusterUpgradeNodeVersion" + // 执行命令超时。 + INTERNALERROR_CMDTIMEOUT = "InternalError.CmdTimeout" + // 内部HTTP客户端错误。 INTERNALERROR_COMPONENTCLIENTHTTP = "InternalError.ComponentClientHttp" // 请求(http请求)其他云服务失败。 INTERNALERROR_COMPONENTCLINETHTTP = "InternalError.ComponentClinetHttp" + // 容器未找到。 + INTERNALERROR_CONTAINERNOTFOUND = "InternalError.ContainerNotFound" + // 创建集群失败。 INTERNALERROR_CREATEMASTERFAILED = "InternalError.CreateMasterFailed" @@ -266,6 +275,9 @@ const ( // 资源被占用。 RESOURCEINUSE = "ResourceInUse" + // 资源不足。 + RESOURCEINSUFFICIENT = "ResourceInsufficient" + // 资源不存在。 RESOURCENOTFOUND = "ResourceNotFound" @@ -290,6 +302,12 @@ const ( // 集群状态不支持该操作。 RESOURCEUNAVAILABLE_CLUSTERSTATE = "ResourceUnavailable.ClusterState" + // Eks Container Instance状态不支持改操作。 + RESOURCEUNAVAILABLE_EKSCONTAINERSTATUS = "ResourceUnavailable.EksContainerStatus" + + // 资源售罄。 + RESOURCESSOLDOUT = "ResourcesSoldOut" + // 未授权操作。 UNAUTHORIZEDOPERATION = "UnauthorizedOperation" diff --git a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/models.go b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/models.go index f73fc333ca..b6e1b22fb8 100644 --- a/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/models.go +++ b/vendor/github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525/models.go @@ -352,6 +352,26 @@ type AutoscalingAdded struct { Total *int64 `json:"Total,omitempty" name:"Total"` } +type Capabilities struct { + + // 启用安全能力项列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + Add []*string `json:"Add,omitempty" name:"Add"` + + // 禁用安全能力向列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + Drop []*string `json:"Drop,omitempty" name:"Drop"` +} + +type CbsVolume struct { + + // cbs volume 数据卷名称 + Name *string `json:"Name,omitempty" name:"Name"` + + // 腾讯云cbs盘Id + CbsDiskId *string `json:"CbsDiskId,omitempty" name:"CbsDiskId"` +} + type CheckInstancesUpgradeAbleRequest struct { *tchttp.BaseRequest @@ -688,7 +708,7 @@ type ClusterCIDRSettings struct { // 集群中每个Node上最大的Pod数量。取值范围4~256。不为2的幂值时会向上取最接近的2的幂值。 MaxNodePodNum *uint64 `json:"MaxNodePodNum,omitempty" name:"MaxNodePodNum"` - // 集群最大的service数量。取值范围32~32768,不为2的幂值时会向上取最接近的2的幂值。 + // 集群最大的service数量。取值范围32~32768,不为2的幂值时会向上取最接近的2的幂值。默认值256 MaxClusterServiceNum *uint64 `json:"MaxClusterServiceNum,omitempty" name:"MaxClusterServiceNum"` // 用于分配集群服务 IP 的 CIDR,不得与 VPC CIDR 冲突,也不得与同 VPC 内其他集群 CIDR 冲突。且网段范围必须在内网网段内,例如:10.1.0.0/14, 192.168.0.1/18,172.16.0.0/16。 @@ -807,6 +827,88 @@ type CommonName struct { CN *string `json:"CN,omitempty" name:"CN"` } +type Container struct { + + // 镜像 + Image *string `json:"Image,omitempty" name:"Image"` + + // 容器名 + Name *string `json:"Name,omitempty" name:"Name"` + + // 容器启动命令 + Commands []*string `json:"Commands,omitempty" name:"Commands"` + + // 容器启动参数 + Args []*string `json:"Args,omitempty" name:"Args"` + + // 容器内操作系统的环境变量 + EnvironmentVars []*EnvironmentVariable `json:"EnvironmentVars,omitempty" name:"EnvironmentVars"` + + // CPU,制改容器最多可使用的核数,该值不可超过容器实例的总核数。单位:核。 + Cpu *float64 `json:"Cpu,omitempty" name:"Cpu"` + + // 内存,限制该容器最多可使用的内存值,该值不可超过容器实例的总内存值。单位:GiB + Memory *float64 `json:"Memory,omitempty" name:"Memory"` + + // 数据卷挂载信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + VolumeMounts []*VolumeMount `json:"VolumeMounts,omitempty" name:"VolumeMounts"` + + // 当前状态 + // 注意:此字段可能返回 null,表示取不到有效值。 + CurrentState *ContainerState `json:"CurrentState,omitempty" name:"CurrentState"` + + // 重启次数 + // 注意:此字段可能返回 null,表示取不到有效值。 + RestartCount *uint64 `json:"RestartCount,omitempty" name:"RestartCount"` + + // 容器工作目录 + // 注意:此字段可能返回 null,表示取不到有效值。 + WorkingDir *string `json:"WorkingDir,omitempty" name:"WorkingDir"` + + // 存活探针 + // 注意:此字段可能返回 null,表示取不到有效值。 + LivenessProbe *LivenessOrReadinessProbe `json:"LivenessProbe,omitempty" name:"LivenessProbe"` + + // 就绪探针 + // 注意:此字段可能返回 null,表示取不到有效值。 + ReadinessProbe *LivenessOrReadinessProbe `json:"ReadinessProbe,omitempty" name:"ReadinessProbe"` + + // Gpu限制 + // 注意:此字段可能返回 null,表示取不到有效值。 + GpuLimit *uint64 `json:"GpuLimit,omitempty" name:"GpuLimit"` +} + +type ContainerState struct { + + // 容器运行开始时间 + // 注意:此字段可能返回 null,表示取不到有效值。 + StartTime *string `json:"StartTime,omitempty" name:"StartTime"` + + // 容器状态:created, running, exited, unknown + State *string `json:"State,omitempty" name:"State"` + + // 容器运行结束时间 + // 注意:此字段可能返回 null,表示取不到有效值。 + FinishTime *string `json:"FinishTime,omitempty" name:"FinishTime"` + + // 容器运行退出码 + // 注意:此字段可能返回 null,表示取不到有效值。 + ExitCode *int64 `json:"ExitCode,omitempty" name:"ExitCode"` + + // 容器状态 Reason + // 注意:此字段可能返回 null,表示取不到有效值。 + Reason *string `json:"Reason,omitempty" name:"Reason"` + + // 容器状态信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + Message *string `json:"Message,omitempty" name:"Message"` + + // 容器重启次数 + // 注意:此字段可能返回 null,表示取不到有效值。 + RestartCount *int64 `json:"RestartCount,omitempty" name:"RestartCount"` +} + type ControllerStatus struct { // 控制器的名字 @@ -1468,6 +1570,142 @@ func (r *CreateEKSClusterResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +type CreateEKSContainerInstancesRequest struct { + *tchttp.BaseRequest + + // 容器组 + Containers []*Container `json:"Containers,omitempty" name:"Containers"` + + // EKS Container Instance容器实例名称 + EksCiName *string `json:"EksCiName,omitempty" name:"EksCiName"` + + // 指定新创建实例所属于的安全组Id + SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds"` + + // 实例所属子网Id + SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` + + // 实例所属VPC的Id + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 内存,单位:GiB。可参考[资源规格](https://cloud.tencent.com/document/product/457/39808)文档 + Memory *float64 `json:"Memory,omitempty" name:"Memory"` + + // CPU,单位:核。可参考[资源规格](https://cloud.tencent.com/document/product/457/39808)文档 + Cpu *float64 `json:"Cpu,omitempty" name:"Cpu"` + + // 实例重启策略: Always(总是重启)、Never(从不重启)、OnFailure(失败时重启),默认:Always。 + RestartPolicy *string `json:"RestartPolicy,omitempty" name:"RestartPolicy"` + + // 镜像仓库凭证数组 + ImageRegistryCredentials []*ImageRegistryCredential `json:"ImageRegistryCredentials,omitempty" name:"ImageRegistryCredentials"` + + // 数据卷,包含NfsVolume数组和CbsVolume数组 + EksCiVolume *EksCiVolume `json:"EksCiVolume,omitempty" name:"EksCiVolume"` + + // 实例副本数,默认为1 + Replicas *int64 `json:"Replicas,omitempty" name:"Replicas"` + + // Init 容器 + InitContainers []*Container `json:"InitContainers,omitempty" name:"InitContainers"` + + // 自定义DNS配置 + DnsConfig *DNSConfig `json:"DnsConfig,omitempty" name:"DnsConfig"` + + // 用来绑定容器实例的已有EIP的列表。如传值,需要保证数值和Replicas相等。 + // 另外此参数和AutoCreateEipAttribute互斥。 + ExistedEipIds []*string `json:"ExistedEipIds,omitempty" name:"ExistedEipIds"` + + // 自动创建EIP的可选参数。若传此参数,则会自动创建EIP。 + // 另外此参数和ExistedEipIds互斥 + AutoCreateEipAttribute *EipAttribute `json:"AutoCreateEipAttribute,omitempty" name:"AutoCreateEipAttribute"` + + // 是否为容器实例自动创建EIP,默认为false。若传true,则此参数和ExistedEipIds互斥 + AutoCreateEip *bool `json:"AutoCreateEip,omitempty" name:"AutoCreateEip"` + + // Pod 所需的 CPU 资源型号,如果不填写则默认不强制指定 CPU 类型。目前支持型号如下: + // intel + // amd + // - 支持优先级顺序写法,如 “amd,intel” 表示优先创建 amd 资源 Pod,如果所选地域可用区 amd 资源不足,则会创建 intel 资源 Pod。 + CpuType *string `json:"CpuType,omitempty" name:"CpuType"` + + // 容器实例所需的 GPU 资源型号,目前支持型号如下: + // 1/4\*V100 + // 1/2\*V100 + // V100 + // 1/4\*T4 + // 1/2\*T4 + // T4 + GpuType *string `json:"GpuType,omitempty" name:"GpuType"` + + // Pod 所需的 GPU 数量,如填写,请确保为支持的规格。默认单位为卡,无需再次注明。 + GpuCount *uint64 `json:"GpuCount,omitempty" name:"GpuCount"` + + // 为容器实例关联 CAM 角色,value 填写 CAM 角色名称,容器实例可获取该 CAM 角色包含的权限策略,方便 容器实例 内的程序进行如购买资源、读写存储等云资源操作。 + CamRoleName *string `json:"CamRoleName,omitempty" name:"CamRoleName"` +} + +func (r *CreateEKSContainerInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateEKSContainerInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Containers") + delete(f, "EksCiName") + delete(f, "SecurityGroupIds") + delete(f, "SubnetId") + delete(f, "VpcId") + delete(f, "Memory") + delete(f, "Cpu") + delete(f, "RestartPolicy") + delete(f, "ImageRegistryCredentials") + delete(f, "EksCiVolume") + delete(f, "Replicas") + delete(f, "InitContainers") + delete(f, "DnsConfig") + delete(f, "ExistedEipIds") + delete(f, "AutoCreateEipAttribute") + delete(f, "AutoCreateEip") + delete(f, "CpuType") + delete(f, "GpuType") + delete(f, "GpuCount") + delete(f, "CamRoleName") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "CreateEKSContainerInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type CreateEKSContainerInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // EKS Container Instance Id集合,格式为eksci-xxx,是容器实例的唯一标识。 + EksCiIds []*string `json:"EksCiIds,omitempty" name:"EksCiIds"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *CreateEKSContainerInstancesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *CreateEKSContainerInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + type CreatePrometheusAlertRuleRequest struct { *tchttp.BaseRequest @@ -1625,6 +1863,32 @@ func (r *CreatePrometheusTemplateResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +type DNSConfig struct { + + // DNS 服务器IP地址列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + Nameservers []*string `json:"Nameservers,omitempty" name:"Nameservers"` + + // DNS搜索域列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + Searches []*string `json:"Searches,omitempty" name:"Searches"` + + // 对象选项列表,每个对象由name和value(可选)构成 + // 注意:此字段可能返回 null,表示取不到有效值。 + Options []*DNSConfigOption `json:"Options,omitempty" name:"Options"` +} + +type DNSConfigOption struct { + + // 配置项名称 + // 注意:此字段可能返回 null,表示取不到有效值。 + Name *string `json:"Name,omitempty" name:"Name"` + + // 项值 + // 注意:此字段可能返回 null,表示取不到有效值。 + Value *string `json:"Value,omitempty" name:"Value"` +} + type DataDisk struct { // 云盘类型 @@ -2126,6 +2390,56 @@ func (r *DeleteEKSClusterResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +type DeleteEKSContainerInstancesRequest struct { + *tchttp.BaseRequest + + // 需要删除的EksCi的Id。 最大数量不超过20 + EksCiIds []*string `json:"EksCiIds,omitempty" name:"EksCiIds"` + + // 是否释放为EksCi自动创建的Eip + ReleaseAutoCreatedEip *bool `json:"ReleaseAutoCreatedEip,omitempty" name:"ReleaseAutoCreatedEip"` +} + +func (r *DeleteEKSContainerInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteEKSContainerInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "EksCiIds") + delete(f, "ReleaseAutoCreatedEip") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DeleteEKSContainerInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DeleteEKSContainerInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DeleteEKSContainerInstancesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DeleteEKSContainerInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + type DeletePrometheusAlertRuleRequest struct { *tchttp.BaseRequest @@ -2444,6 +2758,60 @@ func (r *DescribeClusterAsGroupsResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +type DescribeClusterAuthenticationOptionsRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` +} + +func (r *DescribeClusterAuthenticationOptionsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeClusterAuthenticationOptionsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeClusterAuthenticationOptionsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeClusterAuthenticationOptionsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // ServiceAccount认证配置 + // 注意:此字段可能返回 null,表示取不到有效值。 + ServiceAccounts *ServiceAccountAuthenticationOptions `json:"ServiceAccounts,omitempty" name:"ServiceAccounts"` + + // 最近一次修改操作结果,返回值可能为:Updating,Success,Failed,TimeOut + // 注意:此字段可能返回 null,表示取不到有效值。 + LatestOperationState *string `json:"LatestOperationState,omitempty" name:"LatestOperationState"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeClusterAuthenticationOptionsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeClusterAuthenticationOptionsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + type DescribeClusterCommonNamesRequest struct { *tchttp.BaseRequest @@ -2738,6 +3106,9 @@ type DescribeClusterKubeconfigRequest struct { // 集群ID ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 默认false 获取内网,是否获取外网访问的kubeconfig + IsExtranet *bool `json:"IsExtranet,omitempty" name:"IsExtranet"` } func (r *DescribeClusterKubeconfigRequest) ToJsonString() string { @@ -2753,6 +3124,7 @@ func (r *DescribeClusterKubeconfigRequest) FromJsonString(s string) error { return err } delete(f, "ClusterId") + delete(f, "IsExtranet") if len(f) > 0 { return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeClusterKubeconfigRequest has unknown keys!", "") } @@ -3081,8 +3453,39 @@ type DescribeClustersRequest struct { // 最大输出条数,默认20,最大为100 Limit *int64 `json:"Limit,omitempty" name:"Limit"` - // 过滤条件,当前只支持按照单个条件ClusterName进行过滤 + // · ClusterName + // 按照【集群名】进行过滤。 + // 类型:String + // 必选:否 + // + // · Tags + // 按照【标签键值对】进行过滤。 + // 类型:String + // 必选:否 + // + // · vpc-id + // 按照【VPC】进行过滤。 + // 类型:String + // 必选:否 + // + // · tag-key + // 按照【标签键】进行过滤。 + // 类型:String + // 必选:否 + // + // · tag-value + // 按照【标签值】进行过滤。 + // 类型:String + // 必选:否 + // + // · tag:tag-key + // 按照【标签键值对】进行过滤。 + // 类型:String + // 必选:否 Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 集群类型,例如:MANAGED_CLUSTER + ClusterType *string `json:"ClusterType,omitempty" name:"ClusterType"` } func (r *DescribeClustersRequest) ToJsonString() string { @@ -3101,6 +3504,7 @@ func (r *DescribeClustersRequest) FromJsonString(s string) error { delete(f, "Offset") delete(f, "Limit") delete(f, "Filters") + delete(f, "ClusterType") if len(f) > 0 { return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeClustersRequest has unknown keys!", "") } @@ -3256,73 +3660,338 @@ func (r *DescribeEKSClustersResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } -type DescribeEnableVpcCniProgressRequest struct { +type DescribeEKSContainerInstanceEventRequest struct { *tchttp.BaseRequest - // 开启vpc-cni的集群ID - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + // 容器实例id + EksCiId *string `json:"EksCiId,omitempty" name:"EksCiId"` + + // 最大事件数量。默认为50,最大取值100。 + Limit *int64 `json:"Limit,omitempty" name:"Limit"` } -func (r *DescribeEnableVpcCniProgressRequest) ToJsonString() string { +func (r *DescribeEKSContainerInstanceEventRequest) ToJsonString() string { b, _ := json.Marshal(r) return string(b) } // FromJsonString It is highly **NOT** recommended to use this function // because it has no param check, nor strict type check -func (r *DescribeEnableVpcCniProgressRequest) FromJsonString(s string) error { +func (r *DescribeEKSContainerInstanceEventRequest) FromJsonString(s string) error { f := make(map[string]interface{}) if err := json.Unmarshal([]byte(s), &f); err != nil { return err } - delete(f, "ClusterId") + delete(f, "EksCiId") + delete(f, "Limit") if len(f) > 0 { - return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeEnableVpcCniProgressRequest has unknown keys!", "") + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeEKSContainerInstanceEventRequest has unknown keys!", "") } return json.Unmarshal([]byte(s), &r) } -type DescribeEnableVpcCniProgressResponse struct { +type DescribeEKSContainerInstanceEventResponse struct { *tchttp.BaseResponse Response *struct { - // 任务进度的描述:Running/Succeed/Failed - Status *string `json:"Status,omitempty" name:"Status"` + // 事件集合 + Events []*Event `json:"Events,omitempty" name:"Events"` - // 当任务进度为Failed时,对任务状态的进一步描述,例如IPAMD组件安装失败 - // 注意:此字段可能返回 null,表示取不到有效值。 - ErrorMessage *string `json:"ErrorMessage,omitempty" name:"ErrorMessage"` + // 容器实例id + EksCiId *string `json:"EksCiId,omitempty" name:"EksCiId"` // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 RequestId *string `json:"RequestId,omitempty" name:"RequestId"` } `json:"Response"` } -func (r *DescribeEnableVpcCniProgressResponse) ToJsonString() string { +func (r *DescribeEKSContainerInstanceEventResponse) ToJsonString() string { b, _ := json.Marshal(r) return string(b) } // FromJsonString It is highly **NOT** recommended to use this function // because it has no param check, nor strict type check -func (r *DescribeEnableVpcCniProgressResponse) FromJsonString(s string) error { +func (r *DescribeEKSContainerInstanceEventResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } -type DescribeExistedInstancesRequest struct { +type DescribeEKSContainerInstanceRegionsRequest struct { *tchttp.BaseRequest +} - // 集群 ID,请填写查询集群列表 接口中返回的 ClusterId 字段(仅通过ClusterId获取需要过滤条件中的VPCID。节点状态比较时会使用该地域下所有集群中的节点进行比较。参数不支持同时指定InstanceIds和ClusterId。 - ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` - - // 按照一个或者多个实例ID查询。实例ID形如:ins-xxxxxxxx。(此参数的具体格式可参考API简介的id.N一节)。每次请求的实例的上限为100。参数不支持同时指定InstanceIds和Filters。 - InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` - - // 过滤条件,字段和详见[CVM查询实例](https://cloud.tencent.com/document/api/213/15728)如果设置了ClusterId,会附加集群的VPCID作为查询字段,在此情况下如果在Filter中指定了"vpc-id"作为过滤字段,指定的VPCID必须与集群的VPCID相同。 - Filters []*Filter `json:"Filters,omitempty" name:"Filters"` - - // 实例IP进行过滤(同时支持内网IP和外网IP) - VagueIpAddress *string `json:"VagueIpAddress,omitempty" name:"VagueIpAddress"` +func (r *DescribeEKSContainerInstanceRegionsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeEKSContainerInstanceRegionsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeEKSContainerInstanceRegionsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeEKSContainerInstanceRegionsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // EKS Container Instance支持的地域信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + Regions []*EksCiRegionInfo `json:"Regions,omitempty" name:"Regions"` + + // 总数 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeEKSContainerInstanceRegionsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeEKSContainerInstanceRegionsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeEKSContainerInstancesRequest struct { + *tchttp.BaseRequest + + // 限定此次返回资源的数量。如果不设定,默认返回20,最大不能超过100 + Limit *uint64 `json:"Limit,omitempty" name:"Limit"` + + // 偏移量,默认0 + Offset *uint64 `json:"Offset,omitempty" name:"Offset"` + + // 过滤条件,可条件: + // (1)实例名称 + // KeyName: eks-ci-name + // 类型:String + // + // (2)实例状态 + // KeyName: status + // 类型:String + // 可选值:"Pending", "Running", "Succeeded", "Failed" + // + // (3)内网ip + // KeyName: private-ip + // 类型:String + // + // (4)EIP地址 + // KeyName: eip-address + // 类型:String + // + // (5)VpcId + // KeyName: vpc-id + // 类型:String + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 容器实例 ID 数组 + EksCiIds []*string `json:"EksCiIds,omitempty" name:"EksCiIds"` +} + +func (r *DescribeEKSContainerInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeEKSContainerInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "Limit") + delete(f, "Offset") + delete(f, "Filters") + delete(f, "EksCiIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeEKSContainerInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeEKSContainerInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 容器组总数 + TotalCount *uint64 `json:"TotalCount,omitempty" name:"TotalCount"` + + // 容器组列表 + EksCis []*EksCi `json:"EksCis,omitempty" name:"EksCis"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeEKSContainerInstancesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeEKSContainerInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeEksContainerInstanceLogRequest struct { + *tchttp.BaseRequest + + // Eks Container Instance Id,即容器实例Id + EksCiId *string `json:"EksCiId,omitempty" name:"EksCiId"` + + // 容器名称,单容器的实例可选填。如果为多容器实例,请指定容器名称。 + ContainerName *string `json:"ContainerName,omitempty" name:"ContainerName"` + + // 返回最新日志行数,默认500,最大2000。日志内容最大返回 1M 数据。 + Tail *uint64 `json:"Tail,omitempty" name:"Tail"` + + // UTC时间,RFC3339标准 + StartTime *string `json:"StartTime,omitempty" name:"StartTime"` + + // 是否是查上一个容器(如果容器退出重启了) + Previous *bool `json:"Previous,omitempty" name:"Previous"` + + // 查询最近多少秒内的日志 + SinceSeconds *uint64 `json:"SinceSeconds,omitempty" name:"SinceSeconds"` + + // 日志总大小限制 + LimitBytes *uint64 `json:"LimitBytes,omitempty" name:"LimitBytes"` +} + +func (r *DescribeEksContainerInstanceLogRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeEksContainerInstanceLogRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "EksCiId") + delete(f, "ContainerName") + delete(f, "Tail") + delete(f, "StartTime") + delete(f, "Previous") + delete(f, "SinceSeconds") + delete(f, "LimitBytes") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeEksContainerInstanceLogRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeEksContainerInstanceLogResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 容器名称 + ContainerName *string `json:"ContainerName,omitempty" name:"ContainerName"` + + // 日志内容 + LogContent *string `json:"LogContent,omitempty" name:"LogContent"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeEksContainerInstanceLogResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeEksContainerInstanceLogResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeEnableVpcCniProgressRequest struct { + *tchttp.BaseRequest + + // 开启vpc-cni的集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` +} + +func (r *DescribeEnableVpcCniProgressRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeEnableVpcCniProgressRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeEnableVpcCniProgressRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeEnableVpcCniProgressResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 任务进度的描述:Running/Succeed/Failed + Status *string `json:"Status,omitempty" name:"Status"` + + // 当任务进度为Failed时,对任务状态的进一步描述,例如IPAMD组件安装失败 + // 注意:此字段可能返回 null,表示取不到有效值。 + ErrorMessage *string `json:"ErrorMessage,omitempty" name:"ErrorMessage"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeEnableVpcCniProgressResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeEnableVpcCniProgressResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DescribeExistedInstancesRequest struct { + *tchttp.BaseRequest + + // 集群 ID,请填写查询集群列表 接口中返回的 ClusterId 字段(仅通过ClusterId获取需要过滤条件中的VPCID。节点状态比较时会使用该地域下所有集群中的节点进行比较。参数不支持同时指定InstanceIds和ClusterId。 + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 按照一个或者多个实例ID查询。实例ID形如:ins-xxxxxxxx。(此参数的具体格式可参考API简介的id.N一节)。每次请求的实例的上限为100。参数不支持同时指定InstanceIds和Filters。 + InstanceIds []*string `json:"InstanceIds,omitempty" name:"InstanceIds"` + + // 过滤条件,字段和详见[CVM查询实例](https://cloud.tencent.com/document/api/213/15728)如果设置了ClusterId,会附加集群的VPCID作为查询字段,在此情况下如果在Filter中指定了"vpc-id"作为过滤字段,指定的VPCID必须与集群的VPCID相同。 + Filters []*Filter `json:"Filters,omitempty" name:"Filters"` + + // 实例IP进行过滤(同时支持内网IP和外网IP) + VagueIpAddress *string `json:"VagueIpAddress,omitempty" name:"VagueIpAddress"` // 实例名称进行过滤 VagueInstanceName *string `json:"VagueInstanceName,omitempty" name:"VagueInstanceName"` @@ -3390,6 +4059,66 @@ func (r *DescribeExistedInstancesResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +type DescribeExternalClusterSpecRequest struct { + *tchttp.BaseRequest + + // 注册集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // 默认false 获取内网,是否获取外网版注册命令 + IsExtranet *bool `json:"IsExtranet,omitempty" name:"IsExtranet"` + + // 默认false 不刷新有效时间 ,true刷新有效时间 + IsRefreshExpirationTime *bool `json:"IsRefreshExpirationTime,omitempty" name:"IsRefreshExpirationTime"` +} + +func (r *DescribeExternalClusterSpecRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeExternalClusterSpecRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "IsExtranet") + delete(f, "IsRefreshExpirationTime") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "DescribeExternalClusterSpecRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type DescribeExternalClusterSpecResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 导入第三方集群YAML定义 + Spec *string `json:"Spec,omitempty" name:"Spec"` + + // agent.yaml文件过期时间字符串,时区UTC + Expiration *string `json:"Expiration,omitempty" name:"Expiration"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DescribeExternalClusterSpecResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DescribeExternalClusterSpecResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + type DescribeImagesRequest struct { *tchttp.BaseRequest } @@ -4248,33 +4977,166 @@ func (r *DisableVpcCniNetworkTypeRequest) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } -type DisableVpcCniNetworkTypeResponse struct { - *tchttp.BaseResponse - Response *struct { +type DisableVpcCniNetworkTypeResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *DisableVpcCniNetworkTypeResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *DisableVpcCniNetworkTypeResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + +type DnsServerConf struct { + + // 域名。空字符串表示所有域名。 + Domain *string `json:"Domain,omitempty" name:"Domain"` + + // dns 服务器地址列表。地址格式 ip:port + DnsServers []*string `json:"DnsServers,omitempty" name:"DnsServers"` +} + +type EipAttribute struct { + + // 容器实例删除后,EIP是否释放。 + // Never表示不释放,其他任意值(包括空字符串)表示释放。 + DeletePolicy *string `json:"DeletePolicy,omitempty" name:"DeletePolicy"` + + // EIP线路类型。默认值:BGP。 + // 已开通静态单线IP白名单的用户,可选值: + // CMCC:中国移动 + // CTCC:中国电信 + // CUCC:中国联通 + // 注意:仅部分地域支持静态单线IP。 + // 注意:此字段可能返回 null,表示取不到有效值。 + InternetServiceProvider *string `json:"InternetServiceProvider,omitempty" name:"InternetServiceProvider"` + + // EIP出带宽上限,单位:Mbps。 + // 注意:此字段可能返回 null,表示取不到有效值。 + InternetMaxBandwidthOut *uint64 `json:"InternetMaxBandwidthOut,omitempty" name:"InternetMaxBandwidthOut"` +} + +type EksCi struct { + + // EKS Cotainer Instance Id + EksCiId *string `json:"EksCiId,omitempty" name:"EksCiId"` + + // EKS Cotainer Instance Name + EksCiName *string `json:"EksCiName,omitempty" name:"EksCiName"` + + // 内存大小 + Memory *float64 `json:"Memory,omitempty" name:"Memory"` + + // CPU大小 + Cpu *float64 `json:"Cpu,omitempty" name:"Cpu"` + + // 安全组ID + SecurityGroupIds []*string `json:"SecurityGroupIds,omitempty" name:"SecurityGroupIds"` + + // 容器组的重启策略 + // 注意:此字段可能返回 null,表示取不到有效值。 + RestartPolicy *string `json:"RestartPolicy,omitempty" name:"RestartPolicy"` + + // 返回容器组创建状态:Pending,Running,Succeeded,Failed。其中: + // Failed (运行失败)指的容器组退出,RestartPolilcy为Never, 有容器exitCode非0; + // Succeeded(运行成功)指的是容器组退出了,RestartPolicy为Never或onFailure,所有容器exitCode都为0; + // Failed和Succeeded这两种状态都会停止运行,停止计费。 + // Pending是创建中,Running是 运行中。 + // 注意:此字段可能返回 null,表示取不到有效值。 + Status *string `json:"Status,omitempty" name:"Status"` + + // 接到请求后的系统创建时间。 + // 注意:此字段可能返回 null,表示取不到有效值。 + CreationTime *string `json:"CreationTime,omitempty" name:"CreationTime"` + + // 容器全部成功退出后的时间 + // 注意:此字段可能返回 null,表示取不到有效值。 + SucceededTime *string `json:"SucceededTime,omitempty" name:"SucceededTime"` + + // 容器列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + Containers []*Container `json:"Containers,omitempty" name:"Containers"` + + // 数据卷信息 + // 注意:此字段可能返回 null,表示取不到有效值。 + EksCiVolume *EksCiVolume `json:"EksCiVolume,omitempty" name:"EksCiVolume"` + + // 容器组运行的安全上下文 + // 注意:此字段可能返回 null,表示取不到有效值。 + SecurityContext *SecurityContext `json:"SecurityContext,omitempty" name:"SecurityContext"` + + // 内网ip地址 + // 注意:此字段可能返回 null,表示取不到有效值。 + PrivateIp *string `json:"PrivateIp,omitempty" name:"PrivateIp"` + + // 容器实例绑定的Eip地址,注意可能为空 + // 注意:此字段可能返回 null,表示取不到有效值。 + EipAddress *string `json:"EipAddress,omitempty" name:"EipAddress"` + + // GPU类型。如无使用GPU则不返回 + // 注意:此字段可能返回 null,表示取不到有效值。 + GpuType *string `json:"GpuType,omitempty" name:"GpuType"` + + // CPU类型 + // 注意:此字段可能返回 null,表示取不到有效值。 + CpuType *string `json:"CpuType,omitempty" name:"CpuType"` + + // GPU卡数量 + // 注意:此字段可能返回 null,表示取不到有效值。 + GpuCount *uint64 `json:"GpuCount,omitempty" name:"GpuCount"` + + // 实例所属VPC的Id + // 注意:此字段可能返回 null,表示取不到有效值。 + VpcId *string `json:"VpcId,omitempty" name:"VpcId"` + + // 实例所属子网Id + // 注意:此字段可能返回 null,表示取不到有效值。 + SubnetId *string `json:"SubnetId,omitempty" name:"SubnetId"` + + // 初始化容器列表 + // 注意:此字段可能返回 null,表示取不到有效值。 + InitContainers []*Container `json:"InitContainers,omitempty" name:"InitContainers"` - // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 - RequestId *string `json:"RequestId,omitempty" name:"RequestId"` - } `json:"Response"` -} + // 为容器实例关联 CAM 角色,value 填写 CAM 角色名称,容器实例可获取该 CAM 角色包含的权限策略,方便 容器实例 内的程序进行如购买资源、读写存储等云资源操作。 + // 注意:此字段可能返回 null,表示取不到有效值。 + CamRoleName *string `json:"CamRoleName,omitempty" name:"CamRoleName"` -func (r *DisableVpcCniNetworkTypeResponse) ToJsonString() string { - b, _ := json.Marshal(r) - return string(b) + // 自动为用户创建的EipId + // 注意:此字段可能返回 null,表示取不到有效值。 + AutoCreatedEipId *string `json:"AutoCreatedEipId,omitempty" name:"AutoCreatedEipId"` } -// FromJsonString It is highly **NOT** recommended to use this function -// because it has no param check, nor strict type check -func (r *DisableVpcCniNetworkTypeResponse) FromJsonString(s string) error { - return json.Unmarshal([]byte(s), &r) +type EksCiRegionInfo struct { + + // 地域别名,形如gz + Alias *string `json:"Alias,omitempty" name:"Alias"` + + // 地域名,形如ap-guangzhou + RegionName *string `json:"RegionName,omitempty" name:"RegionName"` + + // 地域ID + RegionId *uint64 `json:"RegionId,omitempty" name:"RegionId"` } -type DnsServerConf struct { +type EksCiVolume struct { - // 域名。空字符串表示所有域名。 - Domain *string `json:"Domain,omitempty" name:"Domain"` + // Cbs Volume + // 注意:此字段可能返回 null,表示取不到有效值。 + CbsVolumes []*CbsVolume `json:"CbsVolumes,omitempty" name:"CbsVolumes"` - // dns 服务器地址列表。地址格式 ip:port - DnsServers []*string `json:"DnsServers,omitempty" name:"DnsServers"` + // Nfs Volume + // 注意:此字段可能返回 null,表示取不到有效值。 + NfsVolumes []*NfsVolume `json:"NfsVolumes,omitempty" name:"NfsVolumes"` } type EksCluster struct { @@ -4394,6 +5256,46 @@ type EnhancedService struct { AutomationService *RunAutomationServiceEnabled `json:"AutomationService,omitempty" name:"AutomationService"` } +type EnvironmentVariable struct { + + // key + Name *string `json:"Name,omitempty" name:"Name"` + + // val + Value *string `json:"Value,omitempty" name:"Value"` +} + +type Event struct { + + // pod名称 + PodName *string `json:"PodName,omitempty" name:"PodName"` + + // 事件原因内容 + Reason *string `json:"Reason,omitempty" name:"Reason"` + + // 事件类型 + Type *string `json:"Type,omitempty" name:"Type"` + + // 事件出现次数 + Count *int64 `json:"Count,omitempty" name:"Count"` + + // 事件第一次出现时间 + FirstTimestamp *string `json:"FirstTimestamp,omitempty" name:"FirstTimestamp"` + + // 事件最后一次出现时间 + LastTimestamp *string `json:"LastTimestamp,omitempty" name:"LastTimestamp"` + + // 事件内容 + Message *string `json:"Message,omitempty" name:"Message"` +} + +type Exec struct { + + // 容器内检测的命令 + // 注意:此字段可能返回 null,表示取不到有效值。 + Commands []*string `json:"Commands,omitempty" name:"Commands"` +} + type ExistedInstance struct { // 实例是否支持加入集群(TRUE 可以加入 FALSE 不能加入)。 @@ -4582,6 +5484,21 @@ func (r *GetUpgradeInstanceProgressResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +type HttpGet struct { + + // HttpGet检测的路径 + // 注意:此字段可能返回 null,表示取不到有效值。 + Path *string `json:"Path,omitempty" name:"Path"` + + // HttpGet检测的端口号 + // 注意:此字段可能返回 null,表示取不到有效值。 + Port *int64 `json:"Port,omitempty" name:"Port"` + + // HTTP or HTTPS + // 注意:此字段可能返回 null,表示取不到有效值。 + Scheme *string `json:"Scheme,omitempty" name:"Scheme"` +} + type IPAddress struct { // Ip 地址的类型。可为 advertise, public 等 @@ -4613,6 +5530,21 @@ type ImageInstance struct { OsCustomizeType *string `json:"OsCustomizeType,omitempty" name:"OsCustomizeType"` } +type ImageRegistryCredential struct { + + // 镜像仓库地址 + Server *string `json:"Server,omitempty" name:"Server"` + + // 用户名 + Username *string `json:"Username,omitempty" name:"Username"` + + // 密码 + Password *string `json:"Password,omitempty" name:"Password"` + + // ImageRegistryCredential的名字 + Name *string `json:"Name,omitempty" name:"Name"` +} + type Instance struct { // 实例ID @@ -4684,6 +5616,10 @@ type InstanceAdvancedSettings struct { // 该节点属于podCIDR大小自定义模式时,可指定节点上运行的pod数量上限 // 注意:此字段可能返回 null,表示取不到有效值。 DesiredPodNumber *int64 `json:"DesiredPodNumber,omitempty" name:"DesiredPodNumber"` + + // base64 编码的用户脚本,在初始化节点之前执行,目前只对添加已有节点生效 + // 注意:此字段可能返回 null,表示取不到有效值。 + PreStartUserScript *string `json:"PreStartUserScript,omitempty" name:"PreStartUserScript"` } type InstanceDataDiskMountSetting struct { @@ -4786,6 +5722,25 @@ type Label struct { Value *string `json:"Value,omitempty" name:"Value"` } +type LivenessOrReadinessProbe struct { + + // 探针参数 + // 注意:此字段可能返回 null,表示取不到有效值。 + Probe *Probe `json:"Probe,omitempty" name:"Probe"` + + // HttpGet检测参数 + // 注意:此字段可能返回 null,表示取不到有效值。 + HttpGet *HttpGet `json:"HttpGet,omitempty" name:"HttpGet"` + + // 容器内检测命令参数 + // 注意:此字段可能返回 null,表示取不到有效值。 + Exec *Exec `json:"Exec,omitempty" name:"Exec"` + + // TcpSocket检测的端口参数 + // 注意:此字段可能返回 null,表示取不到有效值。 + TcpSocket *TcpSocket `json:"TcpSocket,omitempty" name:"TcpSocket"` +} + type LoginSettings struct { // 实例登录密码。不同操作系统类型密码复杂度限制不一样,具体如下:
  • Linux实例密码必须8到30位,至少包括两项[a-z],[A-Z]、[0-9] 和 [( ) \` ~ ! @ # $ % ^ & * - + = | { } [ ] : ; ' , . ? / ]中的特殊符号。
  • Windows实例密码必须12到30位,至少包括三项[a-z],[A-Z],[0-9] 和 [( ) \` ~ ! @ # $ % ^ & * - + = | { } [ ] : ; ' , . ? /]中的特殊符号。

    若不指定该参数,则由系统随机生成密码,并通过站内信方式通知到用户。 @@ -4986,6 +5941,56 @@ func (r *ModifyClusterAttributeResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +type ModifyClusterAuthenticationOptionsRequest struct { + *tchttp.BaseRequest + + // 集群ID + ClusterId *string `json:"ClusterId,omitempty" name:"ClusterId"` + + // ServiceAccount认证配置 + ServiceAccounts *ServiceAccountAuthenticationOptions `json:"ServiceAccounts,omitempty" name:"ServiceAccounts"` +} + +func (r *ModifyClusterAuthenticationOptionsRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyClusterAuthenticationOptionsRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "ClusterId") + delete(f, "ServiceAccounts") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyClusterAuthenticationOptionsRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type ModifyClusterAuthenticationOptionsResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *ModifyClusterAuthenticationOptionsResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *ModifyClusterAuthenticationOptionsResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + type ModifyClusterEndpointSPRequest struct { *tchttp.BaseRequest @@ -5068,6 +6073,9 @@ type ModifyClusterNodePoolRequest struct { // 镜像版本,"DOCKER_CUSTOMIZE"(容器定制版),"GENERAL"(普通版本,默认值) OsCustomizeType *string `json:"OsCustomizeType,omitempty" name:"OsCustomizeType"` + + // 节点自定义参数 + ExtraArgs *InstanceExtraArgs `json:"ExtraArgs,omitempty" name:"ExtraArgs"` } func (r *ModifyClusterNodePoolRequest) ToJsonString() string { @@ -5092,6 +6100,7 @@ func (r *ModifyClusterNodePoolRequest) FromJsonString(s string) error { delete(f, "EnableAutoscale") delete(f, "OsName") delete(f, "OsCustomizeType") + delete(f, "ExtraArgs") if len(f) > 0 { return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "ModifyClusterNodePoolRequest has unknown keys!", "") } @@ -5326,6 +6335,21 @@ func (r *ModifyPrometheusTemplateResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +type NfsVolume struct { + + // nfs volume 数据卷名称 + Name *string `json:"Name,omitempty" name:"Name"` + + // NFS 服务器地址 + Server *string `json:"Server,omitempty" name:"Server"` + + // NFS 数据卷路径 + Path *string `json:"Path,omitempty" name:"Path"` + + // 默认为 False + ReadOnly *bool `json:"ReadOnly,omitempty" name:"ReadOnly"` +} + type NodeCountSummary struct { // 手动管理的节点 @@ -5449,6 +6473,30 @@ type PodLimitsInstance struct { PodLimits *PodLimitsByType `json:"PodLimits,omitempty" name:"PodLimits"` } +type Probe struct { + + // Number of seconds after the container has started before liveness probes are initiated. + // 注意:此字段可能返回 null,表示取不到有效值。 + InitialDelaySeconds *int64 `json:"InitialDelaySeconds,omitempty" name:"InitialDelaySeconds"` + + // Number of seconds after which the probe times out. + // Defaults to 1 second. Minimum value is 1. + // 注意:此字段可能返回 null,表示取不到有效值。 + TimeoutSeconds *int64 `json:"TimeoutSeconds,omitempty" name:"TimeoutSeconds"` + + // How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. + // 注意:此字段可能返回 null,表示取不到有效值。 + PeriodSeconds *int64 `json:"PeriodSeconds,omitempty" name:"PeriodSeconds"` + + // Minimum consecutive successes for the probe to be considered successful after having failed.Defaults to 1. Must be 1 for liveness. Minimum value is 1. + // 注意:此字段可能返回 null,表示取不到有效值。 + SuccessThreshold *int64 `json:"SuccessThreshold,omitempty" name:"SuccessThreshold"` + + // Minimum consecutive failures for the probe to be considered failed after having succeeded.Defaults to 3. Minimum value is 1. + // 注意:此字段可能返回 null,表示取不到有效值。 + FailureThreshold *int64 `json:"FailureThreshold,omitempty" name:"FailureThreshold"` +} + type PrometheusAgentOverview struct { // 集群类型 @@ -5936,6 +6984,52 @@ type ResourceDeleteOption struct { DeleteMode *string `json:"DeleteMode,omitempty" name:"DeleteMode"` } +type RestartEKSContainerInstancesRequest struct { + *tchttp.BaseRequest + + // EKS instance ids + EksCiIds []*string `json:"EksCiIds,omitempty" name:"EksCiIds"` +} + +func (r *RestartEKSContainerInstancesRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *RestartEKSContainerInstancesRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "EksCiIds") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "RestartEKSContainerInstancesRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type RestartEKSContainerInstancesResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *RestartEKSContainerInstancesResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *RestartEKSContainerInstancesResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + type RouteInfo struct { // 路由表名称。 @@ -5979,6 +7073,9 @@ type RouteTableInfo struct { } type RunAutomationServiceEnabled struct { + + // 是否开启云自动化助手。取值范围:
  • TRUE:表示开启云自动化助手服务
  • FALSE:表示不开启云自动化助手服务

    默认取值:FALSE。 + Enabled *bool `json:"Enabled,omitempty" name:"Enabled"` } type RunInstancesForNode struct { @@ -6005,6 +7102,28 @@ type RunSecurityServiceEnabled struct { Enabled *bool `json:"Enabled,omitempty" name:"Enabled"` } +type SecurityContext struct { + + // 安全能力清单 + // 注意:此字段可能返回 null,表示取不到有效值。 + Capabilities *Capabilities `json:"Capabilities,omitempty" name:"Capabilities"` +} + +type ServiceAccountAuthenticationOptions struct { + + // service-account-issuer + // 注意:此字段可能返回 null,表示取不到有效值。 + Issuer *string `json:"Issuer,omitempty" name:"Issuer"` + + // service-account-jwks-uri + // 注意:此字段可能返回 null,表示取不到有效值。 + JWKSURI *string `json:"JWKSURI,omitempty" name:"JWKSURI"` + + // 如果为true,则会自动创建允许匿名用户访问'/.well-known/openid-configuration'和/openid/v1/jwks的rbac规则 + // 注意:此字段可能返回 null,表示取不到有效值。 + AutoCreateDiscoveryAnonymousAuth *bool `json:"AutoCreateDiscoveryAnonymousAuth,omitempty" name:"AutoCreateDiscoveryAnonymousAuth"` +} + type SetNodePoolNodeProtectionRequest struct { *tchttp.BaseRequest @@ -6178,6 +7297,13 @@ type TaskStepInfo struct { FailedMsg *string `json:"FailedMsg,omitempty" name:"FailedMsg"` } +type TcpSocket struct { + + // TcpSocket检测的端口 + // 注意:此字段可能返回 null,表示取不到有效值。 + Port *uint64 `json:"Port,omitempty" name:"Port"` +} + type UpdateClusterVersionRequest struct { *tchttp.BaseRequest @@ -6322,6 +7448,80 @@ func (r *UpdateEKSClusterResponse) FromJsonString(s string) error { return json.Unmarshal([]byte(s), &r) } +type UpdateEKSContainerInstanceRequest struct { + *tchttp.BaseRequest + + // 容器实例 ID + EksCiId *string `json:"EksCiId,omitempty" name:"EksCiId"` + + // 实例重启策略: Always(总是重启)、Never(从不重启)、OnFailure(失败时重启) + RestartPolicy *string `json:"RestartPolicy,omitempty" name:"RestartPolicy"` + + // 数据卷,包含NfsVolume数组和CbsVolume数组 + EksCiVolume *EksCiVolume `json:"EksCiVolume,omitempty" name:"EksCiVolume"` + + // 容器组 + Containers []*Container `json:"Containers,omitempty" name:"Containers"` + + // Init 容器组 + InitContainers []*Container `json:"InitContainers,omitempty" name:"InitContainers"` + + // 容器实例名称 + Name *string `json:"Name,omitempty" name:"Name"` + + // 镜像仓库凭证数组 + ImageRegistryCredentials []*ImageRegistryCredential `json:"ImageRegistryCredentials,omitempty" name:"ImageRegistryCredentials"` +} + +func (r *UpdateEKSContainerInstanceRequest) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *UpdateEKSContainerInstanceRequest) FromJsonString(s string) error { + f := make(map[string]interface{}) + if err := json.Unmarshal([]byte(s), &f); err != nil { + return err + } + delete(f, "EksCiId") + delete(f, "RestartPolicy") + delete(f, "EksCiVolume") + delete(f, "Containers") + delete(f, "InitContainers") + delete(f, "Name") + delete(f, "ImageRegistryCredentials") + if len(f) > 0 { + return tcerr.NewTencentCloudSDKError("ClientError.BuildRequestError", "UpdateEKSContainerInstanceRequest has unknown keys!", "") + } + return json.Unmarshal([]byte(s), &r) +} + +type UpdateEKSContainerInstanceResponse struct { + *tchttp.BaseResponse + Response *struct { + + // 容器实例 ID + // 注意:此字段可能返回 null,表示取不到有效值。 + EksCiId *string `json:"EksCiId,omitempty" name:"EksCiId"` + + // 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 + RequestId *string `json:"RequestId,omitempty" name:"RequestId"` + } `json:"Response"` +} + +func (r *UpdateEKSContainerInstanceResponse) ToJsonString() string { + b, _ := json.Marshal(r) + return string(b) +} + +// FromJsonString It is highly **NOT** recommended to use this function +// because it has no param check, nor strict type check +func (r *UpdateEKSContainerInstanceResponse) FromJsonString(s string) error { + return json.Unmarshal([]byte(s), &r) +} + type UpgradeAbleInstancesItem struct { // 节点Id @@ -6440,3 +7640,30 @@ type VersionInstance struct { // 注意:此字段可能返回 null,表示取不到有效值。 Remark *string `json:"Remark,omitempty" name:"Remark"` } + +type VolumeMount struct { + + // volume名称 + // 注意:此字段可能返回 null,表示取不到有效值。 + Name *string `json:"Name,omitempty" name:"Name"` + + // 挂载路径 + // 注意:此字段可能返回 null,表示取不到有效值。 + MountPath *string `json:"MountPath,omitempty" name:"MountPath"` + + // 是否只读 + // 注意:此字段可能返回 null,表示取不到有效值。 + ReadOnly *bool `json:"ReadOnly,omitempty" name:"ReadOnly"` + + // 子路径 + // 注意:此字段可能返回 null,表示取不到有效值。 + SubPath *string `json:"SubPath,omitempty" name:"SubPath"` + + // 传播挂载方式 + // 注意:此字段可能返回 null,表示取不到有效值。 + MountPropagation *string `json:"MountPropagation,omitempty" name:"MountPropagation"` + + // 子路径表达式 + // 注意:此字段可能返回 null,表示取不到有效值。 + SubPathExpr *string `json:"SubPathExpr,omitempty" name:"SubPathExpr"` +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 458bce783d..d6985c4b87 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -549,7 +549,7 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/ckafka/v20190819 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/clb/v20180317 # github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cloudaudit v1.0.199 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cloudaudit/v20190319 -# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.234 +# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.264 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/errors github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/http @@ -593,7 +593,7 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tag/v20180813 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tcaplusdb/v20190823 # github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tcr v1.0.199 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tcr/v20190924 -# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.0.234 +# github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke v1.0.264 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/tke/v20180525 # github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vod v1.0.199 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vod/v20180717 diff --git a/website/docs/r/kubernetes_cluster.html.markdown b/website/docs/r/kubernetes_cluster.html.markdown index 3267109dd9..6f0217c186 100644 --- a/website/docs/r/kubernetes_cluster.html.markdown +++ b/website/docs/r/kubernetes_cluster.html.markdown @@ -336,6 +336,7 @@ resource "tencentcloud_kubernetes_cluster" "managed_cluster" { The following arguments are supported: * `vpc_id` - (Required, ForceNew) Vpc Id of the cluster. +* `auth_options` - (Optional) Specify cluster authentication configuration. Only available for managed cluster and `cluster_version` >= 1.20. * `base_pod_num` - (Optional, ForceNew) The number of basic pods. valid when enable_customized_pod_cidr=true. * `claim_expired_seconds` - (Optional) Claim expired seconds to recycle ENI. This field can only set when field `network_type` is 'VPC-CNI'. `claim_expired_seconds` must greater or equal than 300 and less than 15768000. * `cluster_as_enabled` - (Optional, ForceNew) Indicates whether to enable cluster node auto scaler. Default is false. @@ -379,6 +380,12 @@ The following arguments are supported: * `upgrade_instances_follow_cluster` - (Optional) Indicates whether upgrade all instances when cluster_version change. Default is false. * `worker_config` - (Optional, ForceNew) Deploy the machine configuration information of the 'WORKER' service, and create <=20 units for common users. The other 'WORK' service are added by 'tencentcloud_kubernetes_worker'. +The `auth_options` object supports the following: + +* `auto_create_discovery_anonymous_auth` - (Optional) If set to `true`, the rbac rule will be created automatically which allow anonymous user to access '/.well-known/openid-configuration' and '/openid/v1/jwks'. +* `issuer` - (Optional) Specify service-account-issuer. +* `jwks_uri` - (Optional) Specify service-account-jwks-uri. + The `cluster_extra_args` object supports the following: * `kube_apiserver` - (Optional, ForceNew) The customized parameters for kube-apiserver.