Skip to content

Commit

Permalink
upgrade notebooks + don't hardcode namespace in istio
Browse files Browse the repository at this point in the history
Signed-off-by: David van der Spek <[email protected]>
  • Loading branch information
davidspek committed Sep 15, 2023
1 parent f1cb50a commit 9e7f324
Show file tree
Hide file tree
Showing 29 changed files with 1,436 additions and 13,236 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ spec:
uri: /
route:
- destination:
host: {{ include "central-dashboard.fullname" . }}.kubeflow.svc.{{ .Values.global.clusterDomain }}
host: {{ include "central-dashboard.fullname" . }}.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}
port:
number: {{ .Values.service.port }}
6 changes: 3 additions & 3 deletions kubeflow/helm/katib/templates/controller/certificate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ metadata:
labels: {{- include "katib.labels" . | nindent 4 }}
name: {{ include "katib.fullname" . }}-controller-certs
spec:
commonName: {{ include "katib.fullname" . }}-controller.kubeflow.svc
commonName: {{ include "katib.fullname" . }}-controller.{{ .Release.Namespace }}.svc
dnsNames:
- {{ include "katib.fullname" . }}-controller.kubeflow.svc
- {{ include "katib.fullname" . }}-controller.kubeflow.svc.cluster.local
- {{ include "katib.fullname" . }}-controller.{{ .Release.Namespace }}.svc
- {{ include "katib.fullname" . }}-controller.{{ .Release.Namespace }}.svc.cluster.local
isCA: true
issuerRef:
kind: ClusterIssuer
Expand Down
2 changes: 1 addition & 1 deletion kubeflow/helm/katib/templates/web-app/virtualservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ spec:
uri: {{ .Values.webApp.virtualService.prefix }}/
route:
- destination:
host: {{ include "katib.fullname" . }}-web-app.kubeflow.svc.{{ .Values.global.clusterDomain }}
host: {{ include "katib.fullname" . }}-web-app.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}
port:
number: {{ .Values.webApp.service.port }}
12,120 changes: 18 additions & 12,102 deletions kubeflow/helm/notebooks/crds/notebooks_crds.yaml

Large diffs are not rendered by default.

2,176 changes: 1,217 additions & 959 deletions kubeflow/helm/notebooks/crds/poddefaults_crd.yaml

Large diffs are not rendered by default.

