Skip to content

Commit

Permalink
Rm any prior refs to gcp from the common config
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgianaElena committed Aug 30, 2023
1 parent b809979 commit 45cdccb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
12 changes: 4 additions & 8 deletions deployer/generate/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
REPO_ROOT = Path(__file__).parent.parent.parent


def generate_cluster_config_file(cluster_config_directory, vars):
def generate_cluster_config_file(cluster_config_directory, provider, vars):
"""
Generates the `config/<cluster_name>/cluster.yaml` config
"""
with open(REPO_ROOT / "config/clusters/templates/gcp/cluster.yaml") as f:
with open(REPO_ROOT / f"config/clusters/templates/{provider}/cluster.yaml") as f:
cluster_yaml_template = jinja2.Template(f.read())
with open(cluster_config_directory / "cluster.yaml", "w") as f:
f.write(cluster_yaml_template.render(**vars))
Expand Down Expand Up @@ -71,12 +71,8 @@ def generate_support_files(cluster_config_directory, vars):

def generate_config_directory(vars):
"""
Generates the required `config` directory for hubs on a GCP cluster
Generates the following files:
- `config/<cluster_name>/cluster.yaml`
- `config/<cluster_name>/support.values.yaml`
- `config/<cluster_name>/enc-support.secret.values.yaml`
Generates the required `config` directory for hubs on a cluster if it doesn't exit
and returns its name.
"""
cluster_config_directory = REPO_ROOT / "config/clusters" / vars["cluster_name"]

Expand Down
2 changes: 1 addition & 1 deletion deployer/generate/generate_gcp_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def generate_gcp_cluster(
cluster_config_directory = generate_config_directory(vars)

# Create the cluster config directory and initial `cluster.yaml` file
generate_cluster_config_file(cluster_config_directory, vars)
generate_cluster_config_file(cluster_config_directory, "gcp", vars)

# Generate the support files
generate_support_files(cluster_config_directory, vars)

0 comments on commit 45cdccb

Please sign in to comment.