[COMMON] Use common secret template in dgbuilder 56/101856/2
authorKrzysztof Opasiak <k.opasiak@samsung.com>
Mon, 17 Feb 2020 21:05:51 +0000 (22:05 +0100)
committerKrzysztof Opasiak <k.opasiak@samsung.com>
Tue, 18 Feb 2020 11:33:20 +0000 (12:33 +0100)
commitacdd90c7b8b2add7c885314563f678f05f09e20b
tree3b66e9b2b6e50e410016e35d646365015d260776
parent4eddfbdf9caabe3ce30937d78b1bfe8aad72f8f9
[COMMON] Use common secret template in dgbuilder

Taken into account how "easy" it would be to modify the dgbuilder
which is written in JavaScript (which is not my mother tongue to say
the least) let's try to remove hardcoded passwords from config files
without modifying the application container itself.

In order to achieve this:

1) Remove createReleaseDir.sh script from the container as it is never
used and contains a ton of passwords

2) Replace all sensitive values in config files with references to
respective environment variables

3) Introduce init container that will run envsubst command on config
files and copy them from ConfigMap value to the new volume which is
backed by tmpfs so that the plain text passwords are never written to
the disk

For now all the hardcoded values are still there to minimize the risk
of breaking the deployment but step by step they will be removed in
next commits.

Issue-ID: OOM-2247
Change-Id: I5a428e3415713857084ba6aaa6be9b04a8eb8c0f
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
kubernetes/common/dgbuilder/resources/config/customSettings.js [moved from kubernetes/common/dgbuilder/resources/scripts/customSettings.js with 78% similarity]
kubernetes/common/dgbuilder/resources/config/svclogic.properties
kubernetes/common/dgbuilder/resources/scripts/createReleaseDir.sh [deleted file]
kubernetes/common/dgbuilder/templates/configmap.yaml
kubernetes/common/dgbuilder/templates/deployment.yaml
kubernetes/common/dgbuilder/templates/secrets.yaml
kubernetes/common/dgbuilder/values.yaml