mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
Add Kubernetes operator webook server as DNS target (#10404)
This PR adds a DNS target that ensures to update an entry into Kubernetes operator when a bucket is created or deleted. See minio/operator#264 for details. Co-authored-by: Harshavardhana <harsha@minio.io>
This commit is contained in:
@@ -33,6 +33,7 @@ import (
|
||||
"github.com/minio/cli"
|
||||
"github.com/minio/minio-go/v7/pkg/set"
|
||||
"github.com/minio/minio/cmd/config"
|
||||
"github.com/minio/minio/cmd/config/etcd/dns"
|
||||
"github.com/minio/minio/cmd/logger"
|
||||
"github.com/minio/minio/pkg/auth"
|
||||
"github.com/minio/minio/pkg/certs"
|
||||
@@ -285,6 +286,14 @@ func handleCommonEnvVars() {
|
||||
os.Unsetenv(config.EnvAccessKeyOld)
|
||||
os.Unsetenv(config.EnvSecretKeyOld)
|
||||
}
|
||||
|
||||
url, user, pwd, ok := env.LookupEnv(config.EnvDNSWebhook)
|
||||
if ok {
|
||||
globalDNSConfig, err = dns.NewOperatorDNS(url, user, pwd)
|
||||
if err != nil {
|
||||
logger.Fatal(err, "Unable to fetch the value of "+config.EnvDNSWebhook)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func logStartupMessage(msg string) {
|
||||
|
||||
Reference in New Issue
Block a user