fix(autodeploy+msi): don't autogen creds when using msi
@@ -177,6 +177,12 @@ func (dc *deployCmd) validate(cmd *cobra.Command, args []string) {
log.Fatal("apimodel invalid: ServicePrincipalProfile is missing either the clientid or secret.")
}
+ if dc.containerService.Properties.OrchestratorProfile != nil &&
+ dc.containerService.Properties.OrchestratorProfile.KubernetesConfig != nil &&
+ dc.containerService.Properties.OrchestratorProfile.KubernetesConfig.UseManagedIdentity {
+ log.Warnln("apimodel: ServicePrincipalProfile was empty, but user is using msi. Skipping ServicePrincipal creation.")
+ } else {
+
log.Warnln("apimodel: ServicePrincipalProfile was empty, creating application...")
// TODO: consider caching the creds here so they persist between subsequent runs of 'deploy'
@@ -204,6 +210,7 @@ func (dc *deployCmd) validate(cmd *cobra.Command, args []string) {
Secret: secret,
}
}
+ }
// This isn't terribly elegant, but it's the easiest way to go for now w/o duplicating a bunch of code
rawVersionedAPIModel, err := api.SerializeContainerService(dc.containerService, dc.apiVersion)
