File tree Expand file tree Collapse file tree 10 files changed +56
-73
lines changed Expand file tree Collapse file tree 10 files changed +56
-73
lines changed Original file line number Diff line number Diff line change 1
1
# Image URL to use all building/pushing image targets
2
- IMG ?= nbv2 -backend:latest
2
+ IMG ?= nb -backend:latest
3
3
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
4
4
ENVTEST_K8S_VERSION = 1.31.0
5
5
@@ -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 config/default && $(KUSTOMIZE ) edit set image nbv2 -backend=${IMG}
159
- $(KUSTOMIZE ) build config/default | $(KUBECTL ) apply -f -
158
+ cd manifests/kustomize/base && $(KUSTOMIZE ) edit set image nb -backend=${IMG}
159
+ $(KUSTOMIZE ) build manifests/kustomize/base | $(KUBECTL ) apply -f -
160
160
161
161
.PHONY : undeploy
162
162
undeploy : kustomize # # Undeploy backend from the K8s cluster specified in ~/.kube/config.
163
- $(KUSTOMIZE ) build config/default | $(KUBECTL ) delete --ignore-not-found=true -f -
163
+ $(KUSTOMIZE ) build manifests/kustomize/base | $(KUBECTL ) delete --ignore-not-found=true -f -
164
164
165
165
166
166
# #@ Dependencies
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
apiVersion : apps/v1
2
2
kind : Deployment
3
3
metadata :
4
- name : nbv2-backend
5
- namespace : backend-system
6
- labels :
7
- app : nbv2-backend
8
- app.kubernetes.io/component : backend
9
- app.kubernetes.io/managed-by : kustomize
4
+ name : backend
10
5
spec :
11
6
replicas : 1
7
+ selector :
8
+ matchLabels : {}
12
9
strategy :
13
10
type : RollingUpdate
14
11
rollingUpdate :
15
12
maxUnavailable : 0
16
13
maxSurge : 1
17
- selector :
18
- matchLabels :
19
- app : nbv2-backend
20
- app.kubernetes.io/component : backend
21
- app.kubernetes.io/managed-by : kustomize
22
14
template :
23
15
metadata :
24
- labels :
25
- app : nbv2-backend
26
- app.kubernetes.io/component : backend
27
- app.kubernetes.io/managed-by : kustomize
16
+ labels : {}
28
17
spec :
29
- serviceAccountName : nbv2- backend
18
+ serviceAccountName : backend
30
19
securityContext :
31
20
runAsNonRoot : true
32
21
terminationGracePeriodSeconds : 30
33
22
containers :
34
- - name : nbv2 -backend
35
- image : nbv2 -backend
23
+ - name : nb -backend
24
+ image : nb -backend
36
25
imagePullPolicy : IfNotPresent
37
26
securityContext :
38
27
allowPrivilegeEscalation : false
39
28
capabilities :
40
29
drop :
41
30
- " ALL"
42
31
ports :
43
- - containerPort : 4000
32
+ - name : http-backend
33
+ containerPort : 4000
44
34
env :
45
35
- name : PORT
46
36
value : " 4000"
47
37
resources :
48
38
limits :
49
- cpu : 500m
50
- memory : 256Mi
39
+ cpu : 1
40
+ memory : 1Gi
51
41
requests :
52
42
cpu : 100m
53
- memory : 128Mi
43
+ memory : 512Mi
54
44
livenessProbe :
55
45
httpGet :
56
46
path : /api/v1/healthcheck
57
- port : 4000
47
+ port : http-backend
58
48
scheme : HTTP
59
49
initialDelaySeconds : 30
60
50
periodSeconds : 20
64
54
readinessProbe :
65
55
httpGet :
66
56
path : /api/v1/healthcheck
67
- port : 4000
57
+ port : http-backend
68
58
scheme : HTTP
69
59
initialDelaySeconds : 10
70
60
periodSeconds : 10
Original file line number Diff line number Diff line change
1
+ apiVersion : kustomize.config.k8s.io/v1beta1
2
+ kind : Kustomization
3
+
4
+ namespace : kubeflow-system
5
+ namePrefix : nb-
6
+
7
+ 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
Original file line number Diff line number Diff line change @@ -27,5 +27,5 @@ roleRef:
27
27
name : backend-clusterrole
28
28
subjects :
29
29
- kind : ServiceAccount
30
- name : nbv2 -backend
31
- namespace : backend -system
30
+ name : nb -backend
31
+ namespace : kubeflow -system
Original file line number Diff line number Diff line change
1
+ apiVersion : v1
2
+ kind : Service
3
+ metadata :
4
+ name : backend
5
+ spec :
6
+ selector : {}
7
+ ports :
8
+ - name : http-backend
9
+ port : 4000
10
+ targetPort : http-backend
11
+ type : ClusterIP
Original file line number Diff line number Diff line change
1
+ apiVersion : v1
2
+ kind : ServiceAccount
3
+ metadata :
4
+ name : backend
You can’t perform that action at this time.
0 commit comments