func getCSECommandVariables()

in pkg/agent/variables.go [85:135]


func getCSECommandVariables(config *datamodel.NodeBootstrappingConfiguration) paramsMap {
	cs := config.ContainerService
	profile := config.AgentPoolProfile

	// this method is called for both windows and linux. If there's no windows profile, then let's just
	// use a blank one.
	windowsProfile := cs.Properties.WindowsProfile
	if windowsProfile == nil {
		windowsProfile = &datamodel.WindowsProfile{}
	}

	return map[string]interface{}{
		"tenantID":                             config.TenantID,
		"subscriptionId":                       config.SubscriptionID,
		"resourceGroup":                        config.ResourceGroupName,
		"location":                             cs.Location,
		"vmType":                               cs.Properties.GetVMType(),
		"subnetName":                           cs.Properties.GetSubnetName(),
		"nsgName":                              cs.Properties.GetNSGName(),
		"virtualNetworkName":                   cs.Properties.GetVirtualNetworkName(),
		"virtualNetworkResourceGroupName":      cs.Properties.GetVNetResourceGroupName(),
		"routeTableName":                       cs.Properties.GetRouteTableName(),
		"primaryAvailabilitySetName":           cs.Properties.GetPrimaryAvailabilitySetName(),
		"primaryScaleSetName":                  config.PrimaryScaleSetName,
		"useManagedIdentityExtension":          useManagedIdentity(cs),
		"useInstanceMetadata":                  useInstanceMetadata(cs),
		"loadBalancerSku":                      cs.Properties.OrchestratorProfile.KubernetesConfig.LoadBalancerSku,
		"excludeMasterFromStandardLB":          true,
		"maximumLoadBalancerRuleCount":         getMaximumLoadBalancerRuleCount(cs),
		"userAssignedIdentityID":               config.UserAssignedIdentityClientID,
		"isVHD":                                isVHD(profile),
		"gpuNode":                              strconv.FormatBool(config.EnableNvidia),
		"sgxNode":                              strconv.FormatBool(datamodel.IsSgxEnabledSKU(profile.VMSize)),
		"configGPUDriverIfNeeded":              config.ConfigGPUDriverIfNeeded,
		"enableGPUDevicePluginIfNeeded":        config.EnableGPUDevicePluginIfNeeded,
		"migNode":                              strconv.FormatBool(datamodel.IsMIGNode(config.GPUInstanceProfile)),
		"gpuInstanceProfile":                   config.GPUInstanceProfile,
		"windowsEnableCSIProxy":                windowsProfile.IsCSIProxyEnabled(),
		"windowsPauseImageURL":                 windowsProfile.WindowsPauseImageURL,
		"windowsCSIProxyURL":                   windowsProfile.CSIProxyURL,
		"windowsProvisioningScriptsPackageURL": windowsProfile.ProvisioningScriptsPackageURL,
		"alwaysPullWindowsPauseImage":          strconv.FormatBool(windowsProfile.IsAlwaysPullWindowsPauseImage()),
		"windowsCalicoPackageURL":              windowsProfile.WindowsCalicoPackageURL,
		"windowsSecureTlsEnabled":              windowsProfile.IsWindowsSecureTlsEnabled(),
		"windowsGmsaPackageUrl":                windowsProfile.WindowsGmsaPackageUrl,
		"windowsGpuDriverURL":                  windowsProfile.GpuDriverURL,
		"windowsCSEScriptsPackageURL":          windowsProfile.CseScriptsPackageURL,
		"isDisableWindowsOutboundNat":          strconv.FormatBool(config.AgentPoolProfile.IsDisableWindowsOutboundNat()),
		"isSkipCleanupNetwork":                 strconv.FormatBool(config.AgentPoolProfile.IsSkipCleanupNetwork()),
	}
}