mirror of
https://github.com/apricote/home-cloud.git
synced 2026-02-08 02:37:02 +00:00
deploy flux helm-operator to cluster
This commit is contained in:
parent
0f007bfea3
commit
36b4fe6a6e
4 changed files with 48 additions and 4 deletions
|
|
@ -21,6 +21,16 @@ locals {
|
|||
version = var.flux_version
|
||||
git_url = var.flux_git_url
|
||||
})
|
||||
|
||||
manifest_helm_operator_crds = templatefile("${path.module}/files/k8s-apps/helm-operator-crds.sh", {
|
||||
version = var.helm_operator_version
|
||||
k3s_manifest_folder = local.k3s_manifest_folder
|
||||
})
|
||||
|
||||
manifest_helm_operator = templatefile("${path.module}/files/k8s-apps/helm-operator.yaml", {
|
||||
version = var.helm_operator_version
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
resource null_resource install_manifests {
|
||||
|
|
@ -28,10 +38,12 @@ resource null_resource install_manifests {
|
|||
server_id = hcloud_server.server.id
|
||||
|
||||
# File hashes to trigger on update
|
||||
hcloud_csi_driver = sha256(local.manifest_hcloud_csi_driver)
|
||||
cert_manager_crds = sha256(local.manifest_cert_manager_crds)
|
||||
cert_manager = sha256(local.manifest_cert_manager)
|
||||
flux = sha256(local.manifest_flux)
|
||||
hcloud_csi_driver = sha256(local.manifest_hcloud_csi_driver)
|
||||
cert_manager_crds = sha256(local.manifest_cert_manager_crds)
|
||||
cert_manager = sha256(local.manifest_cert_manager)
|
||||
flux = sha256(local.manifest_flux)
|
||||
helm_operator_crds = sha256(local.manifest_helm_operator_crds)
|
||||
helm_operator = sha256(local.manifest_helm_operator)
|
||||
}
|
||||
|
||||
connection {
|
||||
|
|
@ -49,6 +61,10 @@ resource null_resource install_manifests {
|
|||
inline = [local.manifest_cert_manager_crds]
|
||||
}
|
||||
|
||||
provisioner remote-exec {
|
||||
inline = [local.manifest_helm_operator_crds]
|
||||
}
|
||||
|
||||
provisioner file {
|
||||
content = local.manifest_cert_manager
|
||||
destination = "${local.k3s_manifest_folder}/cert-manager.yaml"
|
||||
|
|
@ -58,5 +74,10 @@ resource null_resource install_manifests {
|
|||
content = local.manifest_flux
|
||||
destination = "${local.k3s_manifest_folder}/flux.yaml"
|
||||
}
|
||||
|
||||
provisioner file {
|
||||
content = local.manifest_helm_operator
|
||||
destination = "${local.k3s_manifest_folder}/helm-operator.yaml"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue