diff --git a/charts/alfresco-transform-service/README.md b/charts/alfresco-transform-service/README.md index c7fd9c7f..3c50bd5e 100644 --- a/charts/alfresco-transform-service/README.md +++ b/charts/alfresco-transform-service/README.md @@ -15,7 +15,7 @@ A Helm chart for deploying Alfresco Transform Services | Key | Type | Default | Description | |-----|------|---------|-------------| -| filestore.affinity | object | `{}` | | +| filestore.affinity | string | `"podAntiAffinity:\n preferredDuringSchedulingIgnoredDuringExecution:\n - weight: 10\n podAffinityTerm:\n labelSelector:\n matchExpressions:\n - key: app\n operator: In\n values:\n - {{ template \"alfresco-transform-service.filestore.name\" . }}\n topologyKey: topology.kubernetes.io/zone\n - weight: 5\n podAffinityTerm:\n labelSelector:\n matchExpressions:\n - key: app\n operator: In\n values:\n - {{ template \"alfresco-transform-service.filestore.name\" . }}\n topologyKey: app.kubernetes.io/name"` | Pod affinity, passed thru tpl function | | filestore.enabled | bool | `true` | | | filestore.environment."scheduler.cleanup.interval" | string | `"86400000"` | | | filestore.environment."scheduler.content.age.millis" | string | `"86400000"` | | @@ -65,7 +65,7 @@ A Helm chart for deploying Alfresco Transform Services | global.alfrescoRegistryPullSecrets | string | `"quay-registry-secret"` | | | global.strategy.rollingUpdate.maxSurge | int | `1` | | | global.strategy.rollingUpdate.maxUnavailable | int | `0` | | -| imagemagick.affinity | object | `{}` | | +| imagemagick.affinity | string | `"podAntiAffinity:\n preferredDuringSchedulingIgnoredDuringExecution:\n - weight: 10\n podAffinityTerm:\n labelSelector:\n matchExpressions:\n - key: app\n operator: In\n values:\n - {{ template \"alfresco-transform-service.imagemagick.name\" . }}\n topologyKey: topology.kubernetes.io/zone\n - weight: 5\n podAffinityTerm:\n labelSelector:\n matchExpressions:\n - key: app\n operator: In\n values:\n - {{ template \"alfresco-transform-service.imagemagick.name\" . }}\n topologyKey: app.kubernetes.io/name"` | Pod affinity, passed thru tpl function | | imagemagick.enabled | bool | `true` | | | imagemagick.environment.JAVA_OPTS | string | `"-XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80"` | | | imagemagick.image.internalPort | int | `8090` | | @@ -100,7 +100,7 @@ A Helm chart for deploying Alfresco Transform Services | imagemagick.tolerations | list | `[]` | | | imagemagick.volumeMounts | list | `[]` | | | imagemagick.volumes | list | `[]` | | -| libreoffice.affinity | object | `{}` | | +| libreoffice.affinity | string | `"podAntiAffinity:\n preferredDuringSchedulingIgnoredDuringExecution:\n - weight: 10\n podAffinityTerm:\n labelSelector:\n matchExpressions:\n - key: app\n operator: In\n values:\n - {{ template \"alfresco-transform-service.libreoffice.name\" . }}\n topologyKey: topology.kubernetes.io/zone\n - weight: 5\n podAffinityTerm:\n labelSelector:\n matchExpressions:\n - key: app\n operator: In\n values:\n - {{ template \"alfresco-transform-service.libreoffice.name\" . }}\n topologyKey: app.kubernetes.io/name"` | Pod affinity, passed thru tpl function | | libreoffice.enabled | bool | `true` | | | libreoffice.environment.JAVA_OPTS | string | `"-XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80"` | | | libreoffice.image.internalPort | int | `8090` | | @@ -143,7 +143,7 @@ A Helm chart for deploying Alfresco Transform Services | messageBroker.password | string | `nil` | Activemq password | | messageBroker.url | string | `nil` | Activemq connection url (e.g. failover:(nio://my-broker:61616)?timeout=3000&jms.useCompression=true) | | messageBroker.user | string | `nil` | Activemq username | -| pdfrenderer.affinity | object | `{}` | | +| pdfrenderer.affinity | string | `"podAntiAffinity:\n preferredDuringSchedulingIgnoredDuringExecution:\n - weight: 10\n podAffinityTerm:\n labelSelector:\n matchExpressions:\n - key: app\n operator: In\n values:\n - {{ template \"alfresco-transform-service.pdfrenderer.name\" . }}\n topologyKey: topology.kubernetes.io/zone\n - weight: 5\n podAffinityTerm:\n labelSelector:\n matchExpressions:\n - key: app\n operator: In\n values:\n - {{ template \"alfresco-transform-service.pdfrenderer.name\" . }}\n topologyKey: app.kubernetes.io/name"` | Pod affinity, passed thru tpl function | | pdfrenderer.enabled | bool | `true` | | | pdfrenderer.environment.JAVA_OPTS | string | `"-XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80"` | | | pdfrenderer.image.internalPort | int | `8090` | | @@ -182,7 +182,7 @@ A Helm chart for deploying Alfresco Transform Services | serviceAccount.automount | bool | `true` | | | serviceAccount.create | bool | `true` | | | serviceAccount.name | string | `""` | | -| tika.affinity | object | `{}` | | +| tika.affinity | string | `"podAntiAffinity:\n preferredDuringSchedulingIgnoredDuringExecution:\n - weight: 10\n podAffinityTerm:\n labelSelector:\n matchExpressions:\n - key: app\n operator: In\n values:\n - {{ template \"alfresco-transform-service.tika.name\" . }}\n topologyKey: topology.kubernetes.io/zone\n - weight: 5\n podAffinityTerm:\n labelSelector:\n matchExpressions:\n - key: app\n operator: In\n values:\n - {{ template \"alfresco-transform-service.tika.name\" . }}\n topologyKey: app.kubernetes.io/name"` | Pod affinity, passed thru tpl function | | tika.enabled | bool | `true` | | | tika.environment.JAVA_OPTS | string | `"-XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80"` | | | tika.image.internalPort | int | `8090` | | @@ -217,7 +217,7 @@ A Helm chart for deploying Alfresco Transform Services | tika.tolerations | list | `[]` | | | tika.volumeMounts | list | `[]` | | | tika.volumes | list | `[]` | | -| transformmisc.affinity | object | `{}` | | +| transformmisc.affinity | string | `"podAntiAffinity:\n preferredDuringSchedulingIgnoredDuringExecution:\n - weight: 10\n podAffinityTerm:\n labelSelector:\n matchExpressions:\n - key: app\n operator: In\n values:\n - {{ template \"alfresco-transform-service.transform-misc.name\" . }}\n topologyKey: topology.kubernetes.io/zone\n - weight: 5\n podAffinityTerm:\n labelSelector:\n matchExpressions:\n - key: app\n operator: In\n values:\n - {{ template \"alfresco-transform-service.transform-misc.name\" . }}\n topologyKey: app.kubernetes.io/name"` | Pod affinity, passed thru tpl function | | transformmisc.enabled | bool | `true` | | | transformmisc.environment.JAVA_OPTS | string | `"-XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80"` | | | transformmisc.image.internalPort | int | `8090` | | @@ -252,7 +252,7 @@ A Helm chart for deploying Alfresco Transform Services | transformmisc.tolerations | list | `[]` | | | transformmisc.volumeMounts | list | `[]` | | | transformmisc.volumes | list | `[]` | | -| transformrouter.affinity | object | `{}` | | +| transformrouter.affinity | string | `"podAntiAffinity:\n preferredDuringSchedulingIgnoredDuringExecution:\n - weight: 10\n podAffinityTerm:\n labelSelector:\n matchExpressions:\n - key: app\n operator: In\n values:\n - {{ template \"alfresco-transform-service.transform-router.name\" . }}\n topologyKey: topology.kubernetes.io/zone\n - weight: 5\n podAffinityTerm:\n labelSelector:\n matchExpressions:\n - key: app\n operator: In\n values:\n - {{ template \"alfresco-transform-service.transform-router.name\" . }}\n topologyKey: app.kubernetes.io/name"` | Pod affinity, passed thru tpl function | | transformrouter.enabled | bool | `true` | | | transformrouter.environment.JAVA_OPTS | string | `"-XX:MinRAMPercentage=50 -XX:MaxRAMPercentage=80"` | | | transformrouter.image.internalPort | int | `8095` | | diff --git a/charts/alfresco-transform-service/templates/deployment-filestore.yaml b/charts/alfresco-transform-service/templates/deployment-filestore.yaml index 76b7e8fe..d4b15f27 100644 --- a/charts/alfresco-transform-service/templates/deployment-filestore.yaml +++ b/charts/alfresco-transform-service/templates/deployment-filestore.yaml @@ -30,27 +30,6 @@ spec: {{- include "alfresco-common.imagePullSecrets" . | indent 6 }} serviceAccountName: {{ include "alfresco-transform-service.serviceAccountName" . }} {{- include "alfresco-common.component-pod-security-context" .Values.filestore | indent 4 }} - affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 10 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - {{ template "alfresco-transform-service.filestore.name" . }} - topologyKey: failure-domain.beta.kubernetes.io/zone - - weight: 5 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - {{ template "alfresco-transform-service.filestore.name" . }} - topologyKey: kubernetes.io/hostname containers: - name: {{ .Chart.Name }} image: "{{ .Values.filestore.image.repository }}:{{ .Values.filestore.image.tag }}" @@ -81,7 +60,7 @@ spec: {{- end }} {{- with .Values.filestore.affinity }} affinity: - {{- toYaml . | nindent 8 }} + {{- tpl . $ | nindent 8 }} {{- end }} {{- with .Values.filestore.tolerations }} tolerations: diff --git a/charts/alfresco-transform-service/templates/deployment-imagemagick.yaml b/charts/alfresco-transform-service/templates/deployment-imagemagick.yaml index 757d42e7..31705656 100644 --- a/charts/alfresco-transform-service/templates/deployment-imagemagick.yaml +++ b/charts/alfresco-transform-service/templates/deployment-imagemagick.yaml @@ -30,27 +30,6 @@ spec: {{- include "alfresco-common.imagePullSecrets" . | indent 6 }} serviceAccountName: {{ include "alfresco-transform-service.serviceAccountName" . }} {{- include "alfresco-common.component-pod-security-context" .Values.imagemagick| indent 4 }} - affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 10 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - {{ template "alfresco-transform-service.imagemagick.name" . }} - topologyKey: failure-domain.beta.kubernetes.io/zone - - weight: 5 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - {{ template "alfresco-transform-service.imagemagick.name" . }} - topologyKey: kubernetes.io/hostname containers: - name: {{ .Chart.Name }} image: "{{ .Values.imagemagick.image.repository }}:{{ .Values.imagemagick.image.tag }}" @@ -79,7 +58,7 @@ spec: {{- end }} {{- with .Values.imagemagick.affinity }} affinity: - {{- toYaml . | nindent 8 }} + {{- tpl . $ | nindent 8 }} {{- end }} {{- with .Values.imagemagick.tolerations }} tolerations: diff --git a/charts/alfresco-transform-service/templates/deployment-libreoffice.yaml b/charts/alfresco-transform-service/templates/deployment-libreoffice.yaml index a602cd5d..3f2268eb 100644 --- a/charts/alfresco-transform-service/templates/deployment-libreoffice.yaml +++ b/charts/alfresco-transform-service/templates/deployment-libreoffice.yaml @@ -30,27 +30,6 @@ spec: {{- include "alfresco-common.imagePullSecrets" . | indent 6 }} serviceAccountName: {{ include "alfresco-transform-service.serviceAccountName" . }} {{- include "alfresco-common.component-pod-security-context" .Values.libreoffice | indent 4 }} - affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 10 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - {{ template "alfresco-transform-service.libreoffice.name" . }} - topologyKey: failure-domain.beta.kubernetes.io/zone - - weight: 5 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - {{ template "alfresco-transform-service.libreoffice.name" . }} - topologyKey: kubernetes.io/hostname containers: - name: {{ .Chart.Name }} image: "{{ .Values.libreoffice.image.repository }}:{{ .Values.libreoffice.image.tag }}" @@ -79,7 +58,7 @@ spec: {{- end }} {{- with .Values.libreoffice.affinity }} affinity: - {{- toYaml . | nindent 8 }} + {{- tpl . $ | nindent 8 }} {{- end }} {{- with .Values.libreoffice.tolerations }} tolerations: diff --git a/charts/alfresco-transform-service/templates/deployment-pdfrenderer.yaml b/charts/alfresco-transform-service/templates/deployment-pdfrenderer.yaml index 919a14a2..563d7d44 100644 --- a/charts/alfresco-transform-service/templates/deployment-pdfrenderer.yaml +++ b/charts/alfresco-transform-service/templates/deployment-pdfrenderer.yaml @@ -30,27 +30,6 @@ spec: {{- include "alfresco-common.imagePullSecrets" . | indent 6 }} serviceAccountName: {{ include "alfresco-transform-service.serviceAccountName" . }} {{- include "alfresco-common.component-pod-security-context" .Values.pdfrenderer | indent 4 }} - affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 10 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - {{ template "alfresco-transform-service.pdfrenderer.name" . }} - topologyKey: failure-domain.beta.kubernetes.io/zone - - weight: 5 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - {{ template "alfresco-transform-service.pdfrenderer.name" . }} - topologyKey: kubernetes.io/hostname containers: - name: {{ .Chart.Name }} image: "{{ .Values.pdfrenderer.image.repository }}:{{ .Values.pdfrenderer.image.tag }}" @@ -79,7 +58,7 @@ spec: {{- end }} {{- with .Values.pdfrenderer.affinity }} affinity: - {{- toYaml . | nindent 8 }} + {{- tpl . $ | nindent 8 }} {{- end }} {{- with .Values.pdfrenderer.tolerations }} tolerations: diff --git a/charts/alfresco-transform-service/templates/deployment-tika.yaml b/charts/alfresco-transform-service/templates/deployment-tika.yaml index e6936f01..0bf844e1 100644 --- a/charts/alfresco-transform-service/templates/deployment-tika.yaml +++ b/charts/alfresco-transform-service/templates/deployment-tika.yaml @@ -30,27 +30,6 @@ spec: {{- include "alfresco-common.imagePullSecrets" . | indent 6 }} serviceAccountName: {{ include "alfresco-transform-service.serviceAccountName" . }} {{- include "alfresco-common.component-pod-security-context" .Values.tika | indent 4 }} - affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 10 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - {{ template "alfresco-transform-service.tika.name" . }} - topologyKey: failure-domain.beta.kubernetes.io/zone - - weight: 5 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - {{ template "alfresco-transform-service.tika.name" . }} - topologyKey: kubernetes.io/hostname containers: - name: {{ .Chart.Name }} image: "{{ .Values.tika.image.repository }}:{{ .Values.tika.image.tag }}" @@ -79,7 +58,7 @@ spec: {{- end }} {{- with .Values.tika.affinity }} affinity: - {{- toYaml . | nindent 8 }} + {{- tpl . $ | nindent 8 }} {{- end }} {{- with .Values.tika.tolerations }} tolerations: diff --git a/charts/alfresco-transform-service/templates/deployment-transform-misc.yaml b/charts/alfresco-transform-service/templates/deployment-transform-misc.yaml index 0ef0c903..c22bff10 100644 --- a/charts/alfresco-transform-service/templates/deployment-transform-misc.yaml +++ b/charts/alfresco-transform-service/templates/deployment-transform-misc.yaml @@ -30,27 +30,6 @@ spec: {{- include "alfresco-common.imagePullSecrets" . | indent 6 }} serviceAccountName: {{ include "alfresco-transform-service.serviceAccountName" . }} {{- include "alfresco-common.component-pod-security-context" .Values.transformmisc | indent 4 }} - affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 10 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - {{ template "alfresco-transform-service.transform-misc.name" . }} - topologyKey: failure-domain.beta.kubernetes.io/zone - - weight: 5 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - {{ template "alfresco-transform-service.transform-misc.name" . }} - topologyKey: kubernetes.io/hostname containers: - name: {{ .Chart.Name }} image: "{{ .Values.transformmisc.image.repository }}:{{ .Values.transformmisc.image.tag }}" @@ -79,7 +58,7 @@ spec: {{- end }} {{- with .Values.transformmisc.affinity }} affinity: - {{- toYaml . | nindent 8 }} + {{- tpl . $ | nindent 8 }} {{- end }} {{- with .Values.transformmisc.tolerations }} tolerations: diff --git a/charts/alfresco-transform-service/templates/deployment-transform-router.yaml b/charts/alfresco-transform-service/templates/deployment-transform-router.yaml index 206b4d5e..533cdcd7 100644 --- a/charts/alfresco-transform-service/templates/deployment-transform-router.yaml +++ b/charts/alfresco-transform-service/templates/deployment-transform-router.yaml @@ -30,27 +30,6 @@ spec: {{- include "alfresco-common.imagePullSecrets" . | indent 6 }} serviceAccountName: {{ include "alfresco-transform-service.serviceAccountName" . }} {{- include "alfresco-common.component-pod-security-context" .Values.transformrouter | indent 4 }} - affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 10 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - {{ template "alfresco-transform-service.transform-router.name" . }} - topologyKey: failure-domain.beta.kubernetes.io/zone - - weight: 5 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: app - operator: In - values: - - {{ template "alfresco-transform-service.transform-router.name" . }} - topologyKey: kubernetes.io/hostname containers: - name: {{ .Chart.Name }} image: "{{ .Values.transformrouter.image.repository }}:{{ .Values.transformrouter.image.tag }}" @@ -79,7 +58,7 @@ spec: {{- end }} {{- with .Values.transformrouter.affinity }} affinity: - {{- toYaml . | nindent 8 }} + {{- tpl . $ | nindent 8 }} {{- end }} {{- with .Values.transformrouter.tolerations }} tolerations: diff --git a/charts/alfresco-transform-service/tests/deployments_test.yaml b/charts/alfresco-transform-service/tests/deployments_test.yaml index 4244286d..1cc885bc 100644 --- a/charts/alfresco-transform-service/tests/deployments_test.yaml +++ b/charts/alfresco-transform-service/tests/deployments_test.yaml @@ -279,3 +279,29 @@ tests: path: spec.template.spec.volumes content: *volumes_content template: deployment-transform-router.yaml + + - it: should render default affinity in every deployment + values: + - values/test_values.yaml + asserts: + - exists: + path: spec.template.spec.affinity.podAntiAffinity + template: deployment-filestore.yaml + - exists: + path: spec.template.spec.affinity.podAntiAffinity + template: deployment-imagemagick.yaml + - exists: + path: spec.template.spec.affinity.podAntiAffinity + template: deployment-libreoffice.yaml + - exists: + path: spec.template.spec.affinity.podAntiAffinity + template: deployment-pdfrenderer.yaml + - exists: + path: spec.template.spec.affinity.podAntiAffinity + template: deployment-tika.yaml + - exists: + path: spec.template.spec.affinity.podAntiAffinity + template: deployment-transform-misc.yaml + - exists: + path: spec.template.spec.affinity.podAntiAffinity + template: deployment-transform-router.yaml diff --git a/charts/alfresco-transform-service/values.yaml b/charts/alfresco-transform-service/values.yaml index 0a5ea622..8b7dfb05 100644 --- a/charts/alfresco-transform-service/values.yaml +++ b/charts/alfresco-transform-service/values.yaml @@ -3,7 +3,28 @@ transformrouter: replicaCount: 2 nodeSelector: {} tolerations: [] - affinity: {} + # -- Pod affinity, passed thru tpl function + affinity: |- + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 10 + podAffinityTerm: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - {{ template "alfresco-transform-service.transform-router.name" . }} + topologyKey: topology.kubernetes.io/zone + - weight: 5 + podAffinityTerm: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - {{ template "alfresco-transform-service.transform-router.name" . }} + topologyKey: app.kubernetes.io/name podAnnotations: {} podLabels: {} image: @@ -46,7 +67,28 @@ pdfrenderer: replicaCount: 2 nodeSelector: {} tolerations: [] - affinity: {} + # -- Pod affinity, passed thru tpl function + affinity: |- + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 10 + podAffinityTerm: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - {{ template "alfresco-transform-service.pdfrenderer.name" . }} + topologyKey: topology.kubernetes.io/zone + - weight: 5 + podAffinityTerm: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - {{ template "alfresco-transform-service.pdfrenderer.name" . }} + topologyKey: app.kubernetes.io/name podAnnotations: {} podLabels: {} image: @@ -93,7 +135,28 @@ imagemagick: replicaCount: 2 nodeSelector: {} tolerations: [] - affinity: {} + # -- Pod affinity, passed thru tpl function + affinity: |- + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 10 + podAffinityTerm: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - {{ template "alfresco-transform-service.imagemagick.name" . }} + topologyKey: topology.kubernetes.io/zone + - weight: 5 + podAffinityTerm: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - {{ template "alfresco-transform-service.imagemagick.name" . }} + topologyKey: app.kubernetes.io/name podAnnotations: {} podLabels: {} image: @@ -140,7 +203,28 @@ libreoffice: replicaCount: 2 nodeSelector: {} tolerations: [] - affinity: {} + # -- Pod affinity, passed thru tpl function + affinity: |- + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 10 + podAffinityTerm: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - {{ template "alfresco-transform-service.libreoffice.name" . }} + topologyKey: topology.kubernetes.io/zone + - weight: 5 + podAffinityTerm: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - {{ template "alfresco-transform-service.libreoffice.name" . }} + topologyKey: app.kubernetes.io/name podAnnotations: {} podLabels: {} image: @@ -187,7 +271,28 @@ tika: replicaCount: 2 nodeSelector: {} tolerations: [] - affinity: {} + # -- Pod affinity, passed thru tpl function + affinity: |- + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 10 + podAffinityTerm: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - {{ template "alfresco-transform-service.tika.name" . }} + topologyKey: topology.kubernetes.io/zone + - weight: 5 + podAffinityTerm: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - {{ template "alfresco-transform-service.tika.name" . }} + topologyKey: app.kubernetes.io/name podAnnotations: {} podLabels: {} image: @@ -234,7 +339,28 @@ transformmisc: replicaCount: 2 nodeSelector: {} tolerations: [] - affinity: {} + # -- Pod affinity, passed thru tpl function + affinity: |- + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 10 + podAffinityTerm: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - {{ template "alfresco-transform-service.transform-misc.name" . }} + topologyKey: topology.kubernetes.io/zone + - weight: 5 + podAffinityTerm: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - {{ template "alfresco-transform-service.transform-misc.name" . }} + topologyKey: app.kubernetes.io/name podAnnotations: {} podLabels: {} image: @@ -281,7 +407,28 @@ filestore: replicaCount: 1 nodeSelector: {} tolerations: [] - affinity: {} + # -- Pod affinity, passed thru tpl function + affinity: |- + podAntiAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 10 + podAffinityTerm: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - {{ template "alfresco-transform-service.filestore.name" . }} + topologyKey: topology.kubernetes.io/zone + - weight: 5 + podAffinityTerm: + labelSelector: + matchExpressions: + - key: app + operator: In + values: + - {{ template "alfresco-transform-service.filestore.name" . }} + topologyKey: app.kubernetes.io/name podAnnotations: {} podLabels: {} image: