Skip to content

Commit

Permalink
ephemeral storageClass; reorder initcontainers
Browse files Browse the repository at this point in the history
  • Loading branch information
artntek committed Nov 21, 2023
1 parent ec16360 commit f1d0448
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 45 deletions.
2 changes: 1 addition & 1 deletion helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ version: 0.5.0
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "2.4.0"
appVersion: "3.0.0-SNAPSHOT"

# Chart dependencies
dependencies:
Expand Down
23 changes: 0 additions & 23 deletions helm/templates/_storage.tpl

This file was deleted.

20 changes: 11 additions & 9 deletions helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@ spec:
optional: true
{{ end }}
initContainers:
- name: init-rabbitmq
image: busybox:latest
command:
- sh
- -c
- >
until nc -z {{ .Values.rabbitmq.hostname }} {{ .Values.rabbitmq.hostport }} >
{{- print " " }}/dev/null; do echo waiting for RabbitMQ; sleep 2; done;
- name: init-solr
image: busybox:latest
command:
Expand All @@ -92,14 +100,6 @@ spec:
{{ .Values.solr.service.ports.http }} | grep -c "<schema name=\"dataone") == 1 ]]; do
echo waiting for Solr Schema to be accessible at http://{{ .Values.solr.hostname }}:
{{- .Values.solr.service.ports.http }}$URI; sleep 1; done;
- name: init-rabbitmq
image: busybox:latest
command:
- sh
- -c
- >
until nc -z {{ .Values.rabbitmq.hostname }} {{ .Values.rabbitmq.hostport }} >
{{- print " " }}/dev/null; do echo waiting for RabbitMQ; sleep 2; done;
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand All @@ -126,7 +126,9 @@ spec:
volumeClaimTemplate:
spec:
accessModes: [ "ReadWriteOnce" ]
{{ include "common.storage.class" (dict "persistence" .Values.persistence "global" .Values.global) }}
{{- if .Values.persistence.ephemeralVolumeStorageClass }}
storageClassName: {{ .Values.persistence.ephemeralVolumeStorageClass }}
{{ end -}}
resources:
requests:
storage: 1Gi
35 changes: 23 additions & 12 deletions helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@

global:
solrPort: &global-solr-port 8983
## Leave commented out to use default, if one is set on your cluster
# storageClass:

replicaCount: 1
## @param global.storageClass default name of the storageClass to use for PVs
## Comment out to use default, if one is set on your cluster
##
## To inspect your cluster to see what storageClass names are supported:
## $ kubectl get storageclass
## (e.g. for Rancher Desktop, use: storageClass: local-path)
storageClass: csi-rbd-sc

image:
repository: ghcr.io/dataoneorg/dataone-index-worker
Expand All @@ -30,16 +34,11 @@ serviceAccount:

podAnnotations: {}

podSecurityContext: {}
# fsGroup: 2000
podSecurityContext:
fsGroup: 1001

securityContext: {}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000
securityContext:
runAsNonRoot: true

resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
Expand All @@ -60,6 +59,9 @@ autoscaling:
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80

## @param replicaCount Number of desired index worker pods. NOTE ignored if autoscaling.enabled=true
#replicaCount: 1

nodeSelector: {}

tolerations: []
Expand All @@ -70,11 +72,20 @@ persistence:
claimName: d1index-metacat-pvc
volumeName: d1index-metacat-pv
mountPath: /var/metacat
## Optional storage class that allows ephemeral volumes to get cleaned up automatically
ephemeralVolumeStorageClass: csi-cephfs-sc

# Values for the IndexWorker
idxworker:
## @param idxworker.mn_url URL of the metacat instance that depends upon this indexer
##
mn_url: "https://valley.duckdns.org/metacat/d1/mn"

## @param idxworker.cn_url URL of the CN
##
cn_url: "https://cn.dataone.org/cn"

## Location of docs/data within the metacat shared volume
data_directory: /var/metacat/data
document_directory: /var/metacat/documents
# The size of the thread pool which processes the index tasks
Expand Down

0 comments on commit f1d0448

Please sign in to comment.