diff options
author | Christian Pointner <equinox@spreadspace.org> | 2018-02-21 20:20:24 +0100 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2018-02-21 20:20:24 +0100 |
commit | e0229e0adb3ead7f89cb160dd0ae429769c5099c (patch) | |
tree | 24e624e79ca13e79c48229c3f7aaed885e1841f4 /templates/default/kubernetes/onionbalance-deploy.yml.j2 | |
parent | added init container for elasticsearch (diff) |
fix automatic preparation of data-dirs
Diffstat (limited to 'templates/default/kubernetes/onionbalance-deploy.yml.j2')
-rw-r--r-- | templates/default/kubernetes/onionbalance-deploy.yml.j2 | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/templates/default/kubernetes/onionbalance-deploy.yml.j2 b/templates/default/kubernetes/onionbalance-deploy.yml.j2 index 6f3313b..e82ff96 100644 --- a/templates/default/kubernetes/onionbalance-deploy.yml.j2 +++ b/templates/default/kubernetes/onionbalance-deploy.yml.j2 @@ -23,6 +23,15 @@ spec: securityContext: runAsUser: 998 fsGroup: 998 + initContainers: + - name: prepare-onion-lib + image: busybox + command: ['sh', '-c', 'chown 998:998 /var/lib/tor && chmod 0750 /var/lib/tor'] + securityContext: + runAsUser: 0 + volumeMounts: + - name: onion-lib + mountPath: /var/lib/tor containers: - name: tor image: spreadspace/onionbalance:{{ desc.globals.deployment.parameter.onionbalance_image_version }} @@ -57,9 +66,8 @@ spec: emptyDir: medium: Memory - name: onion-lib - hostPath: - type: DirectoryOrCreate - path: /var/lib/tor/{{ desc.globals.name }}/_balance + emptyDir: + medium: Memory - name: onion-keys secret: secretName: onionbalance |