Skip to content

Commit cf28033

Browse files
Merge branch 'kubernetes-sigs:master' into feat-emit-events-for-changes
2 parents dcbcf99 + 30cbbc0 commit cf28033

File tree

11 files changed

+307
-80
lines changed

11 files changed

+307
-80
lines changed

go.mod

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ require (
88
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.10.1
99
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dns/armdns v1.2.0
1010
github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/privatedns/armprivatedns v1.3.0
11-
github.com/F5Networks/k8s-bigip-ctlr/v2 v2.20.0
11+
github.com/F5Networks/k8s-bigip-ctlr/v2 v2.20.1
1212
github.com/Yamashou/gqlgenc v0.33.0
1313
github.com/akamai/AkamaiOPEN-edgegrid-golang v1.2.2
1414
github.com/alecthomas/kingpin/v2 v2.4.0
1515
github.com/aliyun/alibaba-cloud-sdk-go v1.63.107
1616
github.com/aws/aws-sdk-go-v2 v1.36.5
1717
github.com/aws/aws-sdk-go-v2/config v1.29.17
1818
github.com/aws/aws-sdk-go-v2/credentials v1.17.70
19-
github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.19.4
19+
github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.19.5
2020
github.com/aws/aws-sdk-go-v2/service/dynamodb v1.44.0
2121
github.com/aws/aws-sdk-go-v2/service/route53 v1.53.0
2222
github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.35.7
@@ -29,7 +29,7 @@ require (
2929
github.com/cloudfoundry-community/go-cfclient v0.0.0-20190201205600-f136f9222381
3030
github.com/datawire/ambassador v1.12.4
3131
github.com/denverdino/aliyungo v0.0.0-20230411124812-ab98a9173ace
32-
github.com/digitalocean/godo v1.157.0
32+
github.com/digitalocean/godo v1.158.0
3333
github.com/dnsimple/dnsimple-go v1.7.0
3434
github.com/exoscale/egoscale v0.102.3
3535
github.com/ffledgling/pdns-go v0.0.0-20180219074714-524e7daccd99
@@ -38,13 +38,12 @@ require (
3838
github.com/goccy/go-yaml v1.18.0
3939
github.com/google/go-cmp v0.7.0
4040
github.com/google/uuid v1.6.0
41-
github.com/linki/instrumented_http v0.3.0
4241
github.com/linode/linodego v1.53.0
4342
github.com/maxatome/go-testdeep v1.14.0
4443
github.com/miekg/dns v1.1.67
4544
github.com/openshift/api v0.0.0-20230607130528-611114dca681
4645
github.com/openshift/client-go v0.0.0-20230607134213-3cd0021bbee3
47-
github.com/oracle/oci-go-sdk/v65 v65.95.1
46+
github.com/oracle/oci-go-sdk/v65 v65.95.2
4847
github.com/ovh/go-ovh v1.9.0
4948
github.com/patrickmn/go-cache v2.1.0+incompatible
5049
github.com/pluralsh/gqlclient v1.12.2
@@ -64,13 +63,13 @@ require (
6463
golang.org/x/sync v0.16.0
6564
golang.org/x/text v0.27.0
6665
golang.org/x/time v0.12.0
67-
google.golang.org/api v0.241.0
66+
google.golang.org/api v0.242.0
6867
gopkg.in/ns1/ns1-go.v2 v2.14.4
6968
istio.io/api v1.26.2
7069
istio.io/client-go v1.26.2
71-
k8s.io/api v0.33.2
72-
k8s.io/apimachinery v0.33.2
73-
k8s.io/client-go v0.33.2
70+
k8s.io/api v0.33.3
71+
k8s.io/apimachinery v0.33.3
72+
k8s.io/client-go v0.33.3
7473
k8s.io/klog/v2 v2.130.1
7574
sigs.k8s.io/controller-runtime v0.21.0
7675
sigs.k8s.io/gateway-api v1.3.0
@@ -90,7 +89,7 @@ require (
9089
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.36 // indirect
9190
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.36 // indirect
9291
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect
93-
github.com/aws/aws-sdk-go-v2/service/dynamodbstreams v1.25.6 // indirect
92+
github.com/aws/aws-sdk-go-v2/service/dynamodbstreams v1.26.0 // indirect
9493
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.4 // indirect
9594
github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.10.17 // indirect
9695
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.17 // indirect

go.sum

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ github.com/AzureAD/microsoft-authentication-library-for-go v1.4.2/go.mod h1:wP83
4848
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
4949
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
5050
github.com/DATA-DOG/go-sqlmock v1.4.1/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
51-
github.com/F5Networks/k8s-bigip-ctlr/v2 v2.20.0 h1:WqsoU+5aA9kDypiBzWbLSkESQUA3NDLNvkjTFzipX3I=
52-
github.com/F5Networks/k8s-bigip-ctlr/v2 v2.20.0/go.mod h1:/lGdCgv0e1qrS4ithe2qTU6q23IT8kqZhMlFBQmuNi0=
51+
github.com/F5Networks/k8s-bigip-ctlr/v2 v2.20.1 h1:O4a7qJCbH2bQPzsk7NNIm9/2orkYEH7g4Uerdp0gzps=
52+
github.com/F5Networks/k8s-bigip-ctlr/v2 v2.20.1/go.mod h1:/lGdCgv0e1qrS4ithe2qTU6q23IT8kqZhMlFBQmuNi0=
5353
github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo=
5454
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
5555
github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E=
@@ -120,8 +120,8 @@ github.com/aws/aws-sdk-go-v2/config v1.29.17 h1:jSuiQ5jEe4SAMH6lLRMY9OVC+TqJLP56
120120
github.com/aws/aws-sdk-go-v2/config v1.29.17/go.mod h1:9P4wwACpbeXs9Pm9w1QTh6BwWwJjwYvJ1iCt5QbCXh8=
121121
github.com/aws/aws-sdk-go-v2/credentials v1.17.70 h1:ONnH5CM16RTXRkS8Z1qg7/s2eDOhHhaXVd72mmyv4/0=
122122
github.com/aws/aws-sdk-go-v2/credentials v1.17.70/go.mod h1:M+lWhhmomVGgtuPOhO85u4pEa3SmssPTdcYpP/5J/xc=
123-
github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.19.4 h1:jKR2jpZqpmBSAVX7xxdOi1E3Z0E9WizMIlxlGI3Hh9o=
124-
github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.19.4/go.mod h1:ATyfcCpSMZuB/rnpFcVbiqrTiFzdwcTXeVbgEk6iXbY=
123+
github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.19.5 h1:oUEqVqonG3xuarrsze1KVJ30KagNYDemikTbdu8KlN8=
124+
github.com/aws/aws-sdk-go-v2/feature/dynamodb/attributevalue v1.19.5/go.mod h1:VNM08cHlOsIbSHRqb6D/M2L4kKXfJv3A2/f0GNbOQSc=
125125
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.32 h1:KAXP9JSHO1vKGCr5f4O6WmlVKLFFXgWYAGoJosorxzU=
126126
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.32/go.mod h1:h4Sg6FQdexC1yYG9RDnOvLbW1a/P986++/Y/a+GyEM8=
127127
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.36 h1:SsytQyTMHMDPspp+spo7XwXTP44aJZZAC7fBV2C5+5s=
@@ -132,8 +132,8 @@ github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 h1:bIqFDwgGXXN1Kpp99pDOdKMTTb5d
132132
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3/go.mod h1:H5O/EsxDWyU+LP/V8i5sm8cxoZgc2fdNR9bxlOFrQTo=
133133
github.com/aws/aws-sdk-go-v2/service/dynamodb v1.44.0 h1:A99gjqZDbdhjtjJVZrmVzVKO2+p3MSg35bDWtbMQVxw=
134134
github.com/aws/aws-sdk-go-v2/service/dynamodb v1.44.0/go.mod h1:mWB0GE1bqcVSvpW7OtFA0sKuHk52+IqtnsYU2jUfYAs=
135-
github.com/aws/aws-sdk-go-v2/service/dynamodbstreams v1.25.6 h1:QHaS/SHXfyNycuu4GiWb+AfW5T3bput6X5E3Ai/Q31M=
136-
github.com/aws/aws-sdk-go-v2/service/dynamodbstreams v1.25.6/go.mod h1:He/RikglWUczbkV+fkdpcV/3GdL/rTRNVy7VaUiezMo=
135+
github.com/aws/aws-sdk-go-v2/service/dynamodbstreams v1.26.0 h1:0wOCTKrmwkyC8Bk76hYH/B4IJn5MGt6gMkSXc0A2uyc=
136+
github.com/aws/aws-sdk-go-v2/service/dynamodbstreams v1.26.0/go.mod h1:He/RikglWUczbkV+fkdpcV/3GdL/rTRNVy7VaUiezMo=
137137
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.4 h1:CXV68E2dNqhuynZJPB80bhPQwAKqBWVer887figW6Jc=
138138
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.4/go.mod h1:/xFi9KtvBXP97ppCz1TAEvU1Uf66qvid89rbem3wCzQ=
139139
github.com/aws/aws-sdk-go-v2/service/internal/endpoint-discovery v1.10.17 h1:x187MqiHwBGjMGAed8Y8K1VGuCtFvQvXb24r+bwmSdo=
@@ -255,8 +255,8 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZm
255255
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
256256
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
257257
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
258-
github.com/digitalocean/godo v1.157.0 h1:ReELaS6FxXNf8gryUiVH0wmyUmZN8/NCmBX4gXd3F0o=
259-
github.com/digitalocean/godo v1.157.0/go.mod h1:tYeiWY5ZXVpU48YaFv0M5irUFHXGorZpDNm7zzdWMzM=
258+
github.com/digitalocean/godo v1.158.0 h1:XW7UlJn2X2qH8JOm6N63Hk/PjPHjLdYgG4zPaSbmbGc=
259+
github.com/digitalocean/godo v1.158.0/go.mod h1:tYeiWY5ZXVpU48YaFv0M5irUFHXGorZpDNm7zzdWMzM=
260260
github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E=
261261
github.com/dnsimple/dnsimple-go v1.7.0 h1:JKu9xJtZ3SqOC+BuYgAWeab7+EEx0sz422vu8j611ZY=
262262
github.com/dnsimple/dnsimple-go v1.7.0/go.mod h1:EKpuihlWizqYafSnQHGCd/gyvy3HkEQJ7ODB4KdV8T8=
@@ -683,8 +683,6 @@ github.com/lib/pq v1.7.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
683683
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE=
684684
github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM=
685685
github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4=
686-
github.com/linki/instrumented_http v0.3.0 h1:dsN92+mXpfZtjJraartcQ99jnuw7fqsnPDjr85ma2dA=
687-
github.com/linki/instrumented_http v0.3.0/go.mod h1:pjYbItoegfuVi2GUOMhEqzvm/SJKuEL3H0tc8QRLRFk=
688686
github.com/linode/linodego v1.53.0 h1:UWr7bUUVMtcfsuapC+6blm6+jJLPd7Tf9MZUpdOERnI=
689687
github.com/linode/linodego v1.53.0/go.mod h1:bI949fZaVchjWyKIA08hNyvAcV6BAS+PM2op3p7PAWA=
690688
github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc=
@@ -828,8 +826,8 @@ github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxS
828826
github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw=
829827
github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4=
830828
github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4=
831-
github.com/oracle/oci-go-sdk/v65 v65.95.1 h1:KCYeX+c+A0ezLVgXKpEcgXNukn6wBkD9oWoSV2FlaUs=
832-
github.com/oracle/oci-go-sdk/v65 v65.95.1/go.mod h1:u6XRPsw9tPziBh76K7GrrRXPa8P8W3BQeqJ6ZZt9VLA=
829+
github.com/oracle/oci-go-sdk/v65 v65.95.2 h1:0HJ0AgpLydp/DtvYrF2d4str2BjXOVAeNbuW7E07g94=
830+
github.com/oracle/oci-go-sdk/v65 v65.95.2/go.mod h1:u6XRPsw9tPziBh76K7GrrRXPa8P8W3BQeqJ6ZZt9VLA=
833831
github.com/ovh/go-ovh v1.9.0 h1:6K8VoL3BYjVV3In9tPJUdT7qMx9h0GExN9EXx1r2kKE=
834832
github.com/ovh/go-ovh v1.9.0/go.mod h1:cTVDnl94z4tl8pP1uZ/8jlVxntjSIf09bNcQ5TJSC7c=
835833
github.com/oxtoacart/bpool v0.0.0-20150712133111-4e1c5567d7c2 h1:CXwSGu/LYmbjEab5aMCs5usQRVBGThelUKBNnoSOuso=
@@ -1359,8 +1357,8 @@ gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZ
13591357
google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0=
13601358
google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk=
13611359
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
1362-
google.golang.org/api v0.241.0 h1:QKwqWQlkc6O895LchPEDUSYr22Xp3NCxpQRiWTB6avE=
1363-
google.golang.org/api v0.241.0/go.mod h1:cOVEm2TpdAGHL2z+UwyS+kmlGr3bVWQQ6sYEqkKje50=
1360+
google.golang.org/api v0.242.0 h1:7Lnb1nfnpvbkCiZek6IXKdJ0MFuAZNAJKQfA1ws62xg=
1361+
google.golang.org/api v0.242.0/go.mod h1:cOVEm2TpdAGHL2z+UwyS+kmlGr3bVWQQ6sYEqkKje50=
13641362
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
13651363
google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
13661364
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
@@ -1468,8 +1466,8 @@ istio.io/client-go v1.26.2/go.mod h1:eAImguSJPdaDiSSS2CEsywNHE8WWfqd3WfS18Rj8ynI
14681466
k8s.io/api v0.18.0/go.mod h1:q2HRQkfDzHMBZL9l/y9rH63PkQl4vae0xRT+8prbrK8=
14691467
k8s.io/api v0.18.2/go.mod h1:SJCWI7OLzhZSvbY7U8zwNl9UA4o1fizoug34OV/2r78=
14701468
k8s.io/api v0.18.4/go.mod h1:lOIQAKYgai1+vz9J7YcDZwC26Z0zQewYOGWdyIPUUQ4=
1471-
k8s.io/api v0.33.2 h1:YgwIS5jKfA+BZg//OQhkJNIfie/kmRsO0BmNaVSimvY=
1472-
k8s.io/api v0.33.2/go.mod h1:fhrbphQJSM2cXzCWgqU29xLDuks4mu7ti9vveEnpSXs=
1469+
k8s.io/api v0.33.3 h1:SRd5t//hhkI1buzxb288fy2xvjubstenEKL9K51KBI8=
1470+
k8s.io/api v0.33.3/go.mod h1:01Y/iLUjNBM3TAvypct7DIj0M0NIZc+PzAHCIo0CYGE=
14731471
k8s.io/apiextensions-apiserver v0.18.0/go.mod h1:18Cwn1Xws4xnWQNC00FLq1E350b9lUF+aOdIWDOZxgo=
14741472
k8s.io/apiextensions-apiserver v0.18.2/go.mod h1:q3faSnRGmYimiocj6cHQ1I3WpLqmDgJFlKL37fC4ZvY=
14751473
k8s.io/apiextensions-apiserver v0.18.4/go.mod h1:NYeyeYq4SIpFlPxSAB6jHPIdvu3hL0pc36wuRChybio=
@@ -1478,8 +1476,8 @@ k8s.io/apiextensions-apiserver v0.33.0/go.mod h1:VeJ8u9dEEN+tbETo+lFkwaaZPg6uFKL
14781476
k8s.io/apimachinery v0.18.0/go.mod h1:9SnR/e11v5IbyPCGbvJViimtJ0SwHG4nfZFjU77ftcA=
14791477
k8s.io/apimachinery v0.18.2/go.mod h1:9SnR/e11v5IbyPCGbvJViimtJ0SwHG4nfZFjU77ftcA=
14801478
k8s.io/apimachinery v0.18.4/go.mod h1:OaXp26zu/5J7p0f92ASynJa1pZo06YlV9fG7BoWbCko=
1481-
k8s.io/apimachinery v0.33.2 h1:IHFVhqg59mb8PJWTLi8m1mAoepkUNYmptHsV+Z1m5jY=
1482-
k8s.io/apimachinery v0.33.2/go.mod h1:BHW0YOu7n22fFv/JkYOEfkUYNRN0fj0BlvMFWA7b+SM=
1479+
k8s.io/apimachinery v0.33.3 h1:4ZSrmNa0c/ZpZJhAgRdcsFcZOw1PQU1bALVQ0B3I5LA=
1480+
k8s.io/apimachinery v0.33.3/go.mod h1:BHW0YOu7n22fFv/JkYOEfkUYNRN0fj0BlvMFWA7b+SM=
14831481
k8s.io/apiserver v0.18.0/go.mod h1:3S2O6FeBBd6XTo0njUrLxiqk8GNy6wWOftjhJcXYnjw=
14841482
k8s.io/apiserver v0.18.2/go.mod h1:Xbh066NqrZO8cbsoenCwyDJ1OSi8Ag8I2lezeHxzwzw=
14851483
k8s.io/apiserver v0.18.4/go.mod h1:q+zoFct5ABNnYkGIaGQ3bcbUNdmPyOCoEBcg51LChY8=
@@ -1488,8 +1486,8 @@ k8s.io/cli-runtime v0.18.4/go.mod h1:9/hS/Cuf7NVzWR5F/5tyS6xsnclxoPLVtwhnkJG1Y4g
14881486
k8s.io/client-go v0.18.0/go.mod h1:uQSYDYs4WhVZ9i6AIoEZuwUggLVEF64HOD37boKAtF8=
14891487
k8s.io/client-go v0.18.2/go.mod h1:Xcm5wVGXX9HAA2JJ2sSBUn3tCJ+4SVlCbl2MNNv+CIU=
14901488
k8s.io/client-go v0.18.4/go.mod h1:f5sXwL4yAZRkAtzOxRWUhA/N8XzGCb+nPZI8PfobZ9g=
1491-
k8s.io/client-go v0.33.2 h1:z8CIcc0P581x/J1ZYf4CNzRKxRvQAwoAolYPbtQes+E=
1492-
k8s.io/client-go v0.33.2/go.mod h1:9mCgT4wROvL948w6f6ArJNb7yQd7QsvqavDeZHvNmHo=
1489+
k8s.io/client-go v0.33.3 h1:M5AfDnKfYmVJif92ngN532gFqakcGi6RvaOF16efrpA=
1490+
k8s.io/client-go v0.33.3/go.mod h1:luqKBQggEf3shbxHY4uVENAxrDISLOarxpTKMiUuujg=
14931491
k8s.io/code-generator v0.18.0/go.mod h1:+UHX5rSbxmR8kzS+FAv7um6dtYrZokQvjHpDSYRVkTc=
14941492
k8s.io/code-generator v0.18.2/go.mod h1:+UHX5rSbxmR8kzS+FAv7um6dtYrZokQvjHpDSYRVkTc=
14951493
k8s.io/code-generator v0.18.4/go.mod h1:TgNEVx9hCyPGpdtCWA34olQYLkh3ok9ar7XfSsr8b6c=

pkg/http/http.go

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
/*
2+
Copyright 2025 The Kubernetes Authors.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
// ref: https://github.com/linki/instrumented_http/blob/master/client.go
18+
19+
package http
20+
21+
import (
22+
"fmt"
23+
"net/http"
24+
"strings"
25+
"time"
26+
27+
"github.com/prometheus/client_golang/prometheus"
28+
)
29+
30+
var (
31+
requestDuration = prometheus.NewSummaryVec(
32+
prometheus.SummaryOpts{
33+
Name: "request_duration_seconds",
34+
Help: "The HTTP request latencies in seconds.",
35+
Subsystem: "http",
36+
ConstLabels: prometheus.Labels{"handler": "instrumented_http"},
37+
Objectives: map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001},
38+
},
39+
[]string{"scheme", "host", "path", "method", "status"},
40+
)
41+
)
42+
43+
func init() {
44+
prometheus.MustRegister(requestDuration)
45+
}
46+
47+
type CustomRoundTripper struct {
48+
next http.RoundTripper
49+
}
50+
51+
// CancelRequest is a no-op to satisfy interfaces that require it.
52+
// https://github.com/kubernetes/client-go/blob/34f52c14eaed7e50c845cc14e85e1c4c91e77470/transport/transport.go#L346
53+
func (r *CustomRoundTripper) CancelRequest(_ *http.Request) {
54+
}
55+
56+
func (r *CustomRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
57+
start := time.Now()
58+
resp, err := r.next.RoundTrip(req)
59+
60+
status := ""
61+
if resp != nil {
62+
status = fmt.Sprintf("%d", resp.StatusCode)
63+
}
64+
65+
labels := prometheus.Labels{
66+
"scheme": req.URL.Scheme,
67+
"host": req.URL.Host,
68+
"path": pathProcessor(req.URL.Path),
69+
"method": req.Method,
70+
"status": status,
71+
}
72+
requestDuration.With(labels).Observe(time.Since(start).Seconds())
73+
return resp, err
74+
}
75+
76+
func NewInstrumentedClient(next *http.Client) *http.Client {
77+
if next == nil {
78+
next = http.DefaultClient
79+
}
80+
81+
next.Transport = NewInstrumentedTransport(next.Transport)
82+
83+
return next
84+
}
85+
86+
func NewInstrumentedTransport(next http.RoundTripper) http.RoundTripper {
87+
if next == nil {
88+
next = http.DefaultTransport
89+
}
90+
91+
return &CustomRoundTripper{next: next}
92+
}
93+
94+
func pathProcessor(path string) string {
95+
parts := strings.Split(path, "/")
96+
return parts[len(parts)-1]
97+
}

pkg/http/http_test.go

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
/*
2+
Copyright 2025 The Kubernetes Authors.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
package http
18+
19+
import (
20+
"fmt"
21+
"net/http"
22+
"testing"
23+
24+
"github.com/stretchr/testify/require"
25+
)
26+
27+
type dummyTransport struct{}
28+
29+
func (d *dummyTransport) RoundTrip(req *http.Request) (*http.Response, error) {
30+
return nil, fmt.Errorf("dummy error")
31+
}
32+
33+
func TestNewInstrumentedTransport(t *testing.T) {
34+
dt := &dummyTransport{}
35+
rt := NewInstrumentedTransport(dt)
36+
crt, ok := rt.(*CustomRoundTripper)
37+
require.True(t, ok)
38+
require.Equal(t, dt, crt.next)
39+
40+
// Should default to http.DefaultTransport if nil
41+
rt2 := NewInstrumentedTransport(nil)
42+
crt2, ok := rt2.(*CustomRoundTripper)
43+
require.True(t, ok)
44+
require.Equal(t, http.DefaultTransport, crt2.next)
45+
}
46+
47+
func TestNewInstrumentedClient(t *testing.T) {
48+
client := &http.Client{Transport: &dummyTransport{}}
49+
result := NewInstrumentedClient(client)
50+
require.Equal(t, client, result)
51+
_, ok := result.Transport.(*CustomRoundTripper)
52+
require.True(t, ok)
53+
54+
// Should default to http.DefaultClient if nil
55+
result2 := NewInstrumentedClient(nil)
56+
require.Equal(t, http.DefaultClient, result2)
57+
_, ok = result2.Transport.(*CustomRoundTripper)
58+
require.True(t, ok)
59+
}
60+
61+
func TestPathProcessor(t *testing.T) {
62+
tests := []struct {
63+
input string
64+
expected string
65+
}{
66+
{"/foo/bar", "bar"},
67+
{"/foo/", ""},
68+
{"/", ""},
69+
{"", ""},
70+
{"/foo/bar/baz", "baz"},
71+
{"foo/bar", "bar"},
72+
{"foo", "foo"},
73+
{"foo/", ""},
74+
}
75+
76+
for _, tt := range tests {
77+
t.Run(tt.input, func(t *testing.T) {
78+
require.Equal(t, tt.expected, pathProcessor(tt.input))
79+
})
80+
}
81+
}

provider/aws/config.go

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@ import (
2020
"context"
2121
"fmt"
2222
"net/http"
23-
"strings"
2423

2524
awsv2 "github.com/aws/aws-sdk-go-v2/aws"
2625
"github.com/aws/aws-sdk-go-v2/aws/retry"
2726
"github.com/aws/aws-sdk-go-v2/config"
2827
stscredsv2 "github.com/aws/aws-sdk-go-v2/credentials/stscreds"
2928
"github.com/aws/aws-sdk-go-v2/service/sts"
30-
"github.com/linki/instrumented_http"
3129
"github.com/sirupsen/logrus"
3230

31+
extdnshttp "sigs.k8s.io/external-dns/pkg/http"
32+
3333
"sigs.k8s.io/external-dns/pkg/apis/externaldns"
3434
)
3535

@@ -84,12 +84,7 @@ func newV2Config(awsConfig AWSSessionConfig) (awsv2.Config, error) {
8484
config.WithRetryer(func() awsv2.Retryer {
8585
return retry.AddWithMaxAttempts(retry.NewStandard(), awsConfig.APIRetries)
8686
}),
87-
config.WithHTTPClient(instrumented_http.NewClient(&http.Client{}, &instrumented_http.Callbacks{
88-
PathProcessor: func(path string) string {
89-
parts := strings.Split(path, "/")
90-
return parts[len(parts)-1]
91-
},
92-
})),
87+
config.WithHTTPClient(extdnshttp.NewInstrumentedClient(&http.Client{})),
9388
config.WithSharedConfigProfile(awsConfig.Profile),
9489
}
9590

0 commit comments

Comments
 (0)