Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OPSEXP-2242: clean up named templates and unused resources #1010

Merged
merged 10 commits into from
Sep 20, 2023
10 changes: 5 additions & 5 deletions helm/alfresco-content-services/templates/_helpers-ats.tpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{/*
Local transformers config
*/}}
{{- define "alfresco-content-service.localTransformConfig" -}}
{{- define "alfresco-content-services.localTransformConfig" -}}
localTransform.core-aio.url=
localTransform.pdfrenderer.url=http://{{ template "alfresco-transform-service.deployment-pdfrenderer.name" . }}
localTransform.imagemagick.url=http://{{ template "alfresco-transform-service.deployment-imagemagick.name" . }}
Expand All @@ -13,7 +13,7 @@ localTransform.misc.url=http://{{ template "alfresco-transform-service.deploymen
{{/*
ATS Tengines config
*/}}
{{- define "alfresco-content-service.tengineConfig" -}}
{{- define "alfresco-content-services.tengineConfig" -}}
alfresco-pdf-renderer.url=http://{{ template "alfresco-transform-service.deployment-pdfrenderer.name" . }}
img.url=http://{{ template "alfresco-transform-service.deployment-imagemagick.name" . }}
jodconverter.url=http://{{ template "alfresco-transform-service.deployment-libreoffice.name" . }}
Expand All @@ -24,14 +24,14 @@ transform.misc.url=http://{{ template "alfresco-transform-service.deployment-tra
{{/*
Get Alfresco Content Service configuration for Alfresco Transform Service
*/}}
{{- define "alfresco-content-service.atsConfig" -}}
{{- define "alfresco-content-services.atsConfig" -}}
{{- $atsCtx := (dict "Values" (index .Values "alfresco-transform-service") "Chart" $.Chart "Release" $.Release) }}
{{ template "alfresco-content-service.localTransformConfig" $atsCtx }}
{{ template "alfresco-content-services.localTransformConfig" $atsCtx }}
{{- if and $atsCtx.Values.filestore.enabled $atsCtx.Values.transformrouter.enabled }}
{{- $routerCtx := (dict "Values" (dict "nameOverride" "router" ) "Chart" .Chart "Release" .Release) }}
{{- $sfsCtx := (dict "Values" (dict "nameOverride" "filestore" ) "Chart" .Chart "Release" .Release) }}
transform.service.url=http://{{ template "alfresco-transform-service.deployment-transform-router.name" $atsCtx }}
sfs.url=http://{{ template "alfresco-transform-service.deployment-filestore.name" $atsCtx }}
{{ template "alfresco-content-service.tengineConfig" $atsCtx }}
{{ template "alfresco-content-services.tengineConfig" $atsCtx }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{{/*
Compute the repository database URL
Usage: include "alfresco-content-service.database.repo" $
Usage: include "alfresco-content-services.database.repo" $
*/}}
{{- define "alfresco-content-service.database.repo" -}}
{{- define "alfresco-content-services.database.repo" -}}
{{- with .Values }}
{{- if and (not .database.url) (not .postgresql.enabled) }}
{{- fail "You must either set database.url or postgresql.enabled" }}
Expand Down

This file was deleted.

30 changes: 0 additions & 30 deletions helm/alfresco-content-services/templates/_helpers-ingress.tpl

This file was deleted.

21 changes: 0 additions & 21 deletions helm/alfresco-content-services/templates/_helpers-legacy.tpl

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{{/*
Compute the Message broker URL
Usage: include "alfresco-content-service.mq.url" $
Usage: include "alfresco-content-services.mq.url" $
*/}}
{{- define "alfresco-content-service.mq.url" -}}
{{- define "alfresco-content-services.mq.url" -}}
{{- if .Values.activemq.enabled }}
{{- printf "failover:(nio://%s-broker:61616)?timeout=3000&jms.useCompression=true" (include "content-services.activemq.fullname" .) }}
{{- $mqCtx := dict "Values" .Values.activemq "Chart" .Chart "Release" .Release }}
{{- printf "failover:(nio://%s-broker:61616)?timeout=3000&jms.useCompression=true" (include "activemq.fullname" $mqCtx) }}
{{- else }}
{{ required "Disabling in-cluster ActiveMQ requires passing (at least) messageBroker.url" .Values.messageBroker.url }}
{{- required "Disabling in-cluster ActiveMQ requires passing (at least) messageBroker.url" .Values.messageBroker.url }}
{{- end }}
{{- end }}
30 changes: 0 additions & 30 deletions helm/alfresco-content-services/templates/_helpers-repository.tpl

This file was deleted.

8 changes: 4 additions & 4 deletions helm/alfresco-content-services/templates/_helpers-search.tpl
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{{/*
Compute the search URL
Usage: include "alfresco-content-service.search.url" $
Usage: include "alfresco-content-services.search.url" $
*/}}
{{- define "alfresco-content-service.search.url" -}}
{{- define "alfresco-content-services.search.url" -}}
{{- with .Values }}
{{- if or .search.url $.Values.global.elasticsearch.url }}
{{- .search.url | default $.Values.global.elasticsearch.url }}
Expand All @@ -25,10 +25,10 @@ Usage: include "alfresco-content-service.search.url" $
{{/*
Compute the search "flavor"
Usage: include "alfresco-content-service.search.flavor" $
Usage: include "alfresco-content-services.search.flavor" $
*/}}
{{- define "alfresco-content-service.search.flavor" -}}
{{- define "alfresco-content-services.search.flavor" -}}
{{- with .Values }}
{{- if .search.flavor }}
{{- .search.flavor }}
Expand Down
11 changes: 0 additions & 11 deletions helm/alfresco-content-services/templates/_helpers-share.tpl

This file was deleted.

This file was deleted.

13 changes: 0 additions & 13 deletions helm/alfresco-content-services/templates/config-email.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ kind: ConfigMap
metadata:
name: {{ .Values.infrastructure.configMapName }}
labels:
{{- include "repository.labels" . | nindent 4 }}
{{- include "alfresco-content-services.labels" . | nindent 4 }}
data:
{{- $repoCtx := dict "Values" (index .Values "alfresco-repository") "Chart" .Chart "Release" .Release }}
repo_svc_name: {{ template "alfresco-repository.fullname" $repoCtx }}
repo_svc_port: {{ .Values.repository.service.externalPort | quote }}
{{- $db_url := include "alfresco-content-service.database.repo" $ }}
{{- $db_url := include "alfresco-content-services.database.repo" $ }}
{{ template "alfresco-repository.db.cm" (dict "url" $db_url "driver" .Values.database.driver) }}
{{ template "alfresco-repository.mq.cm" (include "alfresco-content-service.mq.url" .) }}
{{ template "alfresco-repository.mq.cm" (include "alfresco-content-services.mq.url" .) }}
{{- $search_url := "" }}
{{- $search_flavor := include "alfresco-content-service.search.flavor" . }}
{{- $search_flavor := include "alfresco-content-services.search.flavor" . }}
{{- $searchCtx := dict "Values" (index .Values "alfresco-search") "Chart" .Chart "Release" .Release }}
{{- if index .Values "alfresco-search" "enabled" }}
{{- $search_url = printf "http://%s-solr/solr" (include "alfresco-search-service.fullname" $searchCtx) }}
Expand All @@ -25,4 +25,4 @@ data:
{{- if ne "noindex" $search_flavor }}
SEARCH_URL: {{ $search_url }}
{{- end }}
SEARCH_FLAVOR: {{ template "alfresco-content-service.search.flavor" . }}
SEARCH_FLAVOR: {{ template "alfresco-content-services.search.flavor" . }}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ data:
transform.service.enabled={{ and .enabled $ats_for_enterprise }}
{{- end }}
{{- if index .Values "alfresco-transform-service" "enabled" }}
{{- include "alfresco-content-service.atsConfig" . | indent 4 }}
{{- include "alfresco-content-services.atsConfig" . | indent 4 }}
{{- end }}
{{/*
{{- if .Values.s3connector.enabled }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: Secret
metadata:
name: {{ .Values.database.secretName }}
labels:
{{- include "repository.labels" . | nindent 4 }}
{{- include "alfresco-content-services.labels" . | nindent 4 }}
type: Opaque
data:
DATABASE_USERNAME: {{ .Values.database.user | default .Values.postgresql.auth.username | b64enc | quote }}
Expand Down
11 changes: 0 additions & 11 deletions helm/alfresco-content-services/templates/secret-mail-password.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,20 @@ kind: Secret
metadata:
name: {{ .Values.messageBroker.secretName }}
labels:
{{- include "repository.labels" . | nindent 4 }}
{{- include "alfresco-content-services.labels" . | nindent 4 }}
type: Opaque
data:
{{- if .Values.activemq.enabled }}
BROKER_URL: {{ printf "failover:(nio://%s-broker:61616)?timeout=3000&jms.useCompression=true" (include "content-services.activemq.fullname" .) | b64enc | quote }}
BROKER_USERNAME: {{ .Values.activemq.adminUser.user | b64enc | quote }}
BROKER_PASSWORD: {{ .Values.activemq.adminUser.password | b64enc | quote }}
{{- with .Values.activemq }}
BROKER_USERNAME: {{ .adminUser.user | b64enc | quote }}
BROKER_PASSWORD: {{ .adminUser.password | b64enc | quote }}
{{- end }}
{{- else }}
BROKER_URL: {{ required "Disabling in-cluster ActiveMQ requires passing (at least) messageBroker.url" .Values.messageBroker.url | b64enc | quote }}
BROKER_USERNAME: {{ .Values.messageBroker.user | b64enc | quote }}
BROKER_PASSWORD: {{ .Values.messageBroker.password | b64enc | quote }}
{{- with .Values.messageBroker}}
BROKER_USERNAME: {{ .user | default "" | b64enc | quote }}
BROKER_PASSWORD: {{ .password | default "" | b64enc | quote }}
{{- end }}
{{- end }}
{{/* required until OPSEXP-2300 & OPSEXP-2293 */}}
BROKER_URL: {{ include "alfresco-content-services.mq.url" . | b64enc | quote }}
{{- end }}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: Secret
metadata:
name: {{ .Values.search.secretName }}
labels:
{{- include "repository.labels" . | nindent 4 }}
{{- include "alfresco-content-services.labels" . | nindent 4 }}
type: Opaque
data:
SOLR_SECRET: {{ include "tracking-shared-secret" . | b64enc | quote }}
Expand Down
11 changes: 0 additions & 11 deletions helm/alfresco-content-services/templates/secret-repository.yaml

This file was deleted.

22 changes: 0 additions & 22 deletions helm/alfresco-content-services/templates/secret-s3.yaml

This file was deleted.

Loading
Loading