build: update kubernetes deployment Run. (#2919)

* build: k8s improve.

* refactor: update docker image contents.

* rename seq file.

* build: update k8s origin deploys.

* update check logic.

* update magefile

* update image name.

* update readme

* update Kubernetes Discovery.

* revert pkg.

* update create in k8s

* update service image release CI.

* update deployment image source.

* update mage contents.

* update pkg source.

* update go get pkg.

* fix test file.

* update discovery register.

* update

* update deploy yaml.

* update replica.

* update deployment.

* remove notfication config.

* remove notification and zookeeper.

* update discovery in kubernetes.

* build: improve kubernetes deployment.

* update config field in discovery.

* update ReadMe in deployments.

* update go mod.

* update const quote.

* fix test fields.

* remove unused method.

* remove unused contents.
This commit is contained in:
Monet Lee
2024-12-13 11:02:45 +08:00
committed by GitHub
parent 1eaae5f980
commit 7c7a99f801
192 changed files with 2520 additions and 7897 deletions
+8 -2
View File
@@ -18,7 +18,7 @@ import (
"context"
"flag"
"fmt"
"io/ioutil"
"io"
"log"
"os"
"path/filepath"
@@ -38,10 +38,16 @@ import (
const maxRetry = 180
const (
MountConfigFilePath = "CONFIG_PATH"
DeploymentType = "DEPLOYMENT_TYPE"
KUBERNETES = "kubernetes"
)
func CheckZookeeper(ctx context.Context, config *config.ZooKeeper) error {
// Temporary disable logging
originalLogger := log.Default().Writer()
log.SetOutput(ioutil.Discard)
log.SetOutput(io.Discard)
defer log.SetOutput(originalLogger) // Ensure logging is restored
return zookeeper.Check(ctx, config.Address, config.Schema, zookeeper.WithUserNameAndPassword(config.Username, config.Password))
}