Skip to content

Commit

Permalink
change values names
Browse files Browse the repository at this point in the history
  • Loading branch information
pmacius committed Oct 15, 2024
1 parent 7b2ffd3 commit f0fc41f
Show file tree
Hide file tree
Showing 14 changed files with 39 additions and 39 deletions.
28 changes: 14 additions & 14 deletions charts/alfresco-audit-storage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,6 @@ Checkout [alfresco-content-services chart's doc](https://github.com/Alfresco/acs
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | |
| elasticSearchConnection.existingConfigMap.keys.url | string | `"SEARCH_URL"` | Key within the configmap holding the URL of the elasticsearch service |
| elasticSearchConnection.existingConfigMap.name | string | `nil` | Alternatively, provide elasticsearch service connection details via an existing configmap |
| elasticSearchConnection.existingSecret.keys.password | string | `"SEARCH_PASSWORD"` | Key within the secret that holds the elasticsearch password |
| elasticSearchConnection.existingSecret.keys.username | string | `"SEARCH_USERNAME"` | Key within the secret that holds the elasticsearch username |
| elasticSearchConnection.existingSecret.name | string | `nil` | Alternatively, provide elasticsearch credentials via an existing secret |
| elasticSearchConnection.password | string | `nil` | The password required to access the elasticsearch service, if any |
| elasticSearchConnection.url | string | `nil` | The URL where the elasticsearch service is available |
| elasticSearchConnection.username | string | `nil` | The username required to access the elasticsearch service, if any |
| environment.AUDIT_EVENTINGESTION_DLQ_CONSUMEPERIOD | int | `60000` | |
| environment.AUDIT_EVENTINGESTION_DLQ_CONSUMPTIONCOUNT | int | `1000` | |
| environment.AUDIT_EVENTINGESTION_URI | string | `"activemq:topic:alfresco.repo.event2"` | |
Expand All @@ -42,16 +34,24 @@ Checkout [alfresco-content-services chart's doc](https://github.com/Alfresco/acs
| image.repository | string | `"quay.io/alfresco/alfresco-audit-storage"` | |
| image.tag | string | `"0.0.1-A8"` | |
| imagePullSecrets | list | `[]` | |
| index.existingConfigMap.keys.url | string | `"SEARCH_URL"` | Key within the configmap holding the URL of the elasticsearch service |
| index.existingConfigMap.name | string | `nil` | Alternatively, provide elasticsearch service connection details via an existing configmap |
| index.existingSecret.keys.password | string | `"SEARCH_PASSWORD"` | Key within the secret that holds the elasticsearch password |
| index.existingSecret.keys.username | string | `"SEARCH_USERNAME"` | Key within the secret that holds the elasticsearch username |
| index.existingSecret.name | string | `nil` | Alternatively, provide elasticsearch credentials via an existing secret |
| index.password | string | `nil` | The password required to access the elasticsearch service, if any |
| index.url | string | `nil` | The URL where the elasticsearch service is available |
| index.username | string | `nil` | The username required to access the elasticsearch service, if any |
| livenessProbe.httpGet.path | string | `"/actuator/health/liveness"` | |
| livenessProbe.httpGet.port | string | `"http"` | |
| livenessProbe.initialDelaySeconds | int | `15` | |
| livenessProbe.periodSeconds | int | `60` | |
| messageBrokerConnection.existingConfigMap.keys.url | string | `"BROKER_URL"` | Key within the configmap holding the URL of the message broker |
| messageBrokerConnection.existingConfigMap.name | string | `nil` | Alternatively, provide message broker connection details via an existing configmap |
| messageBrokerConnection.existingSecret | object | `{"keys":{"password":"BROKER_PASSWORD","username":"BROKER_USERNAME"},"name":null}` | Provide connection details alternatively via an existing secret that contains BROKER_URL, BROKER_USERNAME and BROKER_PASSWORD keys |
| messageBrokerConnection.password | string | `nil` | Broker password |
| messageBrokerConnection.url | string | `nil` | Broker URL formatted as per: https://activemq.apache.org/failover-transport-reference |
| messageBrokerConnection.username | string | `nil` | Broker username |
| messageBroker.existingConfigMap.keys.url | string | `"BROKER_URL"` | Key within the configmap holding the URL of the message broker |
| messageBroker.existingConfigMap.name | string | `nil` | Alternatively, provide message broker connection details via an existing configmap |
| messageBroker.existingSecret | object | `{"keys":{"password":"BROKER_PASSWORD","username":"BROKER_USERNAME"},"name":null}` | Provide connection details alternatively via an existing secret that contains BROKER_URL, BROKER_USERNAME and BROKER_PASSWORD keys |
| messageBroker.password | string | `nil` | Broker password |
| messageBroker.url | string | `nil` | Broker URL formatted as per: https://activemq.apache.org/failover-transport-reference |
| messageBroker.username | string | `nil` | Broker username |
| nameOverride | string | `""` | |
| nodeSelector | object | `{}` | |
| podAnnotations | object | `{}` | |
Expand Down
4 changes: 2 additions & 2 deletions charts/alfresco-audit-storage/ci/default-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ activemq:
limits:
cpu: "1000m"
memory: "1Gi"
elasticSearchConnection:
index:
url: http://elasticsearch-master:9200
messageBrokerConnection:
messageBroker:
url: nio://activemq-broker:61616
tags:
ci: true
6 changes: 3 additions & 3 deletions charts/alfresco-audit-storage/templates/_helpers-activemq.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Usage: include "alfresco-audit-storage.activemq.url" $
*/}}
{{- define "alfresco-audit-storage.activemq.url" -}}
{{- required "You need to provide an ActiveMQ URL using messageBrokerConnection.url or using an existingConfigMap check chart README file" $.Values.messageBrokerConnection.url }}
{{- required "You need to provide an ActiveMQ URL using messageBroker.url or using an existingConfigMap check chart README file" $.Values.messageBroker.url }}
{{- end -}}

