hyrax 3.0.0 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/.dassie/config/initializers/riiif.rb +22 -20
  3. data/.dassie/package.json +3 -5
  4. data/Dockerfile +34 -14
  5. data/app/controllers/hyrax/dashboard/collections_controller.rb +2 -4
  6. data/app/forms/hyrax/forms/collection_form.rb +5 -3
  7. data/app/indexers/hyrax/valkyrie_indexer.rb +2 -1
  8. data/app/presenters/hyrax/collection_presenter.rb +10 -14
  9. data/app/services/hyrax/listeners.rb +2 -0
  10. data/app/services/hyrax/listeners/member_cleanup_listener.rb +26 -0
  11. data/app/services/hyrax/listeners/object_lifecycle_listener.rb +1 -1
  12. data/app/services/hyrax/listeners/trophy_cleanup_listener.rb +17 -0
  13. data/app/services/hyrax/persist_derivatives.rb +3 -1
  14. data/app/services/hyrax/thumbnail_path_service.rb +1 -1
  15. data/app/services/hyrax/visibility_propagator.rb +30 -1
  16. data/app/views/hyrax/collections/show.html.erb +1 -1
  17. data/app/views/hyrax/dashboard/collections/_form_branding.html.erb +1 -1
  18. data/app/views/hyrax/file_sets/_actions.html.erb +10 -0
  19. data/chart/hyrax/Chart.yaml +2 -2
  20. data/chart/hyrax/templates/_helpers.tpl +8 -0
  21. data/chart/hyrax/templates/branding-pvc.yaml +14 -0
  22. data/chart/hyrax/templates/configmap-env.yaml +8 -1
  23. data/chart/hyrax/templates/deployment-worker.yaml +92 -0
  24. data/chart/hyrax/templates/deployment.yaml +42 -0
  25. data/chart/hyrax/templates/derivatives-pvc.yaml +14 -0
  26. data/chart/hyrax/templates/secrets.yaml +1 -0
  27. data/chart/hyrax/templates/uploads-pvc.yaml +14 -0
  28. data/chart/hyrax/values.yaml +31 -0
  29. data/config/features.rb +47 -43
  30. data/config/initializers/listeners.rb +2 -0
  31. data/documentation/developing-your-hyrax-based-app.md +4 -4
  32. data/documentation/legacyREADME.md +4 -4
  33. data/lib/generators/hyrax/templates/config/initializers/riiif.rb +22 -20
  34. data/lib/hyrax/configuration.rb +8 -0
  35. data/lib/hyrax/engine.rb +1 -1
  36. data/lib/hyrax/valkyrie_can_can_adapter.rb +2 -0
  37. data/lib/hyrax/version.rb +1 -1
  38. data/lib/wings/converter_value_mapper.rb +2 -2
  39. data/lib/wings/valkyrie/persister.rb +7 -5
  40. data/lib/wings/valkyrie/query_service.rb +60 -17
  41. data/template.rb +1 -1
  42. metadata +8 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 92a018038d9094f92a85088a61ff697aba139a326cfa96a95a7d4cdbeca98a0a
4
- data.tar.gz: 8ca7c54444ba58ba89f2fc977ddcb8597122b985c9d7a7dda21d64fdcc87e648
3
+ metadata.gz: '081daeb5064ca757527e98cfbbea41846b8a15440a26a2d152b1ad7a1c7f395b'
4
+ data.tar.gz: 70e52823ff8ef7546510db08f28c22207488952f146be3bb63b9ecba440ebb81
5
5
  SHA512:
6
- metadata.gz: d5a60ae3e20bead1941c72d241bfa4fbee221eb6bf4637ad1bf58a53edd07eaaa741108707d06ece69b096b83132512875555fc64c6128b3a0c1046b079cbf9a
7
- data.tar.gz: 64b2ef5c948183fa190b4f20adfae67ef22a8abc83df98c4e4581cbe83d960b3dc8d67b0453c062da5940d76f915a496fcb16f3b3a29aa63ffdeb2f0b443dab3
6
+ metadata.gz: a36054d54da990c0ea0ab03ce538a903ceed121026e1ac160b1dc2226a21fc12a8b8d422d99b71e545048af33318ab86ae90e8e3a906b6bcb1061983059ac4d4
7
+ data.tar.gz: 5b8b6759915c77982125b0c33b6f8681dd7ea61c0cce63b0665567fd00e47be468d097e6653cdfd65df5db35ff1ac4f01c98cb39b12d774c741b8cd6ff086e1a
@@ -1,27 +1,29 @@
1
1
  # frozen_string_literal: true
