Kustomize extension - epam/hubctl GitHub Wiki
Provides deploy
and undeploy
routines for kustomize
Prerequisites
File kustomize.yaml
should exist in the component root directory
Required Environment Variables
Following environment variables should be defined in hub-component.yaml
HUB_DOMAIN_NAME
: usually derived fromdns.domain
parameterNAMESPACE
: target namespace for component
Required Tools
Requires following tools to be installed and configured
Component Specirics
Deploy
Deploys resources described in kustomize.yaml
(or kustomize.yaml.template
)
Special case for CRD
User can copy definition of CRD in yaml format to <component-dir>/crds/*.yaml
directory. These files will be processed before kustomize build
will be executed
Note: on undeploy CRDs will retain (to preserver user's custom resources created after deployment of the component)
Same logic (see above) for undeploy applies for all CustomResourceDefinitions described in kustomize.yaml
Special case for Namespaces
deploy
script will create a namespace (if it doesn't exist). If kustomize
script will declare a namespace creation. Then this operation will be ignored. Custom label or annotations should be supplied as one of
pre-deploy
script- patch in
kustomize.yaml
undeploy
script won't delete namespace (To preserve resoruces created after deployment of the component)