Skip to content

Commit

Permalink
Makefile: drop OVERRIDES_DIR and dependent make targets
Browse files Browse the repository at this point in the history
  • Loading branch information
chrischdi committed Jun 11, 2024
1 parent fb6f462 commit acbfd80
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 25 deletions.
17 changes: 0 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,6 @@ SUPERVISOR_WEBHOOK_ROOT ?= $(MANIFEST_ROOT)/supervisor/webhook
RBAC_ROOT ?= $(MANIFEST_ROOT)/rbac
VCSIM_RBAC_ROOT ?= $(VCSIM_DIR)/config/rbac
NETOP_RBAC_ROOT ?= $(NETOP_DIR)/config/rbac
VERSION ?= $(shell cat clusterctl-settings.json | jq .config.nextVersion -r)
OVERRIDES_DIR := $(HOME)/.cluster-api/overrides/infrastructure-vsphere/$(VERSION)

JANITOR_DIR ?= ./$(TOOLS_DIR)/janitor

Expand Down Expand Up @@ -663,10 +661,6 @@ $(RELEASE_NOTES_DIR):
$(BUILD_DIR):
@mkdir -p $(BUILD_DIR)

.PHONY: $(OVERRIDES_DIR)
$(OVERRIDES_DIR):
@mkdir -p $(OVERRIDES_DIR)

.PHONY: release
release: clean-release ## Builds release manifests based on $(PROD_REGISTRY) and $(RELEASE_TAG) into $(RELEASE_DIR)
@if [ -z "${RELEASE_TAG}" ]; then echo "RELEASE_TAG is not set"; exit 1; fi
Expand All @@ -682,13 +676,6 @@ release-manifests-all: ## Builds release manifests into $(RELEASE_DIR)
## Build the manifests into $(RELEASE_DIR)
$(MAKE) release-manifests STAGE=release MANIFEST_DIR=$(RELEASE_DIR)

.PHONY: dev-manifests
dev-manifests: ## Builds dev manifests based on $(REGISTRY) and $(TAG) into the $(OVERRIDES_DIR)
# Set the manifest image to $(REGISTRY)/$(IMAGE_NAME):$(TAG) and pull policy to Always.
$(MAKE) manifest-modification REGISTRY=$(REGISTRY) RELEASE_TAG=$(TAG) PULL_POLICY=Always
## Build the manifests into $(OVERRIDES_DIR)
$(MAKE) release-manifests STAGE=dev MANIFEST_DIR=$(OVERRIDES_DIR)

.PHONY: manifest-modification
manifest-modification: $(BUILD_DIR) # Set the manifest images to $(REGISTRY)/$(IMAGE_NAME):$(RELEASE_TAG) and pull policy to $(PULL_POLICY)
rm -rf $(BUILD_DIR)/config
Expand All @@ -710,10 +697,6 @@ release-manifests: $(BUILD_DIR) $(MANIFEST_DIR) $(KUSTOMIZE) $(STAGE)-flavors ##
release-flavors: $(RELEASE_DIR)
$(MAKE) generate-flavors FLAVOR_DIR=$(RELEASE_DIR)

.PHONY: dev-flavors ## Create dev flavor manifests
dev-flavors: $(OVERRIDES_DIR)
$(MAKE) generate-flavors FLAVOR_DIR=$(OVERRIDES_DIR)

.PHONY: e2e-flavors ## Create dev flavor manifests for e2e testing
e2e-flavors: $(KUSTOMIZE) $(addprefix e2e-flavors-, main)

Expand Down
10 changes: 2 additions & 8 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,6 @@ make docker-push-all ALL_ARCH=$(go env GOARCH)

Overrides need to be placed in `~/.cluster-api/overrides/infrastructure-vsphere/{version}`

Running the following generates these overrides for you:

``` shell
make dev-manifests
```

For development purposes, if you are using a `major.minor.x` version (see env variable VERSION) which is not present in the `metadata.yml`, include this version entry along with the API contract in the file.

### Using dev manifests
Expand All @@ -95,8 +89,8 @@ After publishing your test image and generating the manifests, you can use

#### Using custom cluster-templates

In order to generate a custom `custom-template.yaml`, run `make dev-flavors`.
This command will generate a `cluster-template.yaml` at and the logs will mention the path where this file is generated. On mac it will look something like this - `/Users/<user>/.cluster-api/overrides/infrastructure-vsphere/v0.x.0/cluster-template.yaml`.
In order to generate a custom `custom-template.yaml`, run `make generate-flavors`.
This command will generate all flavors in the `templates` directory.
To create this custom cluster, use `clusterctl generate cluster --from="<cluster_template_path>" <cluster_name>`

## Testing e2e
Expand Down

0 comments on commit acbfd80

Please sign in to comment.