hyrax 3.0.0.pre.rc4 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (92) hide show
  1. checksums.yaml +4 -4
  2. data/.dassie/config/cable.yml +1 -1
  3. data/.dassie/config/environments/development.rb +2 -0
  4. data/.dassie/config/environments/production.rb +1 -1
  5. data/.dassie/config/redis.yml +1 -0
  6. data/.dassie/db/seeds.rb +8 -0
  7. data/.dockerignore +1 -0
  8. data/Dockerfile +7 -4
  9. data/app/actors/hyrax/actors/create_with_remote_files_actor.rb +27 -1
  10. data/app/actors/hyrax/actors/file_actor.rb +4 -2
  11. data/app/actors/hyrax/actors/file_set_actor.rb +8 -6
  12. data/app/controllers/concerns/hyrax/works_controller_behavior.rb +16 -5
  13. data/app/forms/hyrax/forms/resource_form.rb +15 -0
  14. data/app/helpers/hyrax/hyrax_helper_behavior.rb +8 -0
  15. data/app/indexers/hyrax/valkyrie_file_set_indexer.rb +116 -0
  16. data/app/indexers/hyrax/valkyrie_indexer.rb +6 -1
  17. data/app/indexers/hyrax/valkyrie_work_indexer.rb +2 -0
  18. data/app/jobs/embargo_expiry_job.rb +7 -5
  19. data/app/jobs/file_set_attached_event_job.rb +6 -1
  20. data/app/jobs/lease_expiry_job.rb +6 -4
  21. data/app/models/concerns/hyrax/ability.rb +11 -0
  22. data/app/models/concerns/hyrax/solr_document_behavior.rb +7 -1
  23. data/app/models/hyrax/file_set.rb +1 -0
  24. data/app/models/hyrax/work.rb +2 -0
  25. data/app/models/job_io_wrapper.rb +1 -1
  26. data/app/services/hyrax/access_control_list.rb +1 -1
  27. data/app/services/hyrax/adapters/nesting_index_adapter.rb +1 -1
  28. data/app/services/hyrax/embargo_manager.rb +1 -1
  29. data/app/services/hyrax/graph_exporter.rb +1 -1
  30. data/app/services/hyrax/listeners/metadata_index_listener.rb +18 -1
  31. data/app/services/hyrax/versioning_service.rb +1 -1
  32. data/app/services/hyrax/work_uploads_handler.rb +5 -2
  33. data/app/views/hyrax/admin/admin_sets/_show_document_list_row.html.erb +1 -1
  34. data/app/views/hyrax/base/_form_share.html.erb +1 -5
  35. data/app/views/hyrax/base/_workflow_actions.html.erb +1 -1
  36. data/app/views/hyrax/batch_edits/edit.html.erb +2 -2
  37. data/app/views/hyrax/collections/_list_collections.html.erb +1 -1
  38. data/app/views/hyrax/collections/_search_form.html.erb +1 -1
  39. data/app/views/hyrax/stats/file.html.erb +1 -1
  40. data/app/views/hyrax/stats/work.html.erb +1 -1
  41. data/app/views/hyrax/uploads/_js_templates.html.erb +4 -4
  42. data/app/views/hyrax/uploads/_js_templates_versioning.html.erb +4 -4
  43. data/app/views/hyrax/users/_contributions.html.erb +1 -1
  44. data/app/views/hyrax/users/_profile_tabs.html.erb +2 -2
  45. data/app/views/hyrax/users/_search_form.html.erb +1 -1
  46. data/app/views/hyrax/users/_user.html.erb +1 -1
  47. data/app/views/hyrax/users/_user_info.html.erb +9 -9
  48. data/bin/db-migrate-seed.sh +3 -1
  49. data/bin/solrcloud-assign-configset.sh +27 -0
  50. data/bin/solrcloud-upload-configset.sh +31 -0
  51. data/chart/hyrax/Chart.yaml +8 -8
  52. data/chart/hyrax/README.md +42 -6
  53. data/chart/hyrax/templates/NOTES.txt +1 -1
  54. data/chart/hyrax/templates/_helpers.tpl +76 -0
  55. data/chart/hyrax/templates/configmap-env.yaml +10 -11
  56. data/chart/hyrax/templates/cron-embargo.yaml +24 -0
  57. data/chart/hyrax/templates/cron-lease.yaml +24 -0
  58. data/chart/hyrax/templates/deployment.yaml +36 -4
  59. data/chart/hyrax/templates/secrets.yaml +3 -2
  60. data/chart/hyrax/values.yaml +72 -1
  61. data/config/initializers/listeners.rb +2 -0
  62. data/documentation/developing-your-hyrax-based-app.md +3 -3
  63. data/lib/hyrax/transactions/container.rb +11 -1
  64. data/lib/hyrax/transactions/steps/delete_resource.rb +38 -0
  65. data/lib/hyrax/transactions/steps/destroy_work.rb +1 -0
  66. data/lib/hyrax/transactions/work_destroy.rb +20 -0
  67. data/lib/hyrax/version.rb +1 -1
  68. data/lib/tasks/embargo_lease.rake +27 -0
  69. data/lib/wings/active_fedora_converter/default_work.rb +4 -0
  70. data/lib/wings/attribute_transformer.rb +29 -19
  71. data/lib/wings/model_transformer.rb +4 -19
  72. data/lib/wings/orm_converter.rb +24 -21
  73. data/lib/wings/valkyrie/persister.rb +1 -0
  74. data/lib/wings/valkyrie/query_service.rb +36 -24
  75. data/template.rb +1 -1
  76. metadata +14 -20
  77. data/chart/fcrepo/.gitignore +0 -2
  78. data/chart/fcrepo/.helmignore +0 -23
  79. data/chart/fcrepo/Chart.yaml +0 -11
  80. data/chart/fcrepo/README.md +0 -50
  81. data/chart/fcrepo/templates/NOTES.txt +0 -21
  82. data/chart/fcrepo/templates/_helpers.tpl +0 -68
  83. data/chart/fcrepo/templates/configmap-env.yaml +0 -19
  84. data/chart/fcrepo/templates/deployment.yaml +0 -109
  85. data/chart/fcrepo/templates/ingress.yaml +0 -41
  86. data/chart/fcrepo/templates/pvc.yaml +0 -20
  87. data/chart/fcrepo/templates/secret.yaml +0 -12
  88. data/chart/fcrepo/templates/service.yaml +0 -15
  89. data/chart/fcrepo/templates/serviceaccount.yaml +0 -12
  90. data/chart/fcrepo/templates/tests/test-connection.yaml +0 -15
  91. data/chart/fcrepo/values.yaml +0 -79
  92. data/chart/hyrax/templates/fcrepo-secret.yaml +0 -13