2
- Riiif::Image.file_resolver = Riiif::HttpFileResolver.new
3
- Riiif::Image.info_service = lambda do |id, _file|
4
- # id will look like a path to a pcdm:file
5
- # (e.g. rv042t299%2Ffiles%2F6d71677a-4f80-42f1-ae58-ed1063fd79c7)
6
- # but we just want the id for the FileSet it's attached to.
2
+ ActiveSupport::Reloader.to_prepare do
3
+ Riiif::Image.file_resolver = Riiif::HttpFileResolver.new
4
+ Riiif::Image.info_service = lambda do |id, _file|
5
+ # id will look like a path to a pcdm:file
6
+ # (e.g. rv042t299%2Ffiles%2F6d71677a-4f80-42f1-ae58-ed1063fd79c7)
7
+ # but we just want the id for the FileSet it's attached to.
7
8
 
8
- # Capture everything before the first slash
9
- fs_id = id.sub(/\A([^\/]*)\/.*/, '\1')
10
- resp = Hyrax::SolrService.get("id:#{fs_id}")
11
- doc = resp['response']['docs'].first
12
- raise "Unable to find solr document with id:#{fs_id}" unless doc
13
- { height: doc['height_is'], width: doc['width_is'], format: doc['mime_type_ssi'], channels: doc['alpha_channels_ssi'] }
14
- end
9
+ # Capture everything before the first slash
10
+ fs_id = id.sub(/\A([^\/]*)\/.*/, '\1')
11
+ resp = Hyrax::SolrService.get("id:#{fs_id}")
12
+ doc = resp['response']['docs'].first
13
+ raise "Unable to find solr document with id:#{fs_id}" unless doc
14
+ { height: doc['height_is'], width: doc['width_is'], format: doc['mime_type_ssi'], channels: doc['alpha_channels_ssi'] }
15
+ end
15
16
 
16
- Riiif::Image.file_resolver.id_to_uri = lambda do |id|
17
- Hyrax::Base.id_to_uri(CGI.unescape(id)).tap do |url|
18
- Rails.logger.info "Riiif resolved #{id} to #{url}"
17
+ Riiif::Image.file_resolver.id_to_uri = lambda do |id|
18
+ Hyrax::Base.id_to_uri(CGI.unescape(id)).tap do |url|
19
+ Rails.logger.info "Riiif resolved #{id} to #{url}"
20
+ end
19
21
  end
20
- end
21
22
 
22
- Riiif::Image.authorization_service = Hyrax::IIIFAuthorizationService
23
+ Riiif::Image.authorization_service = Hyrax::IIIFAuthorizationService
23
24
 
24
- Riiif.not_found_image = Rails.root.join('app', 'assets', 'images', 'us_404.svg')
25
- Riiif.unauthorized_image = Rails.root.join('app', 'assets', 'images', 'us_404.svg')
25
+ Riiif.not_found_image = Rails.root.join('app', 'assets', 'images', 'us_404.svg')
26
+ Riiif.unauthorized_image = Rails.root.join('app', 'assets', 'images', 'us_404.svg')
26
27
 
27
- Riiif::Engine.config.cache_duration = 365.days
28
+ Riiif::Engine.config.cache_duration = 365.days
29
+ end
data/.dassie/package.json CHANGED
@@ -8,10 +8,8 @@
8
8
  "scripts": {
9
9
  "preinstall": "rm -rf ./public/uv",
10
10
  "postinstall": "yarn run uv-install && yarn run uv-config",
11
- "uv-install": "shx cp -r ./node_modules/universalviewer/dist ./public/uv",
12
- "uv-config": "shx cp ./config/uv/uv.html ./public/uv/uv.html & shx cp ./config/uv/uv-config.json ./public/uv/"
11
+ "uv-install": "cp -r ./node_modules/universalviewer/dist ./public/uv",
12
+ "uv-config": "cp ./config/uv/uv.html ./public/uv/uv.html & cp ./config/uv/uv-config.json ./public/uv/"
13
13
  },
14
- "devDependencies": {
15
- "shx": "^0.3.2"
16
- }
14
+ "devDependencies": {}
17
15
  }
