mirror of
https://github.com/openshift/installer.git
synced 2026-02-05 06:46:36 +01:00
Prior to this change, users needed to edit the gcp upi python templates in order to provision an cluster using a shared VPC. This was prone to user error. This change breaks up the templates so that only the yaml files need to be modified, thus greatly simplifying the process. All of the resources that would be provisioned in the host project are now in their own python templates (01_vpc.py, 02_dns.py, and 03_firewall.py). These resources can be removed from the yaml files to be run against the service project and placed into yaml files to be run against the host project instead.
19 lines
543 B
Python
19 lines
543 B
Python
def GenerateConfig(context):
|
|
|
|
resources = [{
|
|
'name': context.properties['infra_id'] + '-private-zone',
|
|
'type': 'dns.v1.managedZone',
|
|
'properties': {
|
|
'description': '',
|
|
'dnsName': context.properties['cluster_domain'] + '.',
|
|
'visibility': 'private',
|
|
'privateVisibilityConfig': {
|
|
'networks': [{
|
|
'networkUrl': context.properties['cluster_network']
|
|
}]
|
|
}
|
|
}
|
|
}]
|
|
|
|
return {'resources': resources}
|