Use a single format of the admin kubeconfig

* Use a single admin kubeconfig for initial bootkube bootstrap
and for use by a human admin. Previously, an admin kubeconfig
without a named context was used for bootstrap and direct usage
with KUBECONFIG=path, while one with a named context was used
for `kubectl config use-context` style usage. Confusing.
* Provide the admin kubeconfig via `assets/auth/kubeconfig`,
`assets/auth/CLUSTER-config`, or output `kubeconfig-admin`
This commit is contained in:
Dalton Hubble 2019-01-05 14:36:55 -08:00
parent 6795a753ea
commit 60c70797ec
18 changed files with 18 additions and 18 deletions

View File

@ -1,6 +1,6 @@
# Self-hosted Kubernetes assets (kubeconfig, manifests)
module "bootkube" {
source = "git::https://github.com/poseidon/terraform-render-bootkube.git?ref=f5ea389e8c86a4de159ae92742b8665a6f8bede0"
source = "git::https://github.com/poseidon/terraform-render-bootkube.git?ref=847ec5929b4b4b3d8b922dbbee4a3ecefd71f597"
cluster_name = "${var.cluster_name}"
api_servers = ["${format("%s.%s", var.cluster_name, var.dns_zone)}"]

View File

@ -1,5 +1,5 @@
output "kubeconfig-admin" {
value = "${module.bootkube.kubeconfig-admin-context}"
value = "${module.bootkube.kubeconfig-admin}"
}
# Outputs for Kubernetes Ingress

View File

@ -1,6 +1,6 @@
# Self-hosted Kubernetes assets (kubeconfig, manifests)
module "bootkube" {
source = "git::https://github.com/poseidon/terraform-render-bootkube.git?ref=f5ea389e8c86a4de159ae92742b8665a6f8bede0"
source = "git::https://github.com/poseidon/terraform-render-bootkube.git?ref=847ec5929b4b4b3d8b922dbbee4a3ecefd71f597"
cluster_name = "${var.cluster_name}"
api_servers = ["${format("%s.%s", var.cluster_name, var.dns_zone)}"]

View File

@ -1,5 +1,5 @@
output "kubeconfig-admin" {
value = "${module.bootkube.kubeconfig-admin-context}"
value = "${module.bootkube.kubeconfig-admin}"
}
# Outputs for Kubernetes Ingress

View File

@ -1,6 +1,6 @@
# Self-hosted Kubernetes assets (kubeconfig, manifests)
module "bootkube" {
source = "git::https://github.com/poseidon/terraform-render-bootkube.git?ref=f5ea389e8c86a4de159ae92742b8665a6f8bede0"
source = "git::https://github.com/poseidon/terraform-render-bootkube.git?ref=847ec5929b4b4b3d8b922dbbee4a3ecefd71f597"
cluster_name = "${var.cluster_name}"
api_servers = ["${format("%s.%s", var.cluster_name, var.dns_zone)}"]

View File

@ -1,5 +1,5 @@
output "kubeconfig-admin" {
value = "${module.bootkube.kubeconfig-admin-context}"
value = "${module.bootkube.kubeconfig-admin}"
}
# Outputs for Kubernetes Ingress

View File

@ -1,6 +1,6 @@
# Self-hosted Kubernetes assets (kubeconfig, manifests)
module "bootkube" {
source = "git::https://github.com/poseidon/terraform-render-bootkube.git?ref=f5ea389e8c86a4de159ae92742b8665a6f8bede0"
source = "git::https://github.com/poseidon/terraform-render-bootkube.git?ref=847ec5929b4b4b3d8b922dbbee4a3ecefd71f597"
cluster_name = "${var.cluster_name}"
api_servers = ["${var.k8s_domain_name}"]

View File

@ -1,3 +1,3 @@
output "kubeconfig-admin" {
value = "${module.bootkube.kubeconfig-admin-context}"
value = "${module.bootkube.kubeconfig-admin}"
}

View File

@ -1,6 +1,6 @@
# Self-hosted Kubernetes assets (kubeconfig, manifests)
module "bootkube" {
source = "git::https://github.com/poseidon/terraform-render-bootkube.git?ref=f5ea389e8c86a4de159ae92742b8665a6f8bede0"
source = "git::https://github.com/poseidon/terraform-render-bootkube.git?ref=847ec5929b4b4b3d8b922dbbee4a3ecefd71f597"
cluster_name = "${var.cluster_name}"
api_servers = ["${var.k8s_domain_name}"]

View File

@ -1,3 +1,3 @@
output "kubeconfig-admin" {
value = "${module.bootkube.kubeconfig-admin-context}"
value = "${module.bootkube.kubeconfig-admin}"
}

View File

@ -1,6 +1,6 @@
# Self-hosted Kubernetes assets (kubeconfig, manifests)
module "bootkube" {
source = "git::https://github.com/poseidon/terraform-render-bootkube.git?ref=f5ea389e8c86a4de159ae92742b8665a6f8bede0"
source = "git::https://github.com/poseidon/terraform-render-bootkube.git?ref=847ec5929b4b4b3d8b922dbbee4a3ecefd71f597"
cluster_name = "${var.cluster_name}"
api_servers = ["${format("%s.%s", var.cluster_name, var.dns_zone)}"]

View File

@ -1,5 +1,5 @@
output "kubeconfig-admin" {
value = "${module.bootkube.user-kubeconfig}"
value = "${module.bootkube.kubeconfig-admin}"
}
output "controllers_dns" {

View File

@ -1,6 +1,6 @@
# Self-hosted Kubernetes assets (kubeconfig, manifests)
module "bootkube" {
source = "git::https://github.com/poseidon/terraform-render-bootkube.git?ref=f5ea389e8c86a4de159ae92742b8665a6f8bede0"
source = "git::https://github.com/poseidon/terraform-render-bootkube.git?ref=847ec5929b4b4b3d8b922dbbee4a3ecefd71f597"
cluster_name = "${var.cluster_name}"
api_servers = ["${format("%s.%s", var.cluster_name, var.dns_zone)}"]

View File

@ -1,5 +1,5 @@
output "kubeconfig-admin" {
value = "${module.bootkube.user-kubeconfig}"
value = "${module.bootkube.kubeconfig-admin}"
}
output "controllers_dns" {

View File

@ -1,6 +1,6 @@
# Self-hosted Kubernetes assets (kubeconfig, manifests)
module "bootkube" {
source = "git::https://github.com/poseidon/terraform-render-bootkube.git?ref=f5ea389e8c86a4de159ae92742b8665a6f8bede0"
source = "git::https://github.com/poseidon/terraform-render-bootkube.git?ref=847ec5929b4b4b3d8b922dbbee4a3ecefd71f597"
cluster_name = "${var.cluster_name}"
api_servers = ["${format("%s.%s", var.cluster_name, var.dns_zone)}"]

View File

@ -1,5 +1,5 @@
output "kubeconfig-admin" {
value = "${module.bootkube.kubeconfig-admin-context}"
value = "${module.bootkube.kubeconfig-admin}"
}
# Outputs for Kubernetes Ingress

View File

@ -1,6 +1,6 @@
# Self-hosted Kubernetes assets (kubeconfig, manifests)
module "bootkube" {
source = "git::https://github.com/poseidon/terraform-render-bootkube.git?ref=f5ea389e8c86a4de159ae92742b8665a6f8bede0"
source = "git::https://github.com/poseidon/terraform-render-bootkube.git?ref=847ec5929b4b4b3d8b922dbbee4a3ecefd71f597"
cluster_name = "${var.cluster_name}"
api_servers = ["${format("%s.%s", var.cluster_name, var.dns_zone)}"]

View File

@ -1,5 +1,5 @@
output "kubeconfig-admin" {
value = "${module.bootkube.kubeconfig-admin-context}"
value = "${module.bootkube.kubeconfig-admin}"
}
# Outputs for Kubernetes Ingress