Enable ability to flip configuration of allownomutate

This commit is contained in:
2023-03-24 09:38:00 -05:00
parent 80ef925ff4
commit 8094816911
9 changed files with 50 additions and 57 deletions

View File

@@ -10,6 +10,9 @@ import (
"mutating-webhook/internal/config"
)
// global configuration
var cfg config.Config
func forever() {
c := make(chan os.Signal, 1)
signal.Notify(c, os.Interrupt, syscall.SIGINT, syscall.SIGTERM)
@@ -24,9 +27,9 @@ func main() {
}()
// initialize application configuration
cfg := config.Init()
cfg = config.Init()
go httpServer(cfg)
go httpServer()
forever()
}