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