File tree Expand file tree Collapse file tree 16 files changed +204
-80
lines changed Expand file tree Collapse file tree 16 files changed +204
-80
lines changed Original file line number Diff line number Diff line change @@ -155,12 +155,12 @@ $(GOLANGCI_LINT): $(LOCALBIN)
155155
156156.PHONY : deploy
157157deploy : 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
160160
161161.PHONY : undeploy
162162undeploy : 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
164164
165165
166166# #@ Dependencies
Original file line number Diff line number Diff line change 11apiVersion : apps/v1
22kind : Deployment
33metadata :
4- name : backend
4+ name : workspaces- backend
55spec :
66 replicas : 1
77 selector :
@@ -15,21 +15,21 @@ spec:
1515 metadata :
1616 labels : {}
1717 spec :
18- serviceAccountName : backend
18+ serviceAccountName : workspaces- backend
1919 securityContext :
2020 runAsNonRoot : true
2121 terminationGracePeriodSeconds : 30
2222 containers :
23- - name : nb -backend
24- image : nb -backend
23+ - name : workspaces -backend
24+ image : workspaces -backend
2525 imagePullPolicy : IfNotPresent
2626 securityContext :
2727 allowPrivilegeEscalation : false
2828 capabilities :
2929 drop :
3030 - " ALL"
3131 ports :
32- - name : http-backend
32+ - name : http-api
3333 containerPort : 4000
3434 env :
3535 - name : PORT
4444 livenessProbe :
4545 httpGet :
4646 path : /api/v1/healthcheck
47- port : http-backend
47+ port : http-api
4848 scheme : HTTP
4949 initialDelaySeconds : 30
5050 periodSeconds : 20
@@ -54,10 +54,10 @@ spec:
5454 readinessProbe :
5555 httpGet :
5656 path : /api/v1/healthcheck
57- port : http-backend
57+ port : http-api
5858 scheme : HTTP
5959 initialDelaySeconds : 10
6060 periodSeconds : 10
6161 timeoutSeconds : 5
6262 failureThreshold : 3
63- successThreshold : 1
63+ successThreshold : 1
Original file line number Diff line number Diff line change 11apiVersion : kustomize.config.k8s.io/v1beta1
22kind : Kustomization
33
4- namespace : kubeflow-system
5- namePrefix : nb-
4+ namespace : kubeflow-workspaces
65
76resources :
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 11apiVersion : rbac.authorization.k8s.io/v1
22kind : ClusterRole
33metadata :
4- name : backend-clusterrole
4+ name : workspaces-backend
55rules :
66- apiGroups :
77 - kubeflow.org
@@ -16,16 +16,24 @@ rules:
1616 - update
1717 - patch
1818 - delete
19+ - apiGroups :
20+ - " "
21+ resources :
22+ - namespaces
23+ verbs :
24+ - get
25+ - list
26+ - watch
1927---
2028apiVersion : rbac.authorization.k8s.io/v1
2129kind : ClusterRoleBinding
2230metadata :
23- name : backend-clusterrolebinding
31+ name : workspaces-backend
2432roleRef :
2533 apiGroup : rbac.authorization.k8s.io
2634 kind : ClusterRole
27- name : backend-clusterrole
35+ name : workspaces-backend
2836subjects :
2937- 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 11apiVersion : v1
22kind : Service
33metadata :
4- name : backend
4+ name : workspaces- backend
55spec :
66 selector : {}
77 ports :
8- - name : http-backend
8+ - name : http-api
99 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 11apiVersion : v1
22kind : ServiceAccount
33metadata :
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