This allows users to create tags (or properties in the case of OpenStack) on instances using string interpolation values. The use case is to be able to add information about the tenant* which requested the instance to cloud-provider tags. * Note that ultimately Nodepool may not end up using a given node for the request which originally prompted its creation, so care should be taken when using information like this. The documentation notes that. This feature uses a new configuration attribute on the provider-label rather than the existing "tags" or "instance-properties" because existing values may not be safe for use as Python format strings (e.g., an existing value might be a JSON blob). This could be solved with YAML tags (like !unsafe) but the most sensible default for that would be to assume format strings and use a YAML tag to disable formatting, which doesn't help with our backwards-compatibility problem. Additionally, Nodepool configuration does not use YAML anchors (yet), so this would be a significant change that might affect people's use of external tools on the config file. Testing this was beyond the ability of the AWS test framework as written, so some redesign for how we handle patching boto-related methods is included. The new approach is simpler, more readable, and flexible in that it can better accomodate future changes. Change-Id: I5f1befa6e2f2625431523d8d94685f79426b6ae5
112 lines
3.4 KiB
YAML
112 lines
3.4 KiB
YAML
webapp:
|
|
port: 8005
|
|
listen_address: '0.0.0.0'
|
|
|
|
zookeeper-servers:
|
|
- host: {zookeeper_host}
|
|
port: {zookeeper_port}
|
|
chroot: {zookeeper_chroot}
|
|
|
|
zookeeper-tls:
|
|
ca: {zookeeper_ca}
|
|
cert: {zookeeper_cert}
|
|
key: {zookeeper_key}
|
|
|
|
tenant-resource-limits:
|
|
- tenant-name: tenant-1
|
|
max-cores: 1024
|
|
|
|
labels:
|
|
- name: bionic
|
|
min-ready: 0
|
|
- name: windows-password
|
|
min-ready: 0
|
|
- name: windows-generate
|
|
min-ready: 0
|
|
- name: image-by-name
|
|
min-ready: 0
|
|
- name: image-by-tag
|
|
min-ready: 0
|
|
|
|
providers:
|
|
- name: azure
|
|
driver: azure
|
|
zuul-public-key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC+mplenM+m6pNY9Un3fpO9eqf808Jrfb3d1gXg7BZVawCvtEZ/cDYvLQ3OF1AeL2kcIC0UAIglM5JXae7yO5CJbJRdkbXvv0u1LvpLxYSPM4ATR0r4IseC5YVxkfJQNi4ixSwTqD4ScEkuCXcSqSU9M+hB+KlnwXoR4IcYHf7vD2Z0Mdwm2ikk3SeERmspmMxx/uz0SPn58QxONuoTlNWQKqDWsV6bRyoPa6HWccMrIH1/e7E69Nw/30oioOQpKBgaDCauh+QkDtSkjRpRMOV47ZFh16Q9DqMgLx+FD8z6++9rsHlB65Zas1xyQsiRCFG09s00b7OR7Xz9ukQ5+vXV
|
|
resource-group-location: centralus
|
|
location: centralus
|
|
resource-group: nodepool
|
|
auth-path: {auth_path}
|
|
subnet-id: /subscriptions/c35cf7df-ed75-4c85-be00-535409a85120/resourceGroups/nodepool/providers/Microsoft.Network/virtualNetworks/NodePool/subnets/default
|
|
cloud-images:
|
|
- name: bionic
|
|
username: zuul
|
|
shell-type: sh
|
|
image-reference:
|
|
sku: 18.04-LTS
|
|
publisher: Canonical
|
|
version: latest
|
|
offer: UbuntuServer
|
|
- name: windows-password
|
|
image-reference:
|
|
sku: 2022-datacenter-azure-edition
|
|
publisher: MicrosoftWindowsServer
|
|
version: latest
|
|
offer: WindowsServer
|
|
username: foobar
|
|
password: reallybadpassword123
|
|
- name: windows-generate
|
|
image-reference:
|
|
sku: 2022-datacenter-azure-edition
|
|
publisher: MicrosoftWindowsServer
|
|
version: latest
|
|
offer: WindowsServer
|
|
username: foobar
|
|
generate-password: True
|
|
- name: image-by-name
|
|
username: zuul
|
|
image-filter:
|
|
name: test1
|
|
- name: image-by-tag
|
|
username: zuul
|
|
image-filter:
|
|
tags:
|
|
foo: bar
|
|
pools:
|
|
- name: main
|
|
max-servers: 10
|
|
node-attributes:
|
|
key1: value1
|
|
key2: value2
|
|
labels:
|
|
- name: bionic
|
|
cloud-image: bionic
|
|
hardware-profile:
|
|
vm-size: Standard_B1ls
|
|
tags:
|
|
department: R&D
|
|
team: DevOps
|
|
systemPurpose: CI
|
|
dynamic-tags:
|
|
# Note: we double the braces to deal with unit-test
|
|
# pre-processing of this file. The output and actual
|
|
# file syntax is single braces.
|
|
dynamic-tenant: "Tenant is {{request.tenant_name}}"
|
|
user-data: "This is the user data"
|
|
custom-data: "This is the custom data"
|
|
- name: image-by-name
|
|
cloud-image: image-by-name
|
|
hardware-profile:
|
|
vm-size: Standard_B1ls
|
|
- name: image-by-tag
|
|
cloud-image: image-by-tag
|
|
hardware-profile:
|
|
vm-size: Standard_B1ls
|
|
- name: windows-password
|
|
cloud-image: windows-password
|
|
hardware-profile:
|
|
vm-size: Standard_B1ls
|
|
- name: windows-generate
|
|
cloud-image: windows-generate
|
|
hardware-profile:
|
|
vm-size: Standard_B1ls
|