Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bean: Use properties instead of property with key and value #1487

Merged
merged 10 commits into from
May 25, 2023
Merged
5 changes: 2 additions & 3 deletions kamelets/kafka-scram-source.kamelet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,8 @@ spec:
beans:
- name: kafkaHeaderDeserializer
type: "#class:org.apache.camel.kamelets.utils.serialization.kafka.KafkaHeaderDeserializer"
property:
- key: enabled
value: '{{deserializeHeaders}}'
properties:
enabled: '{{deserializeHeaders}}'
from:
uri: "kafka:{{topic}}"
parameters:
Expand Down
5 changes: 2 additions & 3 deletions kamelets/kafka-source.kamelet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,8 @@ spec:
beans:
- name: kafkaHeaderDeserializer
type: "#class:org.apache.camel.kamelets.utils.serialization.kafka.KafkaHeaderDeserializer"
property:
- key: enabled
value: '{{deserializeHeaders}}'
properties:
enabled: '{{deserializeHeaders}}'
from:
uri: "kafka:{{topic}}"
parameters:
Expand Down
29 changes: 10 additions & 19 deletions kamelets/kafka-ssl-sink.kamelet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,25 +123,16 @@ spec:
- name: kafka-ssl-sink-local
type: '#class:org.apache.camel.component.kafka.KafkaComponent'
- name: kafka-ssl-sink-configuration-local
property:
- key: brokers
value: '{{bootstrapServers}}'
- key: securityProtocol
value: '{{securityProtocol}}'
- key: sslKeystoreLocation
value: '{{sslKeystoreLocation}}'
- key: sslKeyPassword
value: '{{sslKeyPassword}}'
- key: sslKeystorePassword
value: '{{sslKeystorePassword}}'
- key: sslTruststoreLocation
value: '{{sslTruststoreLocation}}'
- key: sslProtocol
value: '{{sslProtocol}}'
- key: sslEnabledProtocols
value: '{{sslEnabledProtocols}}'
- key: saslMechanism
value: '{{saslMechanism}}'
properties:
brokers: '{{bootstrapServers}}'
securityProtocol: '{{securityProtocol}}'
sslKeystoreLocation: '{{sslKeystoreLocation}}'
sslKeyPassword: '{{sslKeyPassword}}'
sslKeystorePassword: '{{sslKeystorePassword}}'
sslTruststoreLocation: '{{sslTruststoreLocation}}'
sslProtocol: '{{sslProtocol}}'
sslEnabledProtocols: '{{sslEnabledProtocols}}'
saslMechanism: '{{saslMechanism}}'
type: '#class:org.apache.camel.component.kafka.KafkaConfiguration'
from:
uri: "kamelet:source"
Expand Down
56 changes: 20 additions & 36 deletions kamelets/kafka-ssl-source.kamelet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -154,48 +154,32 @@ spec:
beans:
- name: kafka-ssl-source-local
type: '#class:org.apache.camel.component.kafka.KafkaComponent'
- name: kafka-ssl-sink-configuration-local
property:
- key: brokers
value: '{{bootstrapServers}}'
- key: securityProtocol
value: '{{securityProtocol}}'
- key: sslKeystoreLocation
value: '{{?sslKeystoreLocation}}'
- key: sslKeyPassword
value: '{{sslKeyPassword}}'
- key: sslKeystorePassword
value: '{{?sslKeystorePassword}}'
- key: sslTruststoreLocation
value: '{{sslTruststoreLocation}}'
- key: sslProtocol
value: '{{sslProtocol}}'
- key: sslEnabledProtocols
value: '{{sslEnabledProtocols}}'
- key: saslMechanism
value: '{{saslMechanism}}'
- key: groupId
value: '{{?consumerGroup}}'
- key: autoOffsetReset
value: '{{autoOffsetReset}}'
- key: pollOnError
value: '{{pollOnError}}'
- key: allowManualCommit
value: '{{allowManualCommit}}'
- key: autoCommitEnable
value: '{{autoCommitEnable}}'
- key: saslJaasConfig
value: '{{?saslJaasConfig}}'
- name: kafka-ssl-source-configuration-local
properties:
brokers: '{{bootstrapServers}}'
securityProtocol: '{{securityProtocol}}'
sslKeystoreLocation: '{{sslKeystoreLocation}}'
sslKeyPassword: '{{sslKeyPassword}}'
sslKeystorePassword: '{{sslKeystorePassword}}'
sslTruststoreLocation: '{{sslTruststoreLocation}}'
sslProtocol: '{{sslProtocol}}'
sslEnabledProtocols: '{{sslEnabledProtocols}}'
saslMechanism: '{{saslMechanism}}'
groupId: '{{?consumerGroup}}'
autoOffsetReset: '{{autoOffsetReset}}'
pollOnError: '{{pollOnError}}'
allowManualCommit: '{{allowManualCommit}}'
autoCommitEnable: '{{autoCommitEnable}}'
saslJaasConfig: '{{?saslJaasConfig}}'
type: '#class:org.apache.camel.component.kafka.KafkaConfiguration'
- name: kafkaHeaderDeserializer
type: "#class:org.apache.camel.kamelets.utils.serialization.kafka.KafkaHeaderDeserializer"
property:
- key: enabled
value: '{{deserializeHeaders}}'
properties:
enabled: '{{deserializeHeaders}}'
from:
uri: "{{kafka-ssl-source-local}}:{{topic}}"
parameters:
configuration: '#bean:{{kafka-ssl-sink-configuration-local}}'
configuration: '#bean:{{kafka-ssl-source-configuration-local}}'
steps:
- process:
ref: "{{kafkaHeaderDeserializer}}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,8 @@ spec:
beans:
- name: kafkaHeaderDeserializer
type: "#class:org.apache.camel.kamelets.utils.serialization.kafka.KafkaHeaderDeserializer"
property:
- key: enabled
value: '{{deserializeHeaders}}'
properties:
enabled: '{{deserializeHeaders}}'
from:
uri: "kafka:{{topic}}"
parameters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,8 @@ spec:
beans:
- name: kafkaHeaderDeserializer
type: "#class:org.apache.camel.kamelets.utils.serialization.kafka.KafkaHeaderDeserializer"
property:
- key: enabled
value: '{{deserializeHeaders}}'
properties:
enabled: '{{deserializeHeaders}}'
from:
uri: "kafka:{{topic}}"
parameters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,25 +123,16 @@ spec:
- name: kafka-ssl-sink-local
type: '#class:org.apache.camel.component.kafka.KafkaComponent'
- name: kafka-ssl-sink-configuration-local
property:
- key: brokers
value: '{{bootstrapServers}}'
- key: securityProtocol
value: '{{securityProtocol}}'
- key: sslKeystoreLocation
value: '{{sslKeystoreLocation}}'
- key: sslKeyPassword
value: '{{sslKeyPassword}}'
- key: sslKeystorePassword
value: '{{sslKeystorePassword}}'
- key: sslTruststoreLocation
value: '{{sslTruststoreLocation}}'
- key: sslProtocol
value: '{{sslProtocol}}'
- key: sslEnabledProtocols
value: '{{sslEnabledProtocols}}'
- key: saslMechanism
value: '{{saslMechanism}}'
properties:
brokers: '{{bootstrapServers}}'
securityProtocol: '{{securityProtocol}}'
sslKeystoreLocation: '{{sslKeystoreLocation}}'
sslKeyPassword: '{{sslKeyPassword}}'
sslKeystorePassword: '{{sslKeystorePassword}}'
sslTruststoreLocation: '{{sslTruststoreLocation}}'
sslProtocol: '{{sslProtocol}}'
sslEnabledProtocols: '{{sslEnabledProtocols}}'
saslMechanism: '{{saslMechanism}}'
type: '#class:org.apache.camel.component.kafka.KafkaConfiguration'
from:
uri: "kamelet:source"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,48 +154,32 @@ spec:
beans:
- name: kafka-ssl-source-local
type: '#class:org.apache.camel.component.kafka.KafkaComponent'
- name: kafka-ssl-sink-configuration-local
property:
- key: brokers
value: '{{bootstrapServers}}'
- key: securityProtocol
value: '{{securityProtocol}}'
- key: sslKeystoreLocation
value: '{{?sslKeystoreLocation}}'
- key: sslKeyPassword
value: '{{sslKeyPassword}}'
- key: sslKeystorePassword
value: '{{?sslKeystorePassword}}'
- key: sslTruststoreLocation
value: '{{sslTruststoreLocation}}'
- key: sslProtocol
value: '{{sslProtocol}}'
- key: sslEnabledProtocols
value: '{{sslEnabledProtocols}}'
- key: saslMechanism
value: '{{saslMechanism}}'
- key: groupId
value: '{{?consumerGroup}}'
- key: autoOffsetReset
value: '{{autoOffsetReset}}'
- key: pollOnError
value: '{{pollOnError}}'
- key: allowManualCommit
value: '{{allowManualCommit}}'
- key: autoCommitEnable
value: '{{autoCommitEnable}}'
- key: saslJaasConfig
value: '{{?saslJaasConfig}}'
- name: kafka-ssl-source-configuration-local
properties:
brokers: '{{bootstrapServers}}'
securityProtocol: '{{securityProtocol}}'
sslKeystoreLocation: '{{sslKeystoreLocation}}'
sslKeyPassword: '{{sslKeyPassword}}'
sslKeystorePassword: '{{sslKeystorePassword}}'
sslTruststoreLocation: '{{sslTruststoreLocation}}'
sslProtocol: '{{sslProtocol}}'
sslEnabledProtocols: '{{sslEnabledProtocols}}'
saslMechanism: '{{saslMechanism}}'
groupId: '{{?consumerGroup}}'
autoOffsetReset: '{{autoOffsetReset}}'
pollOnError: '{{pollOnError}}'
allowManualCommit: '{{allowManualCommit}}'
autoCommitEnable: '{{autoCommitEnable}}'
saslJaasConfig: '{{?saslJaasConfig}}'
type: '#class:org.apache.camel.component.kafka.KafkaConfiguration'
- name: kafkaHeaderDeserializer
type: "#class:org.apache.camel.kamelets.utils.serialization.kafka.KafkaHeaderDeserializer"
property:
- key: enabled
value: '{{deserializeHeaders}}'
properties:
enabled: '{{deserializeHeaders}}'
from:
uri: "{{kafka-ssl-source-local}}:{{topic}}"
parameters:
configuration: '#bean:{{kafka-ssl-sink-configuration-local}}'
configuration: '#bean:{{kafka-ssl-source-configuration-local}}'
steps:
- process:
ref: "{{kafkaHeaderDeserializer}}"
Expand Down