Skip to content

Commit 0c8654c

Browse files
password example and profile
1 parent 70ee7c4 commit 0c8654c

File tree

9 files changed

+72
-19
lines changed

9 files changed

+72
-19
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,11 @@ Some considerations:
7676

7777
### Set a new password
7878

79-
The `user_password` variable allows you to set a non-default password. This is
80-
essential for deploying Kubeflow.
79+
It's critical to not use the default password for internet-facing deployments.
80+
81+
See the See [examples/k3s-existing-istio](examples/k3s-existing-istio) for deployment with a non-default dex password (passed in via terraform CLI)
82+
83+
Note that dex will only pick up new config at start -- you may have to restart the dex pod manually for a password change to take effect.
8184

8285
### Make Kubeflow available securely on a network using HTTPS
8386

examples/eks-https-loadbalancer/kubeflow.tf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,20 @@ gateway:
5252
limits:
5353
cpu: 2000m
5454
memory: 1024Mi
55+
dex:
56+
spec:
57+
project: default
58+
source:
59+
kustomize:
60+
patches:
61+
- target:
62+
kind: Secret
63+
name: dex-passwords
64+
patch: |-
65+
- op: replace
66+
path: /stringData/DEX_USER_PASSWORD
67+
value: ${bcrypt(var.password)}
68+
5569
EOF
5670
]
5771
depends_on = [

examples/eks-https-loadbalancer/variables.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
variable "password" {
2+
sensitive = true
3+
description = "password for [email protected]"
4+
}
15

26
variable "host" {
37
}

helm/example-profile/Chart.yaml

Lines changed: 0 additions & 3 deletions
This file was deleted.

helm/example-profile/templates/all.yaml

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{{ if .Values.exampleProfile.enabled }}
2+
apiVersion: argoproj.io/v1alpha1
3+
kind: Application
4+
metadata:
5+
name: 102-example-profile
6+
annotations:
7+
argocd.argoproj.io/sync-wave: "102"
8+
finalizers:
9+
- resources-finalizer.argocd.argoproj.io
10+
spec:
11+
{{ .Values.exampleProfile.spec | toYaml | indent 2 }}
12+
{{- end -}}

helm/kubeflow-argo-apps/values.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,3 +353,20 @@ volumesWebApp:
353353
prune: false
354354
syncOptions:
355355
- ServerSideApply=true
356+
357+
exampleProfile:
358+
enabled: true
359+
spec:
360+
project: default
361+
source:
362+
path: common/user-namespace/base
363+
repoURL: https://github.com/kubeflow/manifests
364+
targetRevision: 776d4f4
365+
destination:
366+
namespace: argocd
367+
name: in-cluster
368+
syncPolicy:
369+
automated:
370+
prune: false
371+
syncOptions:
372+
- ServerSideApply=true

main.tf

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ EOF
3030

3131
locals {
3232
user_vals = "\n${var.kubeflow_values[0]}"
33-
default_values = [
33+
top_level_values = [
3434
<<EOF
3535
treebeardKubeflow:
36-
repoURL: "ghcr.io/treebeardtech"
37-
targetRevision: 0.1-2024-03-08-T10-50-10
38-
chart: 'kubeflow-argo-apps'
36+
repoURL: ${var.treebeard_kubeflow_dependency["repoURL"]}
37+
targetRevision: ${var.treebeard_kubeflow_dependency["targetRevision"]}
38+
chart: ${var.treebeard_kubeflow_dependency["chart"]}
3939
values: ${indent(4, local.user_vals)}
4040
EOF
4141
]
@@ -46,7 +46,7 @@ resource "helm_release" "kubeflow_apps" {
4646
namespace = "argocd"
4747
chart = "${path.module}/helm/kubeflow-bootstrap"
4848
wait_for_jobs = true
49-
values = concat(local.default_values)
49+
values = concat(local.top_level_values)
5050

5151
dynamic "set" {
5252
iterator = item
@@ -71,4 +71,8 @@ resource "helm_release" "kubeflow_apps" {
7171
null_resource.start,
7272
helm_release.argo_cd
7373
]
74-
}
74+
}
75+
76+
output "top_level_values" {
77+
value = local.top_level_values
78+
}

variables.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
variable "treebeard_kubeflow_dependency" {
2+
description = "Configuration for Treebeard Kubeflow helm"
3+
type = map(string)
4+
default = {
5+
repoURL = "ghcr.io/treebeardtech"
6+
targetRevision = "0.1-2024-03-08-T12-25-15"
7+
chart = "kubeflow-argo-apps"
8+
}
9+
}
10+
111
variable "enable_argocd" {
212
type = bool
313
default = true

0 commit comments

Comments
 (0)