@@ -45,6 +45,7 @@ MOCKGEN := $(TOOLS_BIN_DIR)/mockgen
45
45
CONVERSION_GEN := $(TOOLS_BIN_DIR ) /conversion-gen
46
46
RELEASE_NOTES_BIN := bin/release-notes
47
47
RELEASE_NOTES := $(TOOLS_DIR ) /$(RELEASE_NOTES_BIN )
48
+ GINKGO := $(abspath $(TOOLS_BIN_DIR ) /ginkgo)
48
49
49
50
# Define Docker related variables. Releases should modify and double check these vars.
50
51
REGISTRY ?= gcr.io/$(shell gcloud config get-value project)
@@ -128,13 +129,15 @@ endif
128
129
# # --------------------------------------
129
130
# # Binaries
130
131
# # --------------------------------------
132
+ $(GINKGO ) : $(TOOLS_DIR ) /go.mod
133
+ cd $(TOOLS_DIR ) && go build -tags=tools -o $(BIN_DIR ) /ginkgo github.com/onsi/ginkgo/ginkgo
131
134
132
135
.PHONY : binaries
133
136
binaries : manager # # Builds and installs all binaries
134
137
135
138
.PHONY : manager
136
139
manager : # # Build manager binary.
137
- go build -o $(BIN_DIR ) /manager .
140
+ go build -ldflags " $( LDFLAGS ) " - o $(BIN_DIR ) /manager .
138
141
139
142
# # --------------------------------------
140
143
# # Tooling Binaries
@@ -196,7 +199,7 @@ generate-go: $(CONTROLLER_GEN) $(CONVERSION_GEN) $(MOCKGEN) ## Runs Go related g
196
199
object:headerFile=./hack/boilerplate/boilerplate.generatego.txt
197
200
198
201
$(CONVERSION_GEN) \
199
- --input-dirs=./api/v1alpha2 \
202
+ --input-dirs=./api/v1alpha3 \
200
203
--output-file-base=zz_generated.conversion \
201
204
--go-header-file=./hack/boilerplate/boilerplate.generatego.txt
202
205
go generate ./...
@@ -295,20 +298,7 @@ release: clean-release ## Builds and push container images using the latest git
295
298
296
299
.PHONY : release-manifests
297
300
release-manifests : $(RELEASE_DIR ) # # Builds the manifests to publish with a release
298
- kustomize build config > $(RELEASE_DIR ) /infrastructure-components.yaml
299
-
300
- .PHONY : release-binary
301
- release-binary : $(RELEASE_DIR )
302
- docker run \
303
- --rm \
304
- -e CGO_ENABLED=0 \
305
- -e GOOS=$(GOOS ) \
306
- -e GOARCH=$(GOARCH ) \
307
- -v " $$ (pwd):/workspace$( DOCKER_VOL_OPTS) " \
308
- -w /workspace \
309
- golang:1.13.8 \
310
- go build -a -ldflags ' $(LDFLAGS) -extldflags "-static"' \
311
- -o $(RELEASE_DIR ) /$(notdir $(RELEASE_BINARY ) ) -$(GOOS ) -$(GOARCH ) $(RELEASE_BINARY )
301
+ $(KUSTOMIZE ) build config > $(RELEASE_DIR ) /infrastructure-components.yaml
312
302
313
303
.PHONY : release-staging
314
304
release-staging : # # Builds and push container images to the staging bucket.
@@ -347,7 +337,7 @@ create-cluster: $(CLUSTERCTL) $(ENVSUBST) ## Create a development Kubernetes clu
347
337
kubectl wait --for=condition=Available --timeout=5m apiservice v1beta1.webhook.cert-manager.io
348
338
349
339
# Deploy CAPI
350
- kubectl apply -f https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.3.0-rc.3 /cluster-api-components.yaml
340
+ kubectl apply -f https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.3.0/cluster-api-components.yaml
351
341
352
342
# Deploy CAPO
353
343
kustomize build config | $(ENVSUBST) | kubectl apply -f -
@@ -380,7 +370,7 @@ create-cluster: $(CLUSTERCTL) $(ENVSUBST) ## Create a development Kubernetes clu
380
370
381
371
# Deploy calico
382
372
kubectl --kubeconfig=./kubeconfig apply -f https://docs.projectcalico.org/manifests/calico.yaml
383
- # FIXME:
373
+
384
374
# Create a worker node with MachineDeployment.
385
375
kubectl apply -f examples/_out/machinedeployment.yaml
386
376
0 commit comments