mirror of
https://github.com/khuedoan/homelab.git
synced 2025-01-09 23:10:22 +07:00
Add cluster bootstrap
This commit is contained in:
parent
7cb4264c1a
commit
93ee9e025e
@ -9,9 +9,9 @@ terraform {
|
||||
|
||||
provider "helm" {
|
||||
kubernetes {
|
||||
host = var.kubeconfig.host
|
||||
client_certificate = var.kubeconfig.client_certificate
|
||||
client_key = var.kubeconfig.client_key
|
||||
cluster_ca_certificate = var.kubeconfig.cluster_ca_certificate
|
||||
host = yamldecode(var.kube_config)["clusters"][0]["cluster"]["server"]
|
||||
cluster_ca_certificate = base64decode(yamldecode(var.kube_config)["clusters"][0]["cluster"]["certificate-authority-data"])
|
||||
client_certificate = base64decode(yamldecode(var.kube_config)["users"][0]["user"]["client-certificate-data"])
|
||||
client_key = base64decode(yamldecode(var.kube_config)["users"][0]["user"]["client-key-data"])
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,3 @@
|
||||
variable "kube_config" {
|
||||
description = "Kubernetes config"
|
||||
}
|
4
infra/platform/bootstrap.tf
Normal file
4
infra/platform/bootstrap.tf
Normal file
@ -0,0 +1,4 @@
|
||||
module "rke_cluster_bootstrap" {
|
||||
source = "../modules/kubernetes-cluster-bootstrap"
|
||||
kube_config = rke_cluster.cluster.kube_config_yaml
|
||||
}
|
Loading…
Reference in New Issue
Block a user