diff options
author | 2023-04-20 19:47:17 +0530 | |
---|---|---|
committer | 2023-04-20 19:47:50 +0530 | |
commit | 6a39bafe137855bd867871d6c588b5ac989ebf4c (patch) | |
tree | fe10a7ae0692a85f5d56a1b714755512d21dbeb0 /sdnr/wt/mountpoint-registrar/provider/src/main | |
parent | 9932d3b8395e46ebe57a2a1a95596661a1754896 (diff) |
Include env vars as defaults
strimzikafka section updated in mountpoint-registrar.properties
Issue-ID: SDNC-1796
Signed-off-by: Ravi Pendurty <ravi.pendurty@highstreet-technologies.com>
Change-Id: I2880442966291dd00293bf92e31fecd15d554e4c
Signed-off-by: Ravi Pendurty <ravi.pendurty@highstreet-technologies.com>
Diffstat (limited to 'sdnr/wt/mountpoint-registrar/provider/src/main')
-rw-r--r-- | sdnr/wt/mountpoint-registrar/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/config/StrimziKafkaConfig.java | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sdnr/wt/mountpoint-registrar/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/config/StrimziKafkaConfig.java b/sdnr/wt/mountpoint-registrar/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/config/StrimziKafkaConfig.java index 41ab8a7cb..0e88e299f 100644 --- a/sdnr/wt/mountpoint-registrar/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/config/StrimziKafkaConfig.java +++ b/sdnr/wt/mountpoint-registrar/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/mountpointregistrar/config/StrimziKafkaConfig.java @@ -25,7 +25,7 @@ import org.onap.ccsdk.features.sdnr.wt.common.configuration.ConfigurationFileRep * bootstrapServers=abc:9092,def:9092 * securityProtocol=PLAINTEXT #OTHER POSSIBLE VALUES - SSL, SASL_PLAINTEXT, SASL_SSL * saslMechanism=PLAIN #Need to understand more - * saslJaasConfig= + * saslJaasConfig=PLAIN * consumerGroup= * consumerID= */ @@ -34,18 +34,19 @@ public class StrimziKafkaConfig implements Configuration { private static final String SECTION_MARKER = "strimzi-kafka"; private static final String PROPERTY_KEY_ENABLED = "strimziEnabled"; + private static final String DEFAULT_VALUE_KAFKA_ENABLED = "${SDNR_KAFKA_ENABLED}"; private static final String PROPERTY_KEY_BOOTSTRAPSERVERS = "bootstrapServers"; - private static final String DEFAULT_VALUE_BOOTSTRAPSERVERS = "onap-strimzi-kafka-0:9094,onap-strimzi-kafka-1:9094"; + private static final String DEFAULT_VALUE_BOOTSTRAPSERVERS = "${SDNR_KAFKA_BOOTSTRAP_SERVERS}"; private static final String PROPERTY_KEY_SECURITYPROTOCOL = "securityProtocol"; - private static final String DEFAULT_VALUE_SECURITYPROTOCOL = "PLAINTEXT"; + private static final String DEFAULT_VALUE_SECURITYPROTOCOL = "${SDNR_KAFKA_SECURITY_PROTOCOL}"; private static final String PROPERTY_KEY_SASLMECHANISM = "saslMechanism"; - private static final String DEFAULT_VALUE_SASLMECHANISM = "PLAIN"; + private static final String DEFAULT_VALUE_SASLMECHANISM = "${SDNR_KAFKA_SASL_MECHANISM}"; private static final String PROPERTY_KEY_SASLJAASCONFIG = "saslJaasConfig"; - private static final String DEFAULT_VALUE_SASLJAASCONFIG = "PLAIN"; // TBD + private static final String DEFAULT_VALUE_SASLJAASCONFIG = "${SDNR_KAFKA_SASL_JAAS_CONFIG}"; private ConfigurationFileRepresentation configuration; @@ -84,7 +85,7 @@ public class StrimziKafkaConfig implements Configuration { public void defaults() { // The default value should be "false" given that SDNR can be run in // environments where Strimzi is not used - configuration.setPropertyIfNotAvailable(SECTION_MARKER, PROPERTY_KEY_ENABLED, Boolean.FALSE); + configuration.setPropertyIfNotAvailable(SECTION_MARKER, PROPERTY_KEY_ENABLED, DEFAULT_VALUE_KAFKA_ENABLED); configuration.setPropertyIfNotAvailable(SECTION_MARKER, PROPERTY_KEY_BOOTSTRAPSERVERS, DEFAULT_VALUE_BOOTSTRAPSERVERS); configuration.setPropertyIfNotAvailable(SECTION_MARKER, PROPERTY_KEY_SECURITYPROTOCOL, |