data/Dockerfile CHANGED
@@ -43,21 +43,8 @@ ONBUILD COPY --chown=1001:101 $APP_PATH /app/samvera/hyrax-webapp
43
43
  ONBUILD RUN bundle install --jobs "$(nproc)"
44
44
  ONBUILD RUN RAILS_ENV=production SECRET_KEY_BASE=`bin/rake secret` DB_ADAPTER=nulldb DATABASE_URL='postgresql://fake' bundle exec rake assets:precompile
45
45
 
46
- FROM hyrax-base as hyrax-engine-dev
47
-
48
- ARG APP_PATH=.dassie
49
- ARG BUNDLE_WITHOUT=
50
-
51
- ENV HYRAX_ENGINE_PATH /app/samvera/hyrax-engine
52
-
53
- COPY --chown=1001:101 $APP_PATH /app/samvera/hyrax-webapp
54
- COPY --chown=1001:101 . /app/samvera/hyrax-engine
55
-
56
- RUN cd /app/samvera/hyrax-engine && bundle install --jobs "$(nproc)"
57
- RUN RAILS_ENV=production SECRET_KEY_BASE='fakesecret1234' DB_ADAPTER=nulldb DATABASE_URL='postgresql://fake' bundle exec rake assets:precompile
58
46
 
59
-
60
- FROM hyrax-engine-dev as hyrax-engine-dev-worker
47
+ FROM hyrax-base as hyrax-worker
61
48
 
62
49
  ENV MALLOC_ARENA_MAX=2
63
50
 
@@ -77,4 +64,37 @@ RUN mkdir -p /app/fits && \
77
64
  chmod a+x /app/fits/fits.sh
78
65
  ENV PATH="${PATH}:/app/fits"
79
66
 
67
+ ARG APP_PATH=.
68
+ ARG BUNDLE_WITHOUT="development test"
69
+
70
+ ONBUILD COPY --chown=1001:101 $APP_PATH /app/samvera/hyrax-webapp
71
+ ONBUILD RUN bundle install --jobs "$(nproc)"
72
+
80
73
  CMD bundle exec sidekiq
74
+
75
+
76
+ FROM hyrax-base as hyrax-engine-dev
77
+
78
+ ARG APP_PATH=.dassie
79
+ ARG BUNDLE_WITHOUT=
80
+
81
+ ENV HYRAX_ENGINE_PATH /app/samvera/hyrax-engine
82
+
83
+ COPY --chown=1001:101 $APP_PATH /app/samvera/hyrax-webapp
84
+ COPY --chown=1001:101 . /app/samvera/hyrax-engine
85
+
86
+ RUN cd /app/samvera/hyrax-engine && bundle install --jobs "$(nproc)"
87
+ RUN RAILS_ENV=production SECRET_KEY_BASE='fakesecret1234' DB_ADAPTER=nulldb DATABASE_URL='postgresql://fake' bundle exec rake assets:precompile
88
+
89
+
90
+ FROM hyrax-worker as hyrax-engine-dev-worker
91
+
92
+ ARG APP_PATH=.dassie
93
+ ARG BUNDLE_WITHOUT=
94
+
95
+ ENV HYRAX_ENGINE_PATH /app/samvera/hyrax-engine
96
+
97
+ COPY --chown=1001:101 $APP_PATH /app/samvera/hyrax-webapp
98
+ COPY --chown=1001:101 . /app/samvera/hyrax-engine
99
+
100
+ RUN cd /app/samvera/hyrax-engine && bundle install --jobs "$(nproc)"
@@ -69,10 +69,8 @@ module Hyrax
69
69
  end
70
70
 
71
71
  def show
72
- if @collection.collection_type.brandable?
73
- banner_info = CollectionBrandingInfo.where(collection_id: @collection.id.to_s).where(role: "banner")
74
- @banner_file = "/" + banner_info.first.local_path.split("/")[-4..-1].join("/") unless banner_info.empty?
75
- end
72
+ # @todo: remove this unused assignment in 4.0.0
73
+ @banner_file = presenter.banner_file if @collection.collection_type.brandable?
76
74
 
77
75
  presenter
78
76
  query_collection_members
@@ -80,18 +80,20 @@ module Hyrax
80
80
  def banner_info
81
81
  @banner_info ||= begin
82
82
  # Find Banner filename
