Skip to content

Commit cb033ff

Browse files
committed
Put only secret stuff in ENV
1 parent b4f6467 commit cb033ff

File tree

6 files changed

+126
-122
lines changed

6 files changed

+126
-122
lines changed

kubernetes/acls/csp1_consumer.yaml

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -54,30 +54,16 @@ spec:
5454
- name: cluster-certs
5555
mountPath: /tls/ca.p12
5656
subPath: ca.p12
57+
- name: config
58+
mountPath: /app/app.properties
59+
subPath: app.properties
5760
env:
58-
# Replace ConfigMap by Environment
59-
- name: KAFKA_BOOTSTRAP_SERVERS
60-
value: kafka-kafka-bootstrap:9093
61-
- name: KAFKA_GROUP_ID
62-
value: csp1-consumer
63-
- name: KAFKA_TOPIC
64-
value: csp1.transactions
65-
- name: KAFKA_CLIENT_ID
66-
value: csp1-consumer
67-
- name: KAFKA_APP_LOG_INFOS
68-
value: "true"
6961
# SSL Configs
70-
- name: KAFKA_SECURITY_PROTOCOL
71-
value: SSL
7262
- name: KAFKA_SSL_KEYSTORE_PASSWORD
7363
valueFrom:
7464
secretKeyRef:
7565
name: csp1-consumer
7666
key: user.password
77-
- name: KAFKA_SSL_KEYSTORE_LOCATION
78-
value: /tls/user.p12
79-
- name: KAFKA_SSL_TRUSTSTORE_LOCATION
80-
value: /tls/ca.p12
8167
- name: KAFKA_SSL_TRUSTSTORE_PASSWORD
8268
valueFrom:
8369
secretKeyRef:
@@ -89,4 +75,22 @@ spec:
8975
secretName: csp1.consumer
9076
- name: cluster-certs
9177
secret:
92-
secretName: kafka-cluster-ca-cert
78+
secretName: kafka-cluster-ca-cert
79+
- name: config
80+
configMap:
81+
name: csp1-consumer-config
82+
---
83+
apiVersion: v1
84+
kind: ConfigMap
85+
metadata:
86+
name: csp1-consumer-config
87+
data:
88+
app.properties: |
89+
bootstrap.servers=kafka-kafka-bootstrap:9093
90+
topic=csp1.transactions
91+
group.id=csp1_consumer
92+
app.log.infos=true
93+
client.id=csp1_consumer
94+
security.protocol=SSL
95+
ssl.keystore.location=/tls/user.p12
96+
ssl.truststore.location=/tls/ca.p12

kubernetes/acls/csp1_producer.yaml

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,10 @@ spec:
4848
- name: cluster-certs
4949
mountPath: /tls/ca.p12
5050
subPath: ca.p12
51+
- name: config
52+
mountPath: /app/app.properties
53+
subPath: app.properties
5154
env:
52-
# Replace ConfigMap by Environment
53-
- name: KAFKA_BOOTSTRAP_SERVERS
54-
value: kafka-kafka-bootstrap:9093
55-
- name: KAFKA_TOPIC
56-
value: csp1.transactions
57-
- name: KAFKA_CLIENT_ID
58-
value: csp1.producer
59-
- name: KAFKA_PRODUCER_MSGS_PER_SEC
60-
value: "1"
61-
- name: KAFKA_APP_LOG_INFOS
62-
value: "true"
6355
# SSL Configs
6456
- name: KAFKA_SECURITY_PROTOCOL
6557
value: SSL
@@ -68,10 +60,6 @@ spec:
6860
secretKeyRef:
6961
name: csp1.producer
7062
key: user.password
71-
- name: KAFKA_SSL_KEYSTORE_LOCATION
72-
value: /tls/user.p12
73-
- name: KAFKA_SSL_TRUSTSTORE_LOCATION
74-
value: /tls/ca.p12
7563
- name: KAFKA_SSL_TRUSTSTORE_PASSWORD
7664
valueFrom:
7765
secretKeyRef:
@@ -83,4 +71,22 @@ spec:
8371
secretName: csp1.producer
8472
- name: cluster-certs
8573
secret:
86-
secretName: kafka-cluster-ca-cert
74+
secretName: kafka-cluster-ca-cert
75+
- name: config
76+
configMap:
77+
name: csp1-producer-config
78+
---
79+
apiVersion: v1
80+
kind: ConfigMap
81+
metadata:
82+
name: csp1-producer-config
83+
data:
84+
app.properties: |
85+
bootstrap.servers=kafka-kafka-bootstrap:9093
86+
topic=csp1.transactions
87+
producer.msgs.per.sec=1
88+
app.log.infos=true
89+
client.id=csp1_producer
90+
security.protocol=SSL
91+
ssl.keystore.location=/tls/user.p12
92+
ssl.truststore.location=/tls/ca.p12