{{/*
Expand All @@ -14,7 +14,7 @@ Usage: include "alfresco-audit-storage.activemq.cm.env" $
*/}}
{{- define "alfresco-audit-storage.activemq.cm.env" -}}
{{- $mqCtx := dict "Values" (dict "nameOverride" (printf "%s-%s" (.Values.nameOverride | default $.Chart.Name) "mq")) "Chart" .Chart "Release" .Release }}
{{- with .Values.messageBrokerConnection }}
{{- with .Values.messageBroker }}
{{- $mqCm := coalesce .existingConfigMap.name (include "alfresco-audit-storage.fullname" $mqCtx) }}
- name: SPRING_ACTIVEMQ_BROKERURL
valueFrom:
Expand All @@ -31,7 +31,7 @@ Usage: include "alfresco-audit-storage.activemq.secret.env" $
*/}}
{{- define "alfresco-audit-storage.activemq.secret.env" -}}
{{- $mqCtx := dict "Values" (dict "nameOverride" (printf "%s-%s" (.Values.nameOverride | default .Chart.Name) "mq")) "Chart" .Chart "Release" .Release }}
{{- with .Values.messageBrokerConnection }}
{{- with .Values.messageBroker }}
{{- $mqSecret := coalesce .existingSecret.name (include "alfresco-audit-storage.fullname" $mqCtx) }}
- name: SPRING_ACTIVEMQ_USER
valueFrom:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Usage: include "alfresco-audit-storage.config.audit.entryStorage.es.env" $
*/}}
{{- define "alfresco-audit-storage.config.audit.entryStorage.es.env" -}}
{{- $esCtx := dict "Values" (dict "nameOverride" (printf "%s-%s" (.Values.nameOverride | default .Chart.Name) "es")) "Chart" .Chart "Release" .Release }}
{{- with .Values.elasticSearchConnection }}
{{- with .Values.index }}
{{- $esCm := coalesce .existingConfigMap.name (include "alfresco-audit-storage.fullname" $esCtx) }}
- name: AUDIT_ENTRYSTORAGE_OPENSEARCH_CONNECTOR_URI
valueFrom:
Expand All @@ -22,7 +22,7 @@ Usage: include "alfresco-audit-storage.config.audit.entryStorage.envCredentials"
*/}}
{{- define "alfresco-audit-storage.config.audit.entryStorage.envCredentials" -}}
{{- $esCtx := dict "Values" (dict "nameOverride" (printf "%s-%s" (.Values.nameOverride | default .Chart.Name) "es")) "Chart" .Chart "Release" .Release }}
{{- with .Values.elasticSearchConnection }}
{{- with .Values.index }}
{{- $esSecret := coalesce .existingSecret.name (include "alfresco-audit-storage.fullname" $esCtx) }}
- name: AUDIT_ENTRYSTORAGE_OPENSEARCH_CONNECTOR_USERNAME
valueFrom:
Expand Down
4 changes: 2 additions & 2 deletions charts/alfresco-audit-storage/templates/configmap-es.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- with .Values.elasticSearchConnection }}
{{- with .Values.index }}
{{- if not .existingConfigMap.name }}
apiVersion: v1
kind: ConfigMap
Expand All @@ -8,7 +8,7 @@ metadata:
labels:
{{- include "alfresco-audit-storage.labels" $ | nindent 4 }}
data:
{{- $reqMsg := "Please provide elasticsearch connection details as .elasticSearchConnection.url values or using an .elasticSearchConnection.existingConfigMap." }}
{{- $reqMsg := "Please provide elasticsearch connection details as .index.url values or using an .index.existingConfigMap." }}
{{- $esProtocol := required $reqMsg (include "alfresco-common.url.scheme" .url) }}
{{- $esHost := required $reqMsg (include "alfresco-common.url.host" .url) }}
{{- $esPort := required $reqMsg (include "alfresco-common.url.port" .url) }}
Expand Down
2 changes: 1 addition & 1 deletion charts/alfresco-audit-storage/templates/configmap-mq.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if not .Values.messageBrokerConnection.existingConfigMap.name -}}
{{- if not .Values.messageBroker.existingConfigMap.name -}}
apiVersion: v1
kind: ConfigMap
metadata:
Expand Down
2 changes: 1 addition & 1 deletion charts/alfresco-audit-storage/templates/secret-es.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- with .Values.elasticSearchConnection }}
{{- with .Values.index }}
{{- if not .existingSecret.name }}
apiVersion: v1
kind: Secret
Expand Down
2 changes: 1 addition & 1 deletion charts/alfresco-audit-storage/templates/secret-mq.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- with .Values.messageBrokerConnection }}
{{- with .Values.messageBroker }}
{{- if not .existingSecret.name }}
apiVersion: v1
kind: Secret
Expand Down
6 changes: 3 additions & 3 deletions charts/alfresco-audit-storage/tests/configmaps_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ tests:
asserts:
- failedTemplate:
errorMessage: >-
You need to provide an ActiveMQ URL using messageBrokerConnection.url or using an existingConfigMap check chart README file
You need to provide an ActiveMQ URL using messageBroker.url or using an existingConfigMap check chart README file
template: configmap-mq.yaml

