Skip to content

Commit 4064108

Browse files
committed
helm: fix istio namespace names
Signed-off-by: danish9039 <danishsiddiqui040@gmail.com>
1 parent a2454f9 commit 4064108

4 files changed

Lines changed: 4 additions & 23 deletions

File tree

experimental/helm/charts/istio/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ Helm release metadata and Istio workloads are stored in `istio-system`. The
5050
`kubeflow-namespaces` foundation chart creates `Namespace/istio-system` first.
5151
Istio CNI resources still run in `kube-system`.
5252

53+
## Namespace names
54+
55+
Namespace names are fixed to match the Kustomize baseline and `kubeflow-namespaces` foundation chart. Istio workloads use `istio-system`, Istio CNI resources use `kube-system`, and Kubeflow gateway resources refer to `kubeflow`. These names are not configurable.
56+
5357
## Kustomize Mapping
5458

5559
- `ci/values-crds.yaml`: `common/istio/istio-crds/base`

experimental/helm/charts/istio/templates/_helpers.tpl

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,9 @@
22
Render a static Kustomize-generated manifest file while preserving the Go
33
templates embedded in Istio injector ConfigMaps.
44
*/}}
5-
{{- define "kubeflow-istio.validateNamespace" -}}
6-
{{- $name := .name -}}
7-
{{- $value := .value | toString -}}
8-
{{- if or (gt (len $value) 63) (not (regexMatch "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" $value)) -}}
9-
{{- fail (printf "%s must be a valid DNS-1123 label, got %q" $name $value) -}}
10-
{{- end -}}
11-
{{- end -}}
12-
135
{{- define "kubeflow-istio.renderFile" -}}
146
{{- $root := .root -}}
157
{{- $content := $root.Files.Get .path -}}
16-
{{- $content = replace "istio-system" ($root.Values.global.istioNamespace | toString) $content -}}
17-
{{- $content = replace "kube-system" ($root.Values.global.kubeSystemNamespace | toString) $content -}}
18-
{{- $content = regexReplaceAll "(?m)^([[:space:]]*namespace: )kubeflow$" $content (printf "${1}%s" ($root.Values.global.kubeflowNamespace | toString)) -}}
19-
{{- $content = replace "- kubeflow/*" (printf "- %s/*" ($root.Values.global.kubeflowNamespace | toString)) $content -}}
208
{{- if .oauth2ProxyService -}}
219
{{- $content = replace "service: oauth2-proxy.oauth2-proxy.svc.cluster.local" (printf "service: %s" ($root.Values.oauth2Proxy.service | toString)) $content -}}
2210
{{- $content = regexReplaceAll "(service: [^\\n]+\\n[[:space:]]*port: )[0-9]+(\\n[[:space:]]*name: oauth2-proxy)" $content (printf "${1}%d${2}" (int $root.Values.oauth2Proxy.port)) -}}

experimental/helm/charts/istio/templates/profile-validation.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
{{- include "kubeflow-istio.validateNamespace" (dict "name" "global.istioNamespace" "value" .Values.global.istioNamespace) -}}
2-
{{- include "kubeflow-istio.validateNamespace" (dict "name" "global.kubeflowNamespace" "value" .Values.global.kubeflowNamespace) -}}
3-
{{- include "kubeflow-istio.validateNamespace" (dict "name" "global.kubeSystemNamespace" "value" .Values.global.kubeSystemNamespace) -}}
41
{{- $validProfiles := list "base" "oauth2-proxy" "gke" -}}
52
{{- if not (has .Values.profile $validProfiles) -}}
63
{{- fail (printf "unsupported istio profile %q; supported values are: base, oauth2-proxy, gke" .Values.profile) -}}

experimental/helm/charts/istio/values.yaml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,6 @@
77
# -- Istio install profile used when install.enabled=true. Supported values: base, oauth2-proxy, gke.
88
profile: oauth2-proxy
99

10-
global:
11-
# -- Namespace for Istio control-plane workloads.
12-
istioNamespace: istio-system
13-
# -- Namespace for Kubeflow resources referenced by Istio Sidecar resources.
14-
kubeflowNamespace: kubeflow
15-
# -- Namespace for Istio CNI resources.
16-
kubeSystemNamespace: kube-system
17-
1810
crds:
1911
# -- Render Istio CustomResourceDefinition resources.
2012
enabled: true

0 commit comments

Comments
 (0)