deploy command deploys the specified files in a given namespace of a Kubernetes cluster.
-f: file and/or folder paths containing data to interpolate
deploy_all): set the deployment type (accepted values:
--force-deploy-when-no-semver: flag used to force deploy of services that are not following semantic versioning.
true): set if the namespace existence should be ensured. By default it is set to true so that the namespace existence is checked and, if it not exists, created. If set to false, it throws if namespace not already exists.
To make the command work, also the following flags described in options are required:
--namespace: to specify the namespace in which the resources are deployed
- The set of flags required to connect to the Kubernetes cluster
Resources application order
By default resources to be deployed are applied in a default order based on their
Kind. It can be overridden by annotating the target resource with
This annotation takes a comma-separated list of kinds for which the resource must be applied before. If some of the specified kinds is not managed in the default order listing they are ignored. Any resource having this annotation falls outside the kind-based sorting logic and therefore cannot be applied after other resources having in their
mia-platform.eu/apply-before-kinds annotation its kind.
Below there is an example of a resource that must be applied before
mia-platform.eu/apply-before-kinds: Pod, Deployment
- name: busybox
Await resources completion
During the deploy phase resources are applied sequentially one after the other.
mlp allows to wait for the completion of a resource using the annotation
mia-platform.eu/await-completion on the specific resource to be awaited. The annotation value should be a duration string as expected by the
1m) function that specifies the time to wait for completion before a timeout error is triggered.
The resources supported by this annotation:
- Job: the resource will be applied by
mlpthen the tool will listen to cluster events until the job status becomes
- ExternalSecret: this CRD will be applied and then
mlpwill watch cluster events until the resource
Delete resources before applying them
By annotating a resource with
mia-platform.eu/delete-before-apply, having arbitrary value, the user can force
mlp to delete the corresponding resource on the cluster before re-creating it. If the annotated resource is not already present on the cluster no additional operations will occur.