diff options
author | Christian Pointner <equinox@spreadspace.org> | 2018-02-23 12:45:55 +0100 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2018-02-23 12:45:55 +0100 |
commit | e163fb53e277c8b8b3dcd36e9fcc0d7d16b94976 (patch) | |
tree | dc13411770fe1f4fc4531339fbccf53baf4d8260 /templates/default/kubernetes/sfive-deploy.yml.j2 | |
parent | added mysql pod (diff) |
refactor k8s templates
Diffstat (limited to 'templates/default/kubernetes/sfive-deploy.yml.j2')
-rw-r--r-- | templates/default/kubernetes/sfive-deploy.yml.j2 | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/templates/default/kubernetes/sfive-deploy.yml.j2 b/templates/default/kubernetes/sfive-deploy.yml.j2 index 4de270a..6cd271b 100644 --- a/templates/default/kubernetes/sfive-deploy.yml.j2 +++ b/templates/default/kubernetes/sfive-deploy.yml.j2 @@ -2,16 +2,16 @@ apiVersion: apps/v1 kind: Deployment metadata: namespace: {{ namespace }} - name: sfive-{{ worker.name }} + name: sfive-{{ deploy.worker.name }} labels: app: sfive - worker: {{ worker.name }} + worker: {{ deploy.worker.name }} spec: replicas: 1 selector: matchLabels: app: sfive - worker: {{ worker.name }} + worker: {{ deploy.worker.name }} strategy: type: Recreate revisionHistoryLimit: 5 @@ -19,12 +19,12 @@ spec: metadata: labels: app: sfive - worker: {{ worker.name }} -{% if worker.flags.sfive == 'proxy' and 'stream-onion' in worker.flags %} - spreadspace.org/onion-service: {{ worker.flags['stream-onion'] }} + worker: {{ deploy.worker.name }} +{% if deploy.worker.flags.sfive == 'proxy' and 'stream-onion' in deploy.worker.flags %} + spreadspace.org/onion-service: {{ deploy.worker.flags['stream-onion'] }} {% endif %} spec: - nodeName: {{ worker.name }} + nodeName: {{ deploy.worker.name }} serviceAccountName: sfive securityContext: runAsUser: 998 @@ -40,7 +40,7 @@ spec: volumeMounts: - name: hub-data mountPath: /srv/data -{% if worker.flags.sfive == 'proxy' and 'stream-onion' in worker.flags %} +{% if deploy.worker.flags.sfive == 'proxy' and 'stream-onion' in deploy.worker.flags %} - name: prepare-onion-lib image: busybox command: ['sh', '-c', 'chown 998:998 /var/lib/tor && chmod 0750 /var/lib/tor'] @@ -51,7 +51,7 @@ spec: mountPath: /var/lib/tor {% endif %} containers: -{% if worker.flags.sfive == 'proxy' %} +{% if deploy.worker.flags.sfive == 'proxy' %} - name: proxy image: spreadspace/sfive:{{ desc.globals.deployment.parameter.sfive_image_version }} imagePullPolicy: Always @@ -64,7 +64,7 @@ spec: mountPath: /srv - name: proxy-config mountPath: /srv/config -{% if 'stream-onion' in worker.flags %} +{% if 'stream-onion' in deploy.worker.flags %} - name: proxy-onion image: spreadspace/sfive:{{ desc.globals.deployment.parameter.sfive_image_version }} imagePullPolicy: Always @@ -121,14 +121,14 @@ spec: - name: home emptyDir: medium: Memory -{% if worker.flags.sfive == 'proxy' and 'stream-onion' in worker.flags %} +{% if deploy.worker.flags.sfive == 'proxy' and 'stream-onion' in deploy.worker.flags %} - name: onion-lib emptyDir: medium: Memory {% endif %} - name: proxy-config configMap: - name: sfive-{{ worker.name }} + name: sfive-{{ deploy.worker.name }} - name: hub-data hostPath: type: DirectoryOrCreate |