StarpTech / k-andy

Low cost Kubernetes stack for startups, prototypes, and playgrounds on Hetzner Cloud.
MIT License
141 stars 20 forks source link

feat: add structured kubeconfig output #9

Closed toabi closed 3 years ago

toabi commented 3 years ago

This changes the kubeconfig output to structured data which can be used as provider configuration.

Example:


data "terraform_remote_state" "cluster_base" {
  backend = "…"
  config = { … }
}

locals {
  remote = {
    kubeconfig = data.terraform_remote_state.cluster_base.outputs.kubeconfig
  }
}

provider "helm" {
  kubernetes {
    host     = local.remote.kubeconfig.host
    client_certificate     = local.remote.kubeconfig.client_certificate
    client_key             = local.remote.kubeconfig.client_key
    cluster_ca_certificate = local.remote.kubeconfig.cluster_ca_certificate
  }
}

🥳

StarpTech commented 3 years ago

👍

StarpTech commented 3 years ago

I think it's time to implement rudimentary CI e.g terraform validate.

toabi commented 3 years ago

Yeah would be cool. But have 0 experience with CI on github :(

StarpTech commented 3 years ago

No problem, I will do it.