Skip to content

Commit

Permalink
bump
Browse files Browse the repository at this point in the history
Signed-off-by: Pavel Okhlopkov <[email protected]>
  • Loading branch information
Pavel Okhlopkov committed Nov 6, 2024
1 parent 5a8eadc commit 271b421
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ module github.com/flant/shell-operator
go 1.22.8

require (
github.com/deckhouse/deckhouse/pkg/log v0.0.0-20241102120041-7e44e3e22ab9
github.com/flant/kube-client v1.2.1
github.com/deckhouse/deckhouse/pkg/log v0.0.0-20241106140903-258b93b3334e
github.com/flant/kube-client v0.0.0-20241106144802-74dd66e8b239
github.com/flant/libjq-go v1.6.3-0.20201126171326-c46a40ff22ee // branch: master
github.com/go-chi/chi/v5 v5.1.0
github.com/go-openapi/spec v0.19.8
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/deckhouse/deckhouse/pkg/log v0.0.0-20241102120041-7e44e3e22ab9 h1:gCV1iKcaE69x3Knzj8isyVyEtRuG2YI4nmLIzBHBWeQ=
github.com/deckhouse/deckhouse/pkg/log v0.0.0-20241102120041-7e44e3e22ab9/go.mod h1:Mk5HRzkc5pIcDIZ2JJ6DPuuqnwhXVkb3you8M8Mg+4w=
github.com/deckhouse/deckhouse/pkg/log v0.0.0-20241106140903-258b93b3334e h1:QUQy+5Bv7/UzhfrytiG3c5gfLGhPppepVbRpbMisVIw=
github.com/deckhouse/deckhouse/pkg/log v0.0.0-20241106140903-258b93b3334e/go.mod h1:Mk5HRzkc5pIcDIZ2JJ6DPuuqnwhXVkb3you8M8Mg+4w=
github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g=
github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U=
github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/flant/go-openapi-validate v0.19.12-flant.0 h1:xk6kvc9fHKMgUdB6J7kbpbLR5vJOUzKAK8p3nrD7mDk=
github.com/flant/go-openapi-validate v0.19.12-flant.0/go.mod h1:Rzou8hA/CBw8donlS6WNEUQupNvUZ0waH08tGe6kAQ4=
github.com/flant/kube-client v1.2.1 h1:8lHF8+wGZrhsXM6TeS3CNAPupXyx7UJLkBvNMpCe/ZI=
github.com/flant/kube-client v1.2.1/go.mod h1:62vCzrIUzWMU4DB0Pn6/02Pu7uwKh5/mHGWy2NmxZAk=
github.com/flant/kube-client v0.0.0-20241106144802-74dd66e8b239 h1:CALDLTCaqutYLAeCM+VaueLu73r66jtL5/8qRZ8jWW0=
github.com/flant/kube-client v0.0.0-20241106144802-74dd66e8b239/go.mod h1:eMa3aJ6V1PRWSQ/RCROkObDpY4S74uM84SJS4G/LINg=
github.com/flant/libjq-go v1.6.3-0.20201126171326-c46a40ff22ee h1:evii83J+/6QGNvyf6tjQ/p27DPY9iftxIBb37ALJRTg=
github.com/flant/libjq-go v1.6.3-0.20201126171326-c46a40ff22ee/go.mod h1:f+REaGl/+pZR97rbTcwHEka/MAipoQQ2Mc0iQUj4ak0=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
Expand Down
2 changes: 1 addition & 1 deletion pkg/shell-operator/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func (op *ShellOperator) AssembleCommonOperator(listenAddress, listenPort string
op.setupHookMetricStorage()

// 'main' Kubernetes client.
op.KubeClient, err = initDefaultMainKubeClient(op.MetricStorage)
op.KubeClient, err = initDefaultMainKubeClient(op.MetricStorage, op.logger)
if err != nil {
return err
}
Expand Down
14 changes: 7 additions & 7 deletions pkg/shell-operator/kube_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ var (

// defaultMainKubeClient creates a Kubernetes client for hooks. No timeout specified, because
// timeout will reset connections for Watchers.
func defaultMainKubeClient(metricStorage *metric_storage.MetricStorage, metricLabels map[string]string) *klient.Client {
client := klient.New()
func defaultMainKubeClient(metricStorage *metric_storage.MetricStorage, metricLabels map[string]string, logger *log.Logger) *klient.Client {
client := klient.New(logger)
client.WithContextName(app.KubeContext)
client.WithConfigPath(app.KubeConfig)
client.WithRateLimiterSettings(app.KubeClientQps, app.KubeClientBurst)
Expand All @@ -29,10 +29,10 @@ func defaultMainKubeClient(metricStorage *metric_storage.MetricStorage, metricLa
return client
}

func initDefaultMainKubeClient(metricStorage *metric_storage.MetricStorage) (*klient.Client, error) {
func initDefaultMainKubeClient(metricStorage *metric_storage.MetricStorage, logger *log.Logger) (*klient.Client, error) {
//nolint:staticcheck
klient.RegisterKubernetesClientMetrics(metricStorage, defaultMainKubeClientMetricLabels)
kubeClient := defaultMainKubeClient(metricStorage, defaultMainKubeClientMetricLabels)
kubeClient := defaultMainKubeClient(metricStorage, defaultMainKubeClientMetricLabels, logger.Named("main-kube-client"))
err := kubeClient.Init()
if err != nil {
return nil, fmt.Errorf("initialize 'main' Kubernetes client: %s\n", err)
Expand All @@ -41,8 +41,8 @@ func initDefaultMainKubeClient(metricStorage *metric_storage.MetricStorage) (*kl
}

// defaultObjectPatcherKubeClient initializes a Kubernetes client for ObjectPatcher. Timeout is specified here.
func defaultObjectPatcherKubeClient(metricStorage *metric_storage.MetricStorage, metricLabels map[string]string) *klient.Client {
client := klient.New()
func defaultObjectPatcherKubeClient(metricStorage *metric_storage.MetricStorage, metricLabels map[string]string, logger *log.Logger) *klient.Client {
client := klient.New(logger)
client.WithContextName(app.KubeContext)
client.WithConfigPath(app.KubeConfig)
client.WithRateLimiterSettings(app.ObjectPatcherKubeClientQps, app.ObjectPatcherKubeClientBurst)
Expand All @@ -53,7 +53,7 @@ func defaultObjectPatcherKubeClient(metricStorage *metric_storage.MetricStorage,
}

func initDefaultObjectPatcher(metricStorage *metric_storage.MetricStorage, logger *log.Logger) (*object_patch.ObjectPatcher, error) {
patcherKubeClient := defaultObjectPatcherKubeClient(metricStorage, defaultObjectPatcherKubeClientMetricLabels)
patcherKubeClient := defaultObjectPatcherKubeClient(metricStorage, defaultObjectPatcherKubeClientMetricLabels, logger.Named("object-patcher-kube-client"))
err := patcherKubeClient.Init()
if err != nil {
return nil, fmt.Errorf("initialize Kubernetes client for Object patcher: %s\n", err)
Expand Down

0 comments on commit 271b421

Please sign in to comment.