Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 203efbf
Author: Jiangtian Li <[email protected]>
Date:   Fri Jan 19 09:07:14 2018 -0800

    Extend windows os drive size when customized OSDiskSizeGB is used (Azure#2097)

commit 88ec2fb
Author: Robbie Zhang <[email protected]>
Date:   Thu Jan 11 13:49:44 2018 -0800

    Update the kube-dns addon

commit 217ad8d
Merge: 530bedb d8856c8
Author: Wenjun Wu <[email protected]>
Date:   Mon Jan 8 16:22:56 2018 -0800

    Merge remote-tracking branch 'origin/migration' into migration

commit d8856c8
Author: Robbie Zhang <[email protected]>
Date:   Fri Jan 5 15:39:28 2018 -0800

    Remove the Allow SSH and RDP Rules from NSG

commit 530bedb
Merge: f3389a6 5070934
Author: Wenjun Wu <[email protected]>
Date:   Fri Jan 5 15:38:54 2018 -0800

    Merge tag 'v0.9.4' into migration

commit f3389a6
Author: Wenjun Wu <[email protected]>
Date:   Fri Dec 15 11:11:13 2017 -0800

    remove agent customscript and service file (#13)

    * remove agent specific custom script and service file.

    * remove cloud provider from windows start ps1

commit c2eda57
Merge: 8ef4f2b 004145c
Author: Wenjun Wu <[email protected]>
Date:   Tue Dec 12 18:05:13 2017 -0800

    Merge commit '004145cba163' into migration

commit 004145c
Author: Wenjun Wu <[email protected]>
Date:   Tue Dec 12 18:03:36 2017 -0800

    fix merge error: azure storage classes yaml

commit 8ef4f2b
Merge: adbc1cf bd006fc
Author: Wenjun Wu <[email protected]>
Date:   Mon Nov 27 18:24:06 2017 -0800

    Merge tag 'v0.9.3' into migration

commit adbc1cf
Merge: f8da501 7957245
Author: Wenjun Wu <[email protected]>
Date:   Wed Oct 25 14:36:24 2017 -0700

    Merge tag 'v0.8.0' into migration

commit f8da501
Author: Robbie Zhang <[email protected]>
Date:   Fri Sep 1 16:38:00 2017 -0700

    Disable Windows Update

commit ac83868
Author: Robbie Zhang <[email protected]>
Date:   Fri Sep 1 16:37:36 2017 -0700

    Use kubelet v1.6.6.1 for Windows agent

commit 5424f14
Author: Robbie Zhang <[email protected]>
Date:   Fri Sep 1 16:36:47 2017 -0700

    Set master AvailabilitySet FaultDomainCount and UpdateDomainCount to 1

commit 5b1fbb0
Author: Robbie Zhang <[email protected]>
Date:   Tue Aug 15 12:23:41 2017 -0700

    Enable StorageAccount Encryption and Enforce HTTPS

commit 12fd01d
Author: Harry He <[email protected]>
Date:   Fri Jul 7 10:16:03 2017 -0700

    Remove Resource Requests from kube-proxy (#5)

    Previously kube-proxy requested 100m CPU. It prevented containers requesting 1 CPU from being deployed onto nodes with 1 CPU, because there is only 900m CPU left.

    This change remove resource requests from kube-proxy.

commit 5241639
Author: Robbie Zhang <[email protected]>
Date:   Fri Jul 7 14:23:32 2017 -0700

    Set the default CloudProvider backoff values

commit 549a4c2
Merge: 0506730 8a47cbd
Author: Robbie Zhang <[email protected]>
Date:   Fri Jul 7 16:14:12 2017 -0700

    Merge with v0.3.0

commit 0506730
Author: Robbie Zhang <[email protected]>
Date:   Fri Jul 7 13:01:18 2017 -0700

    Disable Automatic Windows Update

commit 8eb8afe
Merge: 639e36a fb09cdf
Author: Robbie Zhang <[email protected]>
Date:   Fri Jul 7 12:07:03 2017 -0700

    Merge from upstream release v0.2.0

commit 639e36a
Author: Robbie Zhang <[email protected]>
Date:   Mon Jul 3 11:05:10 2017 -0700

    Remove azure.json from Windows Agent

commit c9d0704
Merge: bae0a8b 579e8b8
Author: Robbie Zhang <[email protected]>
Date:   Mon Jun 19 10:13:37 2017 -0700

    Merge tag 'v0.1.2' into migration

commit bae0a8b
Author: Raghu Shantha [MSFT] <[email protected]>
Date:   Thu Jun 15 11:36:03 2017 -0700

    Enable Firewall on Node, Add Windows Firewall rules for required ports (#2)

    * Enable Firewall on Node, Add Windows Firewall rules for required ports

    * Added comments for firewall rules

    * Allow all traffic; lockdown kubectl Node ports to Master only

    * Remove & and single quote in comment section

    resource group deployment parser does not like these chars in the comment section

commit af24ad6
Author: Robbie Zhang <[email protected]>
Date:   Tue Jun 6 18:20:40 2017 -0700

    Enable RBAC on APIServer

commit e648d3d
Merge: 380bc58 cc95f47
Author: Robbie Zhang <[email protected]>
Date:   Wed May 24 11:01:11 2017 -0700

    Merge branch 'master' into migration

commit 380bc58
Author: Robbie Zhang <[email protected]>
Date:   Mon May 15 11:39:43 2017 -0700

    Fix: add the size map for F1

commit e64b446
Merge: 87c56c3 253dd41
Author: Wenjun Wu <[email protected]>
Date:   Sun May 14 15:47:20 2017 -0700

    Merge branch 'master' into migration

commit 87c56c3
Author: Robbie Zhang <[email protected]>
Date:   Fri Apr 14 12:55:21 2017 -0700

    Private Commit for Azure Console Shell

    Remove SPN secrets from agent node
    Remove the Kube Dashboard and Heapster Addons
    Add agentpool label on the agent nodes
    Use static IP address for system and agentpool1
  • Loading branch information
wenwu449 committed Feb 13, 2018
1 parent 9fa6a69 commit fa3d6ff
Show file tree
Hide file tree
Showing 9 changed files with 148 additions and 102 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ spec:
matchLabels:
k8s-app: kube-dns
version: v20
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
type: RollingUpdate
template:
metadata:
annotations:
Expand Down Expand Up @@ -168,3 +173,4 @@ spec:
serviceAccountName: kube-dns
nodeSelector:
beta.kubernetes.io/os: linux
agentpool: system
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ spec:
- "--feature-gates=ExperimentalCriticalPodAnnotation=true"
image: "<kubernetesHyperkubeSpec>"
name: kube-proxy
resources:
requests:
cpu: 100m
securityContext:
privileged: true
volumeMounts:
Expand Down
42 changes: 40 additions & 2 deletions parts/k8s/kubernetesagentresourcesvmas.t
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,15 @@
{{if eq $seq 1}}
"primary": true,
{{end}}
{{if eq $.Name "system"}}
"privateIPAddress": "[concat(variables('masterFirstAddrPrefix'), copyIndex(add(50, int(variables('masterFirstAddrOctet4')))))]",
"privateIPAllocationMethod": "Static",
{{else if eq $.Name "agentpool1"}}
"privateIPAddress": "[concat(variables('masterFirstAddrPrefix'), copyIndex(add(100, int(variables('masterFirstAddrOctet4')))))]",
"privateIPAllocationMethod": "Static",
{{else}}
"privateIPAllocationMethod": "Dynamic",
{{end}}
"subnet": {
"id": "[variables('{{$.Name}}VnetSubnetID')]"
}
Expand Down Expand Up @@ -69,10 +77,25 @@
"[concat('Microsoft.Network/publicIPAddresses/', variables('masterPublicIPAddressName'))]"
],
{{end}}
"kind": "Storage",
"location": "[variables('location')]",
"name": "[concat(variables('storageAccountPrefixes')[mod(add(copyIndex(),variables('{{.Name}}StorageAccountOffset')),variables('storageAccountPrefixesCount'))],variables('storageAccountPrefixes')[div(add(copyIndex(),variables('{{.Name}}StorageAccountOffset')),variables('storageAccountPrefixesCount'))],variables('{{.Name}}AccountName'))]",
"properties": {
"accountType": "[variables('vmSizesMap')[variables('{{.Name}}VMSize')].storageAccountType]"
"encryption": {
"keySource": "Microsoft.Storage",
"services": {
"blob": {
"enabled": true
},
"file": {
"enabled": true
}
}
},
"supportsHttpsTrafficOnly": true
},
"sku": {
"name": "[variables('vmSizesMap')[variables('{{.Name}}VMSize')].storageAccountType]"
},
"type": "Microsoft.Storage/storageAccounts"
},
Expand All @@ -88,10 +111,25 @@
"[concat('Microsoft.Network/publicIPAddresses/', variables('masterPublicIPAddressName'))]"
],
{{end}}
"kind": "Storage",
"location": "[variables('location')]",
"name": "[concat(variables('storageAccountPrefixes')[mod(add(copyIndex(variables('dataStorageAccountPrefixSeed')),variables('{{.Name}}StorageAccountOffset')),variables('storageAccountPrefixesCount'))],variables('storageAccountPrefixes')[div(add(copyIndex(variables('dataStorageAccountPrefixSeed')),variables('{{.Name}}StorageAccountOffset')),variables('storageAccountPrefixesCount'))],variables('{{.Name}}DataAccountName'))]",
"properties": {
"accountType": "[variables('vmSizesMap')[variables('{{.Name}}VMSize')].storageAccountType]"
"encryption": {
"keySource": "Microsoft.Storage",
"services": {
"blob": {
"enabled": true
},
"file": {
"enabled": true
}
}
},
"supportsHttpsTrafficOnly": true
},
"sku": {
"name": "[variables('vmSizesMap')[variables('{{.Name}}VMSize')].storageAccountType]"
},
"type": "Microsoft.Storage/storageAccounts"
},
Expand Down
31 changes: 21 additions & 10 deletions parts/k8s/kubernetesmastercustomscript.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,7 @@ echo `date`,`hostname`, startscript>>/opt/m
# A delay to start the kubernetes processes is necessary
# if a reboot is required. Otherwise, the agents will encounter issue:
# https://github.com/kubernetes/kubernetes/issues/41185
if [ -f /var/run/reboot-required ]; then
REBOOTREQUIRED=true
else
REBOOTREQUIRED=false
fi
REBOOTREQUIRED=false

