Skip to content

Commit

Permalink
fix: defaults for env vars for amalthea sessions
Browse files Browse the repository at this point in the history
  • Loading branch information
olevski committed Sep 17, 2024
1 parent 1de6ebf commit 8835949
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions k8s-watcher/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,19 +75,19 @@ func NewConfigFromEnvOrDie(prefix string) Config {
if asGroup, ok := os.LookupEnv(fmt.Sprintf("%sAMALTHEA_SESSION_GROUP", prefix)); ok {
config.AmaltheaSessionGroup = asGroup
} else {
log.Fatalf("Invalid configuration, %sAMALTHEA_SESSION_GROUP must be provided\n", prefix)
config.AmaltheaSessionGroup = "amalthea.dev"
}

if asVersion, ok := os.LookupEnv(fmt.Sprintf("%sAMALTHEA_SESSION_VERSION", prefix)); ok {
config.AmaltheaSessionVersion = asVersion
} else {
log.Fatalf("invalid configuration, %sAMALTHEA_SESSION_VERSION must be provided", prefix)
config.AmaltheaSessionVersion = "v1alpha1"
}

if asPlural, ok := os.LookupEnv(fmt.Sprintf("%sAMALTHEA_SESSION_PLURAL", prefix)); ok {
config.AmaltheaSessionPlural = asPlural
} else {
log.Fatalf("invalid configuration, %sAMALTHEA_SESSION_PLURAL must be provided", prefix)
config.AmaltheaSessionPlural = "amaltheasessions"
}

if port, ok := os.LookupEnv(fmt.Sprintf("%sPORT", prefix)); ok {
Expand Down

0 comments on commit 8835949

Please sign in to comment.