Skip to content

Commit

Permalink
feat: Add hcloud-cloud-controller-manager
Browse files Browse the repository at this point in the history
  • Loading branch information
mrclrchtr committed Mar 18, 2024
1 parent 5e3dc88 commit dd1b34a
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
8 changes: 8 additions & 0 deletions health.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# The cluster should be healthy after cilium is installed
data "talos_cluster_health" "this" {
depends_on = [data.helm_template.cilium]
client_configuration = data.talos_client_configuration.this.client_configuration
endpoints = local.control_plane_public_ipv4_list
control_plane_nodes = local.control_plane_private_ipv4_list
worker_nodes = local.worker_private_ipv4_list
}
28 changes: 28 additions & 0 deletions manifest_hcloud_ccm.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
data "helm_template" "hcloud_ccm" {
name = "hcloud-cloud-controller-manager"
namespace = "kube-system"

repository = "https://charts.hetzner.cloud"
chart = "hcloud-cloud-controller-manager"
version = "1.19.0"

set {
name = "networking.enabled"
value = "true"
}

set {
name = "networking.clusterCIDR"
value = local.pod_ipv4_cidr
}
}

data "kubectl_file_documents" "hcloud_ccm" {
content = data.helm_template.hcloud_ccm.manifest
}

resource "kubectl_manifest" "apply_hcloud_ccm" {
for_each = data.kubectl_file_documents.hcloud_ccm.manifests
yaml_body = each.value
depends_on = [data.talos_cluster_health.this]
}

0 comments on commit dd1b34a

Please sign in to comment.