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: remove usage of lookup in alfresco-repository #105

Merged
merged 31 commits into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
8a54282
revert usage of read.cm.then.value
alxgomz Sep 4, 2023
c2f575a
better message
alxgomz Sep 4, 2023
ae7cb34
align tests
alxgomz Sep 4, 2023
4e885d0
add other DB vars and use them instead of templates
alxgomz Sep 4, 2023
e0a792d
align tests
alxgomz Sep 4, 2023
dc6b98b
revert usage of read.cm.then.value for mq
alxgomz Sep 4, 2023
e68c789
do not lookup to determine solr comms
alxgomz Sep 4, 2023
a752c15
revert usage of read.cm.then.value for search
alxgomz Sep 5, 2023
cb99a73
provide template for each search flavor to use in configmap
alxgomz Sep 5, 2023
b1836dd
merge common search env vars
alxgomz Sep 5, 2023
884383d
few fixes
alxgomz Sep 5, 2023
ff501c3
add var using named template
alxgomz Sep 5, 2023
eedd842
remove cheksum annotation to redeploy
alxgomz Sep 5, 2023
8b20d45
bump alfresco-repository chart
alxgomz Sep 5, 2023
23e6adb
search env vars are optional
alxgomz Sep 5, 2023
94fcd2e
fix tests
alxgomz Sep 5, 2023
0712558
remove duplicate env var
alxgomz Sep 5, 2023
9186a59
add missing flavor env var
alxgomz Sep 5, 2023
94072d4
cleanup templates moved to common
alxgomz Sep 6, 2023
375a47f
provide named template to build the db configmap
alxgomz Sep 6, 2023
135470d
allow evaluation of db configmap name
alxgomz Sep 6, 2023
cb0ef6b
rename repo cm
alxgomz Sep 6, 2023
794bf89
switch tag based dependency management for CI
alxgomz Sep 7, 2023
fbd857e
add cm template for mq
alxgomz Sep 7, 2023
373a9e6
allow evaluation of mq configmap name
alxgomz Sep 7, 2023
a2006ce
bump dep lock file
alxgomz Sep 7, 2023
f43e73c
better values doc
alxgomz Sep 8, 2023
3aea406
Revert "allow evaluation of mq configmap name"
alxgomz Sep 8, 2023
0a6330b
Revert "allow evaluation of db configmap name"
alxgomz Sep 8, 2023
cc9984d
revert value nulling with empty string
alxgomz Sep 8, 2023
66f8640
explicit doc of ci stuff
alxgomz Sep 8, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions charts/alfresco-repository/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
dependencies:
- name: alfresco-common
repository: https://alfresco.github.io/alfresco-helm-charts/
version: 2.1.0-alpha.4
version: 2.1.0
- name: postgresql
repository: oci://registry-1.docker.io/bitnamicharts
version: 12.5.6
digest: sha256:fc198ff15a70999cb84eae6ea08e68f73168a0f6495c127efb0f1b9f7b1ebb69
generated: "2023-08-07T21:24:10.004093+02:00"
digest: sha256:043a1323627d74eed9c3675ebe4c704df37d01011d07fb704fa24f1a81703c1b
generated: "2023-09-07T16:17:44.513368+02:00"
7 changes: 4 additions & 3 deletions charts/alfresco-repository/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ apiVersion: v2
name: alfresco-repository
description: Alfresco content repository Helm chart
type: application
version: 0.1.0-alpha.7
version: 0.1.0-alpha.8
appVersion: 23.1.0-A21
dependencies:
- name: alfresco-common
version: 2.1.0-alpha.4
version: 2.1.0
repository: https://alfresco.github.io/alfresco-helm-charts/
- name: postgresql
version: 12.5.6
repository: oci://registry-1.docker.io/bitnamicharts
condition: postgresql.enabled
tags:
- ci
30 changes: 18 additions & 12 deletions charts/alfresco-repository/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# alfresco-repository