kubernetes/acls/csp1_transformer.yaml

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -68,36 +68,16 @@ spec:
6868
- name: cluster-certs
6969
mountPath: /tls/ca.p12
7070
subPath: ca.p12
71+
- name: config
72+
mountPath: /app/app.properties
73+
subPath: app.properties
7174
env:
72-
# Replace ConfigMap by Environment
73-
- name: KAFKA_BOOTSTRAP_SERVERS
74-
value: kafka-kafka-bootstrap:9093
75-
- name: KAFKA_CSP1_TOPIC
76-
value: csp1.transactions
77-
- name: KAFKA_CLIENT_ID
78-
value: csp1.transformer
79-
- name: KAFKA_APP_LOG_INFOS
80-
value: "true"
81-
- name: KAFKA_OUTPUT_TOPIC
82-
value: transactions
83-
- name: KAFKA_GROUP_ID
84-
value: csp1.transformer
85-
- name: KAFKA_TRANSACTIONAL_ID
86-
value: transactions-transformer-app
87-
- name: KAFKA_PROCESSING_TIME_MS
88-
value: "1000"
8975
# SSL Configs
90-
- name: KAFKA_SECURITY_PROTOCOL
91-
value: SSL
9276
- name: KAFKA_SSL_KEYSTORE_PASSWORD
9377
valueFrom:
9478
secretKeyRef:
9579
name: csp1.producer
9680
key: user.password
97-
- name: KAFKA_SSL_KEYSTORE_LOCATION
98-
value: /tls/user.p12
99-
- name: KAFKA_SSL_TRUSTSTORE_LOCATION
100-
value: /tls/ca.p12
10181
- name: KAFKA_SSL_TRUSTSTORE_PASSWORD
10282
valueFrom:
10383
secretKeyRef:
@@ -109,4 +89,22 @@ spec:
10989
secretName: csp1.producer
11090
- name: cluster-certs
11191
secret:
112-
secretName: kafka-cluster-ca-cert
92+
secretName: kafka-cluster-ca-cert
93+
- name: config
94+
configMap:
95+
name: csp1-transformer-config
96+
---
97+
apiVersion: v1
98+
kind: ConfigMap
99+
metadata:
100+
name: csp1-transformer-config
101+
data:
102+
app.properties: |
103+
bootstrap.servers=kafka-kafka-bootstrap:9093
104+
csp1.topic=csp1.transactions
105+
output.topic=transactions
106+
group.id=csp1_transformer
107+
transactional.id=transactions-transformer-app
108+
processing.time.ms=1000
109+
app.log.infos=true
110+
client.id=csp1_transformer

kubernetes/acls/csp2_producer.yaml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -48,32 +48,16 @@ spec:
4848
- name: cluster-certs
4949
mountPath: /tls/ca.p12
5050
subPath: ca.p12
51+
- name: config
52+
mountPath: /app/app.properties
53+
subPath: app.properties
5154
env:
52-
# Replace ConfigMap by Environment
53-
- name: KAFKA_BOOTSTRAP_SERVERS
54-
value: kafka-kafka-bootstrap:9093
55-
- name: KAFKA_TOPIC
56-
value: csp2.transactions
57-
- name: KAFKA_PRODUCER_BATCH_INTERVAL_S
58-
value: "10"
59-
- name: KAFKA_PRODUCER_MSGS_PER_BATCH
60-
value: "100"
61-
- name: KAFKA_CLIENT_ID
62-
value: csp2.producer
63-
- name: KAFKA_APP_LOG_INFOS
64-
value: "true"
6555
# SSL Configs
66-
- name: KAFKA_SECURITY_PROTOCOL
67-
value: SSL
6856
- name: KAFKA_SSL_KEYSTORE_PASSWORD
6957
valueFrom:
7058
secretKeyRef:
7159
name: csp2.producer
7260
key: user.password
73-
- name: KAFKA_SSL_KEYSTORE_LOCATION
74-
value: /tls/user.p12
75-
- name: KAFKA_SSL_TRUSTSTORE_LOCATION
76-
value: /tls/ca.p12
7761
- name: KAFKA_SSL_TRUSTSTORE_PASSWORD
7862
valueFrom:
7963
secretKeyRef:
@@ -85,4 +69,20 @@ spec:
8569
secretName: csp2.producer
8670
- name: cluster-certs
8771
secret:
88-
secretName: kafka-cluster-ca-cert
72+
secretName: kafka-cluster-ca-cert
73+
- name: config
74+
configMap:
75+
name: csp2-producer-config
76+
---
77+
apiVersion: v1
78+
kind: ConfigMap
79+
metadata:
80+
name: csp2-producer-config
81+
data:
82+
app.properties: |
83+
bootstrap.servers=kafka-kafka-bootstrap:9093
84+
topic=csp2.transactions
85+
producer.batch_interval.s=10
86+
producer.msgs_per_batch=100
87+
app.log.infos=true
88+
client.id=csp2_producer

kubernetes/acls/csp2_transformer.yaml

