/* * Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ namespace TencentCloud.Tke.V20180525.Models { using Newtonsoft.Json; using System.Collections.Generic; using TencentCloud.Common; public class InstanceAdvancedSettings : AbstractModel { /// /// 数据盘挂载点, 默认不挂载数据盘. 已格式化的 ext3,ext4,xfs 文件系统的数据盘将直接挂载,其他文件系统或未格式化的数据盘将自动格式化为ext4 并挂载,请注意备份数据! 无数据盘或有多块数据盘的云主机此设置不生效。 /// [JsonProperty("MountTarget")] public string MountTarget{ get; set; } /// /// dockerd --graph 指定值, 默认为 /var/lib/docker /// [JsonProperty("DockerGraphPath")] public string DockerGraphPath{ get; set; } /// /// base64 编码的用户脚本, 此脚本会在 k8s 组件运行后执行, 需要用户保证脚本的可重入及重试逻辑, 脚本及其生成的日志文件可在节点的 /data/ccs_userscript/ 路径查看, 如果要求节点需要在进行初始化完成后才可加入调度, 可配合 unschedulable 参数使用, 在 userScript 最后初始化完成后, 添加 kubectl uncordon nodename --kubeconfig=/root/.kube/config 命令使节点加入调度 /// [JsonProperty("UserScript")] public string UserScript{ get; set; } /// /// 设置加入的节点是否参与调度,默认值为0,表示参与调度;非0表示不参与调度, 待节点初始化完成之后, 可执行kubectl uncordon nodename使node加入调度. /// [JsonProperty("Unschedulable")] public long? Unschedulable{ get; set; } /// /// 节点Label数组 /// [JsonProperty("Labels")] public Label[] Labels{ get; set; } /// /// 数据盘相关信息 /// [JsonProperty("DataDisks")] public DataDisk[] DataDisks{ get; set; } /// /// 节点相关的自定义参数信息 /// [JsonProperty("ExtraArgs")] public InstanceExtraArgs ExtraArgs{ get; set; } /// /// For internal usage only. DO NOT USE IT. /// internal override void ToMap(Dictionary map, string prefix) { this.SetParamSimple(map, prefix + "MountTarget", this.MountTarget); this.SetParamSimple(map, prefix + "DockerGraphPath", this.DockerGraphPath); this.SetParamSimple(map, prefix + "UserScript", this.UserScript); this.SetParamSimple(map, prefix + "Unschedulable", this.Unschedulable); this.SetParamArrayObj(map, prefix + "Labels.", this.Labels); this.SetParamArrayObj(map, prefix + "DataDisks.", this.DataDisks); this.SetParamObj(map, prefix + "ExtraArgs.", this.ExtraArgs); } } }