Skip to content

Commit

Permalink
chore: better debug info + a clear check on env variable DISABLE_DSC_…
Browse files Browse the repository at this point in the history
…CONFIG (opendatahub-io#986)

* chore: better debug info

Signed-off-by: Wen Zhou <[email protected]>

* fix(DSCI): create defautl DSCI

if not set variable => create DSCI
if set variable + no value => skip create
if set variable to true => skip create
if set variable to false => create DSCI

Signed-off-by: Wen Zhou <[email protected]>

---------

Signed-off-by: Wen Zhou <[email protected]>
  • Loading branch information
zdtsw authored Apr 24, 2024
1 parent 96c85f2 commit 1ccd1cf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,10 @@ func main() { //nolint:funlen
os.Exit(1)
}
// Check if user opted for disabling DSC configuration
_, disableDSCConfig := os.LookupEnv("DISABLE_DSC_CONFIG")
if !disableDSCConfig {
disableDSCConfig, existDSCConfig := os.LookupEnv("DISABLE_DSC_CONFIG")
if existDSCConfig && disableDSCConfig != "false" {
setupLog.Info("DSCI auto creation is disabled")
} else {
var createDefaultDSCIFunc manager.RunnableFunc = func(ctx context.Context) error {
err := upgrade.CreateDefaultDSCI(setupClient, platform, dscApplicationsNamespace, dscMonitoringNamespace)
if err != nil {
Expand Down

0 comments on commit 1ccd1cf

Please sign in to comment.