Skip to content

Commit 2431b82

Browse files
authored
Merge pull request #69 from cdapio/enhancement/securitySecret-consistency
[CDAP-18079] Improve SecuritySecret CConf Consistency
2 parents 2d36d9e + 6fc0dc8 commit 2431b82

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

controllers/cdapmaster_controller.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,11 @@ func ApplyDefaults(resource interface{}) {
133133
spec.Config[confLocalDataDirKey] = confLocalDataDirVal
134134
}
135135

136+
// Set twill.security.secret.disk.name to be consistent with securitySecret if not overwritten.
137+
if _, ok := spec.Config[confTwillSecuritySecretDiskName]; !ok {
138+
spec.Config[confTwillSecuritySecretDiskName] = spec.SecuritySecret
139+
}
140+
136141
// Disable explore
137142
spec.Config[confExploreEnabled] = "false"
138143

controllers/constants.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,13 @@ const (
4747
fieldNameCDAPExternalServiceSpec = "CDAPExternalServiceSpec"
4848

4949
// cconf and hconf
50-
confExploreEnabled = "explore.enabled"
51-
confLocalDataDirKey = "local.data.dir"
52-
confLocalDataDirVal = "/data"
53-
confRouterServerAddress = "router.server.address"
54-
confRouterBindPort = "router.bind.port"
55-
confUserInterfaceBindPort = "dashboard.bind.port"
50+
confExploreEnabled = "explore.enabled"
51+
confLocalDataDirKey = "local.data.dir"
52+
confLocalDataDirVal = "/data"
53+
confRouterServerAddress = "router.server.address"
54+
confRouterBindPort = "router.bind.port"
55+
confUserInterfaceBindPort = "dashboard.bind.port"
56+
confTwillSecuritySecretDiskName = "twill.security.secret.disk.name"
5657

5758
// default values
5859
defaultImage = "gcr.io/cdapio/cdap:latest"

0 commit comments

Comments
 (0)