Skip to content

Commit

Permalink
Updated kind deployment type
Browse files Browse the repository at this point in the history
Signed-off-by: Ali Abbas Jaffri <[email protected]>
  • Loading branch information
aliabbasjaffri committed Oct 9, 2024
1 parent ae1bc6b commit e9b1f3a
Showing 1 changed file with 24 additions and 10 deletions.
34 changes: 24 additions & 10 deletions src/mlinfra/stack_processor/deployment_processor/kind_deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,30 @@ def generate_k8s_helm_provider_config(self):
"r",
) as provider_tf:
provider_tf_json = json.load(provider_tf)
provider_tf_json["provider"]["kubernetes"]["client_certificate"] = (
'"${module.kind.client_certificate}"'
)
provider_tf_json["provider"]["kubernetes"]["client_key"] = (
'"${module.kind.client_key}"'
)
provider_tf_json["provider"]["kubernetes"]["cluster_ca_certificate"] = (
'"${module.kind.cluster_ca_certificate}"'
)
provider_tf_json["provider"]["kubernetes"]["host"] = '"${module.kind.endpoint}"'
if provider == "kubernetes":
provider_tf_json["provider"]["kubernetes"]["client_certificate"] = (
"${ module.kind.client_certificate }"
)
provider_tf_json["provider"]["kubernetes"]["client_key"] = (
"${ module.kind.client_key }"
)
provider_tf_json["provider"]["kubernetes"]["cluster_ca_certificate"] = (
"${ module.kind.cluster_ca_certificate }"
)
provider_tf_json["provider"]["kubernetes"]["host"] = "${ module.kind.endpoint }"
else:
provider_tf_json["provider"]["helm"]["kubernetes"]["client_certificate"] = (
"${ module.kind.client_certificate }"
)
provider_tf_json["provider"]["helm"]["kubernetes"]["client_key"] = (
"${ module.kind.client_key }"
)
provider_tf_json["provider"]["helm"]["kubernetes"]["cluster_ca_certificate"] = (
"${ module.kind.cluster_ca_certificate }"
)
provider_tf_json["provider"]["helm"]["kubernetes"]["host"] = (
"${ module.kind.endpoint }"
)
data["provider"].update(provider_tf_json["provider"])

generate_tf_json(module_name="k8s_provider", json_module=data)
Expand Down

0 comments on commit e9b1f3a

Please sign in to comment.