parent
7f7b2589ab
commit
2b84ac45bc
|
@ -244,6 +244,10 @@ def manifests_edit(ctx=None):
|
|||
data_v['projectID'] = tfvars['service_project']['project_id']
|
||||
if not 'ocp-worker' in data_v['tags']:
|
||||
data_v['tags'].append('ocp-worker')
|
||||
if tfvars['install_config_params']['labels']:
|
||||
data_v['labels'] = tfvars['install_config_params']['labels'].copy()
|
||||
for i, d in enumerate(data_v['disks']):
|
||||
d['labels'] = tfvars['install_config_params']['labels'].copy()
|
||||
data_n = data_v['networkInterfaces'][0]
|
||||
data_n['network'] = tfvars['host_project']['vpc_name']
|
||||
data_n['subnetwork'] = tfvars['host_project']['workers_subnet_name']
|
||||
|
|
|
@ -75,6 +75,7 @@ resource "google_compute_instance" "bootstrap" {
|
|||
})
|
||||
VmDnsSetting = "GlobalDefault"
|
||||
}
|
||||
labels = var.install_config_params.labels
|
||||
}
|
||||
|
||||
resource "google_compute_instance_group" "bootstrap" {
|
||||
|
|
|
@ -45,6 +45,7 @@ resource "google_compute_instance" "master" {
|
|||
user-data = file("${local.fs_paths.config_dir}/master.ign"),
|
||||
VmDnsSetting = "GlobalDefault"
|
||||
}
|
||||
labels = var.install_config_params.labels
|
||||
}
|
||||
|
||||
resource "google_compute_instance_group" "master" {
|
||||
|
|
|
@ -58,6 +58,7 @@ variable "install_config_params" {
|
|||
description = "OpenShift cluster configuration."
|
||||
type = object({
|
||||
disk_size = number
|
||||
labels = map(string)
|
||||
network = object({
|
||||
cluster = string
|
||||
host_prefix = number
|
||||
|
@ -72,6 +73,7 @@ variable "install_config_params" {
|
|||
})
|
||||
default = {
|
||||
disk_size = 16
|
||||
labels = {}
|
||||
network = {
|
||||
cluster = "10.128.0.0/14"
|
||||
host_prefix = 23
|
||||
|
|
Loading…
Reference in New Issue