This repository was archived by the owner on Apr 8, 2025. It is now read-only.
File tree 2 files changed +36
-0
lines changed
2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change 13
13
@echo " make build - Build UserSpace CNI container."
14
14
@echo " make deploy - Copy binary from container to host: /opt/cni/bin."
15
15
@echo " make all - build and deploy"
16
+ @echo " make rollout - kubectl apply daemonset"
16
17
17
18
build :
18
19
@$(IMAGE_BUILDER ) build . -f ./docker/userspacecni/Dockerfile -t $(IMAGE_NAME )
@@ -23,8 +24,14 @@ deploy:
23
24
@$(IMAGE_BUILDER ) run -it --rm -v /opt/cni/bin/:/opt/cni/bin/ $(IMAGE_NAME )
24
25
25
26
generate-bin : generate
27
+ # Used in dockerfile
26
28
@cd userspace && go build -v
27
29
28
30
generate :
31
+ # Used in dockerfile
29
32
for package in cnivpp/api/* ; do cd $$ package ; pwd ; go generate ; cd - ; done
30
33
34
+ rollout :
35
+ # Use sed to replace image name and then apply deploument file
36
+ sed " s|\(image:\).*\(#registory\)|\1 $( IMAGE_NAME) \2|g" ./kubernetes/userspace-daemonset.yml | kubectl apply -f -
37
+
Original file line number Diff line number Diff line change
1
+ ---
2
+ apiVersion : apps/v1
3
+ kind : DaemonSet
4
+ metadata :
5
+ name : userspace-cni
6
+ namespace : kube-system
7
+ spec :
8
+ selector :
9
+ matchLabels :
10
+ app : userspace-cni
11
+ template :
12
+ metadata :
13
+ labels :
14
+ app : userspace-cni
15
+ spec :
16
+ initContainers :
17
+ - name : userspace-cni-plugin
18
+ image : localhost:5000/userspacecni # registory:imagename
19
+ imagePullPolicy : IfNotPresent
20
+ volumeMounts :
21
+ - name : cnibin
22
+ mountPath : /opt/cni/bin
23
+ volumes :
24
+ - name : cnibin
25
+ hostPath :
26
+ path : /opt/cni/bin
27
+ containers :
28
+ - name : pause
29
+ image : gcr.io/google_containers/pause
You can’t perform that action at this time.
0 commit comments