Skip to content

Commit 39b285d

Browse files
authored
upgrade go client and prometheus exporter (nginx#6916)
1 parent 48dbe3c commit 39b285d

File tree

9 files changed

+35
-51
lines changed

9 files changed

+35
-51
lines changed

cmd/nginx-ingress/main.go

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import (
2929
cr_validation "github.com/nginxinc/kubernetes-ingress/pkg/apis/configuration/validation"
3030
k8s_nginx "github.com/nginxinc/kubernetes-ingress/pkg/client/clientset/versioned"
3131
conf_scheme "github.com/nginxinc/kubernetes-ingress/pkg/client/clientset/versioned/scheme"
32-
"github.com/nginxinc/nginx-plus-go-client/client"
32+
"github.com/nginxinc/nginx-plus-go-client/v2/client"
3333
nginxCollector "github.com/nginxinc/nginx-prometheus-exporter/collector"
3434
"github.com/prometheus/client_golang/prometheus"
3535
api_v1 "k8s.io/api/core/v1"
@@ -45,10 +45,6 @@ import (
4545
clientcmdapi "k8s.io/client-go/tools/clientcmd/api"
4646
"k8s.io/client-go/tools/record"
4747

48-
kitlog "github.com/go-kit/log"
49-
50-
"github.com/go-kit/log/level"
51-
5248
nl "github.com/nginxinc/kubernetes-ingress/internal/logger"
5349
nic_glog "github.com/nginxinc/kubernetes-ingress/internal/logger/glog"
5450
"github.com/nginxinc/kubernetes-ingress/internal/logger/levels"
@@ -850,9 +846,7 @@ func createPlusAndLatencyCollectors(
850846
streamServerZoneVariableLabels := []string{"resource_type", "resource_name", "resource_namespace"}
851847
variableLabelNames := nginxCollector.NewVariableLabelNames(upstreamServerVariableLabels, serverZoneVariableLabels, upstreamServerPeerVariableLabelNames,
852848
streamUpstreamServerVariableLabels, streamServerZoneVariableLabels, streamUpstreamServerPeerVariableLabelNames, nil)
853-
logger := kitlog.NewLogfmtLogger(os.Stdout)
854-
logger = level.NewFilter(logger, level.AllowError())
855-
plusCollector = nginxCollector.NewNginxPlusCollector(plusClient, "nginx_ingress_nginxplus", variableLabelNames, constLabels, logger)
849+
plusCollector = nginxCollector.NewNginxPlusCollector(plusClient, "nginx_ingress_nginxplus", variableLabelNames, constLabels, l)
856850
go metrics.RunPrometheusListenerForNginxPlus(ctx, *prometheusMetricsListenPort, plusCollector, registry, prometheusSecret)
857851
} else {
858852
httpClient := getSocketClient("/var/lib/nginx/nginx-status.sock")

go.mod

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,12 @@ require (
88
github.com/cert-manager/cert-manager v1.16.2
99
github.com/dlclark/regexp2 v1.11.4
1010
github.com/gkampitakis/go-snaps v0.5.7
11-
github.com/go-kit/log v0.2.1
1211
github.com/golang-jwt/jwt/v4 v4.5.1
1312
github.com/google/go-cmp v0.6.0
1413
github.com/gruntwork-io/terratest v0.47.2
1514
github.com/jinzhu/copier v0.4.0
16-
github.com/nginxinc/nginx-plus-go-client v1.3.0
17-
github.com/nginxinc/nginx-prometheus-exporter v1.3.0
15+
github.com/nginxinc/nginx-plus-go-client/v2 v2.1.0
16+
github.com/nginxinc/nginx-prometheus-exporter v1.4.0
1817
github.com/nginxinc/nginx-service-mesh v1.7.0
1918
github.com/nginxinc/telemetry-exporter v0.1.2
2019
github.com/prometheus/client_golang v1.20.5
@@ -68,7 +67,6 @@ require (
6867
github.com/go-errors/errors v1.4.2 // indirect
6968
github.com/go-jose/go-jose/v4 v4.0.4 // indirect
7069
github.com/go-ldap/ldap/v3 v3.4.8 // indirect
71-
github.com/go-logfmt/logfmt v0.5.1 // indirect
7270
github.com/go-logr/logr v1.4.2 // indirect
7371
github.com/go-logr/stdr v1.2.2 // indirect
7472
github.com/go-logr/zapr v1.3.0 // indirect
@@ -124,7 +122,7 @@ require (
124122
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
125123
github.com/pquerna/otp v1.2.0 // indirect
126124
github.com/prometheus/client_model v0.6.1 // indirect
127-
github.com/prometheus/common v0.55.0 // indirect
125+
github.com/prometheus/common v0.60.1 // indirect
128126
github.com/prometheus/procfs v0.15.1 // indirect
129127
github.com/rogpeppe/go-internal v1.13.1 // indirect
130128
github.com/russross/blackfriday/v2 v2.1.0 // indirect

go.sum

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,8 @@ github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxI
9595
github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og=
9696
github.com/go-jose/go-jose/v4 v4.0.4 h1:VsjPI33J0SB9vQM6PLmNjoHqMQNGPiZ0rHL7Ni7Q6/E=
9797
github.com/go-jose/go-jose/v4 v4.0.4/go.mod h1:NKb5HO1EZccyMpiZNbdUw/14tiXNyUJh188dfnMCAfc=
98-
github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU=
99-
github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0=
10098
github.com/go-ldap/ldap/v3 v3.4.8 h1:loKJyspcRezt2Q3ZRMq2p/0v8iOurlmeXDPw6fikSvQ=
10199
github.com/go-ldap/ldap/v3 v3.4.8/go.mod h1:qS3Sjlu76eHfHGpUdWkAXQTw4beih+cHsco2jXlIXrk=
102-
github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA=
103-
github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs=
104100
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
105101
github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
106102
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
@@ -264,10 +260,10 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq
264260
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
265261
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus=
266262
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
267-
github.com/nginxinc/nginx-plus-go-client v1.3.0 h1:q/aeT4B5k0KLwWlefoBzfLfraBBvIKLuDg+lLFWAo4I=
268-
github.com/nginxinc/nginx-plus-go-client v1.3.0/go.mod h1:n8OFLzrJulJ2fur28Cwa1Qp5DZNS2VicLV+Adt30LQ4=
269-
github.com/nginxinc/nginx-prometheus-exporter v1.3.0 h1:1JtdxsZH0Uwhu1nL/j/QyOXytP5V5j68AEo2X+DFWb0=
270-
github.com/nginxinc/nginx-prometheus-exporter v1.3.0/go.mod h1:hXoH+X6aIKSyQuO6QTIiPKH3eZyxqy/wW8GYiE3dflU=
263+
github.com/nginxinc/nginx-plus-go-client/v2 v2.1.0 h1:1ViGtowDeR6339+6ik5rqyyCbxo22M4FxdLuEFdrghI=
264+
github.com/nginxinc/nginx-plus-go-client/v2 v2.1.0/go.mod h1:/ohb6n086OtbLkOHbC+LWkyMG2MwLRnycSGe7+kl2CM=
265+
github.com/nginxinc/nginx-prometheus-exporter v1.4.0 h1:/k4tsYJkNGufzQx4UPbWOOZzifxXKJl9iCklbvXib+Q=
266+
github.com/nginxinc/nginx-prometheus-exporter v1.4.0/go.mod h1:WV8mTXldpz+TUvLwtgadgTgT74+ff1NoHr9ZQnSIYq8=
271267
github.com/nginxinc/nginx-service-mesh v1.7.0 h1:oxKr+Jdbxkos10VTy5xF2UHCcmfIhqWNlsOK/zPnZDM=
272268
github.com/nginxinc/nginx-service-mesh v1.7.0/go.mod h1:8tREM3kSEUGyk8JT8hdCf/9ol2kEo7hLR8b+m5Yd8Fs=
273269
github.com/nginxinc/telemetry-exporter v0.1.2 h1:97vUGhQYgQ2KEsXKCBmr5gqfuujJCKPHwdg5HKoANUs=
@@ -292,8 +288,8 @@ github.com/prometheus/client_golang v1.20.5 h1:cxppBPuYhUnsO6yo/aoRol4L7q7UFfdm+
292288
github.com/prometheus/client_golang v1.20.5/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE=
293289
github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E=
294290
github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY=
295-
github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc=
296-
github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8=
291+
github.com/prometheus/common v0.60.1 h1:FUas6GcOw66yB/73KC+BOZoFJmbo/1pojoILArPAaSc=
292+
github.com/prometheus/common v0.60.1/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw=
297293
github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc=
298294
github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk=
299295
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=

internal/healthcheck/healthcheck.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
v1 "k8s.io/api/core/v1"
1919

2020
"github.com/nginxinc/kubernetes-ingress/internal/configs"
21-
"github.com/nginxinc/nginx-plus-go-client/client"
21+
"github.com/nginxinc/nginx-plus-go-client/v2/client"
2222
"k8s.io/utils/strings/slices"
2323
)
2424

@@ -40,9 +40,9 @@ type HealthServer struct {
4040
Server *http.Server
4141
URL string
4242
UpstreamsForHost func(host string) []string
43-
NginxUpstreams func() (*client.Upstreams, error)
43+
NginxUpstreams func(ctx context.Context) (*client.Upstreams, error)
4444
StreamUpstreamsForName func(host string) []string
45-
NginxStreamUpstreams func() (*client.StreamUpstreams, error)
45+
NginxStreamUpstreams func(ctx context.Context) (*client.StreamUpstreams, error)
4646
Logger *slog.Logger
4747
}
4848

@@ -106,7 +106,7 @@ func (hs *HealthServer) UpstreamStats(w http.ResponseWriter, r *http.Request) {
106106
return
107107
}
108108

109-
upstreams, err := hs.NginxUpstreams()
109+
upstreams, err := hs.NginxUpstreams(context.Background())
110110
if err != nil {
111111
nl.Errorf(hs.Logger, "error retrieving upstreams for requested hostname: %s", host)
112112
w.WriteHeader(http.StatusInternalServerError)
@@ -144,7 +144,7 @@ func (hs *HealthServer) StreamStats(w http.ResponseWriter, r *http.Request) {
144144
w.WriteHeader(http.StatusNotFound)
145145
return
146146
}
147-
streams, err := hs.NginxStreamUpstreams()
147+
streams, err := hs.NginxStreamUpstreams(context.Background())
148148
if err != nil {
149149
nl.Errorf(hs.Logger, "error retrieving stream upstreams for requested name: %s", n)
150150
w.WriteHeader(http.StatusInternalServerError)

internal/healthcheck/healthcheck_test.go

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package healthcheck_test
22

33
import (
4+
"context"
45
"encoding/json"
56
"errors"
67
"io"
@@ -14,7 +15,7 @@ import (
1415

1516
"github.com/google/go-cmp/cmp"
1617
"github.com/nginxinc/kubernetes-ingress/internal/healthcheck"
17-
"github.com/nginxinc/nginx-plus-go-client/client"
18+
"github.com/nginxinc/nginx-plus-go-client/v2/client"
1819
)
1920

2021
// testHandler creates http handler for testing HealthServer.
@@ -356,7 +357,7 @@ func getUpstreamsForHost(host string) []string {
356357
// Upstreams retrieved using NGINX API client:
357358
// foo.tea.com -> upstream1, upstream2
358359
// bar.tea.com -> upstream2
359-
func getUpstreamsFromNGINXAllUp() (*client.Upstreams, error) {
360+
func getUpstreamsFromNGINXAllUp(_ context.Context) (*client.Upstreams, error) {
360361
ups := client.Upstreams{
361362
"upstream1": client.Upstream{
362363
Peers: []client.Peer{
@@ -390,7 +391,7 @@ func getUpstreamsFromNGINXAllUp() (*client.Upstreams, error) {
390391
// Upstreams retrieved using NGINX API client:
391392
// foo.tea.com -> upstream1, upstream2
392393
// bar.tea.com -> upstream2
393-
func getUpstreamsFromNGINXAllUnhealthy() (*client.Upstreams, error) {
394+
func getUpstreamsFromNGINXAllUnhealthy(_ context.Context) (*client.Upstreams, error) {
394395
ups := client.Upstreams{
395396
"upstream1": client.Upstream{
396397
Peers: []client.Peer{
@@ -425,7 +426,7 @@ func getUpstreamsFromNGINXAllUnhealthy() (*client.Upstreams, error) {
425426
// Upstreams retrieved using NGINX API client
426427
// foo.tea.com -> upstream1, upstream2
427428
// bar.tea.com -> upstream2
428-
func getUpstreamsFromNGINXPartiallyUp() (*client.Upstreams, error) {
429+
func getUpstreamsFromNGINXPartiallyUp(_ context.Context) (*client.Upstreams, error) {
429430
ups := client.Upstreams{
430431
"upstream1": client.Upstream{
431432
Peers: []client.Peer{
@@ -455,14 +456,14 @@ func getUpstreamsFromNGINXPartiallyUp() (*client.Upstreams, error) {
455456
// getUpstreamsFromNGINXNotExistingHost is a helper func used
456457
// for faking response data from NGINX API. It responds
457458
// with empty upstreams on a request for not existing host.
458-
func getUpstreamsFromNGINXNotExistingHost() (*client.Upstreams, error) {
459+
func getUpstreamsFromNGINXNotExistingHost(_ context.Context) (*client.Upstreams, error) {
459460
ups := client.Upstreams{}
460461
return &ups, nil
461462
}
462463

463464
// getUpstreamsFromNGINXErrorFromAPI is a helper func used
464465
// for faking err response from NGINX API client.
465-
func getUpstreamsFromNGINXErrorFromAPI() (*client.Upstreams, error) {
466+
func getUpstreamsFromNGINXErrorFromAPI(_ context.Context) (*client.Upstreams, error) {
466467
return nil, errors.New("nginx api error")
467468
}
468469

@@ -483,7 +484,7 @@ func streamUpstreamsForName(name string) []string {
483484
// for faking response from NGINX Plus client.
484485
//
485486
//nolint:unparam
486-
func streamUpstreamsFromNGINXAllUp() (*client.StreamUpstreams, error) {
487+
func streamUpstreamsFromNGINXAllUp(_ context.Context) (*client.StreamUpstreams, error) {
487488
streamUpstreams := client.StreamUpstreams{
488489
"streamUpstream1": client.StreamUpstream{
489490
Peers: []client.StreamPeer{
@@ -507,7 +508,7 @@ func streamUpstreamsFromNGINXAllUp() (*client.StreamUpstreams, error) {
507508
// for faking response from NGINX Plus client.
508509
//
509510
//nolint:unparam
510-
func streamUpstreamsFromNGINXPartiallyUp() (*client.StreamUpstreams, error) {
511+
func streamUpstreamsFromNGINXPartiallyUp(_ context.Context) (*client.StreamUpstreams, error) {
511512
streamUpstreams := client.StreamUpstreams{
512513
"streamUpstream1": client.StreamUpstream{
513514
Peers: []client.StreamPeer{
@@ -531,7 +532,7 @@ func streamUpstreamsFromNGINXPartiallyUp() (*client.StreamUpstreams, error) {
531532
// for faking response from NGINX Plus client.
532533
//
533534
//nolint:unparam
534-
func streamUpstreamsFromNGINXAllPeersDown() (*client.StreamUpstreams, error) {
535+
func streamUpstreamsFromNGINXAllPeersDown(_ context.Context) (*client.StreamUpstreams, error) {
535536
streamUpstreams := client.StreamUpstreams{
536537
"streamUpstream1": client.StreamUpstream{
537538
Peers: []client.StreamPeer{

internal/metrics/listener.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,9 @@ import (
77
"fmt"
88
"log/slog"
99
"net/http"
10-
"os"
1110
"strconv"
1211
"time"
1312

14-
kitlog "github.com/go-kit/log"
15-
"github.com/go-kit/log/level"
1613
prometheusClient "github.com/nginxinc/nginx-prometheus-exporter/client"
1714
nginxCollector "github.com/nginxinc/nginx-prometheus-exporter/collector"
1815
"github.com/prometheus/client_golang/prometheus"
@@ -29,9 +26,7 @@ func NewNginxMetricsClient(httpClient *http.Client) *prometheusClient.NginxClien
2926

3027
// RunPrometheusListenerForNginx runs an http server to expose Prometheus metrics for NGINX
3128
func RunPrometheusListenerForNginx(ctx context.Context, port int, client *prometheusClient.NginxClient, registry *prometheus.Registry, constLabels map[string]string, prometheusSecret *v1.Secret) {
32-
logger := kitlog.NewLogfmtLogger(os.Stdout)
33-
logger = level.NewFilter(logger, level.AllowError())
34-
registry.MustRegister(nginxCollector.NewNginxCollector(client, "nginx_ingress_nginx", constLabels, logger))
29+
registry.MustRegister(nginxCollector.NewNginxCollector(client, "nginx_ingress_nginx", constLabels, nl.LoggerFromContext(ctx)))
3530
runServer(ctx, strconv.Itoa(port), registry, prometheusSecret)
3631
}
3732

internal/nginx/fake_manager.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
nl "github.com/nginxinc/kubernetes-ingress/internal/logger"
1010
nic_glog "github.com/nginxinc/kubernetes-ingress/internal/logger/glog"
1111
"github.com/nginxinc/kubernetes-ingress/internal/logger/levels"
12-
"github.com/nginxinc/nginx-plus-go-client/client"
12+
"github.com/nginxinc/nginx-plus-go-client/v2/client"
1313
)
1414

1515
// FakeManager provides a fake implementation of the Manager interface.

internal/nginx/manager.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
nl "github.com/nginxinc/kubernetes-ingress/internal/logger"
1919
"github.com/nginxinc/kubernetes-ingress/internal/metrics/collectors"
2020

21-
"github.com/nginxinc/nginx-plus-go-client/client"
21+
"github.com/nginxinc/nginx-plus-go-client/v2/client"
2222
)
2323

2424
const (
@@ -432,7 +432,7 @@ func (lm *LocalManager) UpdateServersInPlus(upstream string, servers []string, c
432432
})
433433
}
434434

435-
added, removed, updated, err := lm.plusClient.UpdateHTTPServers(upstream, upsServers)
435+
added, removed, updated, err := lm.plusClient.UpdateHTTPServers(context.Background(), upstream, upsServers)
436436
if err != nil {
437437
nl.Debugf(lm.logger, "Couldn't update servers of %v upstream: %v", upstream, err)
438438
return fmt.Errorf("error updating servers of %v upstream: %w", upstream, err)
@@ -487,7 +487,7 @@ func (lm *LocalManager) UpdateStreamServersInPlus(upstream string, servers []str
487487
})
488488
}
489489

490-
added, removed, updated, err := lm.plusClient.UpdateStreamServers(upstream, upsServers)
490+
added, removed, updated, err := lm.plusClient.UpdateStreamServers(context.Background(), upstream, upsServers)
491491
if err != nil {
492492
nl.Debugf(lm.logger, "Couldn't update stream servers of %v upstream: %v", upstream, err)
493493
return fmt.Errorf("error updating stream servers of %v upstream: %w", upstream, err)
@@ -699,7 +699,7 @@ func (lm *LocalManager) UpsertSplitClientsKeyVal(zoneName, key, value string) {
699699
key = strings.Trim(key, "\"")
700700
value = strings.Trim(value, "\"")
701701

702-
keyValPairs, err := lm.plusClient.GetKeyValPairs(zoneName)
702+
keyValPairs, err := lm.plusClient.GetKeyValPairs(context.Background(), zoneName)
703703
if err != nil {
704704
lm.tryAddKeyValPair(zoneName, key, value)
705705
return
@@ -713,7 +713,7 @@ func (lm *LocalManager) UpsertSplitClientsKeyVal(zoneName, key, value string) {
713713
}
714714

715715
func (lm *LocalManager) tryAddKeyValPair(zoneName, key, value string) {
716-
err := lm.plusClient.AddKeyValPair(zoneName, key, value)
716+
err := lm.plusClient.AddKeyValPair(context.Background(), zoneName, key, value)
717717
if err != nil {
718718
nl.Warnf(lm.logger, "Failed to add key value pair: %v", err)
719719
} else {
@@ -722,7 +722,7 @@ func (lm *LocalManager) tryAddKeyValPair(zoneName, key, value string) {
722722
}
723723

724724
func (lm *LocalManager) tryModifyKeyValPair(zoneName, key, value string) {
725-
err := lm.plusClient.ModifyKeyValPair(zoneName, key, value)
725+
err := lm.plusClient.ModifyKeyValPair(context.Background(), zoneName, key, value)
726726
if err != nil {
727727
nl.Warnf(lm.logger, "Failed to modify key value pair: %v", err)
728728
} else {

internal/nginx/manager_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package nginx
33
import (
44
"testing"
55

6-
"github.com/nginxinc/nginx-plus-go-client/client"
6+
"github.com/nginxinc/nginx-plus-go-client/v2/client"
77
)
88

99
// Helper functions to create pointers

0 commit comments

Comments
 (0)