83
- banner_info = CollectionBrandingInfo.where(collection_id: id).where(role: "banner")
83
+ banner_info = CollectionBrandingInfo.where(collection_id: id, role: "banner")
84
84
  banner_file = File.split(banner_info.first.local_path).last unless banner_info.empty?
85
+ alttext = banner_info.first.alt_text unless banner_info.empty?
85
86
  file_location = banner_info.first.local_path unless banner_info.empty?
86
87
  relative_path = "/" + banner_info.first.local_path.split("/")[-4..-1].join("/") unless banner_info.empty?
87
- { file: banner_file, full_path: file_location, relative_path: relative_path }
88
+ { file: banner_file, full_path: file_location, relative_path: relative_path, alttext: alttext }
88
89
  end
89
90
  end
90
91
 
91
92
  def logo_info
92
93
  @logo_info ||= begin
93
94
  # Find Logo filename, alttext, linktext
94
- logos_info = CollectionBrandingInfo.where(collection_id: id).where(role: "logo")
95
+ logos_info = CollectionBrandingInfo.where(collection_id: id, role: "logo")
96
+
95
97
  logos_info.map do |logo_info|
96
98
  logo_file = File.split(logo_info.local_path).last
97
99
  relative_path = "/" + logo_info.local_path.split("/")[-4..-1].join("/")
@@ -69,7 +69,8 @@ module Hyrax
69
69
  {
70
70
  "id": resource.id.to_s,
71
71
  "created_at_dtsi": resource.created_at,
72
- "updated_at_dtsi": resource.updated_at
72
+ "updated_at_dtsi": resource.updated_at,
73
+ "has_model_ssim": resource.internal_resource
73
74
  }
74
75
  end
75
76
 
@@ -119,25 +119,21 @@ module Hyrax
119
119
  Hyrax::Engine.routes.url_helpers.dashboard_collection_path(id, locale: I18n.locale)
120
120
  end
121
121
 
122
+ ##
123
+ # @return [#to_s, nil] a download path for the banner file
122
124
  def banner_file
123
- # Find Banner filename
124
- ci = CollectionBrandingInfo.where(collection_id: id, role: "banner")
125
- "/" + ci[0].local_path.split("/")[-4..-1].join("/") unless ci.empty?
125
+ banner = CollectionBrandingInfo.find_by(collection_id: id, role: "banner")
126
+ "/" + banner.local_path.split("/")[-4..-1].join("/") if banner
126
127
  end
127
128
 
128
129
  def logo_record
129
- logo_info = []
130
- # Find Logo filename, alttext, linktext
131
- cis = CollectionBrandingInfo.where(collection_id: id, role: "logo")
132
- return if cis.empty?
133
- cis.each do |coll_info|
134
- logo_file = File.split(coll_info.local_path).last
135
- file_location = "/" + coll_info.local_path.split("/")[-4..-1].join("/") unless logo_file.empty?
136
- alttext = coll_info.alt_text
137
- linkurl = coll_info.target_url
138
- logo_info << { file: logo_file, file_location: file_location, alttext: alttext, linkurl: linkurl }
130
+ CollectionBrandingInfo.where(collection_id: id, role: "logo")
131
+ .select(:local_path, :alt_text, :target_url).map do |logo|
132
+ { alttext: logo.alt_text,
133
+ file: File.split(logo.local_path).last,
134
+ file_location: "/#{logo.local_path.split('/')[-4..-1].join('/')}",
135
+ linkurl: logo.target_url }
139
136
  end
140
- logo_info
141
137
  end
142
138
 
143
139
  # A presenter for selecting a work type to create
@@ -14,9 +14,11 @@ module Hyrax
14
14
  autoload :BatchNotificationListener
15
15
  autoload :FileSetLifecycleListener
16
16
  autoload :FileSetLifecycleNotificationListener
17
+ autoload :MemberCleanupListener
17
18
  autoload :MetadataIndexListener
18
19
  autoload :ObjectLifecycleListener
19
20
  autoload :ProxyDepositListener
21
+ autoload :TrophyCleanupListener
20
22
  autoload :WorkflowListener
21
23
  end
22
24
  end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Hyrax
