Skip to content

Commit

Permalink
fix: lint warnning
Browse files Browse the repository at this point in the history
Signed-off-by: hlts2 <hiroto.funakoshi.hiroto@gmail.com>
  • Loading branch information
hlts2 committed Dec 7, 2023
1 parent 8192f11 commit 4c11568
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 19 deletions.
6 changes: 5 additions & 1 deletion cmd/gateway/mirror/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorial/vald-multicluster-on-k8s.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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.

<details><summary>vald-01 Namespace</summary><br>

```bash
kubectl get pods -n vald-01
NAME READY STATUS RESTARTS AGE
Expand Down
22 changes: 6 additions & 16 deletions internal/k8s/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Check warning on line 158 in internal/k8s/reconciler.go

View check run for this annotation

Codecov / codecov/patch

internal/k8s/reconciler.go#L157-L158

Added lines #L157 - L158 were not covered by tests
}

// TODO delete --->>>

0 comments on commit 4c11568

Please sign in to comment.