aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/Makefile
blob: 0ca00e2cd7aefc419a98c766c5f00cdb2f896995 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Define the output file
OUTPUT_FILE := _manifest.yaml

# Define the Kustomize build command
KUSTOMIZE_BUILD := kustomize build .

# The default target
all: build

$(OUTPUT_FILE):
	$(KUSTOMIZE_BUILD) > $(OUTPUT_FILE)

# Build the Kustomize configuration into the output file
build: clean $(OUTPUT_FILE)

# Deploy the manifest using kubectl apply
deploy: $(OUTPUT_FILE)
	kubectl apply -f $(OUTPUT_FILE)

# Clean up the output file
clean:
	rm -f $(OUTPUT_FILE)

.PHONY: all build deploy clean