50 changes: 50 additions & 0 deletions kubeflow/helm/notebooks/templates/controller/cluster-role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels: {{- include "notebooks.labels" . | nindent 4 }}
name: {{ include "notebooks.fullname" . }}-controller-cluster-role
rules:
- apiGroups:
- apps
resources:
- statefulsets
verbs:
- '*'
- apiGroups:
- ""
resources:
- events
verbs:
- create
- get
- list
- patch
- watch
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- services
verbs:
- '*'
- apiGroups:
- kubeflow.org
resources:
- notebooks
- notebooks/finalizers
- notebooks/status
verbs:
- '*'
- apiGroups:
- networking.istio.io
resources:
- virtualservices
verbs:
- '*'
9 changes: 5 additions & 4 deletions kubeflow/helm/notebooks/templates/controller/configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
apiVersion: v1
kind: ConfigMap
metadata:
labels: {{- include "notebooks.labels" . | nindent 4 }}
name: {{ include "notebooks.fullname" . }}-controller-config
data:
ISTIO_GATEWAY: {{ .Values.controller.istio.gateway | quote }}
USE_ISTIO: {{ .Values.controller.istio.enabled | quote }}
CLUSTER_DOMAIN: {{ .Values.global.clusterDomain | quote }}
ENABLE_CULLING: {{ .Values.controller.culling.enabled | quote }}
IDLENESS_CHECK_PERIOD: {{ .Values.controller.culling.checkPeriod | quote }}
CULL_IDLE_TIME: {{ .Values.controller.culling.idleTime | quote }}
kind: ConfigMap
metadata:
labels: {{- include "notebooks.labels" . | nindent 4 }}
name: {{ include "notebooks.fullname" . }}-controller-config
Original file line number Diff line number Diff line change
Expand Up @@ -48,53 +48,3 @@ rules:
- get
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels: {{- include "notebooks.labels" . | nindent 4 }}
name: {{ include "notebooks.fullname" . }}-controller-cluster-role
rules:
- apiGroups:
- apps
resources:
- statefulsets
verbs:
- '*'
- apiGroups:
- ""
resources:
- events
verbs:
- create
- get
- list
- watch
- apiGroups:
- ""
resources:
- pods
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- services
verbs:
- '*'
- apiGroups:
- kubeflow.org
resources:
- notebooks
- notebooks/finalizers
- notebooks/status
verbs:
- '*'
- apiGroups:
- networking.istio.io
resources:
- virtualservices
verbs:
- '*'
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ metadata:
labels: {{- include "notebooks.labels" . | nindent 4 }}
name: {{ include "notebooks.fullname" . }}-pod-defaults-certs
spec:
commonName: {{ include "notebooks.fullname" . }}-pod-defaults.kubeflow.svc
commonName: {{ include "notebooks.fullname" . }}-pod-defaults.{{ .Release.Namespace }}.svc
dnsNames:
- {{ include "notebooks.fullname" . }}-pod-defaults.kubeflow.svc
- {{ include "notebooks.fullname" . }}-pod-defaults.kubeflow.svc.cluster.local
- {{ include "notebooks.fullname" . }}-pod-defaults.{{ .Release.Namespace }}.svc
- {{ include "notebooks.fullname" . }}-pod-defaults.{{ .Release.Namespace }}.svc.cluster.local
isCA: true
issuerRef:
kind: ClusterIssuer
Expand Down
18 changes: 18 additions & 0 deletions kubeflow/helm/notebooks/templates/pod-defaults/cluster-role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels: {{- include "notebooks.labels" . | nindent 4 }}
name: {{ include "notebooks.fullname" . }}-pod-defaults-cluster-role
rules:
- apiGroups:
- kubeflow.org
resources:
- poddefaults
verbs:
- get
- watch
- list
- update
- create
- patch
- delete
Original file line number Diff line number Diff line change
@@ -1,22 +1,3 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels: {{- include "notebooks.labels" . | nindent 4 }}
name: {{ include "notebooks.fullname" . }}-pod-defaults-cluster-role
rules:
- apiGroups:
- kubeflow.org
resources:
- poddefaults
verbs:
- get
- watch
- list
- update
- create
- patch
- delete
---
aggregationRule:
clusterRoleSelectors:
- matchLabels:
Expand Down
57 changes: 57 additions & 0 deletions kubeflow/helm/notebooks/templates/web-app/cluster-role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels: {{- include "notebooks.labels" . | nindent 4 }}
name: {{ include "notebooks.fullname" . }}-web-app-cluster-role
rules:
- apiGroups:
- authorization.k8s.io
resources:
- subjectaccessreviews
verbs:
- create
- apiGroups:
- kubeflow.org
resources:
- notebooks
- notebooks/finalizers
- poddefaults
verbs:
- get
- list
- create
- delete
- patch
- update
- apiGroups:
- ""
resources:
- persistentvolumeclaims
verbs:
- create
- delete
- get
- list
- apiGroups:
- ""
resources:
- events
- nodes
verbs:
- list
- apiGroups:
- storage.k8s.io
resources:
- storageclasses
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- pods
- pods/log
verbs:
- list
- get
1 change: 1 addition & 0 deletions kubeflow/helm/notebooks/templates/web-app/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,7 @@ data:
UI: default
USERID_HEADER: {{ .Values.global.userIDHeader }}
USERID_PREFIX: {{ .Values.global.userIDPrefix | quote }}
APP_SECURE_COOKIES: "true"
kind: ConfigMap
metadata:
labels: {{- include "notebooks.labels" . | nindent 4 }}
Expand Down
14 changes: 14 additions & 0 deletions kubeflow/helm/notebooks/templates/web-app/destination-rule.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: {{ include "notebooks.fullname" . }}-web-app
labels: {{- include "notebooks.labels" . | nindent 4 }}
{{- with .Values.webApp.virtualService.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
host: {{ include "notebooks.fullname" . }}-web-app.{{ .Release.Namespace }}.svc.{{ .Values.global.clusterDomain }}
trafficPolicy:
tls:
mode: ISTIO_MUTUAL
Original file line number Diff line number Diff line change
@@ -1,64 +1,5 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels: {{- include "notebooks.labels" . | nindent 4 }}
name: {{ include "notebooks.fullname" . }}-web-app-cluster-role
rules:
- apiGroups:
- ""
resources:
- namespaces
verbs:
- get
- list
- create
- delete
- apiGroups:
- authorization.k8s.io
resources:
- subjectaccessreviews
verbs:
- create
- apiGroups:
- kubeflow.org
resources:
- notebooks
- notebooks/finalizers
- poddefaults
verbs:
- get
- list
- create
- delete
- patch
- update
- apiGroups:
- ""
resources:
- persistentvolumeclaims
verbs:
- create
- delete
- get
- list
- apiGroups:
- ""
resources:
- events
- nodes
verbs:
- list
- apiGroups:
- storage.k8s.io
resources:
- storageclasses
verbs:
- get
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels: {{- include "notebooks.labels" . | nindent 4 }}
rbac.authorization.kubeflow.org/aggregate-to-kubeflow-admin: "true"
Expand Down
Loading

0 comments on commit 9e7f324

Please sign in to comment.