hyrax 3.0.1 → 3.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +19 -8
  3. data/.dassie/config/role_map.yml +2 -0
  4. data/.dassie/db/seeds.rb +1 -1
  5. data/.env +1 -1
  6. data/CONTAINERS.md +20 -0
  7. data/app/actors/hyrax/actors/file_set_actor.rb +10 -5
  8. data/app/controllers/hyrax/admin/permission_template_accesses_controller.rb +0 -4
  9. data/app/forms/hyrax/forms/resource_form.rb +11 -1
  10. data/app/helpers/hyrax/dashboard_helper_behavior.rb +20 -5
  11. data/app/helpers/hyrax/embargo_helper.rb +4 -0
  12. data/app/helpers/hyrax/lease_helper.rb +4 -0
  13. data/app/helpers/hyrax/url_helper.rb +4 -1
  14. data/app/indexers/hyrax/valkyrie_file_set_indexer.rb +2 -0
  15. data/app/indexers/hyrax/valkyrie_work_indexer.rb +1 -1
  16. data/app/jobs/ingest_local_file_job.rb +18 -2
  17. data/app/models/collection_branding_info.rb +25 -9
  18. data/app/models/concerns/hyrax/embargoable.rb +24 -0
  19. data/app/models/concerns/hyrax/work_behavior.rb +1 -1
  20. data/app/presenters/hyrax/admin_set_options_presenter.rb +13 -1
  21. data/app/presenters/hyrax/pcdm_member_presenter_factory.rb +119 -0
  22. data/app/presenters/hyrax/work_show_presenter.rb +5 -1
  23. data/app/search_builders/hyrax/collection_member_search_builder.rb +6 -1
  24. data/app/search_builders/hyrax/my/collections_search_builder.rb +1 -1
  25. data/app/search_builders/hyrax/nested_collections_parent_search_builder.rb +1 -1
  26. data/app/search_builders/hyrax/single_collection_search_builder.rb +1 -1
  27. data/app/services/hyrax/contextual_path.rb +1 -1
  28. data/app/services/hyrax/edit_permissions_service.rb +47 -21
  29. data/app/services/hyrax/find_objects_via_solr_service.rb +27 -0
  30. data/app/services/hyrax/multiple_membership_checker.rb +6 -2
  31. data/app/services/hyrax/solr_query_builder_service.rb +17 -3
  32. data/app/services/hyrax/visibility_intention.rb +20 -2
  33. data/app/views/hyrax/base/_form_child_work_relationships.html.erb +1 -1
  34. data/app/views/hyrax/base/_form_visibility_error.html.erb +2 -0
  35. data/app/views/hyrax/base/_guts4form.html.erb +1 -1
  36. data/app/views/hyrax/base/_show_actions.html.erb +1 -1
  37. data/app/views/hyrax/base/_work_button_row.html.erb +1 -1
  38. data/app/views/hyrax/batch_uploads/_form.html.erb +1 -1
  39. data/bin/db-migrate-seed.sh +3 -1
  40. data/bin/hyrax-entrypoint.sh +0 -14
  41. data/bin/solrcloud-assign-configset.sh +5 -0
  42. data/bin/solrcloud-upload-configset.sh +14 -5
  43. data/chart/hyrax/Chart.yaml +8 -4
  44. data/chart/hyrax/README.md +5 -4
  45. data/chart/hyrax/templates/_helpers.tpl +14 -0
  46. data/chart/hyrax/templates/branding-pvc.yaml +2 -2
  47. data/chart/hyrax/templates/configmap-env.yaml +7 -1
  48. data/chart/hyrax/templates/deployment-worker.yaml +39 -5
  49. data/chart/hyrax/templates/deployment.yaml +42 -0
  50. data/chart/hyrax/templates/derivatives-pvc.yaml +2 -2
  51. data/chart/hyrax/templates/ingress.yaml +13 -4
  52. data/chart/hyrax/templates/secrets.yaml +8 -0
  53. data/chart/hyrax/templates/uploads-pvc.yaml +2 -2
  54. data/chart/hyrax/values.yaml +71 -1
  55. data/config/initializers/valkryrie_storage.rb +7 -0
  56. data/docker-compose.yml +38 -8
  57. data/documentation/developing-your-hyrax-based-app.md +3 -3
  58. data/documentation/legacyREADME.md +4 -4
  59. data/lib/hyrax/configuration.rb +12 -0
  60. data/lib/hyrax/engine.rb +1 -0
  61. data/lib/hyrax/resource_name.rb +1 -0
  62. data/lib/hyrax/specs/capybara.rb +2 -2
  63. data/lib/hyrax/valkyrie_simple_path_generator.rb +20 -0
  64. data/lib/hyrax/version.rb +1 -1
  65. data/lib/wings.rb +0 -21
  66. data/lib/wings/active_fedora_converter/default_work.rb +15 -0
  67. data/lib/wings/model_transformer.rb +17 -1
  68. data/lib/wings/setup.rb +1 -0
  69. data/template.rb +1 -1
  70. metadata +8 -3
