-
Notifications
You must be signed in to change notification settings - Fork 26
/
http-secured-source.kamelet.yaml
102 lines (102 loc) · 4.15 KB
/
http-secured-source.kamelet.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# ---------------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ---------------------------------------------------------------------------
apiVersion: camel.apache.org/v1
kind: Kamelet
metadata:
name: http-secured-source
annotations:
camel.apache.org/kamelet.support.level: "Stable"
camel.apache.org/catalog.version: "2.3.0"
camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MjAiCmhlaWdodD0iNDIwIiBzdHJva2U9IiMwMDAiIGZpbGw9Im5vbmUiPgo8cGF0aCBzdHJva2Utd2lkdGg9IjI2IgpkPSJNMjA5LDE1YTE5NSwxOTUgMCAxLDAgMiwweiIvPgo8cGF0aCBzdHJva2Utd2lkdGg9IjE4IgpkPSJtMjEwLDE1djM5MG0xOTUtMTk1SDE1TTU5LDkwYTI2MCwyNjAgMCAwLDAgMzAyLDAgbTAsMjQwIGEyNjAsMjYwIDAgMCwwLTMwMiwwTTE5NSwyMGEyNTAsMjUwIDAgMCwwIDAsMzgyIG0zMCwwIGEyNTAsMjUwIDAgMCwwIDAtMzgyIi8+Cjwvc3ZnPg=="
camel.apache.org/provider: "Red Hat"
camel.apache.org/kamelet.group: "HTTP"
camel.apache.org/kamelet.namespace: "HTTP"
labels:
camel.apache.org/kamelet.type: "source"
spec:
definition:
title: "HTTP Secured Source"
description: |-
Periodically fetches a secured HTTP resource and provides the content as output.
required:
- url
type: object
properties:
period:
title: Period between Updates
description: The interval between fetches in milliseconds
type: integer
default: 10000
contentType:
title: Content Type
description: The content type accepted for the resource
type: string
default: "application/json"
url:
title: URL
description: The URL to fetch for data
type: string
example: "https://gist.githubusercontent.com/nicolaferraro/e3c72ace3c751f9f88273896611ce5fe/raw/3b6f54060bacb56b6719b7386a4645cb59ad6cc1/quote.json"
pattern: "^(http|https)://.*"
authMethod:
title: Authentication Method
description: Authentication methods allowed to use as a comma separated list of values Basic, Digest or NTLM.
type: string
default: "Basic"
authenticationPreemptive:
title: Authentication Preemptive
description: If this option is true, camel-http sends preemptive basic authentication to the server.
type: boolean
x-descriptors:
- 'urn:alm:descriptor:com.tectonic.ui:checkbox'
default: false
authUsername:
title: Authentication Username
description: Authentication username
type: string
x-descriptors:
- urn:camel:group:credentials
authPassword:
title: Authentication Password
description: Authentication password
type: string
format: password
x-descriptors:
- urn:alm:descriptor:com.tectonic.ui:password
- urn:camel:group:credentials
dependencies:
- "camel:http"
- "camel:kamelet"
- "camel:core"
- "camel:timer"
template:
from:
uri: "timer:fetch"
parameters:
period: "{{period}}"
steps:
- set-header:
name: "Accept"
constant: "{{contentType}}"
- to:
uri: "{{url}}"
parameters:
authMethod: "{{authMethod}}"
authUsername: "{{authUsername}}"
authPassword: "{{authPassword}}"
authenticationPreemptive: "{{authenticationPreemptive}}"
- to: "kamelet:sink"