From 18762d69174720493fb4e1d7c13aefa9d3bff837 Mon Sep 17 00:00:00 2001 From: Alex Chapellon Date: Tue, 4 Jul 2023 16:06:19 +0200 Subject: [PATCH] OPSEXP-1861: allow using charts names overrides without installing the chart itself (#66) --- charts/alfresco-transform-service/Chart.yaml | 2 +- charts/alfresco-transform-service/README.md | 7 ++++--- .../alfresco-transform-service/ci/default-values.yaml | 1 + .../templates/secret-messagebroker.yaml | 2 +- charts/alfresco-transform-service/values.yaml | 10 ++++++++-- 5 files changed, 15 insertions(+), 7 deletions(-) diff --git a/charts/alfresco-transform-service/Chart.yaml b/charts/alfresco-transform-service/Chart.yaml index db5a0e3e..7b7cb7b8 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-alpha.0 +version: 0.1.0-alpha.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 162726e0..ead28717 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-alpha.0](https://img.shields.io/badge/Version-0.1.0--alpha.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.0-alpha.1](https://img.shields.io/badge/Version-0.1.0--alpha.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 @@ -18,8 +18,9 @@ A Helm chart for deploying Alfresco Transform Services |-----|------|---------|-------------| | activemq.adminUser.password | string | `"admin"` | Default password for the embedded broker admin user | | activemq.adminUser.user | string | `"admin"` | Default username for the embedded broker admin user | -| activemq.enabled | bool | `false` | | -| activemq.nameOverride | string | `"activemq"` | | +| activemq.enabled | bool | `false` | Deploy ActiveMQ chart as a dependency dependencies should only be called from the root chart | +| activemq.fullnameOverride | string | `nil` | Provide a static name that's used accross the whole Helm release | +| activemq.nameOverride | string | `nil` | Provide a partially static name that's used accross the whole Helm release | | activemq.nodeSelector | object | `{}` | Possibility to choose Node for pod, with a key-value pair label e.g {"kubernetes.io/hostname": multinode-demo-m02} | | ai.enabled | bool | `false` | | | ai.nameOverride | string | `"alfresco-ai"` | | diff --git a/charts/alfresco-transform-service/ci/default-values.yaml b/charts/alfresco-transform-service/ci/default-values.yaml index 5f3c5736..4ba9689c 100644 --- a/charts/alfresco-transform-service/ci/default-values.yaml +++ b/charts/alfresco-transform-service/ci/default-values.yaml @@ -1,5 +1,6 @@ activemq: enabled: true + nameOverride: activemq resources: requests: cpu: "100m" diff --git a/charts/alfresco-transform-service/templates/secret-messagebroker.yaml b/charts/alfresco-transform-service/templates/secret-messagebroker.yaml index c1adc888..cb1571e1 100644 --- a/charts/alfresco-transform-service/templates/secret-messagebroker.yaml +++ b/charts/alfresco-transform-service/templates/secret-messagebroker.yaml @@ -7,7 +7,7 @@ metadata: {{- include "alfresco-transform-service.labels" $ | nindent 4 }} type: Opaque data: - {{- if .Values.activemq.enabled }} + {{- if or .Values.activemq.enabled .Values.activemq.nameOverride .Values.activemq.fullnameOverride }} BROKER_URL: {{ printf "failover:(nio://%s-broker:61616)?timeout=3000&jms.useCompression=true" (include "alfresco-transform-service.fullname" (dict "Values" .Values.activemq "Chart" .Chart "Release" .Release)) | b64enc | quote }} BROKER_USERNAME: {{ .Values.activemq.adminUser.user | b64enc | quote }} BROKER_PASSWORD: {{ .Values.activemq.adminUser.password | b64enc | quote }} diff --git a/charts/alfresco-transform-service/values.yaml b/charts/alfresco-transform-service/values.yaml index fdf124d2..6403f4ce 100644 --- a/charts/alfresco-transform-service/values.yaml +++ b/charts/alfresco-transform-service/values.yaml @@ -312,8 +312,13 @@ filestore: subPath: "alfresco-content-services/filestore-data" activemq: - nameOverride: activemq + # -- Deploy ActiveMQ chart as a dependency + # dependencies should only be called from the root chart enabled: false + # -- Provide a partially static name that's used accross the whole Helm release + nameOverride: null + # -- Provide a static name that's used accross the whole Helm release + fullnameOverride: null # -- Possibility to choose Node for pod, with a key-value pair label # e.g {"kubernetes.io/hostname": multinode-demo-m02} nodeSelector: {} @@ -330,7 +335,8 @@ messageBroker: password: null # -- Name of the secret managed by this chart secretName: acs-alfresco-cs-brokersecret - # -- Alternatively, provide credentials via an existing secret that contains BROKER_URL, BROKER_USERNAME and BROKER_PASSWORD keys + # -- Alternatively, provide credentials via an existing secret that contains + # BROKER_URL, BROKER_USERNAME and BROKER_PASSWORD keys existingSecretName: null ai: