Skip to content

Commit

Permalink
Fix druid defaulter
Browse files Browse the repository at this point in the history
Signed-off-by: Tapajit Chandra Paul <[email protected]>
  • Loading branch information
tapojit047 committed Jul 1, 2024
1 parent 735c468 commit a1aa519
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
10 changes: 7 additions & 3 deletions apis/kubedb/v1alpha2/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -932,10 +932,12 @@ const (
DruidVolumeOperatorConfig = "operator-config-volume"
DruidVolumeMainConfig = "main-config-volume"
DruidVolumeCustomConfig = "custom-config"
DruidMetadataTLSVolume = "metadata-tls-volume"

DruidOperatorConfigDir = "/tmp/config/operator-config"
DruidMainConfigDir = "/opt/druid/conf"
DruidCustomConfigDir = "/tmp/config/custom-config"
DruidOperatorConfigDir = "/tmp/config/operator-config"
DruidMainConfigDir = "/opt/druid/conf"
DruidCustomConfigDir = "/tmp/config/custom-config"
DruidMetadataTLSConfigDir = "/tmp/metadata-tls"

DruidVolumeCommonConfig = "common-config-volume"
DruidCommonConfigFile = "common.runtime.properties"
Expand All @@ -959,6 +961,8 @@ const (
EnvDruidMetdataStoragePassword = "DRUID_METADATA_STORAGE_PASSWORD"
EnvDruidZKServicePassword = "DRUID_ZK_SERVICE_PASSWORD"
EnvDruidCoordinatorAsOverlord = "DRUID_COORDINATOR_AS_OVERLORD"
EnvDruidMetadataTLSEnable = "DRUID_METADATA_TLS_ENABLE"
EnvDruidMetadataStorageType = "DRUID_METADATA_STORAGE_TYPE"

DruidPortCoordinators = 8081
DruidPortOverlords = 8090
Expand Down
6 changes: 6 additions & 0 deletions apis/kubedb/v1alpha2/druid_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,12 @@ func (d *Druid) SetDefaults() {
if d.Spec.MetadataStorage == nil {
d.Spec.MetadataStorage = &MetadataStorage{}
}
if !d.Spec.MetadataStorage.ExternallyManaged {
if d.Spec.MetadataStorage.ObjectReference == nil {
d.Spec.MetadataStorage.ObjectReference = &kmapi.ObjectReference{}
}
d.Spec.MetadataStorage.Name = d.GetMetadataStorageName()
}
if d.Spec.MetadataStorage.Namespace == "" {
d.Spec.MetadataStorage.Namespace = d.Namespace
}
Expand Down

0 comments on commit a1aa519

Please sign in to comment.