diff options
author | Jack Lucas <jflucas@research.att.com> | 2019-08-13 09:51:16 -0400 |
---|---|---|
committer | Jack Lucas <jflucas@research.att.com> | 2019-08-15 21:23:35 +0000 |
commit | 9fbed78169f83658e8736869db6dfa9bd942ed67 (patch) | |
tree | 79b7d62dd59f4b742af33f434a4f9ec6c0a20e0a /dcae-k8s-cleanup-container/README.md | |
parent | ef4ae30a2c4348e18354761f56672df22bf98142 (diff) |
Add DCAE cleanup container
Issue-ID: DCAEGEN2-1317
Change-Id: I1c834346d99c62f036e14724674a447966032ec8
Signed-off-by: Jack Lucas <jflucas@research.att.com>
(cherry picked from commit a1647b2d90cbfd3fc4ccedddf876fba2cf031a8a)
Diffstat (limited to 'dcae-k8s-cleanup-container/README.md')
-rw-r--r-- | dcae-k8s-cleanup-container/README.md | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/dcae-k8s-cleanup-container/README.md b/dcae-k8s-cleanup-container/README.md new file mode 100644 index 0000000..8506885 --- /dev/null +++ b/dcae-k8s-cleanup-container/README.md @@ -0,0 +1,28 @@ +# DCAE Cleanup Container +## Purpose +DCAE platform components (inventory, deployment handler, policy handler, etc.) are +deployed and undeployed using Helm. DCAE service components--data collectors and +data analytics modules--are deployed using Cloudify, with the DCAE k8s plugin. +When DCAE is undeployed, Helm +has no way to undeploy the service components. The artifacts in this directory +build a Docker image that can be run as a Kubernetes Job, using a Helm pre-delete hook. +The image runs a script that deletes the Kubernetes Services and Kubernetes Deployments +(and all of the ReplicaSets and Pods created as children of the Deployments) that were +created by the k8s plugin. + +The script relies on the fact that Services and Deployments created by the k8s +plugin have a unique label ("cfydeployment"). The script finds Services and +Deployments with that label and deletes them. + +## Running the container +The image is intended to be run as Kubernetes Job in a Helm pre-delete hook associated +with the OOM dcaegen2 charts. A Helm template in the OOM dcaegen2 tree defines the Job. +The Job will start a container. The container will execute the `dcae-cleanup.sh` script +and then exit. The intent is that using a `helm undeploy` command will automatically +delete all of the DCAE service components, so that no additional cleanup is needed. + +The container can be run manually using the `kubectl run` command. For example: +``` +kubectl -n onap run --restart='OnFailure' --image dcae-cleanup:0.0.0 cleanup +``` +The `--restart='OnFailure'` parameter causes kubectl to create a Job.
\ No newline at end of file |