| # Copyright 2018 Google Inc. All Rights Reserved. |
| |
| resources: |
| |
| # cluster |
| - name: {{ env['deployment'] }} |
| {% if properties["location"] %} |
| type: gcp-types/container-v1beta1:projects.locations.clusters |
| {% else %} |
| type: gcp-types/container-v1beta1:projects.zones.clusters |
| {% endif %} |
| properties: |
| {% if properties["location"] %} |
| parent: projects/{{ env["project"] }}/locations/{{ properties["location"] }} |
| {% else %} |
| zone: {{ properties['zone'] }} |
| {% endif %} |
| cluster: |
| name: {{ env['deployment'] }} |
| ipAllocationPolicy: |
| useIpAliases: true # for cloud memorystore |
| createSubnetwork: true |
| legacyAbac: # For current kube-lego. |
| enabled: true |
| nodePools: |
| # update '-v\d+' suffix if nodeConfig is updated. |
| - name: {{ properties['machineType'] }}{% if properties['preemptible'] %}-preemptible{% endif %}-v2 |
| config: |
| machineType: {{ properties['machineType'] }} |
| preemptible: {{ properties['preemptible'] }} |
| oauthScopes: |
| - https://www.googleapis.com/auth/cloud-platform |
| - https://www.googleapis.com/auth/cloud.useraccounts.readonly |
| - https://www.googleapis.com/auth/compute.readonly |
| - https://www.googleapis.com/auth/devstorage.read_write |
| - https://www.googleapis.com/auth/logging.write |
| - https://www.googleapis.com/auth/monitoring.write |
| - https://www.googleapis.com/auth/pubsub |
| - https://www.googleapis.com/auth/service.management.readonly |
| - https://www.googleapis.com/auth/servicecontrol |
| - https://www.googleapis.com/auth/stackdriver-integration |
| - https://www.googleapis.com/auth/trace.append |
| autoscaling: |
| enabled: true |
| minNodeCount: 1 |
| maxNodeCount: {{ properties['maxNodeCount'] }} |
| initialNodeCount: 1 |
| management: |
| autoUpgrade: true |
| autoRepair: true |