-
Notifications
You must be signed in to change notification settings - Fork 0
/
component3.yaml
27 lines (26 loc) · 923 Bytes
/
component3.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
name: Download data
inputs:
- {name: Url, type: URI}
- {name: curl options, type: string, default: '--location', description: 'Additional options given to the curl bprogram. See https://curl.haxx.se/docs/manpage.html'}
outputs:
- {name: Data}
metadata:
annotations:
author: Modified by Hitman86R original from Alexey Volkov
canonical_location: 'https://raw.githubusercontent.com/Hitman86R/kubeflow/main/component.yaml'
implementation:
container:
image: curlimages/curl # Sets a non-root user which cannot write to mounted volumes. See https://github.com/curl/curl-docker/issues/22
#image: byrnedo/alpine-curl:latest
command:
- sh
- -exc
- |
url="$0"
output_path="$1"
curl_options="$2"
mkdir -p "$(dirname "$output_path")"
curl --get "$url" --output "$output_path" $curl_options
- inputValue: Url
- outputPath: Data
- inputValue: curl options