update kustomize
This commit is contained in:
parent
c2c5aff42f
commit
c91ba777f0
|
@ -0,0 +1,3 @@
|
|||
[submodule "plugins"]
|
||||
path = plugins
|
||||
url = https://github.com/badjware/kustomize-plugins
|
48
Makefile
48
Makefile
|
@ -1,5 +1,5 @@
|
|||
KUSTOMIZE = docker run -v $(HOME)/.aws:/root/.aws:ro -v $(PWD):/host -w /host badjware/kustomize-plugins:latest
|
||||
KUSTOMIZEFLAGS = --enable_alpha_plugins
|
||||
KUSTOMIZE = KUSTOMIZE_PLUGIN_HOME=$(PWD)/plugins kustomize
|
||||
KUSTOMIZEFLAGS = --enable-alpha-plugins
|
||||
|
||||
KUBECTL = kubectl
|
||||
KUBECTLFLAGS =
|
||||
|
@ -9,11 +9,11 @@ KUBECTLAPPLYFLAGS = --prune
|
|||
SRC := $(shell find kustomize/ -type f)
|
||||
OUTDIR = build
|
||||
|
||||
DEVOUT = $(OUTDIR)/dev
|
||||
DEVMANIFESTSRC = kustomize/overlays/dev
|
||||
DEVMANIFESTOUT = $(DEVOUT)/manifest.yaml
|
||||
DEVCLUSTERSRC = kustomize/overlays/dev-cluster
|
||||
DEVCLUSTEROUT = $(DEVOUT)/cluster.yaml
|
||||
# DEVOUT = $(OUTDIR)/dev
|
||||
# DEVMANIFESTSRC = kustomize/overlays/dev
|
||||
# DEVMANIFESTOUT = $(DEVOUT)/manifest.yaml
|
||||
# DEVCLUSTERSRC = kustomize/overlays/dev-cluster
|
||||
# DEVCLUSTEROUT = $(DEVOUT)/cluster.yaml
|
||||
|
||||
PRODOUT = $(OUTDIR)/prod
|
||||
PRODMANIFESTOUT = $(PRODOUT)/manifest.yaml
|
||||
|
@ -21,17 +21,21 @@ PRODMANIFESTSRC = kustomize/overlays/prod
|
|||
PRODCLUSTEROUT = $(PRODOUT)/cluster.yaml
|
||||
PRODCLUSTERSRC = kustomize/overlays/prod-cluster
|
||||
|
||||
ifeq ($(environment),prod)
|
||||
environment = prod
|
||||
# ifeq ($(environment),prod)
|
||||
# environment = prod
|
||||
|
||||
# ENVOUTDIR = $(PRODOUT)
|
||||
# ENVOUTFILE = $(PRODMANIFESTOUT) $(PRODCLUSTEROUT)
|
||||
# else
|
||||
# environment = dev
|
||||
|
||||
# ENVOUTDIR = $(DEVOUT)
|
||||
# ENVOUTFILE = $(DEVMANIFESTOUT) $(DEVCLUSTERTOUT)
|
||||
# endif
|
||||
|
||||
environment=prod
|
||||
ENVOUTDIR = $(PRODOUT)
|
||||
ENVOUTFILE = $(PRODMANIFESTOUT) $(PRODCLUSTEROUT)
|
||||
else
|
||||
environment = dev
|
||||
|
||||
ENVOUTDIR = $(DEVOUT)
|
||||
ENVOUTFILE = $(DEVMANIFESTOUT) $(DEVCLUSTERTOUT)
|
||||
endif
|
||||
|
||||
.PHONY: diff
|
||||
diff: $(environment)
|
||||
|
@ -44,16 +48,16 @@ apply: $(environment)
|
|||
|
||||
.PHONY: all dev prod
|
||||
all: dev prod
|
||||
dev: $(DEVMANIFESTOUT) $(DEVCLUSTEROUT)
|
||||
# dev: $(DEVMANIFESTOUT) $(DEVCLUSTEROUT)
|
||||
prod: $(PRODMANIFESTOUT) $(PRODCLUSTEROUT)
|
||||
|
||||
$(DEVMANIFESTOUT): $(SRC)
|
||||
mkdir -p $(DEVOUT)
|
||||
$(KUSTOMIZE) build $(KUSTOMIZEFLAGS) $(DEVMANIFESTSRC) >$(DEVMANIFESTOUT) || (rm $(DEVMANIFESTOUT); exit 1)
|
||||
# $(DEVMANIFESTOUT): $(SRC)
|
||||
# mkdir -p $(DEVOUT)
|
||||
# $(KUSTOMIZE) build $(KUSTOMIZEFLAGS) $(DEVMANIFESTSRC) >$(DEVMANIFESTOUT) || (rm $(DEVMANIFESTOUT); exit 1)
|
||||
|
||||
$(DEVCLUSTEROUT): $(SRC)
|
||||
mkdir -p $(DEVOUT)
|
||||
$(KUSTOMIZE) build $(KUSTOMIZEFLAGS) $(DEVCLUSTERSRC) >$(DEVCLUSTEROUT) || (rm $(DEVCLUSTEROUT); exit 1)
|
||||
# $(DEVCLUSTEROUT): $(SRC)
|
||||
# mkdir -p $(DEVOUT)
|
||||
# $(KUSTOMIZE) build $(KUSTOMIZEFLAGS) $(DEVCLUSTERSRC) >$(DEVCLUSTEROUT) || (rm $(DEVCLUSTEROUT); exit 1)
|
||||
|
||||
$(PRODMANIFESTOUT): $(SRC)
|
||||
mkdir -p $(PRODOUT)
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 323a2f9a62df1215b3bb4d60a0ebdd1a0bc15c0f
|
Loading…
Reference in New Issue