File tree Expand file tree Collapse file tree 17 files changed +209
-85
lines changed Expand file tree Collapse file tree 17 files changed +209
-85
lines changed Original file line number Diff line number Diff line change @@ -155,12 +155,12 @@ $(GOLANGCI_LINT): $(LOCALBIN)
155
155
156
156
.PHONY : deploy
157
157
deploy : kustomize # # Deploy backend to the K8s cluster specified in ~/.kube/config.
158
- cd manifests/kustomize/base && $(KUSTOMIZE ) edit set image nb -backend=${IMG}
159
- $(KUSTOMIZE ) build manifests/kustomize/base | $( KUBECTL ) apply -f -
158
+ cd manifests/kustomize/overlays/istio && $(KUSTOMIZE ) edit set image workspaces -backend=${IMG}
159
+ $(KUBECTL ) apply -k manifests/kustomize/overlays/istio
160
160
161
161
.PHONY : undeploy
162
162
undeploy : kustomize # # Undeploy backend from the K8s cluster specified in ~/.kube/config.
163
- $(KUSTOMIZE ) build manifests/kustomize/base | $( KUBECTL ) delete --ignore-not-found=true -f -
163
+ $(KUBECTL ) delete -k manifests/kustomize/overlays/istio --ignore-not-found=true
164
164
165
165
166
166
# #@ Dependencies
Original file line number Diff line number Diff line change 1
1
apiVersion : apps/v1
2
2
kind : Deployment
3
3
metadata :
4
- name : backend
4
+ name : workspaces- backend
5
5
spec :
6
6
replicas : 1
7
7
selector :
@@ -15,21 +15,21 @@ spec:
15
15
metadata :
16
16
labels : {}
17
17
spec :
18
- serviceAccountName : backend
18
+ serviceAccountName : workspaces- backend
19
19
securityContext :
20
20
runAsNonRoot : true
21
21
terminationGracePeriodSeconds : 30
22
22
containers :
23
- - name : nb -backend
24
- image : nb -backend
23
+ - name : workspaces -backend
24
+ image : workspaces -backend
25
25
imagePullPolicy : IfNotPresent
26
26
securityContext :
27
27
allowPrivilegeEscalation : false
28
28
capabilities :
29
29
drop :
30
30
- " ALL"
31
31
ports :
32
- - name : http-backend
32
+ - name : http-api
33
33
containerPort : 4000
34
34
env :
35
35
- name : PORT
44
44
livenessProbe :
45
45
httpGet :
46
46
path : /api/v1/healthcheck
47
- port : http-backend
47
+ port : http-api
48
48
scheme : HTTP
49
49
initialDelaySeconds : 30
50
50
periodSeconds : 20
@@ -54,10 +54,10 @@ spec:
54
54
readinessProbe :
55
55
httpGet :
56
56
path : /api/v1/healthcheck
57
- port : http-backend
57
+ port : http-api
58
58
scheme : HTTP
59
59
initialDelaySeconds : 10
60
60
periodSeconds : 10
61
61
timeoutSeconds : 5
62
62
failureThreshold : 3
63
- successThreshold : 1
63
+ successThreshold : 1
Original file line number Diff line number Diff line change 1
1
apiVersion : kustomize.config.k8s.io/v1beta1
2
2
kind : Kustomization
3
3
4
- namespace : kubeflow-system
5
- namePrefix : nb-
4
+ namespace : kubeflow-workspaces
6
5
7
6
resources :
8
- - service_account.yaml
9
- - rbac.yaml
10
- - service.yaml
11
- - deployment.yaml
12
-
13
- images :
14
- - name : nb-backend
15
-
16
- labels :
17
- - includeSelectors : true
18
- pairs :
19
- app.kubernetes.io/name : kubeflow-notebooks
20
- app.kubernetes.io/component : backend
21
- app.kubernetes.io/managed-by : kustomize
7
+ - namespace.yaml
8
+ - service_account.yaml
9
+ - rbac.yaml
10
+ - service.yaml
11
+ - deployment.yaml
Original file line number Diff line number Diff line change
1
+ apiVersion : v1
2
+ kind : Namespace
3
+ metadata :
4
+ name : kubeflow-workspaces
Original file line number Diff line number Diff line change 1
1
apiVersion : rbac.authorization.k8s.io/v1
2
2
kind : ClusterRole
3
3
metadata :
4
- name : backend-clusterrole
4
+ name : workspaces-backend
5
5
rules :
6
6
- apiGroups :
7
7
- kubeflow.org
@@ -16,16 +16,24 @@ rules:
16
16
- update
17
17
- patch
18
18
- delete
19
+ - apiGroups :
20
+ - " "
21
+ resources :
22
+ - namespaces
23
+ verbs :
24
+ - get
25
+ - list
26
+ - watch
19
27
---
20
28
apiVersion : rbac.authorization.k8s.io/v1
21
29
kind : ClusterRoleBinding
22
30
metadata :
23
- name : backend-clusterrolebinding
31
+ name : workspaces-backend
24
32
roleRef :
25
33
apiGroup : rbac.authorization.k8s.io
26
34
kind : ClusterRole
27
- name : backend-clusterrole
35
+ name : workspaces-backend
28
36
subjects :
29
37
- kind : ServiceAccount
30
- name : nb -backend
31
- namespace : kubeflow-system
38
+ name : workspaces -backend
39
+ namespace : kubeflow-workspaces
Original file line number Diff line number Diff line change 1
1
apiVersion : v1
2
2
kind : Service
3
3
metadata :
4
- name : backend
4
+ name : workspaces- backend
5
5
spec :
6
6
selector : {}
7
7
ports :
8
- - name : http-backend
8
+ - name : http-api
9
9
port : 4000
10
- targetPort : http-backend
11
- type : ClusterIP
10
+ targetPort : http-api
11
+ type : ClusterIP
Original file line number Diff line number Diff line change 1
1
apiVersion : v1
2
2
kind : ServiceAccount
3
3
metadata :
4
- name : backend
4
+ name : workspaces- backend
Original file line number Diff line number Diff line change
1
+ apiVersion : kustomize.config.k8s.io/v1alpha1
2
+ kind : Component
3
+
4
+ labels :
5
+ - includeSelectors : true
6
+ pairs :
7
+ app.kubernetes.io/component : workspaces-backend
8
+ app.kubernetes.io/managed-by : kustomize
9
+ app.kubernetes.io/name : kubeflow-workspaces
10
+ app.kubernetes.io/part-of : kubeflow
Original file line number Diff line number Diff line change
1
+ apiVersion : security.istio.io/v1beta1
2
+ kind : AuthorizationPolicy
3
+ metadata :
4
+ name : workspaces-backend
5
+ spec :
6
+ action : ALLOW
7
+ selector :
8
+ matchLabels : {}
9
+ rules :
10
+ - {}
Original file line number Diff line number Diff line change
1
+ apiVersion : networking.istio.io/v1beta1
2
+ kind : DestinationRule
3
+ metadata :
4
+ name : workspaces-backend
5
+ spec :
6
+ host : workspaces-backend.kubeflow-workspaces.svc.cluster.local
7
+ trafficPolicy :
8
+ tls :
9
+ mode : DISABLE
You can’t perform that action at this time.
0 commit comments