Lines changed: 23 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -61,38 +61,16 @@ spec:
6161
- name: cluster-certs
6262
mountPath: /tls/ca.p12
6363
subPath: ca.p12
64+
- name: config
65+
mountPath: /app/app.properties
66+
subPath: app.properties
6467
env:
65-
# Replace ConfigMap by Environment
66-
- name: KAFKA_BOOTSTRAP_SERVERS
67-
value: kafka-kafka-bootstrap:9093
68-
- name: KAFKA_APPLICATION_ID
69-
value: csp2-transformer
70-
- name: KAFKA_CSP2_TRANSACTIONS_TOPIC
71-
value: csp2.transactions
72-
- name: KAFKA_CSP2_CUSTOMER_ID_MAPPING_TOPIC
73-
value: csp2.customer.id.mapping
74-
- name: KAFKA_CSP2_CHARGINGSTATION_ID_MAPPING_TOPIC
75-
value: csp2.chargingstation.id.mapping
76-
- name: KAFKA_CLIENT_ID
77-
value: csp2.transformer
78-
- name: KAFKA_APP_LOG_INFOS
79-
value: "true"
80-
- name: KAFKA_OUTPUT_TOPIC
81-
value: transactions
82-
- name: KAFKA_PROCESSING_TIME_MS
83-
value: "1000"
8468
# SSL Configs
85-
- name: KAFKA_SECURITY_PROTOCOL
86-
value: SSL
8769
- name: KAFKA_SSL_KEYSTORE_PASSWORD
8870
valueFrom:
8971
secretKeyRef:
9072
name: csp2.transformer
9173
key: user.password
92-
- name: KAFKA_SSL_KEYSTORE_LOCATION
93-
value: /tls/user.p12
94-
- name: KAFKA_SSL_TRUSTSTORE_LOCATION
95-
value: /tls/ca.p12
9674
- name: KAFKA_SSL_TRUSTSTORE_PASSWORD
9775
valueFrom:
9876
secretKeyRef:
@@ -104,4 +82,23 @@ spec:
10482
secretName: csp2.transformer
10583
- name: cluster-certs
10684
secret:
107-
secretName: kafka-cluster-ca-cert
85+
secretName: kafka-cluster-ca-cert
86+
- name: config
87+
configMap:
88+
name: csp2-transformer-config
89+
---
90+
apiVersion: v1
91+
kind: ConfigMap
92+
metadata:
93+
name: csp2-transformer-config
94+
data:
95+
app.properties: |
96+
bootstrap.servers=kafka-kafka-bootstrap:9093
97+
application.id=csp2-transformer2
98+
csp2.transactions.topic=csp2.transactions
99+
csp2.customer_id_mapping.topic=csp2.customer.id.mapping
100+
csp2.chargingstation_id_mapping.topic=csp2.chargingstation.id.mapping
101+
output.topic=transactions
102+
processing.time.ms=100
103+
app.log.infos=true
104+
client.id=csp2_transformer

kubernetes/acls/dashboard.yaml

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -69,31 +69,16 @@ spec:
6969
- name: cluster-certs
7070
mountPath: /tls/ca.p12
7171
subPath: ca.p12
72+
- name: config
73+
mountPath: /app/app.properties
74+
subPath: app.properties
7275
env:
73-
# Replace ConfigMap by Environment
74-
75-
# transactions.topic=transactions
76-
# web.port=9999
77-
- name: KAFKA_BOOTSTRAP_SERVERS
78-
value: kafka-kafka-bootstrap:9093
79-
- name: KAFKA_APPLICATION_ID
80-
value: dashboard
81-
- name: KAFKA_CLIENT_ID
82-
value: dashboard
83-
- name: KAFKA_TRANSACTIONS_TOPIC
84-
value: transactions
8576
# SSL Configs
86-
- name: KAFKA_SECURITY_PROTOCOL
87-
value: SSL
8877
- name: KAFKA_SSL_KEYSTORE_PASSWORD
8978
valueFrom:
9079
secretKeyRef:
9180
name: dashboard
9281
key: user.password
93-
- name: KAFKA_SSL_KEYSTORE_LOCATION
94-
value: /tls/user.p12
95-
- name: KAFKA_SSL_TRUSTSTORE_LOCATION
96-
value: /tls/ca.p12
9782
- name: KAFKA_SSL_TRUSTSTORE_PASSWORD
9883
valueFrom:
9984
secretKeyRef:
@@ -106,3 +91,17 @@ spec:
10691
- name: cluster-certs
10792
secret:
10893
secretName: kafka-cluster-ca-cert
94+
- name: config
95+
configMap:
96+
name: dashboard-config
97+
---
98+
apiVersion: v1
99+
kind: ConfigMap
100+
metadata:
101+
name: dashboard-config
102+
data:
103+
app.properties: |
104+
bootstrap.servers=kafka-kafka-bootstrap:9093
105+
application.id=dashboard
106+
transactions.topic=transactions
107+
web.port=9999

0 commit comments

Comments
 (0)