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/sfive-deploy.yml.j2 | |
parent | added init container for elasticsearch (diff) |
fix automatic preparation of data-dirs
Diffstat (limited to 'templates/default/kubernetes/sfive-deploy.yml.j2')
-rw-r--r-- | templates/default/kubernetes/sfive-deploy.yml.j2 | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/templates/default/kubernetes/sfive-deploy.yml.j2 b/templates/default/kubernetes/sfive-deploy.yml.j2 index aafb468..4de270a 100644 --- a/templates/default/kubernetes/sfive-deploy.yml.j2 +++ b/templates/default/kubernetes/sfive-deploy.yml.j2 @@ -31,6 +31,25 @@ spec: fsGroup: 998 hostNetwork: true dnsPolicy: ClusterFirstWithHostNet + initContainers: + - name: prepare-hub-data + image: busybox + command: ['sh', '-c', 'chown 998:998 /srv/data && chmod 0750 /srv/data'] + securityContext: + runAsUser: 0 + volumeMounts: + - name: hub-data + mountPath: /srv/data +{% if worker.flags.sfive == 'proxy' and 'stream-onion' in worker.flags %} + - 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 +{% endif %} containers: {% if worker.flags.sfive == 'proxy' %} - name: proxy @@ -104,9 +123,8 @@ spec: medium: Memory {% if worker.flags.sfive == 'proxy' and 'stream-onion' in worker.flags %} - name: onion-lib - hostPath: - type: DirectoryOrCreate - path: /var/lib/tor/{{ desc.globals.name }}/{{ worker.flags.stream }} + emptyDir: + medium: Memory {% endif %} - name: proxy-config configMap: |