-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
clean k8s credential handling and fix variable names
- Loading branch information
1 parent
aaadaa7
commit f4e67a8
Showing
7 changed files
with
46 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
src/_nebari/stages/infrastructure/template/azure/modules/credentials/outputs.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
output "credentials" { | ||
description = "Credentials required for connecting to Kubernetes cluster" | ||
sensitive = true | ||
value = { | ||
endpoint = var.azure_rbac_enabled ? var.kube_admin_config.host : var.kube_config.host | ||
username = var.azure_rbac_enabled ? var.kube_admin_config.username : var.kube_config.username | ||
password = var.azure_rbac_enabled ? var.kube_admin_config.password : var.kube_config.password | ||
client_certificate = var.azure_rbac_enabled ? base64decode(var.kube_admin_config.client_certificate) : base64decode(var.kube_config.client_certificate) | ||
client_key = var.azure_rbac_enabled ? base64decode(var.kube_admin_config.client_key) : base64decode(var.kube_config.client_key) | ||
cluster_ca_certificate = var.azure_rbac_enabled ? base64decode(var.kube_admin_config.cluster_ca_certificate) : base64decode(var.kube_config.cluster_ca_certificate) | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
src/_nebari/stages/infrastructure/template/azure/modules/credentials/variables.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
variable "azure_rbac_enabled" { | ||
description = "Flag to enable Azure RBAC" | ||
type = bool | ||
} | ||
|
||
variable "kube_admin_config" { | ||
description = "Kube admin config for RBAC" | ||
type = any | ||
sensitive = true | ||
} | ||
|
||
variable "kube_config" { | ||
description = "Kube config for standard access" | ||
type = any | ||
sensitive = true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 9 additions & 9 deletions
18
src/_nebari/stages/infrastructure/template/azure/modules/kubernetes/outputs.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters