Skip to content

Commit

Permalink
šŸ› fixup Makefile, should fix image build on master (kubernetes-sigs#516)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
sbueringer authored and pierreprinetti committed Apr 22, 2024
1 parent cece8d2 commit 7a0366d
Show file tree
Hide file tree
Showing 16 changed files with 110 additions and 2,444 deletions.
26 changes: 8 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ MOCKGEN := $(TOOLS_BIN_DIR)/mockgen
CONVERSION_GEN := $(TOOLS_BIN_DIR)/conversion-gen
RELEASE_NOTES_BIN := bin/release-notes
RELEASE_NOTES := $(TOOLS_DIR)/$(RELEASE_NOTES_BIN)
GINKGO := $(abspath $(TOOLS_BIN_DIR)/ginkgo)

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

.PHONY: binaries
binaries: manager ## Builds and installs all binaries

.PHONY: manager
manager: ## Build manager binary.
go build -o $(BIN_DIR)/manager .
go build -ldflags "$(LDFLAGS)" -o $(BIN_DIR)/manager .

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

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

.PHONY: release-manifests
release-manifests: $(RELEASE_DIR) ## Builds the manifests to publish with a release
kustomize build config > $(RELEASE_DIR)/infrastructure-components.yaml

.PHONY: release-binary
release-binary: $(RELEASE_DIR)
docker run \
--rm \
-e CGO_ENABLED=0 \
-e GOOS=$(GOOS) \
-e GOARCH=$(GOARCH) \
-v "$$(pwd):/workspace$(DOCKER_VOL_OPTS)" \
-w /workspace \
golang:1.13.8 \
go build -a -ldflags '$(LDFLAGS) -extldflags "-static"' \
-o $(RELEASE_DIR)/$(notdir $(RELEASE_BINARY))-$(GOOS)-$(GOARCH) $(RELEASE_BINARY)
$(KUSTOMIZE) build config > $(RELEASE_DIR)/infrastructure-components.yaml

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

# Deploy CAPI
kubectl apply -f https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.3.0-rc.3/cluster-api-components.yaml
kubectl apply -f https://github.com/kubernetes-sigs/cluster-api/releases/download/v0.3.0/cluster-api-components.yaml

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

# Deploy calico
kubectl --kubeconfig=./kubeconfig apply -f https://docs.projectcalico.org/manifests/calico.yaml
# FIXME:

# Create a worker node with MachineDeployment.
kubectl apply -f examples/_out/machinedeployment.yaml

Expand Down
9 changes: 0 additions & 9 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,6 @@ version: "2"
domain: cluster.x-k8s.io
repo: sigs.k8s.io/cluster-api-provider-openstack
resources:
- group: infrastructure
version: v1alpha2
kind: OpenStackCluster
- group: infrastructure
version: v1alpha2
kind: OpenStackMachine
- group: infrastructure
version: v1alpha2
kind: OpenStackMachineTemplate
- group: infrastructure
version: v1alpha3
kind: OpenStackCluster
Expand Down
36 changes: 0 additions & 36 deletions api/v1alpha2/groupversion_info.go

This file was deleted.

160 changes: 0 additions & 160 deletions api/v1alpha2/openstackcluster_types.go

This file was deleted.

Loading

0 comments on commit 7a0366d

Please sign in to comment.