# If APISERVER_PRIVATE_KEY is empty, then we are not on the master
if [[ ! -z "${APISERVER_PRIVATE_KEY}" ]]; then
Expand Down Expand Up @@ -146,11 +142,15 @@ chmod 0644 "${APISERVER_PUBLIC_KEY_PATH}"
chown root:root "${APISERVER_PUBLIC_KEY_PATH}"
echo "${APISERVER_PUBLIC_KEY}" | base64 --decode > "${APISERVER_PUBLIC_KEY_PATH}"

AZURE_JSON_PATH="/etc/kubernetes/azure.json"
touch "${AZURE_JSON_PATH}"
chmod 0600 "${AZURE_JSON_PATH}"
chown root:root "${AZURE_JSON_PATH}"
cat << EOF > "${AZURE_JSON_PATH}"
# If APISERVER_PRIVATE_KEY is empty, then we are not on the master
if [[ ! -z "${APISERVER_PRIVATE_KEY}" ]]; then
echo "APISERVER_PRIVATE_KEY is non-empty, assuming master node, configure azure json."

AZURE_JSON_PATH="/etc/kubernetes/azure.json"
touch "${AZURE_JSON_PATH}"
chmod 0600 "${AZURE_JSON_PATH}"
chown root:root "${AZURE_JSON_PATH}"
cat << EOF > "${AZURE_JSON_PATH}"
{
"cloud":"${TARGET_ENVIRONMENT}",
"tenantId": "${TENANT_ID}",
Expand All @@ -177,6 +177,9 @@ cat << EOF > "${AZURE_JSON_PATH}"
"useInstanceMetadata": ${USE_INSTANCE_METADATA}
}
EOF
else
echo "APISERVER_PRIVATE_KEY is empty, assuming worker node, skip azure json."
fi

