Skip to content

Commit

Permalink
chore: Adjust Camel K Kamelet examples
Browse files Browse the repository at this point in the history
  • Loading branch information
christophd committed Jun 17, 2024
1 parent 809d017 commit 4803bc2
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 36 deletions.
4 changes: 2 additions & 2 deletions examples/kamelets/hello-source.kamelet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
# ---------------------------------------------------------------------------

apiVersion: camel.apache.org/v1alpha1
apiVersion: camel.apache.org/v1
kind: Kamelet
metadata:
name: hello-source
Expand All @@ -41,5 +41,5 @@ spec:
period: "{{period}}"
steps:
- set-body:
constant: "Hello world!"
constant: "Hello World!"
- to: "kamelet:sink"
2 changes: 1 addition & 1 deletion examples/kamelets/hello-to-log-binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ spec:
source:
ref:
kind: Kamelet
apiVersion: camel.apache.org/v1alpha1
apiVersion: camel.apache.org/v1
name: hello-source
sink:
uri: log:info
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
Feature: Kamelet resource

Background:
Given Disable auto removal of Kamelet resources
Given Disable auto removal of Kubernetes resources
Given Camel K resource polling configuration
| maxAttempts | 20 |
| delayBetweenAttempts | 1000 |
Feature: Kamelet pipe

Scenario: Bind Kamelet to service
# Create Kamelet from file
Expand All @@ -14,24 +7,24 @@ Feature: Kamelet resource

# Create the binding
Given create Kubernetes service greeting-service with target port 8080
And KameletBinding source properties
And Pipe source properties
| message | Hello World |
And bind Kamelet hello-source to uri http://greeting-service.${YAKS_NAMESPACE}/greeting
When create KameletBinding hello-source-uri
Then KameletBinding hello-source-uri should be available
When create Pipe hello-source-uri
Then Pipe hello-source-uri should be available

# Verify binding
Given HTTP server "greeting-service"
And HTTP server timeout is 600000 ms
Then expect HTTP request body: Hello World
Then expect HTTP request body: Hello World!
And receive POST /greeting

Scenario: Create binding from YAML
Given load KameletBinding hello-to-log-binding.yaml
Then KameletBinding hello-to-log-binding should be available
And Camel K integration hello-to-log-binding should print Hello world!
Given load Pipe hello-to-log-binding.yaml
Then Pipe hello-to-log-binding should be available
And Camel K integration hello-to-log-binding should print Hello World!

Scenario: Remove Camel K resources
Given delete Kamelet hello-source
Given delete KameletBinding hello-source-uri
Given delete KameletBinding hello-to-log-binding
Given delete Pipe hello-source-uri
Given delete Pipe hello-to-log-binding
7 changes: 0 additions & 7 deletions examples/kamelets/kamelet-resource.feature
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
Feature: Kamelet resource

Background:
Given Disable auto removal of Camel K resources
Given Disable auto removal of Kamelet resources
Given Camel K resource polling configuration
| maxAttempts | 200 |
| delayBetweenAttempts | 1000 |

Scenario: Use Kamelet
Given load Camel K integration timer-to-log.groovy
Then Camel K integration timer-to-log should be running
Expand Down
7 changes: 0 additions & 7 deletions examples/kamelets/kamelet.feature
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
Feature: Kamelet

Background:
Given Disable auto removal of Camel K resources
Given Disable auto removal of Kamelet resources
Given Camel K resource polling configuration
| maxAttempts | 200 |
| delayBetweenAttempts | 1000 |

Scenario: Create Kamelet
Given Kamelet property definition
| name | message |
Expand Down
10 changes: 8 additions & 2 deletions examples/kamelets/yaks-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,14 @@
config:
runtime:
env:
- name: YAKS_KAMELET_API_VERSION
value: v1alpha1
- name: YAKS_CAMELK_MAX_ATTEMPTS
value: 100
- name: YAKS_CAMELK_DELAY_BETWEEN_ATTEMPTS
value: 1000
- name: YAKS_CAMELK_AUTO_REMOVE_RESOURCES
value: false
- name: YAKS_KAMELETS_AUTO_REMOVE_RESOURCES
value: false
settings:
loggers:
- name: INTEGRATION_STATUS
Expand Down

0 comments on commit 4803bc2

Please sign in to comment.