Skip to content

Commit e99ddcf

Browse files
authored
πŸ› fixup Makefile, should fix image build on master (#516)
* fixup Makefile, should fix image build on master * remove unused v1alpha2 package, update doc, remove other references to v1alpha2 * Fixup cloudbuild.yaml * review fixes * update deps * re-gen
1 parent b406c51 commit e99ddcf

16 files changed

+110
-2444
lines changed

β€ŽMakefileβ€Ž

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ MOCKGEN := $(TOOLS_BIN_DIR)/mockgen
4545
CONVERSION_GEN := $(TOOLS_BIN_DIR)/conversion-gen
4646
RELEASE_NOTES_BIN := bin/release-notes
4747
RELEASE_NOTES := $(TOOLS_DIR)/$(RELEASE_NOTES_BIN)
48+
GINKGO := $(abspath $(TOOLS_BIN_DIR)/ginkgo)
4849

4950
# Define Docker related variables. Releases should modify and double check these vars.
5051
REGISTRY ?= gcr.io/$(shell gcloud config get-value project)
@@ -128,13 +129,15 @@ endif
128129
## --------------------------------------
129130
## Binaries
130131
## --------------------------------------
132+
$(GINKGO): $(TOOLS_DIR)/go.mod
133+
cd $(TOOLS_DIR) && go build -tags=tools -o $(BIN_DIR)/ginkgo github.com/onsi/ginkgo/ginkgo
131134

132135
.PHONY: binaries
133136
binaries: manager ## Builds and installs all binaries
134137

135138
.PHONY: manager
136139
manager: ## Build manager binary.
137-
go build -o $(BIN_DIR)/manager .
140+
go build -ldflags "$(LDFLAGS)" -o $(BIN_DIR)/manager .
138141

139142
## --------------------------------------
140143
## Tooling Binaries
@@ -196,7 +199,7 @@ generate-go: $(CONTROLLER_GEN) $(CONVERSION_GEN) $(MOCKGEN) ## Runs Go related g
196199
object:headerFile=./hack/boilerplate/boilerplate.generatego.txt
197200

198201
$(CONVERSION_GEN) \
199-
--input-dirs=./api/v1alpha2 \
202+
--input-dirs=./api/v1alpha3 \
200203
--output-file-base=zz_generated.conversion \
201204
--go-header-file=./hack/boilerplate/boilerplate.generatego.txt
202205
go generate ./...
@@ -295,20 +298,7 @@ release: clean-release ## Builds and push container images using the latest git
295298

296299
.PHONY: release-manifests
297300
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
312302

313303
.PHONY: release-staging
314304
release-staging: ## Builds and push container images to the staging bucket.
@@ -347,7 +337,7 @@ create-cluster: $(CLUSTERCTL) $(ENVSUBST) ## Create a development Kubernetes clu
347337
kubectl wait --for=condition=Available --timeout=5m apiservice v1beta1.webhook.cert-manager.io
348338

349339
# 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
351341

352342
# Deploy CAPO
353343
kustomize build config | $(ENVSUBST) | kubectl apply -f -
@@ -380,7 +370,7 @@ create-cluster: $(CLUSTERCTL) $(ENVSUBST) ## Create a development Kubernetes clu
380370

381371
# Deploy calico
382372
kubectl --kubeconfig=./kubeconfig apply -f https://docs.projectcalico.org/manifests/calico.yaml
383-
# FIXME:
373+
384374
# Create a worker node with MachineDeployment.
385375
kubectl apply -f examples/_out/machinedeployment.yaml
386376

β€ŽPROJECTβ€Ž

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,6 @@ version: "2"
22
domain: cluster.x-k8s.io
33
repo: sigs.k8s.io/cluster-api-provider-openstack
44
resources:
5-
- group: infrastructure
6-
version: v1alpha2
7-
kind: OpenStackCluster
8-
- group: infrastructure
9-
version: v1alpha2
10-
kind: OpenStackMachine
11-
- group: infrastructure
12-
version: v1alpha2
13-
kind: OpenStackMachineTemplate
145
- group: infrastructure
156
version: v1alpha3
167
kind: OpenStackCluster

β€Žapi/v1alpha2/groupversion_info.goβ€Ž

Lines changed: 0 additions & 36 deletions
This file was deleted.

β€Žapi/v1alpha2/openstackcluster_types.goβ€Ž

Lines changed: 0 additions & 160 deletions
This file was deleted.

0 commit comments

Comments
Β (0)