Skip to content

Commit

Permalink
chore: change deprecated yaml statements
Browse files Browse the repository at this point in the history
Closes #3229
  • Loading branch information
squakez committed Oct 16, 2023
1 parent eb02913 commit 782b75e
Show file tree
Hide file tree
Showing 50 changed files with 128 additions and 129 deletions.
2 changes: 1 addition & 1 deletion config/manifests/bases/camel-k.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ metadata:
categories: Integration & Delivery
certified: "false"
containerImage: docker.io/apache/camel-k:2.1.0-SNAPSHOT
createdAt: 2023-10-06T14:14:36Z
createdAt: 2023-10-16T08:21:55Z
description: Apache Camel K is a lightweight integration platform, born on Kubernetes,
with serverless superpowers.
operators.operatorframework.io/builder: operator-sdk-v1.16.0
Expand Down
2 changes: 1 addition & 1 deletion config/samples/bases/camel_v1_integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ spec:
parameters:
period: '1000'
steps:
- set-body:
- setBody:
constant: Hello from Camel K
- to: log:info
2 changes: 1 addition & 1 deletion config/samples/bases/camel_v1_kamelet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ spec:
parameters:
period: "#property:period"
steps:
- set-body:
- setBody:
constant: "#property:message"
- to: kamelet:sink
uri: timer:tick
4 changes: 2 additions & 2 deletions docs/modules/ROOT/attachments/schema/integration-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -9315,13 +9315,13 @@
"service-call": {
"$ref": "#/definitions/org.apache.camel.k.loader.yaml.parser.ServiceCallStepParser$Definition"
},
"set-body": {
"setBody": {
"$ref": "#/definitions/org.apache.camel.k.loader.yaml.parser.SetBodyStepParser$Definition"
},
"set-exchange-pattern": {
"$ref": "#/definitions/org.apache.camel.k.loader.yaml.parser.SetExchangePatternStepParser$Definition"
},
"set-header": {
"setHeader": {
"$ref": "#/definitions/org.apache.camel.k.loader.yaml.parser.SetHeaderStepParser$Definition"
},
"set-property": {
Expand Down
4 changes: 2 additions & 2 deletions docs/modules/ROOT/attachments/schema/kamelet-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4619,13 +4619,13 @@
"service-call": {
"$ref": "#/definitions/org.apache.camel.k.loader.yaml.parser.ServiceCallStepParser$Definition"
},
"set-body": {
"setBody": {
"$ref": "#/definitions/org.apache.camel.k.loader.yaml.parser.SetBodyStepParser$Definition"
},
"set-exchange-pattern": {
"$ref": "#/definitions/org.apache.camel.k.loader.yaml.parser.SetExchangePatternStepParser$Definition"
},
"set-header": {
"setHeader": {
"$ref": "#/definitions/org.apache.camel.k.loader.yaml.parser.SetHeaderStepParser$Definition"
},
"set-property": {
Expand Down
54 changes: 27 additions & 27 deletions docs/modules/ROOT/pages/kamelets/kamelets-dev.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ spec:
parameters:
period: "{{period}}"
steps:
- set-body:
- setBody:
constant: "{{message}}"
- to: "kamelet:sink"
----
Expand Down Expand Up @@ -734,7 +734,7 @@ If we managed to reduce our integration to contain only a Camel route, convertin
parameters:
period: "{{period}}"
steps:
- set-header:
- setHeader:
name: CamelCaffeineAction
constant: GET
- toD: "caffeine-cache:cache-${routeId}?key=lastUpdate"
Expand All @@ -750,7 +750,7 @@ If we managed to reduce our integration to contain only a Camel route, convertin
- set-property:
name: lastUpdate
simple: "${date-with-timezone:now-{{lookAhead}}m:UTC:yyyy-MM-dd'T'HH:mm:ss.SSS}"
- set-header:
- setHeader:
name: CamelHttpMethod
constant: GET
- toD: "https://earthquake.usgs.gov/fdsnws/event/1/query?format=geojson&updatedafter=${exchangeProperty.lastUpdate}&orderby=time-asc"
Expand All @@ -764,9 +764,9 @@ If we managed to reduce our integration to contain only a Camel route, convertin
simple: "${date-with-timezone:exchangeProperty.generated:UTC:yyyy-MM-dd'T'HH:mm:ss.SSS}"
- claim-check:
operation: Push
- set-body:
- setBody:
exchange-property: lastUpdate
- set-header:
- setHeader:
name: CamelCaffeineAction
constant: PUT
- toD: "caffeine-cache:cache-${routeId}?key=lastUpdate"
Expand Down Expand Up @@ -815,7 +815,7 @@ spec:
parameters:
period: "{{period}}"
steps:
- set-header:
- setHeader:
name: CamelCaffeineAction
constant: GET
- toD: "caffeine-cache:cache-${routeId}?key=lastUpdate"
Expand All @@ -831,7 +831,7 @@ spec:
- set-property:
name: lastUpdate
simple: "${date-with-timezone:now-{{lookAhead}}m:UTC:yyyy-MM-dd'T'HH:mm:ss.SSS}"
- set-header:
- setHeader:
name: CamelHttpMethod
constant: GET
- toD: "https://earthquake.usgs.gov/fdsnws/event/1/query?format=geojson&updatedafter=${exchangeProperty.lastUpdate}&orderby=time-asc"
Expand All @@ -845,9 +845,9 @@ spec:
simple: "${date-with-timezone:exchangeProperty.generated:UTC:yyyy-MM-dd'T'HH:mm:ss.SSS}"
- claim-check:
operation: Push
- set-body:
- setBody:
exchange-property: lastUpdate
- set-header:
- setHeader:
name: CamelCaffeineAction
constant: PUT
- toD: "caffeine-cache:cache-${routeId}?key=lastUpdate"
Expand Down Expand Up @@ -957,7 +957,7 @@ spec:
parameters:
period: "{{period}}"
steps:
- set-header:
- setHeader:
name: CamelCaffeineAction
constant: GET
- toD: "caffeine-cache:cache-${routeId}?key=lastUpdate"
Expand All @@ -973,7 +973,7 @@ spec:
- set-property:
name: lastUpdate
simple: "${date-with-timezone:now-{{lookAhead}}m:UTC:yyyy-MM-dd'T'HH:mm:ss.SSS}"
- set-header:
- setHeader:
name: CamelHttpMethod
constant: GET
- toD: "https://earthquake.usgs.gov/fdsnws/event/1/query?format=geojson&updatedafter=${exchangeProperty.lastUpdate}&orderby=time-asc"
Expand All @@ -987,9 +987,9 @@ spec:
simple: "${date-with-timezone:exchangeProperty.generated:UTC:yyyy-MM-dd'T'HH:mm:ss.SSS}"
- claim-check:
operation: Push
- set-body:
- setBody:
exchange-property: lastUpdate
- set-header:
- setHeader:
name: CamelCaffeineAction
constant: PUT
- toD: "caffeine-cache:cache-${routeId}?key=lastUpdate"
Expand Down Expand Up @@ -1113,7 +1113,7 @@ Let's start with a simple integration:
parameters:
period: 5000
steps:
- set-body:
- setBody:
constant: Hello
- to: direct:endpoint
----
Expand Down Expand Up @@ -1144,7 +1144,7 @@ Now, let's check if we can also send an image, by changing the second route:
parameters:
period: 5000
steps:
- set-header:
- setHeader:
name: CamelHttpMethod
constant: GET
- to: https://github.com/apache/camel/raw/7204aa132662ab6cb8e3c5afea8b9b0859eff0e8/docs/img/logo.png
Expand Down Expand Up @@ -1178,14 +1178,14 @@ When applied to the current use case, the main route can be changed into somethi
steps:
- convert-body-to:
type: "byte[]"
- set-header:
- setHeader:
name: CamelTelegramMediaType
constant: PHOTO_PNG
- simple: "${header[Content-Type]} == 'image/jpeg'"
steps:
- convert-body-to:
type: "byte[]"
- set-header:
- setHeader:
name: CamelTelegramMediaType
constant: PHOTO_JPG
otherwise:
Expand All @@ -1196,24 +1196,24 @@ When applied to the current use case, the main route can be changed into somethi
when:
- simple: "${header[text]}"
steps:
- set-header:
- setHeader:
name: CamelTelegramMediaTitleCaption
simple: "${header[text]}"
- simple: "${header[ce-text]}"
steps:
- set-header:
- setHeader:
name: CamelTelegramMediaTitleCaption
simple: "${header[ce-text]}"
- choice: # <3>
when:
- simple: "${header[chat-id]}"
steps:
- set-header:
- setHeader:
name: CamelTelegramChatId
simple: "${header[chat-id]}"
- simple: "${header[ce-chat-id]}"
steps:
- set-header:
- setHeader:
name: CamelTelegramChatId
simple: "${header[ce-chat-id]}"
- to:
Expand Down Expand Up @@ -1294,14 +1294,14 @@ spec:
- log: h1
- convert-body-to:
type: "byte[]"
- set-header:
- setHeader:
name: CamelTelegramMediaType
constant: PHOTO_PNG
- simple: "${header[Content-Type]} == 'image/jpeg'"
steps:
- convert-body-to:
type: "byte[]"
- set-header:
- setHeader:
name: CamelTelegramMediaType
constant: PHOTO_JPG
otherwise:
Expand All @@ -1312,24 +1312,24 @@ spec:
when:
- simple: "${header[text]}"
steps:
- set-header:
- setHeader:
name: CamelTelegramMediaTitleCaption
simple: "${header[text]}"
- simple: "${header[ce-text]}"
steps:
- set-header:
- setHeader:
name: CamelTelegramMediaTitleCaption
simple: "${header[ce-text]}"
- choice:
when:
- simple: "${header[chat-id]}"
steps:
- set-header:
- setHeader:
name: CamelTelegramChatId
simple: "${header[chat-id]}"
- simple: "${header[ce-chat-id]}"
steps:
- set-header:
- setHeader:
name: CamelTelegramChatId
simple: "${header[ce-chat-id]}"
- to:
Expand Down
2 changes: 1 addition & 1 deletion e2e/common/cli/files/run.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
parameters:
period: "5000"
steps:
- set-body:
- setBody:
simple: "Magic {{property:default}}"
- to: "log:info"
4 changes: 2 additions & 2 deletions e2e/common/cli/files/yaml.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
parameters:
period: "5000"
steps:
- set-header:
- setHeader:
name: "m"
constant: "string!"
- set-body:
- setBody:
simple: "Magic${header.m}"
- to: "log:info"
4 changes: 2 additions & 2 deletions e2e/common/languages/files/yaml-polyglot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
parameters:
period: "5000"
steps:
- set-header:
- setHeader:
name: "m"
constant: "polyglot-yaml"
- set-body:
- setBody:
simple: "Magic${header.m}"
- to: "log:info"
4 changes: 2 additions & 2 deletions e2e/common/languages/files/yaml.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
parameters:
period: "5000"
steps:
- set-header:
- setHeader:
name: "m"
constant: "string!"
- set-body:
- setBody:
simple: "Magic${header.m}"
- to: "log:info"
8 changes: 4 additions & 4 deletions e2e/common/misc/files/cron-fallback.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@
# limitations under the License.
# ---------------------------------------------------------------------------

- from:
- from:
uri: "cron:tab"
parameters:
schedule: "0/1 * * * * ?"
steps:
- set-header:
- setHeader:
name: "m"
constant: "string!"
- set-body:
- setBody:
simple: "Magic${header.m}"
- to:
- to:
uri: "log:info"
parameters:
show-all: "false"
8 changes: 4 additions & 4 deletions e2e/common/misc/files/cron-quartz.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@

- route:
id: "yaml"
from:
from:
uri: "quartz:trigger"
parameters:
cron: "0/1 * * * * ?"
steps:
- set-header:
- setHeader:
name: "m"
constant: "string!"
- set-body:
- setBody:
simple: "Magic${header.m}"
- to:
- to:
uri: "log:info"
parameters:
show-all: "false"
9 changes: 4 additions & 5 deletions e2e/common/misc/files/cron-timer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,17 @@

- route:
id: "yaml"
from:
from:
uri: "timer:tick"
parameters:
period: "60000"
steps:
- set-header:
- setHeader:
name: "m"
constant: "string!"
- set-body:
- setBody:
simple: "Magic${header.m}"
- to:
- to:
uri: "log:info"
parameters:
show-all: "false"

4 changes: 2 additions & 2 deletions e2e/common/misc/files/cron-yaml.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
parameters:
schedule: "* * * * ?"
steps:
- set-header:
- setHeader:
name: "m"
constant: "string!"
- set-body:
- setBody:
simple: "Magic${header.m}"
- to:
uri: "log:info"
Expand Down
Loading

0 comments on commit 782b75e

Please sign in to comment.