@@ -24,7 +24,7 @@ HTML Properties:
24
24
  </div>
25
25
  <div class="message has-warning hidden"></div>
26
26
  <div style="margin-top: 10px">
27
- <%= link_to t('.attach_new_work'), polymorphic_path([main_app, :new, :hyrax, :parent, curation_concern.model_name.singular], parent_id: curation_concern.id), target: "_blank", class: 'btn btn-primary' %>
27
+ <%= link_to t('.attach_new_work'), polymorphic_path([main_app, :new, :hyrax, :parent, curation_concern.model_name.singular.to_sym], parent_id: curation_concern.id), target: "_blank", class: 'btn btn-primary' %>
28
28
  </div>
29
29
  <table class="table table-striped">
30
30
  <caption><%= t('.caption') %></caption>
@@ -1,3 +1,5 @@
1
1
  <%= f.full_error(:visibility) %>
2
2
  <%= f.full_error(:embargo_release_date) %>
3
3
  <%= f.full_error(:visibility_after_embargo) %>
4
+ <%= f.full_error(:lease_expiration_date) %>
5
+ <%= f.full_error(:visibility_after_lease) %>
@@ -4,7 +4,7 @@
4
4
  <div class="panel panel-default tabs" role="main">
5
5
  <!-- Nav tabs -->
6
6
  <ul class="nav nav-tabs" role="tablist">
7
- <% tabs.each_with_index do | tab, i | %>
7
+ <% (tabs - ['share']).each_with_index do | tab, i | %>
8
8
  <% if i == 0 %>
9
9
  <li role="presentation" class="active">
10
10
  <% else %>
@@ -37,7 +37,7 @@
37
37
  <ul class="dropdown-menu">
38
38
  <% presenter.valid_child_concerns.each do |concern| %>
39
39
  <li>
40
- <%= link_to "Attach #{concern.human_readable_type}", polymorphic_path([main_app, :new, :hyrax, :parent, concern.model_name.singular], parent_id: presenter.id) %>
40
+ <%= link_to "Attach #{concern.human_readable_type}", polymorphic_path([main_app, :new, :hyrax, :parent, concern.model_name.singular.to_sym], parent_id: presenter.id) %>
41
41
  </li>
42
42
  <% end %>
43
43
  </ul>
@@ -12,7 +12,7 @@
12
12
  <ul class="dropdown-menu">
13
13
  <% presenter.valid_child_concerns.each do |concern| %>
14
14
  <li>
15
- <%= link_to t(".attach", type: concern.human_readable_type), polymorphic_path([main_app, :new, :hyrax, :parent, concern.model_name.singular], parent_id: presenter.id) %>
15
+ <%= link_to t(".attach", type: concern.human_readable_type), polymorphic_path([main_app, :new, :hyrax, :parent, concern.model_name.singular.to_sym], parent_id: presenter.id) %>
16
16
  </li>
17
17
  <% end %>
18
18
  </ul>
@@ -7,7 +7,7 @@
7
7
  <% provide :files_tab do %>
8
8
  <p class="instructions"><%= t("hyrax.batch_uploads.files.instructions") %></p>
9
9
  <p class="switch-upload-type"><%= t("hyrax.batch_uploads.files.upload_type_instructions") %>
