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 67e8c9c
Show file tree
Hide file tree
Showing 7 changed files with 229 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .idea/cluster-api-provider-azure.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

191 changes: 191 additions & 0 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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 67e8c9c

Please sign in to comment.