Skip to content

Commit

Permalink
use variable for startup script path, to avoid collision on machine c…
Browse files Browse the repository at this point in the history
…ontroller (kubernetes-sigs#341)
  • Loading branch information
k4leung4 authored and k8s-ci-robot committed Jun 15, 2018
1 parent a13c151 commit 825f6b1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions provider-components.yaml.template
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ data:
variable "network" { default = "VM Network"}
variable "disk_label" { default = "disk0" }
variable "disk_size" { default = 10}
variable "startup_script_path" {}

variable "vm_name" {
type = "string"
Expand Down Expand Up @@ -219,7 +220,7 @@ data:
- /tmp/master.sh
EOF
vars {
startup_script = "${base64encode(file("/tmp/machine-startup.sh"))}"
startup_script = "${base64encode(file(var.startup_script_path))}"
cloud_provider_config = "${base64encode(data.template_file.cloud_provider_config.rendered)}"
}
}
Expand Down Expand Up @@ -283,6 +284,7 @@ data:
variable "network" { default = "VM Network"}
variable "disk_label" { default = "disk0" }
variable "disk_size" { default = 10}
variable "startup_script_path" {}

variable "vm_name" {
type = "string"
Expand Down Expand Up @@ -339,7 +341,7 @@ data:
- /tmp/node.sh
EOF
vars {
startup_script = "${indent(6, file("/tmp/machine-startup.sh"))}"
startup_script = "${base64encode(file(var.startup_script_path))}"
}
}

Expand Down

0 comments on commit 825f6b1

Please sign in to comment.