Skip to content

Commit

Permalink
Merge branch 'fix-custom-user-name' into 'main'
Browse files Browse the repository at this point in the history
fix-custom-user-name

See merge request infrastructure/terraform/terraform-kustomization-kubeflow!10
  • Loading branch information
Thomas TF. Fraunholz committed Jun 3, 2022
2 parents b19f420 + 017693a commit 696d0fa
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 9 deletions.
22 changes: 18 additions & 4 deletions namespace.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,27 @@ resource "kubectl_manifest" "kubeflow-namespace" {
}

# Create User namespace
data "kustomization_build" "user-namespace" {
path = "github.com/kubeflow/manifests.git/common/user-namespace/base?ref=${var.kf_version}"
data "kustomization_overlay" "user-namespace" {
config_map_generator {
name = "default-install-config"
behavior = "replace"
envs = [

]
literals = [
"user=${var.dex_user_email}",
"profile-name=${var.user_profile_name}"
]
}

resources = [
"github.com/kubeflow/manifests.git/common/user-namespace/base?ref=${var.kf_version}",
]
}

resource "kubectl_manifest" "user-namespace" {
for_each = data.kustomization_build.user-namespace.ids
yaml_body = yamlencode(jsondecode(data.kustomization_build.user-namespace.manifests[each.value]))
for_each = data.kustomization_overlay.user-namespace.ids
yaml_body = yamlencode(jsondecode(data.kustomization_overlay.user-namespace.manifests[each.value]))
wait = true
depends_on = [
kustomization_resource.profiles,
Expand Down
16 changes: 11 additions & 5 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ variable "deploy_dashboard" {
variable "deploy_katib" {
description = "Deploy Kubeflow Katib Component"
type = bool
default = true
default = false
}

variable "deploy_notebooks" {
Expand All @@ -31,19 +31,19 @@ variable "deploy_notebooks" {
variable "deploy_tensorboard" {
description = "Deploy Kubeflow Tensorboard Component"
type = bool
default = true
default = false
}

variable "deploy_volumes" {
description = "Deploy Kubeflow Volumes Web App Component"
type = bool
default = true
default = false
}

variable "deploy_serving" {
description = "Deploy Kubeflow Serving Component"
type = bool
default = true
default = false
}

variable "istio_ingress_load_balancer" {
Expand All @@ -64,6 +64,12 @@ variable "dex_user_email" {
default = "[email protected]"
}

variable "user_profile_name" {
description = "Name of user profile"
type = string
default = "kubeflow-user-example-com"
}

variable "dex_user_hash" {
description = "Dex static password bcrypt hash of user password"
type = string
Expand All @@ -85,7 +91,7 @@ variable "dex_user_id" {
variable "letsencrypt_mail" {
description = "letsencrypt account email"
type = string
default = "user@example.com"
default = "letsencrypt@example.com"
}

variable "kubeflow_dns_name" {
Expand Down

0 comments on commit 696d0fa

Please sign in to comment.