Skip to content

Commit

Permalink
Merge branch 'develop' into feature-51-liveness-probe
Browse files Browse the repository at this point in the history
  • Loading branch information
artntek committed May 9, 2024
2 parents 6e5eef0 + c556062 commit 9677585
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 6 deletions.
6 changes: 3 additions & 3 deletions helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.0.0
version: 1.0.1-develop

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand All @@ -31,9 +31,9 @@ appVersion: "3.0.0"

# Chart dependencies
dependencies:
- name: rabbitmq # rabbitmq version 3.10.5 is deployed by chart version 10.1.14
- name: rabbitmq
repository: https://charts.bitnami.com/bitnami
version: 10.1.14
version: 10.1.14 # rabbitmq version 3.10.5 is deployed by chart version 10.1.14
condition: rabbitmq.enabled, global.rabbitmq.enabled
- name: solr
repository: https://charts.bitnami.com/bitnami
Expand Down
27 changes: 24 additions & 3 deletions helm/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,24 @@ Create the name of the service account to use
{{- end }}
{{- end }}

{{/*
Check to see if '.Values.global "dataone-indexer.enabled' is set to true in the top-level metacat
chart. If so, we know we're running as a subchart, and can infer the 'metacat.fullname'.
If we're not running as a sub-chart, then we need to read the user-provided value from
.Values.idxworker.metacatK8sFullName
*/}}
{{- define "get.metacat.fullname" -}}
{{- if (index .Values.global "dataone-indexer.enabled") }}
{{- if contains "metacat" (lower .Release.Name) }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-metacat" .Release.Name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- else }}
{{- default "MISSING-idxworker.metacatK8sFullName-MISSING" .Values.idxworker.metacatK8sFullName }}
{{- end }}
{{- end }}

{{/*
set MN url
If we're running as a subchart, can use direct access without needing to go through ingress/https;
Expand All @@ -71,20 +89,23 @@ If connecting to an instance outside the cluster, should use https;
{{- define "idxworker.mn.url" -}}
{{- $mn_url := .Values.idxworker.mn_url }}
{{- if not $mn_url }}
{{- $mn_url = printf "http://%s-hl:8080/%s/d1/mn" .Release.Name .Values.global.metacatAppContext }}
{{- $fullname := (include "get.metacat.fullname" .) }}
{{- $mn_url = printf "http://%s-hl:8080/%s/d1/mn" $fullname .Values.global.metacatAppContext }}
{{- end }}
{{- $mn_url }}
{{- end }}
{{/*
set Claim Name of existing PVC to use (typically the volume that is shared with metacat)
Either use the value set in .Values.persistence.claimName, or if blank, autopopulate with
{podname}-metacat-{releaseName}-0 (e.g. metacatbrooke-metacat-metacatbrooke-0)
{podname}-metacat-{fullName}-0 (e.g. metacatbrooke-metacat-metacatbrooke-metacat-0)
(see 'idxworker.fullname' for logic behind how a 'fullname' is defined)
*/}}
{{- define "idxworker.shared.claimName" -}}
{{- $claimName := .Values.persistence.claimName }}
{{- if not $claimName }}
{{- $claimName = printf "%s-metacat-%s-0" .Release.Name .Release.Name }}
{{- $fullname := (include "get.metacat.fullname" .) }}
{{- $claimName = printf "%s-metacat-%s-0" .Release.Name $fullname }}
{{- end }}
{{- $claimName }}
{{- end }}
Expand Down
12 changes: 12 additions & 0 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

global:
solrPort: &global-solr-port 8983

## @param global.metacatAppContext The application context used by the metacat installation
##
metacatAppContext: metacat

## @param global.storageClass default name of the storageClass to use for PVs
Expand Down Expand Up @@ -109,6 +112,15 @@ persistence:
idxworker:
debug: "FALSE"

## @param idxworker.metacatK8sFullName ignored if deployed as subchart, else use metacat.fullname
## If deployed as a subchart, metacatK8sFullName will be ignored, and metacat.fullname will be
## retrieved automatically from the top-level metacat chart. If this not a subchart, set
## metacatK8sFullName to reflect the k8s "fullname" of the metacat installation being indexed.
## Note there is some tricky logic involved in deciding what the fullname should be - see
## "idxworker.fullname" in templates/_helpers.tpl, as an example.
##
metacatK8sFullName: ""

## @param idxworker.mn_url URL of the metacat instance that depends upon this indexer
## Leave this value unset (mn_url: "") to have it automatically populated
##
Expand Down

0 comments on commit 9677585

Please sign in to comment.