4
+ module Listeners
5
+ ##
6
+ # Listens for object deleted events and cleans up associated members
7
+ class MemberCleanupListener
8
+ def on_object_deleted(event)
9
+ return unless event.payload.key?(:object) # legacy callback
10
+ return if event[:object].is_a?(ActiveFedora::Base) # handled by legacy code
11
+
12
+ Hyrax.custom_queries.find_child_filesets(resource: event[:object]).each do |file_set|
13
+ begin
14
+ Hyrax.persister.delete(resource: file_set)
15
+ Hyrax.publisher
16
+ .publish('object.deleted', object: file_set, id: file_set.id, user: user)
17
+ rescue StandardError # we don't uncaught errors looping filesets
18
+ Hyrax.logger.warn "Failed to delete #{file_set.class}:#{file_set.id} " \
19
+ "during cleanup for resource: #{event[:object]}. " \
20
+ 'This member may now be orphaned.'
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
@@ -8,7 +8,7 @@ module Hyrax
8
8
  ##
9
9
  # @param event [Dry::Event]
10
10
  def on_object_deleted(event)
11
- ContentDeleteEventJob.perform_later(event[:id], event[:user])
11
+ ContentDeleteEventJob.perform_later(event[:id].to_s, event[:user])
12
12
  end
13
13
 
14
14
  ##
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Hyrax
4
+ module Listeners
5
+ ##
6
+ # Listens for object deleted events and cleans up associated members
7
+ class TrophyCleanupListener
8
+ def on_object_deleted(event)
9
+ Trophy.where(work_id: event[:id]).destroy_all
10
+ rescue StandardError => err
11
+ Hyrax.logger.warn "Failed to delete trophies for #{event[:id]}. " \
12
+ 'These trophies might be orphaned.' \
13
+ "\n\t#{err.message}"
14
+ end
15
+ end
16
+ end
17
+ end
@@ -18,7 +18,6 @@ module Hyrax
18
18
  # Open the output file to write and yield the block to the
19
19
  # file. It makes the directories in the path if necessary.
20
20
  def self.output_file(directives, &blk)
21
- # name = derivative_path_factory.derivative_path_for_reference(object, destination_name)
22
21
  raise ArgumentError, "No :url was provided in the transcoding directives" unless directives.key?(:url)
23
22
  uri = URI(directives.fetch(:url))
24
23
  raise ArgumentError, "Must provide a file uri" unless uri.scheme == 'file'
@@ -27,7 +26,10 @@ module Hyrax
27
26
  File.open(uri.path, 'wb', &blk)
28
27
  end
29
28
 
29
+ ##
30
+ # @deprecated
30
31
  def self.derivative_path_factory
32
+ Deprecation.warn("Use 'Hyrax::DerivativePath' instead.")
31
33
  DerivativePath
32
34
  end
33
35
  end
@@ -30,7 +30,7 @@ module Hyrax
30
30
  def fetch_thumbnail(object)
31
31
  return object if object.thumbnail_id == object.id
32
32
  Hyrax.query_service.find_by_alternate_identifier(alternate_identifier: object.thumbnail_id)
33
- rescue Hyrax::ObjectNotFoundError
33
+ rescue Valkyrie::Persistence::ObjectNotFoundError, Hyrax::ObjectNotFoundError
34
34
  Rails.logger.error("Couldn't find thumbnail #{object.thumbnail_id} for #{object.id}")
35
35
  nil
36
36
  end
@@ -2,7 +2,7 @@
2
2
  module Hyrax
3
3
  ##
4
4
  # @abstract Propagates visibility from a provided object (e.g. a Work) to some
5
- # group of its members (e.g. file_sets).
5
+ # group of its members (e.g. file_sets).
6
6
  class VisibilityPropagator
7
7
  ##
8
8
  # @param source [#visibility] the object to propagate visibility from
@@ -14,6 +14,35 @@ module Hyrax
14
14
  FileSetVisibilityPropagator.new(source: source)
15
15
  when Hyrax::Resource # Valkyrie
16
16
  ResourceVisibilityPropagator.new(source: source)
