From 5e0008e43efccf2a1ca4acb06aa5b807e80fd956 Mon Sep 17 00:00:00 2001 From: Spazzy Date: Wed, 1 May 2024 10:43:13 +0200 Subject: [PATCH] chore: set sensible defaults In a lot of cases configuration wont really change if we set sensible and it greatly simplifies deploying aether Signed-off-by: Spazzy --- charts/aether/values.yaml | 13 ++----------- pkg/config/config.go | 3 +++ 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/charts/aether/values.yaml b/charts/aether/values.yaml index 734bfbc..a7247cc 100644 --- a/charts/aether/values.yaml +++ b/charts/aether/values.yaml @@ -14,16 +14,7 @@ image: # this secret will be volumed under `/etc/secrets` secretName: "" -config: - logLevel: "info" - api: - address: 0.0.0.0 - port: 80 - - providersConfig: - scrapingInterval: 5m - - providers: {} +config: {} imagePullSecrets: [] nameOverride: "" @@ -53,7 +44,7 @@ securityContext: {} service: type: ClusterIP - port: 80 + port: 8080 ingress: enabled: false diff --git a/pkg/config/config.go b/pkg/config/config.go index 04e8092..36f09f5 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -40,6 +40,9 @@ func InitConfig(ctx context.Context) { viper.SetDefault("cache.expiry", "3600m") viper.SetDefault("plugins.exporterDir", "/plugins/exporters") viper.SetDefault("plugins.sourceDir", "/plugins/sources") + viper.SetDefault("api.address", "0.0.0.0") + viper.SetDefault("api.port", "8080") + viper.SetDefault("providersConfig.scrapingInterval", "5m") // Find and read the config file err := viper.ReadInConfig()