In case of tap re-run, update the config and start a proxy

This commit is contained in:
M. Mert Yildiran
2023-09-25 23:21:38 +03:00
parent 41dacbff1a
commit 5bd44b57f4
7 changed files with 94 additions and 18 deletions

View File

@@ -74,13 +74,17 @@ func updateLicense(licenseKey string) {
log.Error().Err(err).Send()
return
}
err = kubernetes.SetSecret(kubernetesProvider, "LICENSE", config.Config.License)
updated, err := kubernetes.SetSecret(kubernetesProvider, kubernetes.SECRET_LICENSE, config.Config.License)
if err != nil {
log.Error().Err(err).Send()
return
}
log.Info().Msg("Updated the license. Exiting.")
if updated {
log.Info().Msg("Updated the license, exiting...")
} else {
log.Info().Msg("Exiting...")
}
go func() {
time.Sleep(2 * time.Second)