Skip to content

Commit 8221cf0

Browse files
authored
Merge pull request #428 from SUSE/merge-upstream
Merge upstream
2 parents 381e609 + a6c3836 commit 8221cf0

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ This release contains a number of fixes and improvements:
4545
- Workload Summary: Ring chart series toggled on refresh & legend vs ring colours missmatched [\#389](https://github.com/SUSE/stratos/issues/389)
4646
- Can't connect a K3S endpoint [\#372](https://github.com/SUSE/stratos/issues/372)
4747
- Ensure `cf push` works from Windows [\#4465](https://github.com/cloudfoundry/stratos/issues/4465)
48+
- SSLMode is not respected for database connections [\#4434](https://github.com/cloudfoundry/stratos/issues/4434)
4849
- Visiting marketplace tab breaks service list [\#4397](https://github.com/cloudfoundry/stratos/issues/4397)
4950
- CF Application reports error after restage [\#4392](https://github.com/cloudfoundry/stratos/issues/4392)
5051
- Helm Chart: Icon is missing [\#4370](https://github.com/cloudfoundry/stratos/issues/4370)

src/jetstream/datastore/database_cf_config.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ func ParseCFEnvs(db *DatabaseConfig, env *env.VarSet) (bool, error) {
4747
log.Info("No DB configurations defined, will use SQLite")
4848
return false, nil
4949
}
50-
return findDatabaseConfig(vcapServices, db), nil
50+
return findDatabaseConfig(vcapServices, db, env), nil
5151
}
5252

53-
func findDatabaseConfig(vcapServices map[string][]VCAPService, db *DatabaseConfig) bool {
53+
func findDatabaseConfig(vcapServices map[string][]VCAPService, db *DatabaseConfig, env *env.VarSet) bool {
5454
var service VCAPService
5555
configs := findDatabaseConfigurations(vcapServices)
5656
log.Infof("Found %d database service instances", len(configs))
@@ -78,7 +78,7 @@ func findDatabaseConfig(vcapServices map[string][]VCAPService, db *DatabaseConfi
7878
db.Username = getDBCredentialsValue(dbCredentials["username"])
7979
db.Password = getDBCredentialsValue(dbCredentials["password"])
8080
db.Host = getDBCredentialsValue(dbCredentials["hostname"])
81-
db.SSLMode = "disable"
81+
db.SSLMode = env.String("DB_SSL_MODE", "disable")
8282
db.Port, _ = strconv.Atoi(getDBCredentialsValue(dbCredentials["port"]))
8383
// Note - Both isPostgresService and isMySQLService look at the credentials uri & tags
8484
if isPostgresService(service) {

0 commit comments

Comments
 (0)