@@ -125,6 +125,11 @@ deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in
125
125
undeploy : # # Undeploy controller from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
126
126
$(KUSTOMIZE ) build config/default | $(KUBECTL ) delete --ignore-not-found=$(ignore-not-found ) -f -
127
127
128
+ .PHONY : tilt-cluster
129
+ tilt-cluster : ctlptl tilt
130
+ ctlptl apply -f ctlptl-config.yaml
131
+ tilt up
132
+
128
133
# #@ Build Dependencies
129
134
130
135
# # Location to install dependencies to
@@ -135,12 +140,16 @@ $(LOCALBIN):
135
140
# # Tool Binaries
136
141
KUBECTL ?= kubectl
137
142
KUSTOMIZE ?= $(LOCALBIN ) /kustomize
143
+ CTLPTL ?= $(LOCALBIN ) /ctlptl
138
144
CONTROLLER_GEN ?= $(LOCALBIN ) /controller-gen
145
+ TILT ?= $(LOCALBIN ) /tilt
139
146
ENVTEST ?= $(LOCALBIN ) /setup-envtest
140
147
141
148
# # Tool Versions
142
149
KUSTOMIZE_VERSION ?= v5.1.1
150
+ CTLPTL_VERSION ?= v0.8.22
143
151
CONTROLLER_TOOLS_VERSION ?= v0.13.0
152
+ TILT_VERSION ?= 0.33.6
144
153
145
154
.PHONY : kustomize
146
155
kustomize : $(KUSTOMIZE ) # # Download kustomize locally if necessary. If wrong version is installed, it will be removed before downloading.
@@ -151,12 +160,25 @@ $(KUSTOMIZE): $(LOCALBIN)
151
160
fi
152
161
test -s $(LOCALBIN ) /kustomize || GOBIN=$(LOCALBIN ) GO111MODULE=on go install sigs.k8s.io/kustomize/kustomize/v5@$(KUSTOMIZE_VERSION )
153
162
163
+ .PHONY : ctlptl
164
+ ctlptl : $(CTLPTL ) # # Download ctlptl locally if necessary. If wrong version is installed, it will be overwritten.
165
+ $(CTLPTL ) : $(LOCALBIN )
166
+ test -s $(LOCALBIN ) /ctlptl && $(LOCALBIN ) /ctlptl version | grep -q $(CTLPTL_VERSION ) || \
167
+ GOBIN=$(LOCALBIN ) go install github.com/tilt-dev/ctlptl/cmd/ctlptl@$(CTLPTL_VERSION )
168
+
169
+
154
170
.PHONY : controller-gen
155
171
controller-gen : $(CONTROLLER_GEN ) # # Download controller-gen locally if necessary. If wrong version is installed, it will be overwritten.
156
172
$(CONTROLLER_GEN ) : $(LOCALBIN )
157
173
test -s $(LOCALBIN ) /controller-gen && $(LOCALBIN ) /controller-gen --version | grep -q $(CONTROLLER_TOOLS_VERSION ) || \
158
174
GOBIN=$(LOCALBIN ) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION )
159
175
176
+ .PHONY : tilt
177
+ tilt : $(TILT ) # # Download tilt locally if necessary. If wrong version is installed, it will be overwritten.
178
+ $(TILT ) : $(LOCALBIN )
179
+ test -s $(LOCALBIN ) /tilt && $(LOCALBIN ) /tilt version | grep -q $(TILT_VERSION ) || \
180
+ (cd $( LOCALBIN) ; curl -fsSL https://github.com/tilt-dev/tilt/releases/download/v$( TILT_VERSION) /tilt.$( TILT_VERSION) .linux.x86_64.tar.gz | tar -xzv tilt)
181
+
160
182
.PHONY : envtest
161
183
envtest : $(ENVTEST ) # # Download envtest-setup locally if necessary.
162
184
$(ENVTEST ) : $(LOCALBIN )
0 commit comments