13
13
# See the License for the specific language governing permissions and
14
14
# limitations under the License.
15
15
#
16
+
17
+ SNAPSHOTTER_VERSION =v8.2.0
18
+
16
19
.PHONY : kind/install
17
20
# # install KinD
18
21
kind/install : $(BINDIR ) /kind
@@ -25,7 +28,8 @@ $(BINDIR)/kind:
25
28
26
29
.PHONY : kind/start
27
30
# # start kind (kubernetes in docker) cluster
28
- kind/start :
31
+ kind/start : \
32
+ $(BINDIR ) /docker
29
33
kind create cluster --name $(NAME )
30
34
@make kind/login
31
35
@@ -36,7 +40,8 @@ kind/login:
36
40
37
41
.PHONY : kind/stop
38
42
# # stop kind (kubernetes in docker) cluster
39
- kind/stop :
43
+ kind/stop : \
44
+ $(BINDIR ) /docker
40
45
kind delete cluster --name $(NAME )
41
46
42
47
.PHONY : kind/restart
@@ -54,7 +59,6 @@ kind/cluster/start:
54
59
kubectl apply -f https://projectcontour.io/quickstart/operator.yaml
55
60
kubectl apply -f https://projectcontour.io/quickstart/contour-custom-resource.yaml
56
61
57
-
58
62
.PHONY : kind/cluster/stop
59
63
# # stop kind (kubernetes in docker) multi node cluster
60
64
kind/cluster/stop :
@@ -70,3 +74,33 @@ kind/cluster/login:
70
74
kind/cluster/restart : \
71
75
kind/cluster/stop \
72
76
kind/cluster/start
77
+
78
+ .PHONY : kind/vs/start
79
+ # # start kind (kubernetes in docker) cluster with volume snapshot
80
+ kind/vs/start : \
81
+ $(BINDIR ) /docker
82
+ sed -e ' s/apiServerAddress: "127.0.0.1"/apiServerAddress: "$(shell grep host.docker.internal /etc/hosts | cut -f1)"/' $(ROOTDIR ) /k8s/debug/kind/e2e.yaml | kind create cluster --name $(NAME ) -vs --config -
83
+
84
+ kubectl apply -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/$(SNAPSHOTTER_VERSION)/client/config/crd/snapshot.storage.k8s.io_volumesnapshotclasses.yaml
85
+ kubectl apply -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/$(SNAPSHOTTER_VERSION)/client/config/crd/snapshot.storage.k8s.io_volumesnapshotcontents.yaml
86
+ kubectl apply -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/$(SNAPSHOTTER_VERSION)/client/config/crd/snapshot.storage.k8s.io_volumesnapshots.yaml
87
+ kubectl apply -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/$(SNAPSHOTTER_VERSION)/deploy/kubernetes/snapshot-controller/rbac-snapshot-controller.yaml
88
+ kubectl apply -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/$(SNAPSHOTTER_VERSION)/deploy/kubernetes/snapshot-controller/setup-snapshot-controller.yaml
89
+
90
+ @make kind/vs/login
91
+
92
+ .PHONY : kind/vs/stop
93
+ # # stop kind (kubernetes in docker) cluster with volume snapshot
94
+ kind/vs/stop :
95
+ kind delete cluster --name $(NAME ) -vs
96
+
97
+ .PHONY : kind/vs/login
98
+ # # login command for kind (kubernetes in docker) cluster with volume snapshot
99
+ kind/vs/login :
100
+ kubectl cluster-info --context kind-$(NAME ) -vs
101
+
102
+ .PHONY : kind/vs/restart
103
+ # # restart kind (kubernetes in docker) cluster with volume snapshot
104
+ kind/vs/restart : \
105
+ kind/vs/stop \
106
+ kind/vs/start
0 commit comments