Class: TencentCloud::Tke::V20180525::RunInstancesForNode

Inherits:
Common::AbstractModel
  • Object
show all
Defined in:
lib/v20180525/models.rb

Overview

不同角色的节点配置参数

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(noderole = nil, runinstancespara = nil, instanceadvancedsettingsoverrides = nil) ⇒ RunInstancesForNode

Returns a new instance of RunInstancesForNode.



17870
17871
17872
17873
17874
# File 'lib/v20180525/models.rb', line 17870

def initialize(noderole=nil, runinstancespara=nil, instanceadvancedsettingsoverrides=nil)
  @NodeRole = noderole
  @RunInstancesPara = runinstancespara
  @InstanceAdvancedSettingsOverrides = instanceadvancedsettingsoverrides
end

Instance Attribute Details

#InstanceAdvancedSettingsOverridesObject

Parameters:

  • NodeRole:

    节点角色,取值:MASTER_ETCD, WORKER。MASTER_ETCD只有在创建 INDEPENDENT_CLUSTER 独立集群时需要指定。MASTER_ETCD节点数量为3~7,建议为奇数。MASTER_ETCD节点最小配置为4C8G。

  • RunInstancesPara:

    CVM创建透传参数,json化字符串格式,详见(cloud.tencent.com/document/product/213/15730)接口,传入公共参数外的其他参数即可,其中ImageId会替换为TKE集群OS对应的镜像。

  • InstanceAdvancedSettingsOverrides:

    节点高级设置,该参数会覆盖集群级别设置的InstanceAdvancedSettings,和上边的RunInstancesPara按照顺序一一对应(当前只对节点自定义参数ExtraArgs生效)。



17868
17869
17870
# File 'lib/v20180525/models.rb', line 17868

def InstanceAdvancedSettingsOverrides
  @InstanceAdvancedSettingsOverrides
end

#NodeRoleObject

Parameters:

  • NodeRole:

    节点角色,取值:MASTER_ETCD, WORKER。MASTER_ETCD只有在创建 INDEPENDENT_CLUSTER 独立集群时需要指定。MASTER_ETCD节点数量为3~7,建议为奇数。MASTER_ETCD节点最小配置为4C8G。

  • RunInstancesPara:

    CVM创建透传参数,json化字符串格式,详见(cloud.tencent.com/document/product/213/15730)接口,传入公共参数外的其他参数即可,其中ImageId会替换为TKE集群OS对应的镜像。

  • InstanceAdvancedSettingsOverrides:

    节点高级设置,该参数会覆盖集群级别设置的InstanceAdvancedSettings,和上边的RunInstancesPara按照顺序一一对应(当前只对节点自定义参数ExtraArgs生效)。



17868
17869
17870
# File 'lib/v20180525/models.rb', line 17868

def NodeRole
  @NodeRole
end

#RunInstancesParaObject

Parameters:

  • NodeRole:

    节点角色,取值:MASTER_ETCD, WORKER。MASTER_ETCD只有在创建 INDEPENDENT_CLUSTER 独立集群时需要指定。MASTER_ETCD节点数量为3~7,建议为奇数。MASTER_ETCD节点最小配置为4C8G。

  • RunInstancesPara:

    CVM创建透传参数,json化字符串格式,详见(cloud.tencent.com/document/product/213/15730)接口,传入公共参数外的其他参数即可,其中ImageId会替换为TKE集群OS对应的镜像。

  • InstanceAdvancedSettingsOverrides:

    节点高级设置,该参数会覆盖集群级别设置的InstanceAdvancedSettings,和上边的RunInstancesPara按照顺序一一对应(当前只对节点自定义参数ExtraArgs生效)。



17868
17869
17870
# File 'lib/v20180525/models.rb', line 17868

def RunInstancesPara
  @RunInstancesPara
end

Instance Method Details

#deserialize(params) ⇒ Object



17876
17877
17878
17879
17880
17881
17882
17883
17884
17885
17886
17887
# File 'lib/v20180525/models.rb', line 17876

def deserialize(params)
  @NodeRole = params['NodeRole']
  @RunInstancesPara = params['RunInstancesPara']
  unless params['InstanceAdvancedSettingsOverrides'].nil?
    @InstanceAdvancedSettingsOverrides = []
    params['InstanceAdvancedSettingsOverrides'].each do |i|
      instanceadvancedsettings_tmp = InstanceAdvancedSettings.new
      instanceadvancedsettings_tmp.deserialize(i)
      @InstanceAdvancedSettingsOverrides << instanceadvancedsettings_tmp
    end
  end
end