Skip to content

Commit c49f184

Browse files
committed
fix ssl bundle settings
ca to trust store cert and private key to keystore
1 parent bb36572 commit c49f184

File tree

3 files changed

+37
-17
lines changed

3 files changed

+37
-17
lines changed

chart/mongodb-probe/templates/configmap.yaml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,26 @@ data:
99
1010
spring.ssl.bundle.pem.mongodb-ssl-bundle.reload-on-update=false
1111
12-
1312
{{- with .Values.mongodb.tlsCa }}
1413
spring.ssl.bundle.pem.mongodb-ssl-bundle.truststore.certificate=file:/workspace/config/tls/{{ . }}
1514
{{- end }}
1615
16+
# {{- with .Values.mongodb.tlsCert }}
17+
# spring.ssl.bundle.pem.mongodb-ssl-bundle.truststore.certificate=file:/workspace/config/tls/{{ . }}
18+
# {{- end }}
19+
#
20+
# {{- with .Values.mongodb.tlsKey }}
21+
# spring.ssl.bundle.pem.mongodb-ssl-bundle.truststore.private-key=file:/workspace/config/tls/{{ . }}
22+
# {{- end }}
23+
24+
1725
{{- with .Values.mongodb.tlsCert }}
18-
spring.ssl.bundle.pem.mongodb-ssl-bundle.truststore.certificate=file:/workspace/config/tls/{{ . }}
26+
spring.ssl.bundle.pem.mongodb-ssl-bundle.keystore.certificate=file:/workspace/config/tls/{{ . }}
1927
{{- end }}
20-
28+
2129
{{- with .Values.mongodb.tlsKey }}
22-
spring.ssl.bundle.pem.mongodb-ssl-bundle.truststore.private-key=file:/workspace/config/tls/{{ . }}
30+
spring.ssl.bundle.pem.mongodb-ssl-bundle.keystore.private-key=file:/workspace/config/tls/{{ . }}
2331
{{- end }}
24-
25-
26-
27-
#spring.ssl.bundle.pem.mongodb-ssl-bundle.keystore.certificate=file:/workspace/config/tls/tlsCertFile
28-
#spring.ssl.bundle.pem.mongodb-ssl-bundle.keystore.private-key=file:/workspace/config/tls/tlsKeyFile
2932

3033

3134

cloudfoundry/credentials.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"uri": "mongodb://user:password@mongodb-host:27017/database",
3+
"username": "user",
4+
"password": "password",
5+
"host": "mongodb-host",
6+
"port": "27017",
7+
"database": "database"
8+
}

pom.xml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,24 @@
5151

5252
<!-- Spring Cloud -->
5353
<dependency>
54-
<groupId>org.springframework.cloud</groupId>
55-
<artifactId>spring-cloud-cloudfoundry-connector</artifactId>
56-
<version>2.0.9.RELEASE</version>
57-
</dependency>
58-
<dependency>
59-
<groupId>org.springframework.cloud</groupId>
60-
<artifactId>spring-cloud-spring-service-connector</artifactId>
61-
<version>2.0.9.RELEASE</version>
54+
<groupId>io.pivotal.cfenv</groupId>
55+
<artifactId>java-cfenv-boot</artifactId>
56+
<version>3.4.0</version>
6257
</dependency>
58+
59+
<!-- <dependency>-->
60+
<!-- <groupId>org.springframework.cloud</groupId>-->
61+
<!-- <artifactId>spring-cloud-cloudfoundry-connector</artifactId>-->
62+
<!-- <version>2.0.9.RELEASE</version>-->
63+
<!-- </dependency>-->
64+
65+
<!-- <dependency>-->
66+
<!-- <groupId>org.springframework.cloud</groupId>-->
67+
<!-- <artifactId>spring-cloud-spring-service-connector</artifactId>-->
68+
<!-- <version>2.0.9.RELEASE</version>-->
69+
<!-- </dependency>-->
70+
71+
6372

6473
<dependency>
6574
<groupId>io.opentelemetry.instrumentation</groupId>

0 commit comments

Comments
 (0)