10
- <%= link_to t("hyrax.batch_uploads.files.button_label"), [main_app, :new, Hyrax.primary_work_type.model_name.singular_route_key] %>
10
+ <%= link_to t("hyrax.batch_uploads.files.button_label"), [main_app, :new, Hyrax.primary_work_type.model_name.singular_route_key.to_sym] %>
11
11
  </p>
12
12
  <% end %>
13
13
  <%= render 'hyrax/base/guts4form', f: f, tabs: form_tabs_for(form: f.object) %>
@@ -5,7 +5,9 @@ db-wait.sh "$DB_HOST:$DB_PORT"
5
5
  bundle exec rails db:create
6
6
  bundle exec rails db:migrate
7
7
 
8
- db-wait.sh "$FCREPO_HOST:$FCREPO_PORT"
8
+ if [ "$FCREPO_HOST" ]; then
9
+ db-wait.sh "$FCREPO_HOST:$FCREPO_PORT"
10
+ fi
9
11
  db-wait.sh "$SOLR_HOST:$SOLR_PORT"
10
12
 
11
13
  bundle exec rails db:seed
@@ -1,20 +1,6 @@
1
1
  #!/bin/sh
2
2
  set -e
3
3
 
4
- # Make sure common volume points have the app permission
5
- chown -fR app:app /app/samvera/hyrax-webapp/tmp
6
- chown -fR app:app /app/samvera/hyrax-webapp/public
7
-
8
- if [ -v HYRAX_DERIVITIVES_PATH ]; then
9
- mkdir -p $HYRAX_DERIVITIVES_PATH
10
- chown -f -R app:app $HYRAX_DERIVATIVES_PATH
11
- fi
12
-
13
- if [ -v HYRAX_UPLOAD_PATH ]; then
14
- mkdir -p $HYRAX_UPLOAD_PATH
15
- chown -f -R app:app $HYRAX_UPLOAD_PATH
16
- fi
17
-
18
4
  mkdir -p /app/samvera/hyrax-webapp/tmp/pids
