Skip to content

Commit

Permalink
feat: add core unified prefix for Elasticsearch/OpenSearch (#2643)
Browse files Browse the repository at this point in the history
  • Loading branch information
aabouzaid authored Dec 5, 2024
1 parent 13fc9dc commit 68a5e5b
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 11 deletions.
3 changes: 3 additions & 0 deletions charts/camunda-platform-8.6/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,9 @@ Please see the corresponding [release guide](../../docs/release.md) to find out
| `console.image.pullSecrets` | can be used to configure image pull secrets https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod | `[]` |
| `console.sidecars` | can be used to attach extra containers to the console deployment | `[]` |
| `console.replicas` | Number of Console replicas | `1` |
| `console.tls.enabled` | Enable TLS traffic for console | `false` |
| `console.tls.existingSecret` | The name of the existing secret that contains the TLS certificates. Each key of the secret corresponds to a certificate filename, and each value of a key corresponds to the content of the certificate file. | `""` |
| `console.tls.certKeyFilename` | Certificate Key filename | `""` |
| `console.keycloak.realm` | Specifies the Keycloak realm used for authentication. | `camunda-platform` |
| `console.contextPath` | can be used to make Console web application works on a custom sub-path. This is mainly used to run Camunda web applications under a single domain. | `""` |
| `console.initContainers` | can be used to set up extra init containers for the application Pod | `[]` |
Expand Down
4 changes: 2 additions & 2 deletions charts/camunda-platform-8.6/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -420,9 +420,9 @@ console:
tls:
## @param console.tls.enabled Enable TLS traffic for console
enabled: false
## @param tls.existingSecret The name of the existing secret that contains the TLS certificates. Each key of the secret corresponds to a certificate filename, and each value of a key corresponds to the content of the certificate file.
## @param console.tls.existingSecret The name of the existing secret that contains the TLS certificates. Each key of the secret corresponds to a certificate filename, and each value of a key corresponds to the content of the certificate file.
existingSecret: ""
## @param tls.certKeyFilename Certificate Key filename
## @param console.tls.certKeyFilename Certificate Key filename
certKeyFilename: ""
## console.keycloak configuration to configure Keycloak authentication settings.
keycloak:
Expand Down
1 change: 1 addition & 0 deletions charts/camunda-platform-alpha/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1305,6 +1305,7 @@ Please see the corresponding [release guide](../../docs/release.md) to find out
| `core.tolerations` | can be used to define pod toleration's https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/ | `[]` |
| `global.core.Affinity` | can be used to define pod affinity or anti-affinity https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity | |
| `core.priorityClassName` | can be used to define the broker pods priority https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/#priorityclass | `""` |
| `core.index.prefix` | if specified, defines web apps index prefix in Elasticsearch/OpenSearch. Note, for Zeebe index prefix, use "global.elasticsearch.prefix". | `nil` |
| `core.retention.enabled` | if true, the ILM Policy is created and applied to the index templates. | `false` |
| `core.retention.minimumAge` | defines how old the data must be, before the data is deleted as a duration. | `30d` |
| `core.retention.policyName` | defines the name of the created and applied ILM policy. | `core-record-retention-policy` |
Expand Down
26 changes: 24 additions & 2 deletions charts/camunda-platform-alpha/templates/core/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,10 @@ data:
CamundaExporter:
className: "io.camunda.exporter.CamundaExporter"
args:
{{- if .Values.core.index.prefix }}
index:
prefix: {{ .Values.core.index.prefix | quote }}
{{- end }}
connect:
type: {{ if .Values.global.elasticsearch.enabled }}elasticsearch{{ else }}opensearch{{ end }}
url: {{ if .Values.global.elasticsearch.enabled }}{{ include "camundaPlatform.elasticsearchURL" . | quote }}{{ else }}{{ include "camundaPlatform.opensearchURL" . | quote }}{{- end }}
Expand Down Expand Up @@ -241,6 +245,10 @@ data:
# ELS instance to store Operate data
{{- if .Values.global.elasticsearch.enabled }}
elasticsearch:
# Operate index prefix.
{{- if .Values.core.index.prefix }}
indexPrefix: {{ .Values.core.index.prefix | quote }}
{{- end }}
# Cluster name
clusterName: {{ .Values.global.elasticsearch.clusterName }}
{{- if .Values.global.elasticsearch.external }}
Expand All @@ -263,7 +271,9 @@ data:
# Transport port
port: {{ .Values.global.elasticsearch.url.port }}
# Index prefix, configured in Zeebe Elasticsearch exporter
prefix: {{ .Values.global.elasticsearch.prefix }}
{{- if .Values.core.index.prefix }}
prefix: {{ .Values.core.index.prefix | quote }}
{{- end }}
{{- if .Values.global.elasticsearch.url.host }}
# Elasticsearch full url
url: {{ include "camundaPlatform.elasticsearchURL" . | quote }}
Expand All @@ -279,6 +289,9 @@ data:
gatewayAddress: "{{ include "core.fullname" . }}:{{ .Values.core.service.grpcPort }}"
{{- if .Values.global.opensearch.enabled }}
opensearch:
{{- if .Values.core.index.prefix }}
indexPrefix: {{ .Values.core.index.prefix | quote }}
{{- end }}
url: {{ include "camundaPlatform.opensearchURL" . | quote }}
{{- if .Values.global.opensearch.aws.enabled }}
awsEnabled: true
Expand Down Expand Up @@ -321,6 +334,10 @@ data:
{{- if .Values.global.elasticsearch.enabled }}
# ELS instance to store Tasklist data
elasticsearch:
# Tasklist index prefix.
{{- if .Values.core.index.prefix }}
indexPrefix: {{ .Values.core.index.prefix | quote }}
{{- end }}
# Cluster name
clusterName: {{ .Values.global.elasticsearch.clusterName }}
# Host
Expand All @@ -343,7 +360,9 @@ data:
# Transport port
port: {{ .Values.global.elasticsearch.url.port }}
# Index prefix, configured in Zeebe Elasticsearch exporter
prefix: {{ .Values.global.elasticsearch.prefix }}
{{- if .Values.core.index.prefix }}
prefix: {{ .Values.core.index.prefix | quote }}
{{- end }}
{{- if .Values.global.elasticsearch.url.host }}
# Elasticsearch full url
url: {{ include "camundaPlatform.elasticsearchURL" . | quote }}
Expand All @@ -355,6 +374,9 @@ data:
{{- if .Values.global.opensearch.enabled }}
database: opensearch
opensearch:
{{- if .Values.core.index.prefix }}
indexPrefix: {{ .Values.core.index.prefix | quote }}
{{- end }}
url: {{ include "camundaPlatform.opensearchURL" . | quote }}
{{- if .Values.global.opensearch.aws.enabled }}
awsEnabled: true
Expand Down
13 changes: 13 additions & 0 deletions charts/camunda-platform-alpha/templates/optimize/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ data:
{{- if .Values.global.elasticsearch.enabled }}
es:
settings:
{{- if .Values.core.index.prefix }}
index:
prefix: {{ .Values.core.index.prefix | quote }}
{{- end }}
connection:
nodes:
- host: {{ include "camundaPlatform.elasticsearchHost" . | quote }}
Expand All @@ -35,6 +40,14 @@ data:
enabled: "true"
{{- end }}
{{- end }}
{{- else if .Values.global.opensearch.enabled }}
opensearch:
settings:
{{- if .Values.core.index.prefix }}
index:
prefix: {{ .Values.core.index.prefix | quote }}
{{- end }}
{{- end }}
spring:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ data:
# ELS instance to store Operate data
elasticsearch:
# Operate index prefix.
# Cluster name
clusterName: elasticsearch
# Host
Expand All @@ -168,7 +169,6 @@ data:
# Transport port
port: 9200
# Index prefix, configured in Zeebe Elasticsearch exporter
prefix: zeebe-record
# Elasticsearch full url
url: "http://camunda-platform-test-elasticsearch:9200"
# Zeebe instance
Expand All @@ -191,6 +191,7 @@ data:
#password:
# ELS instance to store Tasklist data
elasticsearch:
# Tasklist index prefix.
# Cluster name
clusterName: elasticsearch
# Host
Expand All @@ -208,7 +209,6 @@ data:
# Transport port
port: 9200
# Index prefix, configured in Zeebe Elasticsearch exporter
prefix: zeebe-record
# Elasticsearch full url
url: "http://camunda-platform-test-elasticsearch:9200"
# Zeebe instance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ data:
# ELS instance to store Operate data
elasticsearch:
# Operate index prefix.
# Cluster name
clusterName: elasticsearch
# Host
Expand All @@ -168,7 +169,6 @@ data:
# Transport port
port: 9200
# Index prefix, configured in Zeebe Elasticsearch exporter
prefix: zeebe-record
# Elasticsearch full url
url: "http://camunda-platform-test-elasticsearch:9200"
# Zeebe instance
Expand All @@ -191,6 +191,7 @@ data:
#password:
# ELS instance to store Tasklist data
elasticsearch:
# Tasklist index prefix.
# Cluster name
clusterName: elasticsearch
# Host
Expand All @@ -208,7 +209,6 @@ data:
# Transport port
port: 9200
# Index prefix, configured in Zeebe Elasticsearch exporter
prefix: zeebe-record
# Elasticsearch full url
url: "http://camunda-platform-test-elasticsearch:9200"
# Zeebe instance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ data:
# ELS instance to store Operate data
elasticsearch:
# Operate index prefix.
# Cluster name
clusterName: elasticsearch
# Host
Expand All @@ -168,7 +169,6 @@ data:
# Transport port
port: 9200
# Index prefix, configured in Zeebe Elasticsearch exporter
prefix: zeebe-record
# Elasticsearch full url
url: "http://camunda-platform-test-elasticsearch:9200"
# Zeebe instance
Expand All @@ -191,6 +191,7 @@ data:
#password:
# ELS instance to store Tasklist data
elasticsearch:
# Tasklist index prefix.
# Cluster name
clusterName: elasticsearch
# Host
Expand All @@ -208,7 +209,6 @@ data:
# Transport port
port: 9200
# Index prefix, configured in Zeebe Elasticsearch exporter
prefix: zeebe-record
# Elasticsearch full url
url: "http://camunda-platform-test-elasticsearch:9200"
# Zeebe instance
Expand Down
5 changes: 4 additions & 1 deletion charts/camunda-platform-alpha/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2107,7 +2107,6 @@ core:
## @param core.serviceAccount.automountServiceAccountToken can be used to control whether the service account token should be automatically mounted
automountServiceAccountToken: false


ingress:
grpc:
## @param core.ingress.grpc.enabled if true, an ingress resource is deployed with the Zeebe gateway deployment. Only useful if an ingress controller is available, like nginx.
Expand Down Expand Up @@ -2346,6 +2345,10 @@ core:
## @param core.priorityClassName can be used to define the broker pods priority https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/#priorityclass
priorityClassName: ""

index:
## @param core.index.prefix if specified, defines web apps index prefix in Elasticsearch/OpenSearch. Note, for Zeebe index prefix, use "global.elasticsearch.prefix".
prefix:

retention:
## @param core.retention.enabled if true, the ILM Policy is created and applied to the index templates.
enabled: false
Expand Down

0 comments on commit 68a5e5b

Please sign in to comment.