mirror of https://github.com/kubernetes/kops.git
Move options to common stage, so that it works with terraform generation
This commit is contained in:
parent
c36607644b
commit
26d05341b4
|
@ -108,15 +108,15 @@ We divide the 'cloudup' model into two parts:
|
||||||
So you don't use terraform for the 'proto' phase (you can't anyway, because of the bug!):
|
So you don't use terraform for the 'proto' phase (you can't anyway, because of the bug!):
|
||||||
|
|
||||||
```
|
```
|
||||||
export MYZONE=<kubernetes.myzone.com>
|
export CLUSTER_NAME=<kubernetes.myzone.com>
|
||||||
${GOPATH}/bin/cloudup --v=0 --logtostderr --cloud=aws --zones=us-east-1c --name=${MYZONE} --model=proto
|
${GOPATH}/bin/cloudup --v=0 --logtostderr --cloud=aws --zones=us-east-1c --name=${CLUSTER_NAME} --model=config,proto
|
||||||
```
|
```
|
||||||
|
|
||||||
And then you can use terraform to do the full installation:
|
And then you can use terraform to do the full installation:
|
||||||
|
|
||||||
```
|
```
|
||||||
export MYZONE=<kubernetes.myzone.com>
|
export CLUSTER_NAME=<kubernetes.myzone.com>
|
||||||
${GOPATH}/bin/cloudup --v=0 --logtostderr --cloud=aws --zones=us-east-1c --name=${MYZONE} --model=cloudup --target=terraform
|
${GOPATH}/bin/cloudup --v=0 --logtostderr --cloud=aws --zones=us-east-1c --name=${CLUSTER_NAME} --model=config,cloudup --target=terraform
|
||||||
```
|
```
|
||||||
|
|
||||||
Then, to apply using terraform:
|
Then, to apply using terraform:
|
||||||
|
|
|
@ -101,6 +101,10 @@ func (t *TerraformTarget) Finish(taskMap map[string]fi.Task) error {
|
||||||
providerGoogle["project"] = t.Project
|
providerGoogle["project"] = t.Project
|
||||||
providerGoogle["region"] = t.Region
|
providerGoogle["region"] = t.Region
|
||||||
providersByName["google"] = providerGoogle
|
providersByName["google"] = providerGoogle
|
||||||
|
} else if t.Cloud.ProviderID() == fi.CloudProviderAWS {
|
||||||
|
providerAWS := make(map[string]interface{})
|
||||||
|
providerAWS["region"] = t.Region
|
||||||
|
providersByName["aws"] = providerAWS
|
||||||
}
|
}
|
||||||
|
|
||||||
data := make(map[string]interface{})
|
data := make(map[string]interface{})
|
||||||
|
|
Loading…
Reference in New Issue