Skip to content

Commit

Permalink
optionally autopopulate rmq host & port
Browse files Browse the repository at this point in the history
  • Loading branch information
artntek committed Nov 22, 2023
1 parent ab315b0 commit 7d2f59d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
11 changes: 8 additions & 3 deletions helm/config/dataone-indexer.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,16 @@ index.document.root.directory={{ .Values.idxworker.document_directory }}
index.tdb.directory={{ .Values.idxworker.tripleDbDirectory }}

#The section for the rabbitMQ configuration
index.rabbitmq.hostname={{ .Values.rabbitmq.hostname }}
index.rabbitmq.hostport={{ .Values.rabbitmq.hostport }}
index.rabbitmq.hostname=
{{- if not .Values.rabbitmq.hostname }}
{{- .Release.Name }}-rabbitmq-headless
{{- else }}
{{- .Values.rabbitmq.hostname }}
{{- end }}
index.rabbitmq.hostport={{ default .Values.rabbitmq.service.ports.amqp .Values.rabbitmq.hostport }}
index.rabbitmq.username={{ .Values.rabbitmq.auth.username }}
## index.rabbitmq.password will be read from RABBITMQ_PASSWORD env var
index.rabbitmq.password: ${env:RABBITMQ_PASSWORD}
index.rabbitmq.password=${env:RABBITMQ_PASSWORD}
#If you change the number of the max priority, the existing queue must be deleted. And consumers must use the same number.
index.rabbitmq.max.priority=10

Expand Down
19 changes: 16 additions & 3 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,24 @@ idxworker:
rabbitmq:
enabled: true
auth:
## @param rabbitmq.username the username for rabbitmq access
##
username: rmq
existingPasswordSecret: "" ## (must contain key: `rabbitmq-password`)

hostname: d1index-rabbitmq-headless.d1index.svc
hostport: 5672
## @param rabbitmq.existingPasswordSecret the k8s secret holding the rabbitmq password
## (must be associated with key: `rabbitmq-password`)
##
existingPasswordSecret: ""

## @param rabbitmq.hostname idxworker param: hostname of the rabbitmq service to use
## Leave this value unset (`hostname: ""`) to have it automatically populated
##
hostname: ""
## @param rabbitmq.hostname idxworker param: hostport of the rabbitmq service
## Leave this value unset (`hostport: ""`) to have it automatically populated
##
hostport: ""

persistence:
size: 10Gi
#replicaCount: 3
Expand Down

0 comments on commit 7d2f59d

Please sign in to comment.