From 4c11568687067753451653f9a6398fe02f70cbb2 Mon Sep 17 00:00:00 2001 From: hlts2 Date: Thu, 7 Dec 2023 14:36:24 +0900 Subject: [PATCH] fix: lint warnning Signed-off-by: hlts2 --- cmd/gateway/mirror/main.go | 6 +++++- docs/tutorial/vald-multicluster-on-k8s.md | 4 ++-- internal/k8s/reconciler.go | 22 ++++++---------------- 3 files changed, 13 insertions(+), 19 deletions(-) diff --git a/cmd/gateway/mirror/main.go b/cmd/gateway/mirror/main.go index a8bdbad9c5..78a04611a4 100644 --- a/cmd/gateway/mirror/main.go +++ b/cmd/gateway/mirror/main.go @@ -45,7 +45,11 @@ func main() { return cfg, &cfg.GlobalConfig, nil }), runner.WithDaemonInitializer(func(cfg interface{}) (runner.Runner, error) { - return usecase.New(cfg.(*config.Data)) + c, ok := cfg.(*config.Data) + if !ok { + return nil, errors.ErrInvalidConfig + } + return usecase.New(c) }), ) })(); err != nil { diff --git a/docs/tutorial/vald-multicluster-on-k8s.md b/docs/tutorial/vald-multicluster-on-k8s.md index 110c75e43a..a73a1e0c37 100644 --- a/docs/tutorial/vald-multicluster-on-k8s.md +++ b/docs/tutorial/vald-multicluster-on-k8s.md @@ -4,7 +4,7 @@ This article shows how to deploy multiple Vald clusters on your Kubernetes clust ## Overview -Vald cluster consists of multiple micro-services. +Vald cluster consists of multiple microservices. In [Get Started](https://vald.vdaas.org/docs/tutorial/get-started), you may use 4 kinds of components to deploy the Vald cluster. @@ -120,7 +120,7 @@ In this section, you will deploy three Vald clusters consisting of `vald-agent-n If success deployment, the Vald cluster’s components should run on each Kubernetes Namespace.
vald-01 Namespace
- + ```bash kubectl get pods -n vald-01 NAME READY STATUS RESTARTS AGE diff --git a/internal/k8s/reconciler.go b/internal/k8s/reconciler.go index 51ecc54800..ddcfc193cd 100644 --- a/internal/k8s/reconciler.go +++ b/internal/k8s/reconciler.go @@ -29,36 +29,29 @@ import ( "k8s.io/apimachinery/pkg/runtime" "sigs.k8s.io/controller-runtime/pkg/builder" "sigs.k8s.io/controller-runtime/pkg/client" - cli "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/config" "sigs.k8s.io/controller-runtime/pkg/handler" "sigs.k8s.io/controller-runtime/pkg/manager" "sigs.k8s.io/controller-runtime/pkg/reconcile" ) -// TODO delete <<<--- - type ( Manager = manager.Manager OwnerReference = v1.OwnerReference ) type ( - Object = cli.Object - ObjectKey = cli.ObjectKey - DeleteAllOfOptions = cli.DeleteAllOfOptions - ListOptions = cli.ListOptions - MatchingLabels = cli.MatchingLabels - InNamespace = cli.InNamespace + Object = client.Object + ObjectKey = client.ObjectKey + DeleteAllOfOptions = client.DeleteAllOfOptions + ListOptions = client.ListOptions + MatchingLabels = client.MatchingLabels + InNamespace = client.InNamespace ) -// TODO delete --->>> - type Controller interface { Start(ctx context.Context) (<-chan error, error) - // TODO delete <<<--- GetManager() Manager - // TODO delete --->>> } var Now = v1.Now @@ -161,9 +154,6 @@ func (c *controller) Start(ctx context.Context) (<-chan error, error) { return ech, nil } -// TODO delete <<<--- func (c *controller) GetManager() Manager { return c.mgr } - -// TODO delete --->>>