data/template.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  # Hack for https://github.com/rails/rails/issues/35153
3
3
  gsub_file 'Gemfile', /^gem ["']sqlite3["']$/, 'gem "sqlite3", "~> 1.3.0"'
4
- gem 'hyrax', '3.0.0-rc4'
4
+ gem 'hyrax', '3.0.0'
5
5
  run 'bundle install'
6
6
  generate 'hyrax:install', '-f'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hyrax
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0.pre.rc4
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Coyne
@@ -14,7 +14,7 @@ authors:
14
14
  autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
- date: 2021-03-11 00:00:00.000000000 Z
17
+ date: 2021-03-24 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: rails
@@ -1178,6 +1178,8 @@ executables:
1178
1178
  - db-migrate-seed.sh
1179
1179
  - db-wait.sh
1180
1180
  - hyrax-entrypoint.sh
1181
+ - solrcloud-assign-configset.sh
1182
+ - solrcloud-upload-configset.sh
1181
1183
  extensions: []
1182
1184
  extra_rdoc_files: []
1183
1185
  files:
@@ -1773,6 +1775,7 @@ files:
1773
1775
  - app/indexers/hyrax/repository_reindexer.rb
1774
1776
  - app/indexers/hyrax/resource_indexer.rb
1775
1777
  - app/indexers/hyrax/valkyrie_collection_indexer.rb
1778
+ - app/indexers/hyrax/valkyrie_file_set_indexer.rb
1776
1779
  - app/indexers/hyrax/valkyrie_indexer.rb
1777
1780
  - app/indexers/hyrax/valkyrie_work_indexer.rb
1778
1781
  - app/indexers/hyrax/visibility_indexer.rb
@@ -2597,21 +2600,8 @@ files:
2597
2600
  - bin/db-migrate-seed.sh
2598
2601
  - bin/db-wait.sh
2599
2602
  - bin/hyrax-entrypoint.sh
2600
- - chart/fcrepo/.gitignore
2601
- - chart/fcrepo/.helmignore
2602
- - chart/fcrepo/Chart.yaml
2603
- - chart/fcrepo/README.md
2604
- - chart/fcrepo/templates/NOTES.txt
2605
- - chart/fcrepo/templates/_helpers.tpl
2606
- - chart/fcrepo/templates/configmap-env.yaml
2607
- - chart/fcrepo/templates/deployment.yaml
2608
- - chart/fcrepo/templates/ingress.yaml
2609
- - chart/fcrepo/templates/pvc.yaml
2610
- - chart/fcrepo/templates/secret.yaml
2611
- - chart/fcrepo/templates/service.yaml
2612
- - chart/fcrepo/templates/serviceaccount.yaml
2613
- - chart/fcrepo/templates/tests/test-connection.yaml
2614
- - chart/fcrepo/values.yaml
2603
+ - bin/solrcloud-assign-configset.sh
2604
+ - bin/solrcloud-upload-configset.sh
2615
2605
  - chart/hyrax/.gitignore
2616
2606
  - chart/hyrax/.helmignore
2617
2607
  - chart/hyrax/Chart.yaml
@@ -2619,8 +2609,9 @@ files:
2619
2609
  - chart/hyrax/templates/NOTES.txt
2620
2610
  - chart/hyrax/templates/_helpers.tpl
2621
2611
  - chart/hyrax/templates/configmap-env.yaml
2612
+ - chart/hyrax/templates/cron-embargo.yaml
2613
+ - chart/hyrax/templates/cron-lease.yaml
2622
2614
  - chart/hyrax/templates/deployment.yaml
2623
- - chart/hyrax/templates/fcrepo-secret.yaml
2624
2615
  - chart/hyrax/templates/hpa.yaml
2625
2616
  - chart/hyrax/templates/ingress.yaml
2626
2617
  - chart/hyrax/templates/secrets.yaml
@@ -2859,6 +2850,7 @@ files:
2859
2850
  - lib/hyrax/transactions/steps/apply_collection_permission_template.rb
2860
2851
  - lib/hyrax/transactions/steps/apply_permission_template.rb
2861
2852
  - lib/hyrax/transactions/steps/apply_visibility.rb
2853
+ - lib/hyrax/transactions/steps/delete_resource.rb
2862
2854
  - lib/hyrax/transactions/steps/destroy_work.rb
2863
2855
  - lib/hyrax/transactions/steps/ensure_admin_set.rb
2864
2856
  - lib/hyrax/transactions/steps/ensure_permission_template.rb
@@ -2873,6 +2865,7 @@ files:
2873
2865
  - lib/hyrax/transactions/transaction.rb
2874
2866
  - lib/hyrax/transactions/update_work.rb
2875
2867
  - lib/hyrax/transactions/work_create.rb
2868
+ - lib/hyrax/transactions/work_destroy.rb
2876
2869
  - lib/hyrax/valkyrie_can_can_adapter.rb
2877
2870
  - lib/hyrax/version.rb
2878
2871
  - lib/hyrax/zotero.rb
@@ -2881,6 +2874,7 @@ files:
2881
2874
  - lib/tasks/controlled_vocabularies.rake
2882
2875
  - lib/tasks/default_admin_set.rake
2883
2876
  - lib/tasks/default_collection_type.rake
2877
+ - lib/tasks/embargo_lease.rake
2884
2878
  - lib/tasks/hyrax.rake
2885
2879
  - lib/tasks/hyrax_user.rake
2886
2880
  - lib/tasks/install.rake
@@ -2954,9 +2948,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
2954
2948
  version: '2.5'
2955
2949
  required_rubygems_version: !ruby/object:Gem::Requirement
2956
2950
  requirements:
2957
- - - ">"
2951
+ - - ">="
2958
2952
  - !ruby/object:Gem::Version
2959
- version: 1.3.1
2953
+ version: '0'
2960
2954
  requirements: []
2961
2955
  rubygems_version: 3.1.4
2962
2956
  signing_key:
@@ -1,2 +0,0 @@
1
- charts/*
2
- Chart.lock
@@ -1,23 +0,0 @@
1
- # Patterns to ignore when building packages.
2
- # This supports shell glob matching, relative path matching, and
3
- # negation (prefixed with !). Only one pattern per line.
4
- .DS_Store
5
- # Common VCS dirs
6
- .git/
7
- .gitignore
8
- .bzr/
9
- .bzrignore
10
- .hg/
11
- .hgignore
12
- .svn/
13
- # Common backup files
14
- *.swp
15
- *.bak
16
- *.tmp
17
- *.orig
18
- *~
19
- # Various IDEs
20
- .project
21
- .idea/
22
- *.tmproj
23
- .vscode/
@@ -1,11 +0,0 @@
1
- apiVersion: v2
2
- name: fcrepo
3
- description: Fedora Commons Repository 4
4
- type: application
5
- version: 0.4.1
6
- appVersion: 4.7
7
- dependencies:
8
- - name: postgresql
9
- version: 9.3.3
10
- repository: https://charts.bitnami.com/bitnami
11
- condition: postgresql.enabled
@@ -1,50 +0,0 @@
1
- Fedora Commons Helm Chart
2
- =========================
3
-
4
- Fedora is the flexible, modular, open source repository platform with native
5
- linked data support.
6
-
7
- ## Installation
8
-
9
- ```sh
10
- helm dep up chart/fcrepo
11
- helm install fcrepo chart/fcrepo
12
- ```
13
-
14
- ## Configuration
15
-
16
- By default, this chart deploys with Postgresql as the backend for Fedora.
17
- Without other configuration, it will deploy a new Postgresql instance/database
18
- as a service available to the `fcrepo` deployment.
19
-
20
- In practice, users may want to forego installing postgres for two reasons:
21
-
22
- _First_, when you are deploying Fedora into a more complex application
23
- environment you may wish to reuse an existing Postgres instance already
24
- maintained with that environment.
25
-
26
- In this case, `fcrepo` should be deployed with postgresql explictly disabled, an
27
- `exernalDatabaseUsername`, and an `fcrepoSecretName`. `fcrepoSecretName` must
28
- correspond to an existing secret providing `DATABASE_PASSWORD`, `DATABASE_HOST`,
29
- and `JAVA_OPTS`.
30
-
31
- Optionally, a `externalDatabaseName` may be given to avoid collissions in the
32
- case that the default `fcrepo` is not an acceptable database name.
33
-
34
- This is usually done in the context of a parent chart which provides the postgresql instance, for example:
35
-
36
- ```yaml
37
- fcrepo:
38
- enabled: true
39
- fcrepoSecretName: "mychart.fcrepo.fullname"
40
- externalDatabaseUsername: "mydbuser"
41
- servicePort: 8080
42
- postgresql:
43
- enabled: false
44
- ```
45
-
46
- _Second_, because they want to use another backend for Fedora. This use case is broadly unsupported here. In theory, you can get a default (Infinispan) configuration by setting `postgresql.enabled` to `false`. **THIS CONFIGURATION IS UNTESTED AND UNSUPPORTED**:
47
-
48
- ```sh
49
- helm install --set postgresql.enabled=false fcrepo-test chart/fcrepo
50
- ```
@@ -1,21 +0,0 @@
1
- 1. Get the application URL by running these commands:
2
- {{- if .Values.ingress.enabled }}
3
- {{- range $host := .Values.ingress.hosts }}
4
- {{- range .paths }}
5
- http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }}
6
- {{- end }}
7
- {{- end }}
8
- {{- else if contains "NodePort" .Values.service.type }}
9
- export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "fcrepo.fullname" . }})
10
- export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
11
- echo http://$NODE_IP:$NODE_PORT
12
- {{- else if contains "LoadBalancer" .Values.service.type }}
13
- NOTE: It may take a few minutes for the LoadBalancer IP to be available.
14
- You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "fcrepo.fullname" . }}'
15
- export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "fcrepo.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
16
- echo http://$SERVICE_IP:{{ .Values.servicePort | default .Values.service.port }}
17
- {{- else if contains "ClusterIP" .Values.service.type }}
18
- export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "fcrepo.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
19
- echo "Visit http://127.0.0.1:8080 to use your application"
20
- kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:{{ .Values.servicePort | default .Values.service.port }}
21
- {{- end }}
@@ -1,68 +0,0 @@
1
- {{/* vim: set filetype=mustache: */}}
2
- {{/*
3
- Expand the name of the chart.
4
- */}}
5
- {{- define "fcrepo.name" -}}
6
- {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
7
- {{- end }}
8
-
9
- {{/*
10
- Create a default fully qualified app name.
11
- We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
12
- If release name contains chart name it will be used as a full name.
13
- */}}
14
- {{- define "fcrepo.fullname" -}}
15
- {{- if .Values.fullnameOverride }}
16
- {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
17
- {{- else }}
18
- {{- $name := default .Chart.Name .Values.nameOverride }}
19
- {{- if contains $name .Release.Name }}
20
- {{- .Release.Name | trunc 63 | trimSuffix "-" }}
21
- {{- else }}
22
- {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
23
- {{- end }}
24
- {{- end }}
25
- {{- end }}
26
-
27
- {{/*
28
- Create chart name and version as used by the chart label.
29
- */}}
30
- {{- define "fcrepo.chart" -}}
31
- {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
32
- {{- end }}
33
-
34
- {{/*
35
- Common labels
36
- */}}
37
- {{- define "fcrepo.labels" -}}
38
- helm.sh/chart: {{ include "fcrepo.chart" . }}
39
- {{ include "fcrepo.selectorLabels" . }}
40
- {{- if .Chart.AppVersion }}
41
- app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
42
- {{- end }}
43
- app.kubernetes.io/managed-by: {{ .Release.Service }}
44
- {{- end }}
45
-
46
- {{/*
47
- Selector labels
48
- */}}
49
- {{- define "fcrepo.selectorLabels" -}}
50
- app.kubernetes.io/name: {{ include "fcrepo.name" . }}
51
- app.kubernetes.io/instance: {{ .Release.Name }}
52
- {{- end }}
53
-
54
- {{/*
55
- Create the name of the service account to use
56
- */}}
57
- {{- define "fcrepo.serviceAccountName" -}}
58
- {{- if .Values.serviceAccount.create }}
59
- {{- default (include "fcrepo.fullname" .) .Values.serviceAccount.name }}
60
- {{- else }}
61
- {{- default "default" .Values.serviceAccount.name }}
62
- {{- end }}
63
- {{- end }}
64
-
65
- {{- define "fcrepo.postgresql.fullname" -}}
66
- {{- $name := default "postgresql" .Values.postgresql.nameOverride -}}
67
- {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
68
- {{- end -}}
@@ -1,19 +0,0 @@
1
- apiVersion: v1
2
- kind: ConfigMap
3
- metadata:
4
- name: {{ include "fcrepo.fullname" . }}-env
5
- labels:
6
- app.kubernetes.io/name: {{ include "fcrepo.name" . }}
7
- helm.sh/chart: {{ include "fcrepo.chart" . }}
8
- app.kubernetes.io/instance: {{ .Release.Name }}
9
- app.kubernetes.io/managed-by: {{ .Release.Service }}
10
- data:
11
- {{- if .Values.postgresql.enabled }}
12
- DATABASE_NAME: {{ .Values.postgresql.postgresqlDatabase }}
13
- DATABASE_USER: {{ .Values.postgresql.postgresqlUsername }}
14
- {{- else }}
15
- {{- if .Values.externalDatabaseUsername }}
16
- DATABASE_NAME: {{ .Values.externalDatabaseName | default "fcrepo" }}
17
- DATABASE_USER: {{ .Values.externalDatabaseUsername }}
18
- {{- end }}
19
- {{- end }}
@@ -1,109 +0,0 @@
1
- apiVersion: apps/v1
2
- kind: Deployment
3
- metadata:
4
- name: {{ include "fcrepo.fullname" . }}
5
- labels:
6
- {{- include "fcrepo.labels" . | nindent 4 }}
7
- spec:
8
- replicas: 1
9
- selector:
10
- matchLabels:
11
- {{- include "fcrepo.selectorLabels" . | nindent 6 }}
12
- strategy:
13
- type: Recreate
14
- template:
15
- metadata:
16
- {{- with .Values.podAnnotations }}
17
- annotations:
18
- {{- toYaml . | nindent 8 }}
19
- {{- end }}
20
- labels:
21
- {{- include "fcrepo.selectorLabels" . | nindent 8 }}
22
- spec:
23
- {{- with .Values.imagePullSecrets }}
24
- imagePullSecrets:
25
- {{- toYaml . | nindent 8 }}
26
- {{- end }}
27
- restartPolicy: Always
28
- serviceAccountName: {{ include "fcrepo.serviceAccountName" . }}
29
- securityContext:
30
- {{- toYaml .Values.podSecurityContext | nindent 8 }}
31
- volumes:
32
- - name: data
33
- persistentVolumeClaim:
34
- claimName: {{ template "fcrepo.fullname" . }}
35
- initContainers:
36
- - name: "remove-lost-found"
37
- image: "busybox:1.32.0"
38
- command:
39
- - rm
40
- - -fr
41
- - /data/lost+found
42
- volumeMounts:
43
- - name: data
44
- mountPath: /data
45
- {{- if not .Values.postgresql.enabled }}
46
- {{- if .Values.fcrepoSecretName }}
47
- - name: "init-db"
48
- image: {{ .Values.postgresql.image.repository | default "bitnami/postgresql" }}:{{ .Values.postgresql.image.tag | default "latest" }}
49
- command:
50
- - sh
51
- - -c
52
- - export PGPASSWORD=$DATABASE_PASSWORD PGHOST=$DATABASE_HOST PGUSER=$DATABASE_USER;
53
- - psql -tc "SELECT 1 FROM pg_database WHERE datname = '$DATABASE_NAME'" | grep -q 1 || createdb -e -w $DATABASE_NAME
54
- envFrom:
55
- - configMapRef:
56
- name: {{ include "fcrepo.fullname" . }}-env
57
- - secretRef:
58
- name: {{ include .Values.fcrepoSecretName . }}
59
- {{- end }}
60
- {{- end }}
61
- containers:
62
- - name: {{ .Chart.Name }}
63
- securityContext:
64
- {{- toYaml .Values.securityContext | nindent 12 }}
65
- image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
66
- imagePullPolicy: {{ .Values.image.pullPolicy }}
67
- envFrom:
68
- - configMapRef:
69
- name: {{ include "fcrepo.fullname" . }}-env
70
- {{- if .Values.postgresql.enabled }}
71
- - secretRef:
72
- name: {{ template "fcrepo.fullname" . }}
73
- {{- else }}
74
- {{- if .Values.fcrepoSecretName }}
75
- - secretRef:
76
- name: {{ include .Values.fcrepoSecretName . }}
77
- {{- end }}
78
- {{- end }}
79
- ports:
80
- - name: http
81
- containerPort: 8080
82
- protocol: TCP
83
- volumeMounts:
84
- - name: data
85
- mountPath: /data
86
- livenessProbe:
87
- httpGet:
88
- path: /
89
- port: http
90
- initialDelaySeconds: {{ default 15 .Values.healthCheck.initialDelay }}
91
- readinessProbe:
92
- httpGet:
93
- path: /fcrepo
94
- port: http
95
- initialDelaySeconds: {{ default 15 .Values.healthCheck.initialDelay }}
96
- resources:
97
- {{- toYaml .Values.resources | nindent 12 }}
98
- {{- with .Values.nodeSelector }}
99
- nodeSelector:
100
- {{- toYaml . | nindent 8 }}
101
- {{- end }}
102
- {{- with .Values.affinity }}
103
- affinity:
104
- {{- toYaml . | nindent 8 }}
105
- {{- end }}
106
- {{- with .Values.tolerations }}
107
- tolerations:
108
- {{- toYaml . | nindent 8 }}
109
- {{- end }}
@@ -1,41 +0,0 @@
1
- {{- if .Values.ingress.enabled -}}
2
- {{- $fullName := include "fcrepo.fullname" . -}}
3
- {{- $svcPort := .Values.service.port -}}
4
- {{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
5
- apiVersion: networking.k8s.io/v1beta1
6
- {{- else -}}
7
- apiVersion: extensions/v1beta1
8
- {{- end }}
9
- kind: Ingress
10
- metadata:
11
- name: {{ $fullName }}
12
- labels:
13
- {{- include "fcrepo.labels" . | nindent 4 }}
14
- {{- with .Values.ingress.annotations }}
15
- annotations:
16
- {{- toYaml . | nindent 4 }}
17
- {{- end }}
18
- spec:
19
- {{- if .Values.ingress.tls }}
20
- tls:
21
- {{- range .Values.ingress.tls }}
22
- - hosts:
23
- {{- range .hosts }}
24
- - {{ . | quote }}
25
- {{- end }}
26
- secretName: {{ .secretName }}
27
- {{- end }}
28
- {{- end }}
29
- rules:
30
- {{- range .Values.ingress.hosts }}
31
- - host: {{ .host | quote }}
32
- http:
33
- paths:
34
- {{- range .paths }}
35
- - path: {{ . }}
36
- backend:
37
- serviceName: {{ $fullName }}
38
- servicePort: {{ $svcPort }}
39
- {{- end }}
40
- {{- end }}
41
- {{- end }}