SYS-5450: add initial kustomize and helm targets
This commit is contained in:
parent
8ad9a3dd6f
commit
8e2f79fa3b
3 changed files with 99 additions and 7 deletions
60
kustomize.mk
Normal file
60
kustomize.mk
Normal file
|
@ -0,0 +1,60 @@
|
|||
# kustomize
|
||||
#
|
||||
# this uses kustomize to install stuff on k8s
|
||||
|
||||
start-kustomize:
|
||||
@- echo "\n### starting deployment with kustomize"
|
||||
@- echo "\n### setting kubernetes context to $(K8S_CONTEXT)"
|
||||
@- kubectl config use-context $(K8S_CONTEXT)
|
||||
|
||||
@- echo "\n### generating imagePullSecrets"
|
||||
@- imagePullSecretsOut.sh > kustomize/base/imagepullsecrets.yaml
|
||||
|
||||
@- echo "\n### editing kustomizations"
|
||||
|
||||
ifdef KUSTOMIZE_EDIT_NAMESPACE
|
||||
@- echo "\n### setting namespace to $(K8S_NAMESPACE)"
|
||||
@- cd $(KUSTOMIZE_FOLDER) && kustomize edit set namespace $(K8S_NAMESPACE)
|
||||
endif
|
||||
|
||||
# actual deployment is happening here
|
||||
@- echo "\n### applying kustomizations"
|
||||
@- cd $(KUSTOMIZE_FOLDER) && kubectl apply -k .
|
||||
|
||||
pull-kustomize:
|
||||
# nop
|
||||
|
||||
#TODO: implement annotation
|
||||
# ifeq ($KUSTOMIZE_EDIT),annotation)
|
||||
# @- $(kustomize edit set annotation .....)
|
||||
# endif
|
||||
|
||||
#TODO: implement buildmetadata
|
||||
# ifeq ($KUSTOMIZE_EDIT),buildmetadata)
|
||||
# @- $(kustomize edit set buildmetadata .....)
|
||||
# endif
|
||||
|
||||
#TODO: implement image
|
||||
# ifeq ($KUSTOMIZE_EDIT),image)
|
||||
# @- $(kustomize edit set image .....)
|
||||
# endif
|
||||
|
||||
#TODO: implement label
|
||||
# ifeq ($KUSTOMIZE_EDIT),label)
|
||||
# @- $(kustomize edit set label .....)
|
||||
# endif
|
||||
|
||||
#TODO: implement nameprefix
|
||||
# ifeq ($KUSTOMIZE_EDIT),nameprefix)
|
||||
# @- $(kustomize edit set nameprefix .....)
|
||||
# endif
|
||||
|
||||
#TODO: implement namesuffix
|
||||
# ifeq ($KUSTOMIZE_EDIT),namesuffix)
|
||||
# @- $(kustomize edit set namesuffix .....)
|
||||
# endif
|
||||
|
||||
#TODO: implement replicas
|
||||
# ifeq ($KUSTOMIZE_EDIT),replicas)
|
||||
# @- $(kustomize edit set replicas .....)
|
||||
# endif
|
Loading…
Add table
Add a link
Reference in a new issue