###########################################################
# END OF SECRET DATA
Expand Down Expand Up @@ -485,6 +488,8 @@ if [[ ! -z "${APISERVER_PRIVATE_KEY}" ]]; then
ensureEtcdDataDir
ensureEtcd
ensureApiserver

/usr/local/bin/kubectl create clusterrolebinding superuser --clusterrole=cluster-admin --user=client
fi

if [[ $OS == $UBUNTU_OS_NAME ]]; then
Expand All @@ -498,6 +503,12 @@ fi

echo "Install complete successfully"

if [ -f /var/run/reboot-required ]; then
REBOOTREQUIRED=true
else
REBOOTREQUIRED=false
fi

if $REBOOTREQUIRED; then
# wait 1 minute to restart node, so that the custom script extension can complete
echo 'reboot required, rebooting node in 1 minute'
Expand Down
51 changes: 18 additions & 33 deletions parts/k8s/kubernetesmasterresources.t
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"name": "[variables('masterAvailabilitySet')]",
"properties":
{
"platformFaultDomainCount": "2",
"platformUpdateDomainCount": "3",
"platformFaultDomainCount": "1",
"platformUpdateDomainCount": "1",
"managed" : "true"
},
"type": "Microsoft.Compute/availabilitySets"
Expand All @@ -24,10 +24,25 @@
"dependsOn": [
"[concat('Microsoft.Network/publicIPAddresses/', variables('masterPublicIPAddressName'))]"
],
"kind": "Storage",
"location": "[variables('location')]",
"name": "[variables('masterStorageAccountName')]",
"properties": {
"accountType": "[variables('vmSizesMap')[variables('masterVMSize')].storageAccountType]"
"encryption": {
"keySource": "Microsoft.Storage",
"services": {
"blob": {
"enabled": true
},
"file": {
"enabled": true
}
}
},
"supportsHttpsTrafficOnly": true
},
"sku": {
"name": "[variables('vmSizesMap')[variables('masterVMSize')].storageAccountType]"
},
"type": "Microsoft.Storage/storageAccounts"
},
Expand Down Expand Up @@ -77,36 +92,6 @@
"name": "[variables('nsgName')]",
"properties": {
"securityRules": [
{{if .HasWindows}}
{
"name": "allow_rdp",
"properties": {
"access": "Allow",
"description": "Allow RDP traffic to master",
"destinationAddressPrefix": "*",
"destinationPortRange": "3389-3389",
"direction": "Inbound",
"priority": 102,
"protocol": "Tcp",
"sourceAddressPrefix": "*",
"sourcePortRange": "*"
}
},
{{end}}
{
"name": "allow_ssh",
"properties": {
"access": "Allow",
"description": "Allow SSH traffic to master",
"destinationAddressPrefix": "*",
"destinationPortRange": "22-22",
"direction": "Inbound",
"priority": 101,
"protocol": "Tcp",
"sourceAddressPrefix": "*",
"sourcePortRange": "*"
}
},
{
"name": "allow_kube_tls",
"properties": {
Expand Down
8 changes: 4 additions & 4 deletions parts/k8s/kubernetesmastervars.t
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
"sshKeyPath": "[concat('/home/',variables('username'),'/.ssh/authorized_keys')]",

{{if .HasStorageAccountDisks}}
"apiVersionStorage": "2015-06-15",
"apiVersionStorage": "2016-12-01",
"maxVMsPerStorageAccount": 20,
"maxStorageAccountsPerAgent": "[div(variables('maxVMsPerPool'),variables('maxVMsPerStorageAccount'))]",
"dataStorageAccountPrefixSeed": 97,
Expand All @@ -171,10 +171,10 @@
{{end}}
"provisionScript": "{{GetKubernetesB64Provision}}",
"mountetcdScript": "{{GetKubernetesB64Mountetcd}}",
"provisionScriptParametersCommon": "[concat('TENANT_ID=',variables('tenantID'),' APISERVER_PUBLIC_KEY=',variables('apiserverCertificate'),' SUBSCRIPTION_ID=',variables('subscriptionId'),' RESOURCE_GROUP=',variables('resourceGroup'),' LOCATION=',variables('location'),' SUBNET=',variables('subnetName'),' NETWORK_SECURITY_GROUP=',variables('nsgName'),' VIRTUAL_NETWORK=',variables('virtualNetworkName'),' VIRTUAL_NETWORK_RESOURCE_GROUP=',variables('virtualNetworkResourceGroupName'),' ROUTE_TABLE=',variables('routeTableName'),' PRIMARY_AVAILABILITY_SET=',variables('primaryAvailabilitySetName'),' SERVICE_PRINCIPAL_CLIENT_ID=',variables('servicePrincipalClientId'),' SERVICE_PRINCIPAL_CLIENT_SECRET=',variables('servicePrincipalClientSecret'),' KUBELET_PRIVATE_KEY=',variables('clientPrivateKey'),' TARGET_ENVIRONMENT=',variables('targetEnvironment'),' NETWORK_POLICY=',variables('networkPolicy'),' FQDNSuffix=',variables('fqdnEndpointSuffix'),' VNET_CNI_PLUGINS_URL=',variables('vnetCniLinuxPluginsURL'),' CNI_PLUGINS_URL=',variables('cniPluginsURL'),' MAX_PODS=',variables('maxPods'),' CLOUDPROVIDER_BACKOFF=',variables('cloudProviderBackoff'),' CLOUDPROVIDER_BACKOFF_RETRIES=',variables('cloudProviderBackoffRetries'),' CLOUDPROVIDER_BACKOFF_EXPONENT=',variables('cloudProviderBackoffExponent'),' CLOUDPROVIDER_BACKOFF_DURATION=',variables('cloudProviderBackoffDuration'),' CLOUDPROVIDER_BACKOFF_JITTER=',variables('cloudProviderBackoffJitter'),' CLOUDPROVIDER_RATELIMIT=',variables('cloudProviderRatelimit'),' CLOUDPROVIDER_RATELIMIT_QPS=',variables('cloudProviderRatelimitQPS'),' CLOUDPROVIDER_RATELIMIT_BUCKET=',variables('cloudProviderRatelimitBucket'),' USE_MANAGED_IDENTITY_EXTENSION=',variables('useManagedIdentityExtension'),' USE_INSTANCE_METADATA=',variables('useInstanceMetadata'))]",
"provisionScriptParametersCommon": "[concat('KUBELET_PRIVATE_KEY=',variables('clientPrivateKey'),' NETWORK_POLICY=',variables('networkPolicy'),' APISERVER_PUBLIC_KEY=',variables('apiserverCertificate'),' MAX_PODS=',variables('maxPods'))]",

{{if not IsHostedMaster}}
"provisionScriptParametersMaster": "[concat('APISERVER_PRIVATE_KEY=',variables('apiServerPrivateKey'),' CA_CERTIFICATE=',variables('caCertificate'),' CA_PRIVATE_KEY=',variables('caPrivateKey'),' MASTER_FQDN=',variables('masterFqdnPrefix'),' KUBECONFIG_CERTIFICATE=',variables('kubeConfigCertificate'),' KUBECONFIG_KEY=',variables('kubeConfigPrivateKey'),' ETCD_SERVER_CERTIFICATE=',variables('etcdServerCertificate'),' ETCD_CLIENT_CERTIFICATE=',variables('etcdClientCertificate'),' ETCD_SERVER_PRIVATE_KEY=',variables('etcdServerPrivateKey'),' ETCD_CLIENT_PRIVATE_KEY=',variables('etcdClientPrivateKey'),' ETCD_PEER_CERTIFICATES=',string(variables('etcdPeerCertificates')),' ETCD_PEER_PRIVATE_KEYS=',string(variables('etcdPeerPrivateKeys')),' ADMINUSER=',variables('username'))]",
"provisionScriptParametersMaster": "[concat('TENANT_ID=',variables('tenantID'),' SUBSCRIPTION_ID=',variables('subscriptionId'),' RESOURCE_GROUP=',variables('resourceGroup'),' LOCATION=',variables('location'),' SUBNET=',variables('subnetName'),' NETWORK_SECURITY_GROUP=',variables('nsgName'),' VIRTUAL_NETWORK=',variables('virtualNetworkName'),' VIRTUAL_NETWORK_RESOURCE_GROUP=',variables('virtualNetworkResourceGroupName'),' ROUTE_TABLE=',variables('routeTableName'),' PRIMARY_AVAILABILITY_SET=',variables('primaryAvailabilitySetName'),' SERVICE_PRINCIPAL_CLIENT_ID=',variables('servicePrincipalClientId'),' SERVICE_PRINCIPAL_CLIENT_SECRET=',variables('servicePrincipalClientSecret'),' TARGET_ENVIRONMENT=',variables('targetEnvironment'),' FQDNSuffix=',variables('fqdnEndpointSuffix'),' VNET_CNI_PLUGINS_URL=',variables('vnetCniLinuxPluginsURL'),' CNI_PLUGINS_URL=',variables('cniPluginsURL'),' CLOUDPROVIDER_BACKOFF=',variables('cloudProviderBackoff'),' CLOUDPROVIDER_BACKOFF_RETRIES=',variables('cloudProviderBackoffRetries'),' CLOUDPROVIDER_BACKOFF_EXPONENT=',variables('cloudProviderBackoffExponent'),' CLOUDPROVIDER_BACKOFF_DURATION=',variables('cloudProviderBackoffDuration'),' CLOUDPROVIDER_BACKOFF_JITTER=',variables('cloudProviderBackoffJitter'),' CLOUDPROVIDER_RATELIMIT=',variables('cloudProviderRatelimit'),' CLOUDPROVIDER_RATELIMIT_QPS=',variables('cloudProviderRatelimitQPS'),' CLOUDPROVIDER_RATELIMIT_BUCKET=',variables('cloudProviderRatelimitBucket'),' USE_MANAGED_IDENTITY_EXTENSION=',variables('useManagedIdentityExtension'),' USE_INSTANCE_METADATA=',variables('useInstanceMetadata'),' APISERVER_PRIVATE_KEY=',variables('apiServerPrivateKey'),' CA_CERTIFICATE=',variables('caCertificate'),' CA_PRIVATE_KEY=',variables('caPrivateKey'),' MASTER_FQDN=',variables('masterFqdnPrefix'),' KUBECONFIG_CERTIFICATE=',variables('kubeConfigCertificate'),' KUBECONFIG_KEY=',variables('kubeConfigPrivateKey'),' ETCD_SERVER_CERTIFICATE=',variables('etcdServerCertificate'),' ETCD_CLIENT_CERTIFICATE=',variables('etcdClientCertificate'),' ETCD_SERVER_PRIVATE_KEY=',variables('etcdServerPrivateKey'),' ETCD_CLIENT_PRIVATE_KEY=',variables('etcdClientPrivateKey'),' ETCD_PEER_CERTIFICATES=',string(variables('etcdPeerCertificates')),' ETCD_PEER_PRIVATE_KEYS=',string(variables('etcdPeerPrivateKeys')),' ADMINUSER=',variables('username'))]",
{{end}}
"generateProxyCertsScript": "{{GetKubernetesB64GenerateProxyCerts}}",
"orchestratorNameVersionTag": "{{.OrchestratorProfile.OrchestratorType}}:{{.OrchestratorProfile.OrchestratorVersion}}",
Expand Down Expand Up @@ -229,7 +229,7 @@
"nsgName": "[concat(variables('agentNamePrefix'), 'nsg')]",
{{end}}
"nsgID": "[resourceId('Microsoft.Network/networkSecurityGroups',variables('nsgName'))]",
"primaryAvailabilitySetName": "[concat('{{ (index .AgentPoolProfiles 0).Name }}-availabilitySet-',variables('nameSuffix'))]",
"primaryAvailabilitySetName": "[concat('{{ (index .AgentPoolProfiles 1).Name }}-availabilitySet-',variables('nameSuffix'))]",
{{if not IsHostedMaster }}
"masterPublicIPAddressName": "[concat(variables('orchestratorName'), '-master-ip-', variables('masterFqdnPrefix'), '-', variables('nameSuffix'))]",
"masterLbID": "[resourceId('Microsoft.Network/loadBalancers',variables('masterLbName'))]",
Expand Down
41 changes: 37 additions & 4 deletions parts/k8s/kuberneteswinagentresourcesvmas.t
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,25 @@
"[concat('Microsoft.Network/publicIPAddresses/', variables('masterPublicIPAddressName'))]"
],
{{end}}
"kind": "Storage",
"location": "[variables('location')]",
"name": "[concat(variables('storageAccountPrefixes')[mod(add(copyIndex(),variables('{{.Name}}StorageAccountOffset')),variables('storageAccountPrefixesCount'))],variables('storageAccountPrefixes')[div(add(copyIndex(),variables('{{.Name}}StorageAccountOffset')),variables('storageAccountPrefixesCount'))],variables('{{.Name}}AccountName'))]",
"properties": {
"accountType": "[variables('vmSizesMap')[variables('{{.Name}}VMSize')].storageAccountType]"
"encryption": {
"keySource": "Microsoft.Storage",
"services": {
"blob": {
"enabled": true
},
"file": {
"enabled": true
}
}
},
"supportsHttpsTrafficOnly": true
},
"sku": {
"name": "[variables('vmSizesMap')[variables('{{.Name}}VMSize')].storageAccountType]"
},
"type": "Microsoft.Storage/storageAccounts"
},
Expand All @@ -88,10 +103,25 @@
"[concat('Microsoft.Network/publicIPAddresses/', variables('masterPublicIPAddressName'))]"
],
{{end}}
"kind": "Storage",
"location": "[variables('location')]",
"name": "[concat(variables('storageAccountPrefixes')[mod(add(copyIndex(variables('dataStorageAccountPrefixSeed')),variables('{{.Name}}StorageAccountOffset')),variables('storageAccountPrefixesCount'))],variables('storageAccountPrefixes')[div(add(copyIndex(variables('dataStorageAccountPrefixSeed')),variables('{{.Name}}StorageAccountOffset')),variables('storageAccountPrefixesCount'))],variables('{{.Name}}DataAccountName'))]",
"properties": {
"accountType": "[variables('vmSizesMap')[variables('{{.Name}}VMSize')].storageAccountType]"
"encryption": {
"keySource": "Microsoft.Storage",
"services": {
"blob": {
"enabled": true
},
"file": {
"enabled": true
}
}
},
"supportsHttpsTrafficOnly": true
},
"sku": {
"name": "[variables('vmSizesMap')[variables('{{.Name}}VMSize')].storageAccountType]"
},
"type": "Microsoft.Storage/storageAccounts"
},
Expand Down Expand Up @@ -156,7 +186,10 @@
"computername": "[concat(variables('{{.Name}}VMNamePrefix'), copyIndex(variables('{{.Name}}Offset')))]",
{{GetKubernetesWindowsAgentCustomData .}}
"adminUsername": "[variables('windowsAdminUsername')]",
"adminPassword": "[variables('windowsAdminPassword')]"
"adminPassword": "[variables('windowsAdminPassword')]",
"windowsConfiguration": {
"enableAutomaticUpdates": false
}
},
"storageProfile": {
{{GetDataDisks .}}
Expand Down Expand Up @@ -245,7 +278,7 @@
"autoUpgradeMinorVersion": true,
"settings": {},
"protectedSettings": {
"commandToExecute": "[concat('powershell.exe -ExecutionPolicy Unrestricted -command \"', '$arguments = ', variables('singleQuote'),'-MasterIP ',variables('kubernetesAPIServerIP'),' -KubeDnsServiceIp ',variables('kubeDnsServiceIp'),' -MasterFQDNPrefix ',variables('masterFqdnPrefix'),' -Location ',variables('location'),' -AgentKey ',variables('clientPrivateKey'),' -AzureHostname ',variables('{{.Name}}VMNamePrefix'),copyIndex(variables('{{.Name}}Offset')),' -AADClientId ',variables('servicePrincipalClientId'),' -AADClientSecret ',variables('servicePrincipalClientSecret'),variables('singleQuote'), ' ; ', variables('windowsCustomScriptSuffix'), '\" > %SYSTEMDRIVE%\\AzureData\\CustomDataSetupScript.log 2>&1')]"
"commandToExecute": "[concat('powershell.exe -ExecutionPolicy Unrestricted -command \"', '$arguments = ', variables('singleQuote'),'-MasterIP ',variables('kubernetesAPIServerIP'),' -KubeDnsServiceIp ',variables('kubeDnsServiceIp'),' -MasterFQDNPrefix ',variables('masterFqdnPrefix'),' -Location ',variables('location'),' -AgentKey ',variables('clientPrivateKey'),' -AzureHostname ',variables('{{.Name}}VMNamePrefix'),copyIndex(variables('{{.Name}}Offset')),variables('singleQuote'), ' ; ', variables('windowsCustomScriptSuffix'), '\" > %SYSTEMDRIVE%\\AzureData\\CustomDataSetupScript.log 2>&1')]"
}
}
}
Loading

0 comments on commit fa3d6ff

Please sign in to comment.