diff --git a/charts/alfresco-transform-service/Chart.yaml b/charts/alfresco-transform-service/Chart.yaml index 68745930..09673e86 100644 --- a/charts/alfresco-transform-service/Chart.yaml +++ b/charts/alfresco-transform-service/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: alfresco-transform-service description: A Helm chart for deploying Alfresco Transform Services type: application -version: 0.1.0 +version: 0.1.1 appVersion: "3.0.0" dependencies: - name: alfresco-common diff --git a/charts/alfresco-transform-service/README.md b/charts/alfresco-transform-service/README.md index fe2b91d2..c2bb403e 100644 --- a/charts/alfresco-transform-service/README.md +++ b/charts/alfresco-transform-service/README.md @@ -1,6 +1,6 @@ # alfresco-transform-service -![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.0.0](https://img.shields.io/badge/AppVersion-3.0.0-informational?style=flat-square) +![Version: 0.1.1](https://img.shields.io/badge/Version-0.1.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.0.0](https://img.shields.io/badge/AppVersion-3.0.0-informational?style=flat-square) A Helm chart for deploying Alfresco Transform Services diff --git a/charts/alfresco-transform-service/templates/svc-imagemagick.yaml b/charts/alfresco-transform-service/templates/svc-imagemagick.yaml index 2a1090d4..aae12c64 100644 --- a/charts/alfresco-transform-service/templates/svc-imagemagick.yaml +++ b/charts/alfresco-transform-service/templates/svc-imagemagick.yaml @@ -1,5 +1,4 @@ {{- if .Values.imagemagick.enabled }} -{{- $componentScope := (dict "Values" (dict "nameOverride" "imagemagick" ) "Chart" .Chart "Release" .Release) }} apiVersion: v1 kind: Service metadata: diff --git a/charts/alfresco-transform-service/templates/svc-transform-router.yaml b/charts/alfresco-transform-service/templates/svc-transform-router.yaml index c4671782..a35d4a14 100644 --- a/charts/alfresco-transform-service/templates/svc-transform-router.yaml +++ b/charts/alfresco-transform-service/templates/svc-transform-router.yaml @@ -1,11 +1,10 @@ {{- if .Values.transformrouter.enabled }} -{{- $componentScope := (dict "Values" (dict "nameOverride" "router" ) "Chart" .Chart "Release" .Release) }} apiVersion: v1 kind: Service metadata: - name: {{ template "alfresco-transform-service.fullname" $componentScope }} + name: {{ template "alfresco-transform-service.deployment-transform-router.name" . }} labels: - {{- include "alfresco-transform-service.labels" $componentScope | nindent 4 }} + {{- include "alfresco-transform-service.transform-router.labels" . | nindent 4 }} spec: type: {{ .Values.transformrouter.service.type }} ports: @@ -14,5 +13,5 @@ spec: protocol: TCP name: {{ .Values.transformrouter.service.name }} selector: - {{- include "alfresco-transform-service.selectorLabels" $componentScope | nindent 4 }} + {{- include "alfresco-transform-service.transform-router.selectorLabels" . | nindent 4 }} {{- end }} diff --git a/charts/alfresco-transform-service/tests/services_test.yaml b/charts/alfresco-transform-service/tests/services_test.yaml new file mode 100644 index 00000000..03b8fe28 --- /dev/null +++ b/charts/alfresco-transform-service/tests/services_test.yaml @@ -0,0 +1,102 @@ +--- +suite: ATS kubernetes service tests +templates: + - deployment-filestore.yaml + - deployment-imagemagick.yaml + - deployment-libreoffice.yaml + - deployment-pdfrenderer.yaml + - deployment-tika.yaml + - deployment-transform-misc.yaml + - deployment-transform-router.yaml + - svc-filestore.yaml + - svc-imagemagick.yaml + - svc-libreoffice.yaml + - svc-pdfrenderer.yaml + - svc-tika.yaml + - svc-transform-misc.yaml + - svc-transform-router.yaml + - config-filestore.yaml + - config-imagemagick.yaml + - config-libreoffice.yaml + - config-pdfrenderer.yaml + - config-tika.yaml + - config-transform-misc.yaml + - config-transform-router.yaml + - secret-messagebroker.yaml + + +tests: + - it: should render a service with matching pods + values: &testvalues + - values/test_values.yaml + asserts: + - isSubset: + path: spec.template.metadata.labels + content: &trouter_labels + app.kubernetes.io/name: transform-router + app.kubernetes.io/instance: RELEASE-NAME + template: deployment-transform-router.yaml + - isSubset: + path: spec.selector + content: *trouter_labels + template: svc-transform-router.yaml + - isSubset: + path: spec.template.metadata.labels + content: &sfs_labels + app.kubernetes.io/name: filestore + app.kubernetes.io/instance: RELEASE-NAME + template: deployment-filestore.yaml + - isSubset: + path: spec.selector + content: *sfs_labels + template: svc-filestore.yaml + - isSubset: + path: spec.template.metadata.labels + content: &im_labels + app.kubernetes.io/name: imagemagick + app.kubernetes.io/instance: RELEASE-NAME + template: deployment-imagemagick.yaml + - isSubset: + path: spec.selector + content: *im_labels + template: svc-imagemagick.yaml + - isSubset: + path: spec.template.metadata.labels + content: &lo_labels + app.kubernetes.io/name: libreoffice + app.kubernetes.io/instance: RELEASE-NAME + template: deployment-libreoffice.yaml + - isSubset: + path: spec.selector + content: *lo_labels + template: svc-libreoffice.yaml + - isSubset: + path: spec.template.metadata.labels + content: &pdf_labels + app.kubernetes.io/name: pdfrenderer + app.kubernetes.io/instance: RELEASE-NAME + template: deployment-pdfrenderer.yaml + - isSubset: + path: spec.selector + content: *pdf_labels + template: svc-pdfrenderer.yaml + - isSubset: + path: spec.template.metadata.labels + content: &tika_labels + app.kubernetes.io/name: tika + app.kubernetes.io/instance: RELEASE-NAME + template: deployment-tika.yaml + - isSubset: + path: spec.selector + content: *tika_labels + template: svc-tika.yaml + - isSubset: + path: spec.template.metadata.labels + content: &misc_labels + app.kubernetes.io/name: transform-misc + app.kubernetes.io/instance: RELEASE-NAME + template: deployment-transform-misc.yaml + - isSubset: + path: spec.selector + content: *misc_labels + template: svc-transform-misc.yaml