![Version: 0.1.0-alpha.7](https://img.shields.io/badge/Version-0.1.0--alpha.7-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 23.1.0-A21](https://img.shields.io/badge/AppVersion-23.1.0--A21-informational?style=flat-square)
![Version: 0.1.0-alpha.8](https://img.shields.io/badge/Version-0.1.0--alpha.8-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 23.1.0-A21](https://img.shields.io/badge/AppVersion-23.1.0--A21-informational?style=flat-square)

Alfresco content repository Helm chart

## Requirements

| Repository | Name | Version |
|------------|------|---------|
| https://alfresco.github.io/alfresco-helm-charts/ | alfresco-common | 2.1.0-alpha.4 |
| https://alfresco.github.io/alfresco-helm-charts/ | alfresco-common | 2.1.0 |
| oci://registry-1.docker.io/bitnamicharts | postgresql | 12.5.6 |

## Configuring Alfresco subsystems
Expand Down Expand Up @@ -94,28 +94,34 @@ environment:
| affinity | object | `{}` | |
| args | list | `[]` | |
| command | list | `[]` | |
| configuration.db.driver | string | `nil` | JDBC driver class of the driver if none is provided the it is guessed from the URL provided |
| configuration.db.existingConfigMap.keys | object | `{}` | |
| configuration.db.existingConfigMap.name | string | `nil` | |
| configuration.db.existingSecret | object | `{"keys":{"password":"DATABASE_PASSWORD","username":"DATABASE_USERNAME"},"name":null}` | Existing secret and their keys where to find the database username & password. |
| configuration.db.driver | string | `""` | JDBC driver class of the driver if none is provided the it is guessed from the URL provided |
| configuration.db.existingConfigMap.keys.driver | string | `"DATABASE_DRIVER"` | |
| configuration.db.existingConfigMap.keys.host | string | `"DATABASE_HOST"` | |
| configuration.db.existingConfigMap.keys.port | string | `"DATABASE_PORT"` | |
| configuration.db.existingConfigMap.keys.url | string | `"DATABASE_URL"` | |
| configuration.db.existingConfigMap.name | string | `""` | |
alxgomz marked this conversation as resolved.
Show resolved Hide resolved
| configuration.db.existingSecret.keys.password | string | `"DATABASE_PASSWORD"` | Key within the secret holding the database password |
| configuration.db.existingSecret.keys.username | string | `"DATABASE_USERNAME"` | Key within the secret holding the database username |
| configuration.db.existingSecret.name | string | `nil` | Name of a pre-existing secret containing database credentials |
| configuration.db.password | string | `nil` | Password to authentication to the repository database |
| configuration.db.url | string | `nil` | JDBC url of the database WITHOUT the "jdbc:" prefix This is a mandatory parameter |
| configuration.db.username | string | `nil` | Username to authentication to the repository database |
| configuration.db.existingSecret.name | string | `""` | Name of a pre-existing secret containing database credentials |
| configuration.db.password | string | `""` | Password to authentication to the repository database |
| configuration.db.url | string | `""` | JDBC url of the database WITHOUT the "jdbc:" prefix This is a mandatory parameter |
| configuration.db.username | string | `""` | Username to authentication to the repository database |
| configuration.hz.port | int | `5701` | Hazelcast listener port Only change it if you use a custom image where the port has been changed from default |
| configuration.messageBroker.existingConfigMap.keys.url | string | `"BROKER_URL"` | Key within the configmap holding the message broker URL. It MUST be a failover URL as per the spec below: https://activemq.apache.org/failover-transport-reference.html |
| configuration.messageBroker.existingConfigMap.name | string | `nil` | Name of a pre-existing configmap containing the meesage broker URL |
| configuration.messageBroker.existingConfigMap.name | string | `""` | Name of a pre-existing configmap containing the meesage broker URL |
| configuration.messageBroker.existingSecret.keys.password | string | `"BROKER_PASSWORD"` | Key within the secret holding the message broker password |
| configuration.messageBroker.existingSecret.keys.username | string | `"BROKER_USERNAME"` | Key within the secret holding the message broker username |
| configuration.messageBroker.existingSecret.name | string | `nil` | Name of a pre-existing secret containing message broker credentials |
| configuration.messageBroker.existingSecret.name | string | `""` | Name of a pre-existing secret containing message broker credentials |
| configuration.messageBroker.password | string | `nil` | Password to authenticate to the message broker |
| configuration.messageBroker.url | string | `nil` | Message Broker URL |
| configuration.messageBroker.username | string | `nil` | Username to authenticate to the message broker |
| configuration.repository.existingConfigMap | string | `nil` | a configmap containing the "alfresco-global.properties" key populated with actual Alfresco repository properties |
| configuration.repository.existingSecrets | list | `[{"key":"license.lic","name":"repository-secrets","purpose":"acs-license"}]` | A list of secrets to make available to the repository as env vars. This list can contain special secrets marked with predifined `purpose`: `acs-license` to pass license as a secret or subsystems:*:* to configure an Alfresco subsystem. See [Configuring Alfresco Subsystem](#configuring-alfresco-subsystems) for more details. |
| configuration.search.existingConfigMap.keys.flavor | string | `"SEARCH_FLAVOR"` | |
| configuration.search.existingConfigMap.keys.host | string | `"SEARCH_HOST"` | |
| configuration.search.existingConfigMap.keys.port | string | `"SEARCH_PORT"` | |
| configuration.search.existingConfigMap.keys.securecomms | string | `"SEARCH_SECURECOMMS"` | |
| configuration.search.existingConfigMap.keys.solr_base_url | string | `"SOLR_BASE_URL"` | |
alxgomz marked this conversation as resolved.
Show resolved Hide resolved
| configuration.search.existingConfigMap.keys.url | string | `"SEARCH_URL"` | Key within the configmap holding the search service URL. |
| configuration.search.existingConfigMap.name | string | `nil` | Optional configmap containing the search service URL |
| configuration.search.existingSecret.keys.password | string | `"ELASTICSEARCH_PASSWORD"` | Key within the secret holding the search service password |
Expand Down
3 changes: 2 additions & 1 deletion charts/alfresco-repository/ci/default-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ configuration:
messageBroker:
url: failover:(tcp://localhost:61616)
postgresql:
enabled: true
fullnameOverride: pg-postgresql-acs
image:
tag: 14.4.0
auth:
username: *pguser
password: *pgpass
database: alfresco
tags:
ci: true
126 changes: 33 additions & 93 deletions charts/alfresco-repository/templates/_helpers-database.tpl
Original file line number Diff line number Diff line change
@@ -1,105 +1,45 @@
{{/*
Compute JDBC URL opbject
We're just manipulating the string URl to make it parseable by urlParse.
It MUST NOT be used directly.
*/}}
{{- define "alfresco-repository.jdbc.parser" -}}
{{- $jdbc_url := required "Alfresco repository needs a database to start. Please provide a valid URL in db.url value" . }}
{{- if hasPrefix "jdbc:" $jdbc_url }}
{{- fail "database URL MUST be provided WITHOUT the 'jdbc' prefix." }}
{{- end }}
{{- if hasPrefix "oracle:thin:@" $jdbc_url }}
{{- $ora_url := trimPrefix "oracle:thin:" $jdbc_url }}
{{- $ora_url = (mustRegexReplaceAllLiteral "^@(tcps?://)?" $ora_url "oracle://") }}
{{- $jdbc_url = $ora_url }}
{{- end }}
{{- if hasPrefix "sqlserver://" $jdbc_url }}
{{- $jdbc_url = trimPrefix "sqlserver://" $jdbc_url }}
{{- $query := $jdbc_url | splitList ";" }}
{{- $host := "" }}
{{- if and (not (empty (index $query 0))) (not (contains "=" (index $query 0))) }}
{{- $host = index $query 0 }}
{{- $query = rest $query }}
{{- end }}
{{- $path := "" }}
{{- range $query }}
{{- if and (hasPrefix "serverName=" .) (empty $host) }}
{{- $host = trimPrefix "serverName=" . }}
{{- $_ := mustWithout $query . }}
{{- end }}
{{- if hasPrefix "databaseName=" . }}
{{- $path = trimPrefix "databaseName=" . }}
{{- $_ := mustWithout $query . }}
{{- end }}
{{- end }}
{{- $ms_url := printf "sqlserver://%s/%s?%s" $host $path ($query | join "&") }}
{{- $jdbc_url = $ms_url }}
{{- end }}
{{- $parsed_url := urlParse $jdbc_url }}
{{- if or (empty $parsed_url.host) (empty $parsed_url.hostname) (empty $parsed_url.scheme) (eq "/" $parsed_url.path) }}
{{- fail "The provided JDBC URL cannot be parsed please check or raise a bug." }}
{{- end }}
{{- mustToJson (dict "jdbc" $parsed_url) }}
{{- end -}}
Render database config as env vars

{{/*
Compute default ports by RDBMS
*/}}
{{- define "alfresco-repository.db.default.port" -}}
{{- $pg_rdbms := dict "name" "postgresql" "port" 5432 }}
{{- $my_rdbms := dict "name" "mysql" "port" 3306 }}
{{- $maria_rdbms := dict "name" "mariadb" "port" 3306 }}
{{- $ora_rdbms := dict "name" "oracle" "port" 1521 }}
{{- $ms_rdbms := dict "name" "sqlserver" "port" 1434 }}
{{- range $rdbms := list $pg_rdbms $my_rdbms $maria_rdbms $ora_rdbms $ms_rdbms }}
{{- eq $rdbms.name $ | ternary $rdbms.port "" }}
{{- end }}
{{- end -}}
Usage: include "alfresco-repository.db.env" $

{{/*
Compute default driver by RDBMS
*/}}
{{- define "alfresco-repository.db.default.driver" -}}
{{- $pg_rdbms := dict "name" "postgresql" "driver" "org.postgresql.Driver" }}
{{- $my_rdbms := dict "name" "mysql" "driver" "com.mysql.jdbc.Driver" }}
{{- $maria_rdbms := dict "name" "mariadb" "driver" "org.mariadb.jdbc.Driver" }}
{{- $ora_rdbms := dict "name" "oracle" "driver" "oracle.jdbc.OracleDriver" }}
{{- $ms_rdbms := dict "name" "sqlserver" "driver" "com.microsoft.sqlserver.jdbc.SQLServerDriver" }}
{{- range $rdbms := list $pg_rdbms $my_rdbms $maria_rdbms $ora_rdbms $ms_rdbms }}
{{- eq $rdbms.name $ | ternary $rdbms.driver "" }}
{{- define "alfresco-repository.db.env" -}}
{{- $dbcmCtx := dict "Values" (dict "nameOverride" "alfresco-database") "Chart" .Chart "Release" .Release }}
{{- with .Values.configuration.db }}
{{- $dbcm := coalesce (tpl .existingConfigMap.name $) (include "alfresco-repository.fullname" $dbcmCtx) }}
alxgomz marked this conversation as resolved.
Show resolved Hide resolved
- name: DATABASE_URL
valueFrom:
configMapKeyRef:
name: {{ $dbcm }}
key: {{ .existingConfigMap.keys.url }}
- name: DATABASE_HOST
valueFrom:
configMapKeyRef:
name: {{ $dbcm }}
key: {{ .existingConfigMap.keys.host }}
- name: DATABASE_PORT
valueFrom:
configMapKeyRef:
name: {{ $dbcm }}
key: {{ .existingConfigMap.keys.port }}
- name: DATABASE_DRIVER
valueFrom:
configMapKeyRef:
name: {{ $dbcm }}
key: {{ .existingConfigMap.keys.driver }}
{{- end }}
{{- end -}}

{{/*
Provide repository database engine
*/}}
{{- define "alfresco-repository.db.rdbms" -}}
{{- index (include "alfresco-repository.jdbc.parser" .url | fromJson) "jdbc" "scheme" }}
{{- end -}}
Render database configmap

{{/*
Provide repository database hostname
*/}}
{{- define "alfresco-repository.db.hostname" -}}
{{- index (include "alfresco-repository.jdbc.parser" .url | fromJson) "jdbc" "hostname" }}
{{- end -}}
Usage: include "alfresco-repository.db.cm" (dict "url" "" "driver" "")

{{/*
Provide repository database port
*/}}
{{- define "alfresco-repository.db.port" -}}
{{- $socket := (index (include "alfresco-repository.jdbc.parser" .url | fromJson) "jdbc" "host") }}
{{- if gt ($socket | splitList ":" | len) 1 }}
{{- $socket | splitList ":" | last }}
{{- else }}
{{- template "alfresco-repository.db.default.port" (index (include "alfresco-repository.jdbc.parser" .url | fromJson) "jdbc" "scheme") }}
{{- end }}
{{- end -}}

{{/*
Provide repository database driverClass
*/}}
{{- define "alfresco-repository.db.driver" -}}
{{- $scheme := index (include "alfresco-repository.jdbc.parser" .url | fromJson) "jdbc" "scheme" }}
{{- coalesce .driver (include "alfresco-repository.db.default.driver" $scheme) }}
{{- define "alfresco-repository.db.cm" -}}
DATABASE_URL: {{ .url }}
DATABASE_HOST: {{ template "alfresco-common.db.hostname" .url }}
DATABASE_PORT: {{ include "alfresco-common.db.port" . | quote }}
DATABASE_DRIVER: {{ template "alfresco-common.db.driver" . }}
{{- end -}}
10 changes: 10 additions & 0 deletions charts/alfresco-repository/templates/_helpers-message-broker.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,13 @@ Usage: include "alfresco-repository.mq.url.valid" "URL"
{{- printf "failover:(%s)" . }}
{{- end }}
{{- end -}}

{{/*
Render message broker configmap

Usage: include "alfresco-repository.mq.cm" "URL"

*/}}
{{- define "alfresco-repository.mq.cm" -}}
BROKER_URL: {{ template "alfresco-repository.mq.url.valid" . }}
{{- end -}}
90 changes: 70 additions & 20 deletions charts/alfresco-repository/templates/_helpers-search.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,14 @@ Usage: include "alfresco-repository.search.flavor.valid" "FLAVOR"
{{/*
Check whether a Solr shared secret was provided
gionn marked this conversation as resolved.
Show resolved Hide resolved

Usage: include "alfresco-repository.solr.security" (dict "ns" "" "search" (dict "existingConfigMap" (dict "name" "" "keys" (dict "solr-secret" ""))))
Usage: include "alfresco-repository.solr.security" (dict "search" (dict "existingConfigMap" (dict "name" "" "keys" (dict "solr-secret" ""))))

*/}}
{{- define "alfresco-repository.solr.security" -}}
{{ $ns := .ns }}
{{- with .search }}
{{- if .existingSecret.name }}
{{- $defaultLookup := (dict "data" dict) }}
{{- $lookup := lookup "v1" "Secret" $ns .existingSecret.name | default $defaultLookup }}
{{- hasKey $lookup.data (index .existingSecret.keys "solr-secret") | ternary "secret" "none" }}
{{- else -}}
{{- not (empty (index . "solr-secret")) | ternary "secret" "none" }}
{{- end }}
{{- if .existingSecret.name }}
{{- print "secret" }}
{{- else }}
{{- not (empty (index . "solr-secret")) | ternary "secret" "none" }}
{{- end }}
{{- end -}}

Expand All @@ -39,23 +34,78 @@ Usage: include "alfresco-repository.search.config" $
*/}}
{{- define "alfresco-repository.search.config" -}}
{{- with .Values.configuration.search }}
{{- $search_url := include "alfresco-common.read.cm.then.value" (dict "ns" $.Release.Namespace "key" "url" "context" .) }}
{{- if eq "solr6" (include "alfresco-repository.search.flavor.valid" .flavor) }}
-Dsolr.host={{ template "alfresco-common.url.host" $search_url }}
-Dsolr.port={{ template "alfresco-common.url.port" $search_url }}
-Dsolr.base.url={{ include "alfresco-common.url.path" $search_url | default "/solr" }}
{{- $solr_comms := include "alfresco-repository.solr.security" (dict "ns" $.Release.Namespace "search" . ) }}
-Dsolr.secureComms={{ $solr_comms }}
{{- if eq "secret" $solr_comms }}
-Dsolr.host="$SEARCH_HOST"
-Dsolr.port="$SEARCH_PORT"
-Dsolr.base.url="$SOLR_BASE_URL"
-Dsolr.secureComms="$SEARCH_SECURECOMMS"
{{- if or .existingSecret.name (index . "solr-secret") }}
-Dsolr.sharedSecret=$SOLR_SECRET
{{- end }}
{{- else if eq "elasticsearch" (include "alfresco-repository.search.flavor.valid" .flavor) }}
-Delasticsearch.host={{ template "alfresco-common.url.host" $search_url }}
-Delasticsearch.port={{ template "alfresco-common.url.port" $search_url }}
-Delasticsearch.secureComms={{ eq "https" (include "alfresco-common.url.scheme" $search_url) | ternary "https" "none" }}
-Delasticsearch.host=$SEARCH_HOST
-Delasticsearch.port=$SEARCH_PORT
-Delasticsearch.secureComms=$SEARCH_SECURECOMMS
-Delasticsearch.user=$ELASTICSEARCH_USERNAME
-Delasticsearch.password=$ELASTICSEARCH_PASSWORD
-Delasticsearch.createIndexIfNotExists=true
{{- end }}
{{- end }}
{{- end -}}

{{/*
Compute Alfresco Repository Solr env from search configuration context

Usage: include "alfresco-repository.solr.cm dict "url" "" "solr-secret" "" "existingSecret" (dict "name" "")

*/}}
{{- define "alfresco-repository.solr.cm" -}}
SEARCH_HOST: {{ template "alfresco-common.url.host" .url }}
SEARCH_PORT: {{ include "alfresco-common.url.port" .url | quote }}
SEARCH_SECURECOMMS: {{ template "alfresco-repository.solr.security" . }}
SOLR_BASE_URL: {{ include "alfresco-common.url.path" .url | default "/solr" }}
{{- end -}}

{{/*
Compute Alfresco Repository Elasticsearch env from search URL

Usage: include "alfresco-repository.elasticsearch.cm "URL"

*/}}
{{- define "alfresco-repository.elasticsearch.cm" -}}
SEARCH_HOST: {{ template "alfresco-common.url.host" . }}
SEARCH_PORT: {{ include "alfresco-common.url.port" . | quote }}
SEARCH_SECURECOMMS: {{ eq "https" (include "alfresco-common.url.scheme" .) | ternary "https" "none" }}
{{- end -}}

{{/*
Render search config as env vars in deployment
*/}}
{{- define "alfresco-repository.search.env" -}}
{{- $cmCtx := dict "Values" (dict "nameOverride" "alfresco-search") "Chart" .Chart "Release" .Release }}
{{- $flavor := include "alfresco-repository.search.flavor.valid" $.Values.configuration.search.flavor }}
{{- with .Values.configuration.search }}
{{- $cm := coalesce .existingConfigMap.name (include "alfresco-repository.fullname" $cmCtx) }}
- name: SEARCH_FLAVOR
valueFrom:
configMapKeyRef:
name: {{ $cm }}
key: {{ .existingConfigMap.keys.flavor }}
{{- if ne "noindex" $flavor }}
{{- range list "host" "port" "securecomms" }}
- name: {{ printf "SEARCH_%s" (upper .) }}
valueFrom:
configMapKeyRef:
name: {{ $cm }}
key: {{ index $.Values.configuration.search.existingConfigMap.keys . }}
{{- end }}
{{- end }}
{{- if eq "solr6" $flavor }}
- name: SOLR_BASE_URL
valueFrom:
configMapKeyRef:
name: {{ $cm }}
key: {{ .existingConfigMap.keys.solr_base_url }}
{{- end }}
{{- end }}
{{- end -}}
12 changes: 12 additions & 0 deletions charts/alfresco-repository/templates/configmap-database.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{{- if not .Values.configuration.db.existingConfigMap.name }}
apiVersion: v1
kind: ConfigMap
metadata:
name: >-
{{- $ctx := dict "Values" (dict "nameOverride" "alfresco-database") "Chart" .Chart "Release" .Release }}
{{ template "alfresco-repository.fullname" $ctx }}
labels:
{{- include "alfresco-repository.labels" . | nindent 4 }}
data:
{{ template "alfresco-repository.db.cm" .Values.configuration.db }}
gionn marked this conversation as resolved.
Show resolved Hide resolved
{{- end }}
Loading