Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion examples/v2/gke/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ When ready, deploy with the following command:

NAME="your-name"
ZONE="your-zone"
CLUSTER_VERSION="your-cluster-version"
MACHINE_TYPE="your-machine-type"
gcloud deployment-manager deployments create ${NAME} \
--template cluster.py \
--properties zone:${ZONE}
--properties zone:${ZONE},clusterVersion:${CLUSTER_VERSION},machineType:${MACHINE_TYPE}

This will result in two resources:

Expand Down
2 changes: 2 additions & 0 deletions examples/v2/gke/python/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ def GenerateConfig(context):
'zone': context.properties['zone'],
'cluster': {
'name': cluster_name,
'initialClusterVersion': context.properties['clusterVersion'],
'initialNodeCount': context.properties['initialNodeCount'],
'nodeConfig': {
'machineType': context.properties['machineType'],
'oauthScopes': [
'https://www.googleapis.com/auth/' + s
for s in [
Expand Down
6 changes: 6 additions & 0 deletions examples/v2/gke/python/cluster.py.schema
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ properties:
zone:
type: string
description: Zone in which the cluster should run.
clusterVersion:
type: string
description: The initial Kubernetes version for this cluster.
machineType:
type: string
description: A set of virtualized hardware resources available to VM instance.
initialNodeCount:
type: integer
description: Initial number of nodes desired in the cluster.
Expand Down
2 changes: 2 additions & 0 deletions examples/v2/gke/python/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@ resources:
type: cluster.py
properties:
zone: ZONE_TO_RUN
clusterVersion: CLUSTER_VERSION
machineType: MACHINE_TYPE