17
+ else
18
+ NullVisibilityPropogator.new(source: source)
19
+ end
20
+ end
21
+
22
+ ##
23
+ # Provides a null/logging implementation of the visibility propogator.
24
+ class NullVisibilityPropogator
25
+ ##
26
+ # @!attribute [rw] source
27
+ # @return [#visibility]
28
+ attr_accessor :source
29
+
30
+ ##
31
+ # @param source [#visibility] the object to propagate visibility from
32
+ def initialize(source:)
33
+ self.source = source
34
+ end
35
+
36
+ ##
37
+ # @return [void]
38
+ # @raise [RuntimeError] if we're in development mode
39
+ def propogate
40
+ message = "Tried to propogate visibility to members of #{source} " \
41
+ "but didn't know what kind of object it is. Model " \
42
+ "name #{source.try(:model_name)}. Called from #{caller[0]}."
43
+
44
+ Hyrax.logger.warn(message)
45
+ Rails.env.development? ? raise(message) : :noop
17
46
  end
18
47
  end
19
48
  end
@@ -3,7 +3,7 @@
3
3
  <div class="row hyc-header">
4
4
  <div class="col-md-12">
5
5
 
6
- <% unless @presenter.banner_file.blank? %>
6
+ <% if @presenter.banner_file.present? %>
7
7
  <div class="hyc-banner" style="background-image:url(<%= @presenter.banner_file %>)">
8
8
  <% else %>
9
9
  <div class="hyc-generic">
@@ -60,7 +60,7 @@
60
60
  <div class="banner-image">
61
61
  <i><%= image_tag(f.object.banner_info[:relative_path],
62
62
  size: "800x100",
63
- alt: "Unable to display banner: #{f.object.banner_info[:file]}") %></i>
63
+ alt: f.object.banner_info[:alttext].presence || f.object.banner_info[:file]) %></i>
64
64
  </div>
65
65
  <% end %>
66
66
  </div> <!-- end banner -->
@@ -1,4 +1,13 @@
1
1
  <% if (can?(:download, file_set.id) || can?(:destroy, file_set.id) || can?(:edit, file_set.id)) && !workflow_restriction?(file_set.parent) %>
2
+ <% if can?(:download, file_set.id) && !(can?(:edit, file_set.id) || can?(:destroy, file_set.id)) %>
3
+ <%= link_to t('.download'),
4
+ hyrax.download_path(file_set),
5
+ class: 'btn btn-default btn-sm',
6
+ title: t('.download_title', file_set: file_set),
7
+ target: "_blank",
8
+ id: "file_download",
9
+ data: { label: file_set.id } %>
10
+ <% else %>
2
11
  <div class="btn-group">
3
12
  <button class="btn btn-default dropdown-toggle" data-toggle="dropdown" type="button" id="dropdownMenu_<%= file_set.id %>" aria-haspopup="true" aria-expanded="false">
4
13
  <span class="sr-only"><%= t('.press_to') %> </span>
@@ -40,4 +49,5 @@
40
49
 
41
50
  </ul>
42
51
  </div>
52
+ <% end %>
43
53
  <% end %>
@@ -2,8 +2,8 @@ apiVersion: v2
2
2
  name: hyrax
3
3
  description: An open-source, Samvera-powered digital repository system
4
4
  type: application
5
- version: 0.6.0
6
- appVersion: 3.0.0
5
+ version: 0.7.0
6
+ appVersion: 3.0.1
7
7
  dependencies:
8
8
  - name: fcrepo
9
9
  version: 0.6.0
@@ -166,3 +166,11 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
166
166
  {{- define "hyrax.zk.fullname" -}}
167
167
  {{- printf "%s-%s" .Release.Name "zookeeper" | trunc 63 | trimSuffix "-" -}}
168
168
  {{- end -}}
169
+
170
+ {{- define "hyrax.redis.host" -}}
171
+ {{- printf "%s-master" (include "hyrax.redis.fullname" .) -}}
172
+ {{- end -}}
173
+
174
+ {{- define "hyrax.redis.url" -}}
175
+ {{- printf "redis://:%s@%s:%s" .Values.redis.password (include "hyrax.redis.host" .) "6379/0" -}}
176
+ {{- end -}}
@@ -0,0 +1,14 @@
1
+ {{- if and .Values.brandingVolume.enabled (not .Values.brandingVolume.existingClaim) }}
2
+ apiVersion: v1
3
+ kind: PersistentVolumeClaim
4
+ metadata:
5
+ name: {{ template "hyrax.fullname" . }}-branding
6
+ labels:
7
+ {{- include "hyrax.labels" . | nindent 4 }}
8
+ spec:
9
+ accessModes:
10
+ - ReadWriteMany
11
+ resources:
12
+ requests:
13
+ storage: {{ .Values.brandingVolume.size }}
14
+ {{- end }}