19
5
  rm -f /app/samvera/hyrax-webapp/tmp/pids/*
20
6
 
@@ -16,6 +16,11 @@ while [ $COUNTER -lt 30 ]; do
16
16
  echo $solr_collection_modify_url
17
17
  curl $solr_user_settings "$solr_collection_modify_url"
18
18
  exit
19
+ else
20
+ echo "-- Collection ${SOLR_COLLECTION_NAME} does not exist; creating and setting ${SOLR_CONFIGSET_NAME} ConfigSet ..."
21
+ solr_collection_create_url="$SOLR_HOST:$SOLR_PORT/solr/admin/collections?action=CREATE&name=$SOLR_COLLECTION_NAME&collection.configName=$SOLR_CONFIGSET_NAME&numShards=1"
22
+ curl $solr_user_settings "$solr_collection_create_url"
23
+ exit
19
24
  fi
20
25
  fi
21
26
  echo "-- Looking for Solr (${SOLR_HOST}:${SOLR_PORT})..."
@@ -15,13 +15,22 @@ solr_config_upload_url="http://$SOLR_HOST:$SOLR_PORT/solr/admin/configs?action=U
15
15
  while [ $COUNTER -lt 30 ]; do
16
16
  echo "-- Looking for Solr (${SOLR_HOST}:${SOLR_PORT})..."
17
17
  if nc -z "${SOLR_HOST}" "${SOLR_PORT}"; then
18
- if curl --silent $solr_user_settings "$solr_config_list_url" | grep -q "$SOLR_CONFIGSET_NAME"; then
19
- echo "-- ConfigSet already exists; skipping creation ...";
18
+ # shellcheck disable=SC2143,SC2086
19
+ if curl --silent --user 'fake:fake' "$solr_config_list_url" | grep -q '401'; then
20
+ # the solr pods come up and report available before they are ready to accept trusted configs
21
+ # only try to upload the config if auth is on.
22
+ if curl --silent $solr_user_settings "$solr_config_list_url" | grep -q "$SOLR_CONFIGSET_NAME"; then
23
+ echo "-- ConfigSet already exists; skipping creation ...";
24
+ else
25
+ echo "-- ConfigSet for ${CONFDIR} does not exist; creating ..."
26
+ (cd "$CONFDIR" && zip -r - *) | curl -X POST $solr_user_settings --header "Content-Type:application/octet-stream" --data-binary @- "$solr_config_upload_url"
27
+ fi
28
+ exit
20
29
  else
21
- echo "-- ConfigSet for ${CONFDIR} does not exist; creating ..."
22
- (cd "$CONFDIR" && zip -r - *) | curl -X POST $solr_user_settings --header "Content-Type:application/octet-stream" --data-binary @- "$solr_config_upload_url"
30
+ echo "-- Solr at $solr_config_list_url is accepting unauthorized connections; we can't upload a trusted ConfigSet."
31
+ echo "-- It's possible SolrCloud is bootstrapping its configuration, so this process will retry."
32
+ echo "-- see: https://solr.apache.org/guide/8_6/configsets-api.html#configsets-upload"
23
33
  fi
24
- exit
25
34
  fi
26
35
  COUNTER=$(( COUNTER+1 ));
27
36
  sleep 5s
@@ -2,17 +2,21 @@ apiVersion: v2
2
2
  name: hyrax
3
3
  description: An open-source, Samvera-powered digital repository system
4
4
  type: application
5
- version: 0.7.0
6
- appVersion: 3.0.1
5
+ version: 0.18.0
6
+ appVersion: 3.0.2
7
7
  dependencies:
8
8
  - name: fcrepo
9
- version: 0.6.0
10
- repository: https://samvera-labs.github.com/fcrepo-charts
9
+ version: 0.6.1
10
+ repository: oci://ghcr.io/samvera
11
11
  condition: fcrepo.enabled
12
12
  - name: memcached
13
13
  version: 4.2.21
14
14
  repository: https://charts.bitnami.com/bitnami
15
15
  condition: memcached.enabled
16
+ - name: minio
17
+ version: 6.7.2
18
+ repository: https://charts.bitnami.com/bitnami
19
+ condition: minio.enabled
16
20
  - name: postgresql
17
21
  version: 10.3.13
18
22
  repository: https://charts.bitnami.com/bitnami
@@ -30,11 +30,12 @@ production environments.
30
30
 
31
31
  The chart populates the following environment variables:
32
32
 
33
- |-------------------|--------------------------------|------------------------|
34
33
  | Variable | Description | Condition |
35
34
  |-------------------|--------------------------------|------------------------|
36
- | DB_HOST | Postgresql hostname | `postgresql.enabled` |
37
- | DB_PORT | Postgresql service port | `postgresql.enabled` |
35
+ | DB_PASSWORD | Postgresql password | n/a |
36
+ | DB_PORT | Postgresql service port | n/a |
37
+ | DB_HOST | Postgresql hostname | n/a |
38
+ | DB_USERNAME | Postgresql username | n/a |
38
39
  | MEMCACHED_HOST | Memcached host | `memcached.enabled` |
39
40
  | RACK_ENV | app environment ('production') | n/a |
40
41
  | RAILS_ENV | app environment ('production') | n/a |
@@ -43,6 +44,7 @@ The chart populates the following environment variables:
43
44
  | FCREPO_HOST | Fedora Commons host | n/a |
44
45
  | FCREPO_PORT | Fedora Commons port | n/a |
45
46
  | FCREPO_REST_PATH | Fedora Commons REST endpoint | n/a |
47
+ | SKIP_HYRAX_ENGINE_SEED | Flag to load Hyrax engine seed file | n/a |
46
48
  | SOLR_ADMIN_USER | Solr user for basic auth | n/a |
47
49
  | SOLR_ADMIN_PASSWORD | Solr password for basic auth | n/a |
48
50
  | SOLR_COLLECTION_NAME | The name of the solr collection to use | n/a |
@@ -50,7 +52,6 @@ The chart populates the following environment variables:
50
52
  | SOLR_HOST | Solr service host | n/a |
51
53
  | SOLR_PORT | Solr service port | n/a |
52
54
  | SOLR_URL | Solr service full URL | n/a |
53
- |----------------- -|--------------------------------|------------------------|
54
55
 
55
56
  ## With an external SolrCloud
56
57
 
@@ -82,6 +82,10 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
82
82
  {{- printf "%s-%s" .Release.Name "memcached" | trunc 63 | trimSuffix "-" -}}
83
83
  {{- end -}}
84
84
 
85
+ {{- define "hyrax.minio.fullname" -}}
86
+ {{- printf "%s-%s" .Release.Name "minio" | trunc 63 | trimSuffix "-" -}}
87
+ {{- end -}}
88
+
85
89
  {{- define "hyrax.postgresql.fullname" -}}
86
90
  {{- printf "%s-%s" .Release.Name "postgresql" | trunc 63 | trimSuffix "-" -}}
87
91
  {{- end -}}
@@ -174,3 +178,13 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
174
178
  {{- define "hyrax.redis.url" -}}
175
179
  {{- printf "redis://:%s@%s:%s" .Values.redis.password (include "hyrax.redis.host" .) "6379/0" -}}
176
180
  {{- end -}}
181
+
182
+ {{- define "hyrax.sharedPvcAccessModes" -}}
183
+ {{- if .Values.worker.enabled }}
184
+ accessModes:
185
+ - ReadWriteMany
186
+ {{- else }}
187
+ accessModes:
188
+ - ReadWriteOnce
189
+ {{- end }}
190
+ {{- end -}}
@@ -6,9 +6,9 @@ metadata:
6
6
  labels:
7
7
  {{- include "hyrax.labels" . | nindent 4 }}
8
8
  spec:
9
- accessModes:
10
- - ReadWriteMany
9
+ {{ include "hyrax.sharedPvcAccessModes" . | nindent 2 }}
11
10
  resources:
12
11
  requests:
13
12
  storage: {{ .Values.brandingVolume.size }}
13
+ storageClassName: {{ .Values.brandingVolume.storageClass }}
14
14
  {{- end }}
@@ -10,6 +10,7 @@ metadata:
10
10
  data:
11
11
  DB_HOST: {{ template "hyrax.postgresql.host" . }}
12
12
  DB_PORT: "5432"
13
+ DB_USERNAME: {{ template "hyrax.postgresql.database" . }}
13
14
  {{- if .Values.memcached.enabled }}
14
15
  MEMCACHED_HOST: {{ template "hyrax.memcached.fullname" . }}
15
16
  {{- end }}
@@ -24,13 +25,18 @@ data:
24
25
  {{- if .Values.redis.enabled }}
25
26
  REDIS_HOST: {{ template "hyrax.redis.host" . }}
26
27
  {{- end }}
28
+ {{- if .Values.fcrepo.enabled }}
27
29
  FCREPO_BASE_PATH: {{ .Values.fcrepoBasePathOverride | default (printf "/%s" (include "hyrax.fullname" .)) | quote }}
28
30
  FCREPO_HOST: {{ template "hyrax.fcrepo.host" . }}
29
31
  FCREPO_PORT: {{ .Values.fcrepo.servicePort | default 8080 | quote }}
30
32
  FCREPO_REST_PATH: {{ .Values.fcrepo.restPath | default "rest" }}
33
+ {{- end }}
31
34
  REDIS_PROVIDER: SIDEKIQ_REDIS_URL
35
+ {{- if .Values.minio.enabled }}
36
+ MINIO_ENDPOINT: {{ template "hyrax.minio.fullname" . }}
37
+ {{- end }}
38
+ SKIP_HYRAX_ENGINE_SEED: {{ .Values.skipHyraxEngineSeed | default 0 | quote }}
32
39
  SOLR_ADMIN_USER: {{ template "hyrax.solr.username" . }}
33
- SOLR_ADMIN_PASSWORD: {{ template "hyrax.solr.password" . }}
34
40
  SOLR_COLLECTION_NAME: {{ template "hyrax.solr.collectionName" . }}
35
41
  SOLR_CONFIGSET_NAME: {{ template "hyrax.fullname" . }}
36
42
  SOLR_HOST: {{ template "hyrax.solr.host" . }}
@@ -1,3 +1,4 @@
1
+ {{- if .Values.worker.enabled }}
1
2
  apiVersion: apps/v1
2
3
  kind: Deployment
3
4
  metadata:
@@ -19,6 +20,9 @@ spec:
19
20
  {{- include "hyrax.selectorLabels" . | nindent 8 }}
20
21
  spec:
21
22
  initContainers:
23
+ {{- if .Values.worker.extraInitContainers }}
24
+ {{- toYaml .Values.worker.extraInitContainers | nindent 8 }}
25
+ {{- end }}
22
26
  - name: db-wait
23
27
  image: "{{ .Values.worker.image.repository }}:{{ .Values.worker.image.tag | default .Chart.AppVersion }}"
24
28
  imagePullPolicy: {{ .Values.worker.image.pullPolicy }}
@@ -27,17 +31,23 @@ spec:
27
31
  name: {{ include "hyrax.fullname" . }}-env
28
32
  - secretRef:
29
33
  name: {{ template "hyrax.fullname" . }}
34
+ env:
35
+ {{- toYaml .Values.worker.extraEnvVars | nindent 12 }}
30
36
  command:
31
37
  - sh
32
38
  - -c
33
- - db-wait.sh "$DB_HOST:$DB_PORT"
34
- - db-wait.sh "$FCREPO_HOST:$FCREPO_PORT"
35
- - db-wait.sh "$SOLR_HOST:$SOLR_PORT"
39
+ - db-wait.sh "$REDIS_HOST:6379"
40
+ {{- with .Values.imagePullSecrets }}
41
+ imagePullSecrets:
42
+ {{- toYaml . | nindent 8 }}
43
+ {{- end }}
36
44
  serviceAccountName: {{ include "hyrax.serviceAccountName" . }}
37
45
  securityContext:
38
- {{- toYaml .Values.podSecurityContext | nindent 8 }}
46
+ {{- toYaml .Values.worker.podSecurityContext | nindent 8 }}
39
47
  containers:
40
48
  - name: {{ .Chart.Name }}-worker
49
+ securityContext:
50
+ {{- toYaml .Values.worker.securityContext | nindent 12 }}
41
51
  image: "{{ .Values.worker.image.repository }}:{{ .Values.worker.image.tag | default .Chart.AppVersion }}"
42
52
  imagePullPolicy: {{ .Values.worker.image.pullPolicy }}
43
53
  envFrom:
@@ -45,6 +55,15 @@ spec:
45
55
  name: {{ include "hyrax.fullname" . }}-env
46
56
  - secretRef:
47
57
  name: {{ template "hyrax.fullname" . }}
58
+ {{- if .Values.solrExistingSecret }}
59
+ - secretRef:
60
+ name: {{ .Values.solrExistingSecret }}
61
+ {{- end }}
62
+ {{- with .Values.worker.extraEnvFrom }}
63
+ {{- toYaml . | nindent 12 }}
64
+ {{- end }}
65
+ env:
66
+ {{- toYaml .Values.worker.extraEnvVars | nindent 12 }}
48
67
  volumeMounts:
49
68
  - name: derivatives
50
69
  mountPath: /app/samvera/derivatives
@@ -54,6 +73,13 @@ spec:
54
73
  - name: uploads
55
74
  subPath: uploads
56
75
  mountPath: /app/samvera/uploads
76
+ {{- if .Values.applicationExistingClaim }}
77
+ - name: application
78
+ mountPath: /app/samvera/hyrax-webapp
79
+ {{- end }}
80
+ {{- with .Values.worker.extraVolumeMounts }}
81
+ {{- toYaml . | nindent 12 }}
82
+ {{- end }}
57
83
  resources:
58
84
  {{- toYaml .Values.worker.resources | nindent 12 }}
59
85
  volumes:
@@ -77,7 +103,14 @@ spec:
77
103
  {{ else }}
78
104
  emptyDir: {}
79
105
  {{ end }}
80
-
106
+ {{- if .Values.applicationExistingClaim }}
107
+ - name: "application"
108
+ persistentVolumeClaim:
109
+ claimName: {{ .Values.applicationExistingClaim }}
110
+ {{- end }}
111
+ {{- with .Values.worker.extraVolumes }}
112
+ {{- toYaml . | nindent 8 }}
113
+ {{- end }}
81
114
  {{- with .Values.worker.nodeSelector }}
82
115
  nodeSelector:
83
116
  {{- toYaml . | nindent 8 }}
@@ -90,3 +123,4 @@ spec:
90
123
  tolerations:
91
124
  {{- toYaml . | nindent 8 }}
92
125
  {{- end }}
126
+ {{- end }}
@@ -21,6 +21,9 @@ spec:
21
21
  {{- include "hyrax.selectorLabels" . | nindent 8 }}
22
22
  spec:
23
23
  initContainers:
24
+ {{- if .Values.extraInitContainers }}
25
+ {{- toYaml .Values.extraInitContainers | nindent 8 }}
26
+ {{- end }}
24
27
  {{- if .Values.loadSolrConfigSet }}
25
28
  - name: load-solr-config
26
29
  image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
@@ -30,6 +33,12 @@ spec:
30
33
  name: {{ include "hyrax.fullname" . }}-env
31
34
  - secretRef:
32
35
  name: {{ include "hyrax.fullname" . }}
36
+ {{- if .Values.solrExistingSecret }}
37
+ - secretRef:
38
+ name: {{ .Values.solrExistingSecret }}
39
+ {{- end }}
40
+ env:
41
+ {{- toYaml .Values.extraEnvVars | nindent 12 }}
33
42
  command:
34
43
  - sh
35
44
  - -c
@@ -45,6 +54,15 @@ spec:
45
54
  name: {{ include "hyrax.fullname" . }}-env
46
55
  - secretRef:
47
56
  name: {{ template "hyrax.fullname" . }}
57
+ {{- if .Values.solrExistingSecret }}
58
+ - secretRef:
59
+ name: {{ .Values.solrExistingSecret }}
60
+ {{- end }}
61
+ {{- with .Values.extraEnvFrom }}
62
+ {{- toYaml . | nindent 12 }}
63
+ {{- end }}
64
+ env:
65
+ {{- toYaml .Values.extraEnvVars | nindent 12 }}
48
66
  command:
49
67
  - sh
50
68
  - -c
@@ -67,6 +85,15 @@ spec:
67
85
  name: {{ include "hyrax.fullname" . }}-env
68
86
  - secretRef:
69
87
  name: {{ template "hyrax.fullname" . }}
88
+ {{- if .Values.solrExistingSecret }}
89
+ - secretRef:
90
+ name: {{ .Values.solrExistingSecret }}
91
+ {{- end }}
92
+ {{- with .Values.extraEnvFrom }}
93
+ {{- toYaml . | nindent 12 }}
94
+ {{- end }}
95
+ env:
96
+ {{- toYaml .Values.extraEnvVars | nindent 12 }}
70
97
  ports:
71
98
  - name: http
72
99
  containerPort: 3000
@@ -106,6 +133,13 @@ spec:
106
133
  - name: uploads
107
134
  subPath: uploads
108
135
  mountPath: /app/samvera/uploads
136
+ {{- if .Values.applicationExistingClaim }}
137
+ - name: application
138
+ mountPath: /app/samvera/hyrax-webapp
139
+ {{- end }}
140
+ {{- with .Values.extraVolumeMounts }}
141
+ {{- toYaml . | nindent 12 }}
142
+ {{- end }}
109
143
  resources:
110
144
  {{- toYaml .Values.resources | nindent 12 }}
111
145
  volumes:
@@ -139,6 +173,14 @@ spec:
139
173
  {{ else }}
140
174
  emptyDir: {}
141
175
  {{ end }}
176
+ {{- if .Values.applicationExistingClaim }}
177
+ - name: "application"
178
+ persistentVolumeClaim:
179
+ claimName: {{ .Values.applicationExistingClaim }}
180
+ {{- end }}
181
+ {{- with .Values.extraVolumes }}
182
+ {{- toYaml . | nindent 8 }}
183
+ {{- end }}
142
184
  {{- with .Values.nodeSelector }}
143
185
  nodeSelector:
144
186
  {{- toYaml . | nindent 8 }}
@@ -6,9 +6,9 @@ metadata:
6
6
  labels:
7
7
  {{- include "hyrax.labels" . | nindent 4 }}
8
8
  spec:
9
- accessModes:
10
- - ReadWriteMany
9
+ {{ include "hyrax.sharedPvcAccessModes" . | nindent 2 }}
11
10
  resources:
12
11
  requests:
13
12
  storage: {{ .Values.derivativesVolume.size }}
13
+ storageClassName: {{ .Values.derivativesVolume.storageClass }}
14
14
  {{- end }}