forked from gdcc/dataverse-kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add example to docs how to get custom metadata inside the job. See gd…
- Loading branch information
1 parent
f4677c5
commit 74af823
Showing
2 changed files
with
75 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
--- | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
generateName: metadata-update-dataverse- | ||
labels: | ||
app.kubernetes.io/name: metadata-update | ||
app.kubernetes.io/version: "1.0" | ||
app.kubernetes.io/component: job | ||
app.kubernetes.io/part-of: dataverse | ||
app.kubernetes.io/managed-by: kubectl | ||
spec: | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: metadata-update | ||
app.kubernetes.io/part-of: dataverse | ||
spec: | ||
containers: | ||
- name: metadata-update | ||
image: iqss/dataverse-k8s | ||
command: ['scripts/metadata-update.sh'] | ||
envFrom: | ||
- configMapRef: | ||
name: dataverse | ||
volumeMounts: | ||
- name: api-secret | ||
mountPath: "/opt/dataverse/secrets/api" | ||
readOnly: true | ||
- name: custom-metadata | ||
mountPath: /metadata | ||
readOnly: true | ||
initContainers: | ||
- name: check-solr-ready | ||
image: giantswarm/tiny-tools | ||
command: ['sh', '-c', | ||
'until curl -sS -f "http://${SOLR_SERVICE_HOST}:${SOLR_SERVICE_PORT}/solr/collection1/admin/ping" 2>&1 | grep "status.:.OK"; | ||
do echo waiting for solr; sleep 3; done;'] | ||
- name: check-dataverse-ready | ||
image: giantswarm/tiny-tools | ||
command: ['sh', '-c', | ||
'until curl -sS -f "http://${DATAVERSE_SERVICE_HOST}:${DATAVERSE_SERVICE_PORT_HTTP}/robots.txt" -m 2 2>&1 > /dev/null; | ||
do echo waiting for dataverse; sleep 15; done;'] | ||
- name: get-metadata | ||
image: giantswarm/tiny-tools | ||
command: | ||
- "curl" | ||
args: | ||
- "-sSo" | ||
- "/metadata/test.tsv" | ||
- "https://gist.githubusercontent.com/poikilotherm/e54660ab99a24b12e5179621c9c7efb5/raw/960085c8277ad33fa1e52f3c16a38ec6df3ef281/test.tsv" | ||
volumeMounts: | ||
- name: custom-metadata | ||
mountPath: /metadata | ||
volumes: | ||
- name: api-secret | ||
secret: | ||
secretName: dataverse-api | ||
- name: custom-metadata | ||
emptyDir: {} | ||
restartPolicy: Never | ||
backoffLimit: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters