Skip to content

Commit 5c5df1d

Browse files
Merge pull request #6 from treebeardtech/gitops
gitops values files and rest of kubeflow components
2 parents d74d24d + 3660626 commit 5c5df1d

File tree

21 files changed

+501
-90
lines changed

21 files changed

+501
-90
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ k3d-delete:
4343
TIMESTAMP := $(shell date -u "+%Y-%m-%d-T%H-%M-%S")
4444
VERSION := 0.1-$(TIMESTAMP)
4545

46-
build-kf-apps:
46+
build-chart:
4747
rm -rf helm/treebeard-kubeflow-*.tgz
4848
helm package helm/treebeard-kubeflow -d helm --version $(VERSION)
4949

50-
push-kf-apps: build-kf-apps
50+
push-chart: build-chart
5151
helm push helm/treebeard-kubeflow-*.tgz oci://ghcr.io/treebeardtech/helm
5252

5353
helm-repo-login:

examples/eks-https-loadbalancer/kubeflow.tf

Lines changed: 41 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -4,74 +4,47 @@ module "treebeardkf" {
44
bootstrap_values = [
55
<<EOF
66
sources:
7-
- repoURL: ghcr.io/treebeardtech/helm
8-
targetRevision: 0.1-2024-03-08-T18-39-28
9-
chart: treebeard-kubeflow
10-
helm:
11-
ignoreMissingValueFiles: true
12-
values: |
13-
certManager:
14-
enabled: false
15-
istioBase:
16-
enabled: false
17-
istiod:
18-
enabled: false
19-
istioResources:
20-
spec:
21-
source:
22-
kustomize:
23-
patches:
24-
- target:
25-
kind: Gateway
26-
name: kubeflow-gateway
27-
patch: |-
28-
- op: replace
29-
path: /spec/servers/0
30-
value:
31-
hosts:
32-
- ${var.host}
33-
port:
34-
name: https
35-
number: 443
36-
protocol: HTTPS
37-
tls:
38-
credentialName: gateway-cert
39-
mode: SIMPLE
40-
gateway:
41-
spec:
42-
sources:
43-
- chart: 'gateway'
44-
repoURL: 'https://istio-release.storage.googleapis.com/charts'
45-
targetRevision: "1.18.7"
46-
helm:
47-
releaseName: "istio-ingressgateway"
48-
ignoreMissingValueFiles: true
49-
valueFiles: []
50-
values: |
51-
service:
52-
type: LoadBalancer
53-
serviceAccount:
54-
name: istio-ingressgateway-service-account
55-
resources:
56-
requests:
57-
cpu: 10m
58-
memory: 64Mi
59-
limits:
60-
cpu: 2000m
61-
memory: 1024Mi
62-
dex:
63-
spec:
64-
project: default
65-
source:
66-
kustomize:
67-
patches:
68-
- target:
69-
kind: Secret
70-
name: dex-passwords
71-
patch: |-
72-
- op: replace
73-
path: /stringData/DEX_USER_PASSWORD
74-
value: ${bcrypt(var.password)}
7+
- repoURL: 'https://github.com/treebeardtech/treebeard-kubeflow-gitops'
8+
targetRevision: 8e3369ac3720bd837f75d812b9ec9d5f9d135cef
9+
ref: values
10+
valueFiles:
11+
- $values/clusters/eks-https-loadbalancer.yaml
12+
valuesObject:
13+
istioResources:
14+
spec:
15+
source:
16+
kustomize:
17+
patches:
18+
- target:
19+
kind: Gateway
20+
name: kubeflow-gateway
21+
patch: |-
22+
- op: replace
23+
path: /spec/servers/0
24+
value:
25+
hosts:
26+
- ${var.host}
27+
port:
28+
name: https
29+
number: 443
30+
protocol: HTTPS
31+
tls:
32+
credentialName: gateway-cert
33+
mode: SIMPLE
34+
35+
dex:
36+
spec:
37+
project: default
38+
source:
39+
kustomize:
40+
patches:
41+
- target:
42+
kind: Secret
43+
name: dex-passwords
44+
patch: |-
45+
- op: replace
46+
path: /stringData/DEX_USER_PASSWORD
47+
value: ${bcrypt(var.password)}
7548
EOF
7649
]
7750
depends_on = [

examples/k3s-existing-istio/main.tf

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -104,19 +104,13 @@ module "treebeardkf" {
104104
source = "../.."
105105
bootstrap_values = [
106106
<<EOF
107-
sources:
108-
- repoURL: ghcr.io/treebeardtech/helm
109-
targetRevision: 0.1-2024-03-08-T18-39-28
110-
chart: treebeard-kubeflow
111-
helm:
112-
ignoreMissingValueFiles: true
113-
values: |
114-
certManager:
115-
enabled: false
116-
istioBase:
117-
enabled: false
118-
istiod:
119-
enabled: false
107+
valuesObject:
108+
certManager:
109+
enabled: false
110+
istioBase:
111+
enabled: false
112+
istiod:
113+
enabled: false
120114
EOF
121115
]
122116
depends_on = [

examples/k3s-gitops/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# K3s Gitops

examples/k3s-gitops/main.tf

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
2+
terraform {
3+
required_providers {
4+
helm = {
5+
source = "hashicorp/helm"
6+
version = "~> 2.12.1"
7+
}
8+
}
9+
backend "local" {
10+
}
11+
}
12+
13+
variable "kubeconfig" {
14+
type = string
15+
}
16+
17+
provider "helm" {
18+
kubernetes {
19+
config_path = var.kubeconfig
20+
}
21+
}
22+
23+
locals {
24+
debug = true
25+
}
26+
27+
module "treebeardkf" {
28+
source = "../.."
29+
bootstrap_values = [
30+
<<EOF
31+
sources:
32+
- repoURL: 'https://github.com/treebeardtech/treebeard-kubeflow-gitops'
33+
targetRevision: main
34+
ref: values
35+
valueFiles:
36+
- $values/clusters/k3s-gitops.yaml
37+
valuesObject:
38+
# example of inline config where terraform vars can be injected
39+
debug: ${local.debug}
40+
syncPolicy: null
41+
42+
EOF
43+
]
44+
depends_on = [
45+
]
46+
}

examples/k3s-gitops/outputs.tf

Whitespace-only changes.

examples/k3s-gitops/variables.tf

Whitespace-only changes.

helm/bootstrap/templates/all.yaml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,27 @@ spec:
2727
source:
2828
{{- toYaml . | nindent 4 }}
2929
{{- end }}
30-
{{- with .sources }}
3130
sources:
32-
{{- toYaml . | nindent 4 }}
31+
- repoURL: {{ .repoURL }}
32+
targetRevision: {{ .targetRevision }}
33+
chart: {{ .chart }}
34+
helm:
35+
{{- with .valuesObject }}
36+
valuesObject:
37+
{{- toYaml . | nindent 8 }}
38+
{{- end }}
39+
{{- with .values }}
40+
values:
41+
{{- toYaml . | nindent 8 }}
42+
{{- end }}
43+
{{- with .valueFiles }}
44+
valueFiles:
45+
{{- toYaml . | nindent 8 }}
46+
{{- end }}
47+
{{- range .sources }}
48+
- repoURL: {{ .repoURL }}
49+
targetRevision: {{ .targetRevision }}
50+
ref: {{ .ref }}
3351
{{- end }}
3452
destination:
3553
{{- toYaml .destination | nindent 4 }}

helm/bootstrap/values.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@ additionalAnnotations: {}
55
finalizers:
66
- resources-finalizer.argocd.argoproj.io
77
project: default
8-
sources:
9-
- repoURL: ghcr.io/treebeardtech/helm
10-
targetRevision: 0.1-2024-03-08-T18-39-28
11-
chart: treebeard-kubeflow
8+
repoURL: ghcr.io/treebeardtech/helm
9+
targetRevision: 0.1-2024-03-11-T13-18-50
10+
chart: treebeard-kubeflow
1211
destination:
1312
server: https://kubernetes.default.svc
1413
namespace: argocd
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{{ if .Values.debug }}
2+
apiVersion: v1
3+
kind: Secret
4+
metadata:
5+
name: treebeard-kubeflow-debug
6+
type: Opaque
7+
stringData:
8+
helm-values: |
9+
{{ .Values | toYaml | indent 4 }}
10+
{{- end }}

0 commit comments

Comments
 (0)