diff --git a/docs/clusterdefinition.md b/docs/clusterdefinition.md index 9c6836811f..1f944ab38e 100644 --- a/docs/clusterdefinition.md +++ b/docs/clusterdefinition.md @@ -41,6 +41,7 @@ Here are the valid values for the orchestrator types: |maxPods|no|The maximum number of pods per node. The minimum valid value, necessary for running kube-system pods, is 5. Default value is 30 when networkPolicy equals azure, 110 otherwise.| |gcHighThreshold|no|Sets the --image-gc-high-threshold value on the kublet configuration. Default is 85. [See kubelet Garbage Collection](https://kubernetes.io/docs/concepts/cluster-administration/kubelet-garbage-collection/) | |gcLowThreshold|no|Sets the --image-gc-low-threshold value on the kublet configuration. Default is 80. [See kubelet Garbage Collection](https://kubernetes.io/docs/concepts/cluster-administration/kubelet-garbage-collection/) | +|useInstanceMetadata|no|Use the Azure cloudprovider instance metadata service for appropriate resource discovery operations. Default is `true`.| |disabledAddons.dashboard|no|Disable dashboard addon (boolean - default == false, i.e. not disabled)| ### masterProfile diff --git a/pkg/acsengine/engine.go b/pkg/acsengine/engine.go index 3a17519f3e..2a052812b4 100644 --- a/pkg/acsengine/engine.go +++ b/pkg/acsengine/engine.go @@ -788,7 +788,12 @@ func (t *TemplateGenerator) getTemplateFuncMap(cs *api.ContainerService) templat return cs.Properties.OrchestratorProfile.KubernetesConfig.UseManagedIdentity }, "UseInstanceMetadata": func() bool { - return cs.Properties.OrchestratorProfile.KubernetesConfig.UseInstanceMetadata + if cs.Properties.OrchestratorProfile.KubernetesConfig.UseInstanceMetadata == nil { + return true + } else if *cs.Properties.OrchestratorProfile.KubernetesConfig.UseInstanceMetadata { + return true + } + return false }, "GetVNETSubnetDependencies": func() string { return getVNETSubnetDependencies(cs.Properties) diff --git a/pkg/api/types.go b/pkg/api/types.go index 675f5098ba..c533936307 100644 --- a/pkg/api/types.go +++ b/pkg/api/types.go @@ -186,7 +186,7 @@ type KubernetesConfig struct { CloudProviderRateLimitBucket int `json:"cloudProviderRateLimitBucket,omitempty"` UseManagedIdentity bool `json:"useManagedIdentity,omitempty"` CustomHyperkubeImage string `json:"customHyperkubeImage,omitempty"` - UseInstanceMetadata bool `json:"useInstanceMetadata,omitempty"` + UseInstanceMetadata *bool `json:"useInstanceMetadata,omitempty"` EnableRbac bool `json:"enableRbac,omitempty"` EnableAggregatedAPIs bool `json:"enableAggregatedAPIs,omitempty"` GCHighThreshold int `json:"gchighthreshold,omitempty"` diff --git a/pkg/api/vlabs/types.go b/pkg/api/vlabs/types.go index 958035498e..ca6ff1f7d2 100644 --- a/pkg/api/vlabs/types.go +++ b/pkg/api/vlabs/types.go @@ -204,7 +204,7 @@ type KubernetesConfig struct { CloudProviderRateLimitBucket int `json:"cloudProviderRateLimitBucket,omitempty"` UseManagedIdentity bool `json:"useManagedIdentity,omitempty"` CustomHyperkubeImage string `json:"customHyperkubeImage,omitempty"` - UseInstanceMetadata bool `json:"useInstanceMetadata,omitempty"` + UseInstanceMetadata *bool `json:"useInstanceMetadata,omitempty"` EnableRbac bool `json:"enableRbac,omitempty"` EnableAggregatedAPIs bool `json:"enableAggregatedAPIs,omitempty"` GCHighThreshold int `json:"gchighthreshold,omitempty"`