Skip to content

Commit 9dc6186

Browse files
switch back to http
1 parent 1b90cd0 commit 9dc6186

File tree

8 files changed

+84
-74
lines changed

8 files changed

+84
-74
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ RUN sudo apt-get update -y && sudo apt-get install -y \
1515
iputils-ping \
1616
traceroute \
1717
kmod
18-
ENV PATH="/workspaces/shadowfax/bin:/home/vscode/.local/bin/:$PATH"
18+
ENV PATH="/home/vscode/.local/bin/:$PATH"

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
},
6767
"ghcr.io/rio/features/k9s:1": {
6868
},
69-
"ghcr.io/devcontainers-contrib/features/vercel-cli:1": {
69+
"ghcr.io/devcontainers-contrib/features/istioctl:1": {
7070
},
7171
},
7272
"mounts": [

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@
9090
| <a name="input_enable_external_secrets"></a> [enable\_external\_secrets](#input\_enable\_external\_secrets) | n/a | `bool` | `false` | no |
9191
| <a name="input_enable_gatekeeper"></a> [enable\_gatekeeper](#input\_enable\_gatekeeper) | n/a | `bool` | `false` | no |
9292
| <a name="input_enable_gpu_operator"></a> [enable\_gpu\_operator](#input\_enable\_gpu\_operator) | n/a | `bool` | `false` | no |
93+
| <a name="input_enable_istio_resources"></a> [enable\_istio\_resources](#input\_enable\_istio\_resources) | Enable istio resources for clusters with pre-existing istio | `bool` | `true` | no |
9394
| <a name="input_enable_kserve"></a> [enable\_kserve](#input\_enable\_kserve) | n/a | `bool` | `false` | no |
9495
| <a name="input_enable_kubeflow_pipelines"></a> [enable\_kubeflow\_pipelines](#input\_enable\_kubeflow\_pipelines) | n/a | `bool` | `false` | no |
9596
| <a name="input_enable_kuberay"></a> [enable\_kuberay](#input\_enable\_kuberay) | n/a | `bool` | `false` | no |

examples/k3s/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ terraform {
1616
}
1717
backend "kubernetes" {
1818
secret_suffix = "state"
19-
config_path = "/home/vscode/.kube/config"
19+
config_path = "~/.kube/dev3.yaml"
2020
}
2121
}
2222

2323
variable "kubeconfig_path" {
2424
type = string
25-
default = "/home/vscode/.kube/config"
25+
default = "~/.kube/dev3.yaml"
2626
}
2727

2828
provider "kustomization" {

main.tf

Lines changed: 54 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -90,28 +90,28 @@ data "kustomization_overlay" "istio_install" {
9090
]
9191

9292

93-
dynamic "patches" {
94-
for_each = var.enable_external_dns ? [1] : []
95-
content {
96-
target {
97-
kind = "Service"
98-
name = "istio-ingressgateway"
99-
namespace = "istio-system"
100-
}
101-
patch = <<EOF
102-
apiVersion: v1
103-
kind: Service
104-
metadata:
105-
name: istio-ingressgateway
106-
namespace: istio-system
107-
annotations:
108-
external-dns.alpha.kubernetes.io/hostname: ${var.hostname}
109-
external-dns.alpha.kubernetes.io/ttl: "60" #optional
110-
spec:
111-
type: LoadBalancer
112-
EOF
113-
}
114-
}
93+
# dynamic "patches" {
94+
# for_each = var.enable_external_dns ? [1] : []
95+
# content {
96+
# target {
97+
# kind = "Service"
98+
# name = "istio-ingressgateway"
99+
# namespace = "istio-system"
100+
# }
101+
# patch = <<EOF
102+
# apiVersion: v1
103+
# kind: Service
104+
# metadata:
105+
# name: istio-ingressgateway
106+
# namespace: istio-system
107+
# annotations:
108+
# external-dns.alpha.kubernetes.io/hostname: ${var.hostname}
109+
# external-dns.alpha.kubernetes.io/ttl: "60" #optional
110+
# spec:
111+
# type: LoadBalancer
112+
# EOF
113+
# }
114+
# }
115115
}
116116

117117
module "istio_install" {
@@ -127,7 +127,7 @@ data "kustomization_overlay" "oidc_authservice" {
127127
name = "oidc-authservice-parameters"
128128
behavior = "merge"
129129
literals = [
130-
"OIDC_PROVIDER=${var.protocol}${var.hostname}${var.port}/dex"
130+
# "OIDC_PROVIDER=${var.protocol}${var.hostname}${var.port}/dex"
131131
]
132132
}
133133

@@ -157,7 +157,7 @@ metadata:
157157
namespace: auth
158158
data:
159159
config.yaml: |-
160-
issuer: ${local.base_url}/dex
160+
issuer: http://dex.auth.svc.cluster.local:5556/dex
161161
storage:
162162
type: kubernetes
163163
config:
@@ -237,10 +237,12 @@ module "knative_serving" {
237237
}
238238

239239
data "kustomization_build" "cluster_local_gateway" {
240-
path = "${path.module}/submodules/manifests/common/istio-1-17/cluster-local-gateway/base"
240+
count = var.enable_kserve ? 1 : 0
241+
path = "${path.module}/submodules/manifests/common/istio-1-17/cluster-local-gateway/base"
241242
}
242243

243244
module "cluster_local_gateway" {
245+
count = var.enable_kserve ? 1 : 0
244246
source = "./modules/kust"
245247
build = data.kustomization_build.cluster_local_gateway
246248
depends_on = [
@@ -279,33 +281,41 @@ module "kubeflow_roles" {
279281

280282
## kubeflow istio resources
281283

284+
variable "enable_istio_resources" {
285+
type = bool
286+
default = true
287+
description = "Enable istio resources for clusters with pre-existing istio"
288+
}
289+
282290
data "kustomization_overlay" "kubeflow_istio_resources" {
291+
count = var.enable_istio_resources ? 1 : 0
283292
resources = [
284293
"${path.module}/overlays/istio-resources"
285294
]
286-
patches {
287-
target {
288-
kind = "Certificate"
289-
name = "gateway-cert"
290-
namespace = "istio-system"
291-
}
292-
patch = <<EOF
293-
apiVersion: cert-manager.io/v1
294-
kind: Certificate
295-
metadata:
296-
name: gateway-cert
297-
namespace: istio-system
298-
spec:
299-
commonName: ${var.hostname}
300-
dnsNames:
301-
- ${var.hostname}
302-
EOF
303-
}
295+
# patches {
296+
# target {
297+
# kind = "Certificate"
298+
# name = "gateway-cert"
299+
# namespace = "istio-system"
300+
# }
301+
# patch = <<EOF
302+
# apiVersion: cert-manager.io/v1
303+
# kind: Certificate
304+
# metadata:
305+
# name: gateway-cert
306+
# namespace: istio-system
307+
# spec:
308+
# commonName: ${var.hostname}
309+
# dnsNames:
310+
# - ${var.hostname}
311+
# EOF
312+
# }
304313
}
305314

306315
module "kubeflow_istio_resources" {
316+
count = var.enable_istio_resources ? 1 : 0
307317
source = "./modules/kust"
308-
build = data.kustomization_overlay.kubeflow_istio_resources
318+
build = data.kustomization_overlay.kubeflow_istio_resources[0]
309319
depends_on = [
310320
module.kubeflow_roles
311321
]

overlays/istio-resources/cert.yaml

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
apiVersion: cert-manager.io/v1
2-
kind: Issuer
3-
metadata:
4-
name: treebeard-issuer
5-
namespace: istio-system
6-
spec:
7-
acme:
8-
email: <patch me>
9-
preferredChain: ''
10-
privateKeySecretRef:
11-
name: treebeard-issuer-account-key
12-
server: https://acme-v02.api.letsencrypt.org/directory
13-
solvers:
14-
- dns01:
15-
route53:
16-
region: <patch me>
17-
hostedZoneID: <patch me>
18-
accessKeyIDSecretRef:
19-
name: aws-credentials
20-
key: aws_access_key_id
21-
secretAccessKeySecretRef:
22-
name: aws-credentials
23-
key: aws_secret_access_key
1+
# apiVersion: cert-manager.io/v1
2+
# kind: Issuer
3+
# metadata:
4+
# name: treebeard-issuer
5+
# namespace: istio-system
6+
# spec:
7+
# acme:
8+
# email: <patch me>
9+
# preferredChain: ''
10+
# privateKeySecretRef:
11+
# name: treebeard-issuer-account-key
12+
# server: https://acme-v02.api.letsencrypt.org/directory
13+
# solvers:
14+
# - dns01:
15+
# route53:
16+
# region: <patch me>
17+
# hostedZoneID: <patch me>
18+
# accessKeyIDSecretRef:
19+
# name: aws-credentials
20+
# key: aws_access_key_id
21+
# secretAccessKeySecretRef:
22+
# name: aws-credentials
23+
# key: aws_secret_access_key
2424
---
2525
apiVersion: cert-manager.io/v1
2626
kind: Certificate

overlays/istio-resources/kustomization.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ kind: Kustomization
33
resources:
44
- ../../submodules/manifests/common/istio-1-17/kubeflow-istio-resources/base
55
- cert.yaml
6-
patches: # only needed when using TLS loadbalancer
7-
- path: patches/resources.yaml
6+
# patches: # only needed when using TLS loadbalancer
7+
# - path: patches/resources.yaml

scripts/setup-krew.sh

100644100755
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
export KREW_ROOT=/workspaces/shadowfax
21
set -x; cd "$(mktemp -d)" &&
32
OS="$(uname | tr '[:upper:]' '[:lower:]')" &&
43
ARCH="$(uname -m | sed -e 's/x86_64/amd64/' -e 's/\(arm\)\(64\)\?.*/\1\2/' -e 's/aarch64$/arm64/')" &&

0 commit comments

Comments
 (0)