зеркало из https://github.com/Azure/acs-engine.git
added etcdDiskSizeGB to kubernetesConfig (#1751)
* added etcdDiskSizeGB to kubernetesConfig * added example config for etcd custom volume size * changing example etcd size to 256
This commit is contained in:
Родитель
f0cf135b46
Коммит
fc56e54014
|
@ -8,3 +8,4 @@ These cluster definition examples show how to create customized [Kubernetes](../
|
|||
2. [**kubernetes-maxpods.json**](kubernetes-maxpods.json) - Configuring a custom maximum limit on the number of pods per node.
|
||||
3. [**kubernetes-dockerbridgesubnet.json**](kubernetes-dockerbridgesubnet.json) - Configuring a custom IP subnet used for allocating IP addresses for the docker bridge network on nodes.
|
||||
4. [**kubernetes-gc.json**](kubernetes-gc.json) - Configuring custom image garbage collection values.
|
||||
4. [**kubernetes-etcd-storage-size.json**](kubernetes-etcd-storage-size.json) - Configuring a custom size for the etcd disk volume.
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
"apiVersion": "vlabs",
|
||||
"properties": {
|
||||
"orchestratorProfile": {
|
||||
"orchestratorType": "Kubernetes",
|
||||
"kubernetesConfig": {
|
||||
"etcdDiskSizeGB": "256"
|
||||
}
|
||||
},
|
||||
"masterProfile": {
|
||||
"count": 1,
|
||||
"dnsPrefix": "",
|
||||
"vmSize": "Standard_D2_v2"
|
||||
},
|
||||
"agentPoolProfiles": [
|
||||
{
|
||||
"name": "agentpool1",
|
||||
"count": 3,
|
||||
"vmSize": "Standard_D2_v2",
|
||||
"availabilityProfile": "AvailabilitySet"
|
||||
}
|
||||
],
|
||||
"linuxProfile": {
|
||||
"adminUsername": "azureUser",
|
||||
"ssh": {
|
||||
"publicKeys": [
|
||||
{
|
||||
"keyData": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"servicePrincipalProfile": {
|
||||
"clientId": "",
|
||||
"secret": ""
|
||||
}
|
||||
}
|
||||
}
|
|
@ -434,7 +434,7 @@
|
|||
"dataDisks": [
|
||||
{
|
||||
"createOption": "Empty"
|
||||
,"diskSizeGB": "128"
|
||||
,"diskSizeGB": "[variables('etcdDiskSizeGB')]"
|
||||
,"lun": 0
|
||||
,"name": "[concat(variables('masterVMNamePrefix'), copyIndex(variables('masterOffset')),'-etcddisk')]"
|
||||
{{if .MasterProfile.IsStorageAccount}}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
"etcdDiskSizeGB": "[parameters('etcdDiskSizeGB')]",
|
||||
"maxVMsPerPool": 100,
|
||||
"apiServerCertificate": "[parameters('apiServerCertificate')]",
|
||||
{{ if not IsHostedMaster }}
|
||||
|
|
|
@ -388,4 +388,11 @@
|
|||
"description": "The offset into the master pool where to start creating master VMs. This value can be from 0 to 4, but must be less than masterCount."
|
||||
},
|
||||
"type": "int"
|
||||
},
|
||||
"etcdDiskSizeGB": {
|
||||
{{PopulateClassicModeDefaultValue "etcdDiskSizeGB"}}
|
||||
"metadata": {
|
||||
"description": "Size in GB to allocate for etcd volume"
|
||||
},
|
||||
"type": "string"
|
||||
}
|
||||
|
|
|
@ -86,6 +86,8 @@ const (
|
|||
DefaultGeneratorCode = "acsengine"
|
||||
// DefaultOrchestratorName specifies the 3 character orchestrator code of the cluster template and affects resource naming.
|
||||
DefaultOrchestratorName = "k8s"
|
||||
// DefaultEtcdDiskSize specifies the default size for Kubernetes master etcd disk volumes in GB
|
||||
DefaultEtcdDiskSize = "128"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
|
@ -291,6 +291,11 @@ func setOrchestratorDefaults(cs *api.ContainerService) {
|
|||
a.OrchestratorProfile.KubernetesConfig.TillerMemoryLimit = DefaultTillerMemoryLimit
|
||||
}
|
||||
|
||||
if a.OrchestratorProfile.KubernetesConfig.EtcdDiskSizeGB == "" {
|
||||
fmt.Println("didn't find EtcdDiskSizeGB")
|
||||
a.OrchestratorProfile.KubernetesConfig.EtcdDiskSizeGB = DefaultEtcdDiskSize
|
||||
}
|
||||
|
||||
} else if o.OrchestratorType == api.DCOS {
|
||||
if o.DcosConfig == nil {
|
||||
o.DcosConfig = &api.DcosConfig{}
|
||||
|
|
|
@ -584,6 +584,7 @@ func getParameters(cs *api.ContainerService, isClassicMode bool, generatorCode s
|
|||
addValue(parametersMap, "maxPods", properties.OrchestratorProfile.KubernetesConfig.MaxPods)
|
||||
addValue(parametersMap, "gchighthreshold", properties.OrchestratorProfile.KubernetesConfig.GCHighThreshold)
|
||||
addValue(parametersMap, "gclowthreshold", properties.OrchestratorProfile.KubernetesConfig.GCLowThreshold)
|
||||
addValue(parametersMap, "etcdDiskSizeGB", cs.Properties.OrchestratorProfile.KubernetesConfig.EtcdDiskSizeGB)
|
||||
|
||||
if properties.OrchestratorProfile.KubernetesConfig == nil ||
|
||||
!properties.OrchestratorProfile.KubernetesConfig.UseManagedIdentity {
|
||||
|
@ -1214,6 +1215,8 @@ func (t *TemplateGenerator) getTemplateFuncMap(cs *api.ContainerService) templat
|
|||
val = DefaultGeneratorCode
|
||||
case "orchestratorName":
|
||||
val = DefaultOrchestratorName
|
||||
case "etcdDiskSizeGB":
|
||||
val = cs.Properties.OrchestratorProfile.KubernetesConfig.EtcdDiskSizeGB
|
||||
default:
|
||||
val = ""
|
||||
}
|
||||
|
|
|
@ -674,6 +674,7 @@ func convertKubernetesConfigToVLabs(api *KubernetesConfig, vlabs *vlabs.Kubernet
|
|||
vlabs.TillerCPULimit = api.TillerCPULimit
|
||||
vlabs.TillerMemoryRequests = api.TillerMemoryRequests
|
||||
vlabs.TillerMemoryLimit = api.TillerMemoryLimit
|
||||
vlabs.EtcdDiskSizeGB = api.EtcdDiskSizeGB
|
||||
}
|
||||
|
||||
func convertMasterProfileToV20160930(api *MasterProfile, v20160930 *v20160930.MasterProfile) {
|
||||
|
|
|
@ -616,6 +616,7 @@ func convertVLabsKubernetesConfig(vlabs *vlabs.KubernetesConfig, api *Kubernetes
|
|||
api.TillerCPULimit = vlabs.TillerCPULimit
|
||||
api.TillerMemoryRequests = vlabs.TillerMemoryRequests
|
||||
api.TillerMemoryLimit = vlabs.TillerMemoryLimit
|
||||
api.EtcdDiskSizeGB = vlabs.EtcdDiskSizeGB
|
||||
}
|
||||
|
||||
func convertV20160930MasterProfile(v20160930 *v20160930.MasterProfile, api *MasterProfile) {
|
||||
|
|
|
@ -191,6 +191,7 @@ type KubernetesConfig struct {
|
|||
TillerCPULimit string `json:"tillerCPULimit,omitempty"`
|
||||
TillerMemoryRequests string `json:"tillerMemoryRequests,omitempty"`
|
||||
TillerMemoryLimit string `json:"tillerMemoryLimit,omitempty"`
|
||||
EtcdDiskSizeGB string `json:"etcdDiskSizeGB,omitempty"`
|
||||
}
|
||||
|
||||
// DcosConfig Configuration for DC/OS
|
||||
|
|
|
@ -209,6 +209,7 @@ type KubernetesConfig struct {
|
|||
TillerCPULimit string `json:"tillerCPULimit,omitempty"`
|
||||
TillerMemoryRequests string `json:"tillerMemoryRequests,omitempty"`
|
||||
TillerMemoryLimit string `json:"tillerMemoryLimit,omitempty"`
|
||||
EtcdDiskSizeGB string `json:"etcdDiskSizeGB,omitempty"`
|
||||
}
|
||||
|
||||
// DcosConfig Configuration for DC/OS
|
||||
|
|
Загрузка…
Ссылка в новой задаче