- it: should create a cm from messageBroker provided values
Expand All @@ -27,9 +27,9 @@ tests:
- it: should not render cm when existingConfigMap is set
values: *testvalues
set:
elasticSearchConnection.existingConfigMap:
index.existingConfigMap:
name: external-mq-configmap
messageBrokerConnection.existingConfigMap:
messageBroker.existingConfigMap:
name: external-es-configmap
asserts:
- hasDocuments:
Expand Down
4 changes: 2 additions & 2 deletions charts/alfresco-audit-storage/tests/deployment_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ tests:
protocol: TCP
- it: should have envs section with external cm and secrets
set:
messageBrokerConnection:
messageBroker:
existingConfigMap:
name: mq-external-config
keys:
Expand All @@ -67,7 +67,7 @@ tests:
keys:
username: BROKER_USERNAME_EXTERNAL
password: BROKER_PASSWORD_EXTERNAL
elasticSearchConnection:
index:
existingConfigMap:
name: es-external-config
keys:
Expand Down
4 changes: 2 additions & 2 deletions charts/alfresco-audit-storage/tests/secret-es_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ tests:

- it: should have credentials populated when credentials are set
set:
elasticSearchConnection:
index:
username: admin
password: letmein
asserts:
Expand All @@ -27,7 +27,7 @@ tests:

- it: should not have a secret when existingSecret is set
set:
elasticSearchConnection:
index:
existingSecret:
name: whatever
asserts:
Expand Down
4 changes: 2 additions & 2 deletions charts/alfresco-audit-storage/tests/secret-mq_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ tests:

- it: should have credentials populated when messagebroker values are set
set:
messageBrokerConnection:
messageBroker:
url: ssl://mq.domain.tld:61617
username: ext-admin
password: ext-pass
Expand All @@ -28,7 +28,7 @@ tests:

- it: should not have a secret when existingSecretName is set
set:
messageBrokerConnection.existingSecret.name: existing-secret
messageBroker.existingSecret.name: existing-secret
asserts:
- hasDocuments:
count: 0
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
elasticSearchConnection:
index:
url: http://elasticsearch-master:9200
messageBrokerConnection:
messageBroker:
url: nio://activemq-broker:61616
4 changes: 2 additions & 2 deletions charts/alfresco-audit-storage/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ environment:
AUDIT_EVENTINGESTION_DLQ_CONSUMPTIONCOUNT: 1000
SPRING_PROFILES_ACTIVE: "durable-subscriptions"

messageBrokerConnection:
messageBroker:
# -- Broker URL formatted as per:
# https://activemq.apache.org/failover-transport-reference
url: null
Expand All @@ -54,7 +54,7 @@ messageBrokerConnection:
username: BROKER_USERNAME
password: BROKER_PASSWORD

elasticSearchConnection:
index:
# -- The URL where the elasticsearch service is available
url: null
# -- The username required to access the elasticsearch service, if any
Expand Down

0 comments on commit f0fc41f

Please sign in to comment.