Skip to content

Commit

Permalink
Fix kubernetes version for node startup script
Browse files Browse the repository at this point in the history
  • Loading branch information
tahsinrahman committed Mar 28, 2019
1 parent b55f066 commit f880e43
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/cloud/azure/services/config/startupscript.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package config
import (
"fmt"
"os"
"strings"

"github.com/pkg/errors"
"k8s.io/klog"
Expand Down Expand Up @@ -72,7 +73,7 @@ func GetVMStartupScript(machine *actuators.MachineScope, bootstrapToken string)
SaKey: string(machine.Scope.ClusterConfig.SAKeyPair.Key),
BootstrapToken: bootstrapToken,
LBAddress: dnsName,
KubernetesVersion: machine.Machine.Spec.Versions.ControlPlane,
KubernetesVersion: strings.TrimPrefix(machine.Machine.Spec.Versions.ControlPlane, "v"),
CloudProviderConfig: getAzureCloudProviderConfig(machine),
})
if err != nil {
Expand All @@ -99,7 +100,7 @@ func GetVMStartupScript(machine *actuators.MachineScope, bootstrapToken string)
PodSubnet: machine.Scope.Cluster.Spec.ClusterNetwork.Pods.CIDRBlocks[0],
ServiceSubnet: machine.Scope.Cluster.Spec.ClusterNetwork.Services.CIDRBlocks[0],
ServiceDomain: machine.Scope.Cluster.Spec.ClusterNetwork.ServiceDomain,
KubernetesVersion: machine.Machine.Spec.Versions.ControlPlane,
KubernetesVersion: strings.TrimPrefix(machine.Machine.Spec.Versions.Kubelet, "v"),
CloudProviderConfig: getAzureCloudProviderConfig(machine),
})

Expand Down

0 comments on commit f880e43

Please sign in to comment.