mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2026-05-05 14:46:10 +02:00
Merge pull request #3697 from mloiseleur/deps/dependabot
build(deps): bump dev-dependencies group with 41 updates
This commit is contained in:
commit
b59016a9d8
4
.github/workflows/lint.yaml
vendored
4
.github/workflows/lint.yaml
vendored
@ -23,7 +23,7 @@ jobs:
|
||||
- name: Set up Go 1.x
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: 1.19
|
||||
go-version: '1.20'
|
||||
id: go
|
||||
|
||||
- name: Check out code into the Go module directory
|
||||
@ -31,5 +31,5 @@ jobs:
|
||||
|
||||
- name: Lint
|
||||
run: |
|
||||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.53.2
|
||||
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.53.3
|
||||
make lint
|
||||
|
||||
@ -60,6 +60,14 @@ issues:
|
||||
- unused
|
||||
- varcheck
|
||||
- whitespace
|
||||
- path: source/ambassador_host.go
|
||||
linters: [ typecheck ]
|
||||
- path: source/contour_httpproxy.go
|
||||
linters: [ typecheck ]
|
||||
- path: source/f5_virtualserver.go
|
||||
linters: [ typecheck ]
|
||||
- path: source/kong_tcpingress.go
|
||||
linters: [ typecheck ]
|
||||
|
||||
run:
|
||||
skip-files:
|
||||
|
||||
194
go.mod
194
go.mod
@ -4,80 +4,80 @@ go 1.20
|
||||
|
||||
require (
|
||||
cloud.google.com/go/compute/metadata v0.2.3
|
||||
github.com/Azure/azure-sdk-for-go v66.0.0+incompatible
|
||||
github.com/Azure/go-autorest/autorest v0.11.28
|
||||
github.com/Azure/go-autorest/autorest/adal v0.9.21
|
||||
github.com/Azure/azure-sdk-for-go v68.0.0+incompatible
|
||||
github.com/Azure/go-autorest/autorest v0.11.29
|
||||
github.com/Azure/go-autorest/autorest/adal v0.9.23
|
||||
github.com/Azure/go-autorest/autorest/to v0.4.0
|
||||
github.com/F5Networks/k8s-bigip-ctlr/v2 v2.11.1
|
||||
github.com/F5Networks/k8s-bigip-ctlr/v2 v2.13.0
|
||||
github.com/IBM-Cloud/ibm-cloud-cli-sdk v1.1.0
|
||||
github.com/IBM/go-sdk-core/v5 v5.13.4
|
||||
github.com/IBM/networking-go-sdk v0.36.0
|
||||
github.com/StackExchange/dnscontrol/v3 v3.27.1
|
||||
github.com/IBM/networking-go-sdk v0.42.0
|
||||
github.com/StackExchange/dnscontrol/v3 v3.31.6
|
||||
github.com/akamai/AkamaiOPEN-edgegrid-golang v1.2.2
|
||||
github.com/alecthomas/kingpin v2.2.5+incompatible
|
||||
github.com/aliyun/alibaba-cloud-sdk-go v1.62.4
|
||||
github.com/ans-group/sdk-go v1.10.4
|
||||
github.com/aws/aws-sdk-go v1.44.136
|
||||
github.com/alecthomas/kingpin v2.2.6+incompatible
|
||||
github.com/aliyun/alibaba-cloud-sdk-go v1.62.380
|
||||
github.com/ans-group/sdk-go v1.16.5
|
||||
github.com/aws/aws-sdk-go v1.44.285
|
||||
github.com/bodgit/tsig v1.2.2
|
||||
github.com/civo/civogo v0.3.14
|
||||
github.com/cloudflare/cloudflare-go v0.58.1
|
||||
github.com/cloudflare/cloudflare-go v0.69.0
|
||||
github.com/cloudfoundry-community/go-cfclient v0.0.0-20190201205600-f136f9222381
|
||||
github.com/datawire/ambassador v1.6.0
|
||||
github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba
|
||||
github.com/digitalocean/godo v1.97.0
|
||||
github.com/dnsimple/dnsimple-go v1.0.1
|
||||
github.com/exoscale/egoscale v0.97.0
|
||||
github.com/digitalocean/godo v1.99.0
|
||||
github.com/dnsimple/dnsimple-go v1.2.0
|
||||
github.com/exoscale/egoscale v1.19.0
|
||||
github.com/ffledgling/pdns-go v0.0.0-20180219074714-524e7daccd99
|
||||
github.com/go-gandi/go-gandi v0.6.0
|
||||
github.com/google/go-cmp v0.5.9
|
||||
github.com/gophercloud/gophercloud v1.4.0
|
||||
github.com/hooklift/gowsdl v0.5.0
|
||||
github.com/infobloxopen/infoblox-go-client/v2 v2.1.2-0.20220407114022-6f4c71443168
|
||||
github.com/infobloxopen/infoblox-go-client/v2 v2.3.0
|
||||
github.com/linki/instrumented_http v0.3.0
|
||||
github.com/linode/linodego v1.9.1
|
||||
github.com/maxatome/go-testdeep v1.12.0
|
||||
github.com/miekg/dns v1.1.51
|
||||
github.com/linode/linodego v1.17.0
|
||||
github.com/maxatome/go-testdeep v1.13.0
|
||||
github.com/miekg/dns v1.1.55
|
||||
github.com/nesv/go-dynect v0.6.0
|
||||
github.com/nic-at/rc0go v1.1.1
|
||||
github.com/onsi/ginkgo v1.16.5
|
||||
github.com/openshift/api v0.0.0-20210315202829-4b79815405ec
|
||||
github.com/openshift/client-go v0.0.0-20210112165513-ebc401615f47
|
||||
github.com/oracle/oci-go-sdk/v65 v65.35.0
|
||||
github.com/ovh/go-ovh v1.1.0
|
||||
github.com/openshift/api v0.0.0-20230607130528-611114dca681
|
||||
github.com/openshift/client-go v0.0.0-20230607134213-3cd0021bbee3
|
||||
github.com/oracle/oci-go-sdk/v65 v65.41.0
|
||||
github.com/ovh/go-ovh v1.4.1
|
||||
github.com/pkg/errors v0.9.1
|
||||
github.com/pluralsh/gqlclient v1.1.6
|
||||
github.com/projectcontour/contour v1.23.2
|
||||
github.com/prometheus/client_golang v1.14.0
|
||||
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210127161313-bd30bebeac4f
|
||||
github.com/sirupsen/logrus v1.9.0
|
||||
github.com/stretchr/testify v1.8.2
|
||||
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.599
|
||||
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.344
|
||||
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns v1.0.599
|
||||
github.com/transip/gotransip/v6 v6.19.0
|
||||
github.com/ultradns/ultradns-sdk-go v0.0.0-20200616202852-e62052662f60
|
||||
github.com/vinyldns/go-vinyldns v0.0.0-20200211145900-fe8a3d82e556
|
||||
github.com/pluralsh/gqlclient v1.3.17
|
||||
github.com/projectcontour/contour v1.25.0
|
||||
github.com/prometheus/client_golang v1.16.0
|
||||
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17
|
||||
github.com/sirupsen/logrus v1.9.3
|
||||
github.com/stretchr/testify v1.8.4
|
||||
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.684
|
||||
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.684
|
||||
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/privatedns v1.0.684
|
||||
github.com/transip/gotransip/v6 v6.20.0
|
||||
github.com/ultradns/ultradns-sdk-go v1.3.7
|
||||
github.com/vinyldns/go-vinyldns v0.9.16
|
||||
github.com/vultr/govultr/v2 v2.17.2
|
||||
go.etcd.io/etcd/api/v3 v3.5.8
|
||||
go.etcd.io/etcd/client/v3 v3.5.8
|
||||
go.etcd.io/etcd/api/v3 v3.5.9
|
||||
go.etcd.io/etcd/client/v3 v3.5.9
|
||||
go.uber.org/ratelimit v0.2.0
|
||||
golang.org/x/net v0.8.0
|
||||
golang.org/x/oauth2 v0.5.0
|
||||
golang.org/x/sync v0.1.0
|
||||
golang.org/x/time v0.0.0-20220922220347-f3bd1da661af
|
||||
google.golang.org/api v0.110.0
|
||||
gopkg.in/ns1/ns1-go.v2 v2.7.4
|
||||
golang.org/x/net v0.11.0
|
||||
golang.org/x/oauth2 v0.9.0
|
||||
golang.org/x/sync v0.3.0
|
||||
golang.org/x/time v0.3.0
|
||||
google.golang.org/api v0.128.0
|
||||
gopkg.in/ns1/ns1-go.v2 v2.7.6
|
||||
gopkg.in/yaml.v2 v2.4.0
|
||||
istio.io/api v0.0.0-20210128181506-0c4b8e54850f
|
||||
istio.io/client-go v0.0.0-20210128182905-ee2edd059e02
|
||||
k8s.io/api v0.26.0
|
||||
k8s.io/apimachinery v0.26.0
|
||||
k8s.io/client-go v0.26.0
|
||||
sigs.k8s.io/gateway-api v0.6.0
|
||||
istio.io/api v0.0.0-20230524015941-fa6c5f7916bf
|
||||
istio.io/client-go v1.18.0
|
||||
k8s.io/api v0.27.3
|
||||
k8s.io/apimachinery v0.27.3
|
||||
k8s.io/client-go v0.27.3
|
||||
sigs.k8s.io/gateway-api v0.7.1
|
||||
)
|
||||
|
||||
require (
|
||||
cloud.google.com/go/compute v1.18.0 // indirect
|
||||
cloud.google.com/go/compute v1.19.3 // indirect
|
||||
code.cloudfoundry.org/gofileutils v0.0.0-20170111115228-4d0c80011a0f // indirect
|
||||
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
|
||||
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
|
||||
@ -85,11 +85,8 @@ require (
|
||||
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
|
||||
github.com/Masterminds/semver v1.4.2 // indirect
|
||||
github.com/Yamashou/gqlgenc v0.11.0 // indirect
|
||||
github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38 // indirect
|
||||
github.com/alecthomas/colour v0.1.0 // indirect
|
||||
github.com/alecthomas/repr v0.0.0-20200325044227-4184120f674c // indirect
|
||||
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
|
||||
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d // indirect
|
||||
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect
|
||||
github.com/alexbrainman/sspi v0.0.0-20180613141037-e580b900e9f5 // indirect
|
||||
github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129 // indirect
|
||||
github.com/ans-group/go-durationstring v1.2.0 // indirect
|
||||
@ -97,41 +94,44 @@ require (
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.2.0 // indirect
|
||||
github.com/coreos/go-semver v0.3.0 // indirect
|
||||
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
|
||||
github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/deepmap/oapi-codegen v1.9.1 // indirect
|
||||
github.com/emicklei/go-restful/v3 v3.10.2 // indirect
|
||||
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
|
||||
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
|
||||
github.com/fatih/structs v1.1.0 // indirect
|
||||
github.com/frankban/quicktest v1.14.4 // indirect
|
||||
github.com/fsnotify/fsnotify v1.6.0 // indirect
|
||||
github.com/go-logr/logr v1.2.3 // indirect
|
||||
github.com/go-logr/logr v1.2.4 // indirect
|
||||
github.com/go-openapi/errors v0.20.3 // indirect
|
||||
github.com/go-openapi/jsonpointer v0.19.5 // indirect
|
||||
github.com/go-openapi/jsonreference v0.20.0 // indirect
|
||||
github.com/go-openapi/jsonpointer v0.19.6 // indirect
|
||||
github.com/go-openapi/jsonreference v0.20.1 // indirect
|
||||
github.com/go-openapi/strfmt v0.21.5 // indirect
|
||||
github.com/go-openapi/swag v0.19.14 // indirect
|
||||
github.com/go-openapi/swag v0.22.3 // indirect
|
||||
github.com/go-playground/locales v0.14.1 // indirect
|
||||
github.com/go-playground/universal-translator v0.18.1 // indirect
|
||||
github.com/go-playground/validator/v10 v10.13.0 // indirect
|
||||
github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48 // indirect
|
||||
github.com/go-resty/resty/v2 v2.7.0 // indirect
|
||||
github.com/gofrs/flock v0.8.1 // indirect
|
||||
github.com/gofrs/uuid v4.0.0+incompatible // indirect
|
||||
github.com/gogo/protobuf v1.3.2 // indirect
|
||||
github.com/golang-jwt/jwt/v4 v4.5.0 // indirect
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
|
||||
github.com/golang/protobuf v1.5.2 // indirect
|
||||
github.com/google/gnostic v0.5.7-v3refs // indirect
|
||||
github.com/golang/protobuf v1.5.3 // indirect
|
||||
github.com/google/gnostic v0.6.9 // indirect
|
||||
github.com/google/go-querystring v1.1.0 // indirect
|
||||
github.com/google/gofuzz v1.2.0 // indirect
|
||||
github.com/google/s2a-go v0.1.4 // indirect
|
||||
github.com/google/uuid v1.3.0 // indirect
|
||||
github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect
|
||||
github.com/googleapis/gax-go/v2 v2.7.0 // indirect
|
||||
github.com/googleapis/enterprise-certificate-proxy v0.2.4 // indirect
|
||||
github.com/googleapis/gax-go/v2 v2.10.0 // indirect
|
||||
github.com/gorilla/mux v1.8.0 // indirect
|
||||
github.com/hashicorp/errwrap v1.1.0 // indirect
|
||||
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
|
||||
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
||||
github.com/hashicorp/go-retryablehttp v0.7.2 // indirect
|
||||
github.com/hashicorp/go-retryablehttp v0.7.3 // indirect
|
||||
github.com/hashicorp/go-uuid v1.0.3 // indirect
|
||||
github.com/imdario/mergo v0.3.13 // indirect
|
||||
github.com/hashicorp/hcl v1.0.0 // indirect
|
||||
github.com/imdario/mergo v0.3.15 // indirect
|
||||
github.com/jcmturner/aescts/v2 v2.0.0 // indirect
|
||||
github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect
|
||||
github.com/jcmturner/gofork v1.7.6 // indirect
|
||||
@ -143,9 +143,10 @@ require (
|
||||
github.com/josharian/intern v1.0.0 // indirect
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/leodido/go-urn v1.2.3 // indirect
|
||||
github.com/mailru/easyjson v0.7.6 // indirect
|
||||
github.com/magiconair/properties v1.8.7 // indirect
|
||||
github.com/mailru/easyjson v0.7.7 // indirect
|
||||
github.com/mattn/go-runewidth v0.0.13 // indirect
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.2 // indirect
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
|
||||
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
|
||||
github.com/mitchellh/go-homedir v1.1.0 // indirect
|
||||
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
||||
@ -157,51 +158,56 @@ require (
|
||||
github.com/openshift/gssapi v0.0.0-20161010215902-5fb4217df13b // indirect
|
||||
github.com/opentracing/opentracing-go v1.2.1-0.20220228012449-10b1cf09e00b // indirect
|
||||
github.com/patrickmn/go-cache v2.1.0+incompatible // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
|
||||
github.com/peterhellberg/link v1.1.0 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/prometheus/client_model v0.3.0 // indirect
|
||||
github.com/prometheus/common v0.37.0 // indirect
|
||||
github.com/prometheus/procfs v0.8.0 // indirect
|
||||
github.com/prometheus/client_model v0.4.0 // indirect
|
||||
github.com/prometheus/common v0.43.0 // indirect
|
||||
github.com/prometheus/procfs v0.10.1 // indirect
|
||||
github.com/rivo/uniseg v0.2.0 // indirect
|
||||
github.com/schollz/progressbar/v3 v3.8.6 // indirect
|
||||
github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9 // indirect
|
||||
github.com/smartystreets/gunit v1.3.4 // indirect
|
||||
github.com/sony/gobreaker v0.5.0 // indirect
|
||||
github.com/spf13/afero v1.9.3 // indirect
|
||||
github.com/spf13/cast v1.5.0 // indirect
|
||||
github.com/spf13/jwalterweatherman v1.1.0 // indirect
|
||||
github.com/spf13/pflag v1.0.5 // indirect
|
||||
github.com/spf13/viper v1.15.0 // indirect
|
||||
github.com/stretchr/objx v0.5.0 // indirect
|
||||
github.com/subosito/gotenv v1.4.2 // indirect
|
||||
github.com/terra-farm/udnssdk v1.3.5 // indirect
|
||||
github.com/vektah/gqlparser/v2 v2.5.0 // indirect
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.5.8 // indirect
|
||||
github.com/vektah/gqlparser/v2 v2.5.1 // indirect
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.5.9 // indirect
|
||||
go.mongodb.org/mongo-driver v1.11.3 // indirect
|
||||
go.opencensus.io v0.24.0 // indirect
|
||||
go.uber.org/atomic v1.9.0 // indirect
|
||||
go.uber.org/multierr v1.6.0 // indirect
|
||||
go.uber.org/zap v1.19.1 // indirect
|
||||
golang.org/x/crypto v0.7.0 // indirect
|
||||
golang.org/x/mod v0.8.0 // indirect
|
||||
golang.org/x/sys v0.6.0 // indirect
|
||||
golang.org/x/term v0.6.0 // indirect
|
||||
golang.org/x/text v0.8.0 // indirect
|
||||
golang.org/x/tools v0.6.0 // indirect
|
||||
go.uber.org/multierr v1.8.0 // indirect
|
||||
go.uber.org/zap v1.24.0 // indirect
|
||||
golang.org/x/crypto v0.10.0 // indirect
|
||||
golang.org/x/mod v0.10.0 // indirect
|
||||
golang.org/x/sys v0.9.0 // indirect
|
||||
golang.org/x/term v0.9.0 // indirect
|
||||
golang.org/x/text v0.10.0 // indirect
|
||||
golang.org/x/tools v0.8.0 // indirect
|
||||
google.golang.org/appengine v1.6.7 // indirect
|
||||
google.golang.org/genproto v0.0.0-20230209215440-0dfe4f8abfcc // indirect
|
||||
google.golang.org/grpc v1.53.0 // indirect
|
||||
google.golang.org/protobuf v1.28.1 // indirect
|
||||
google.golang.org/genproto v0.0.0-20230530153820-e85fd2cbaebc // indirect
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc // indirect
|
||||
google.golang.org/grpc v1.55.0 // indirect
|
||||
google.golang.org/protobuf v1.30.0 // indirect
|
||||
gopkg.in/go-playground/validator.v9 v9.31.0 // indirect
|
||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||
gopkg.in/ini.v1 v1.66.6 // indirect
|
||||
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||
gopkg.in/resty.v1 v1.12.0 // indirect
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
istio.io/gogo-genproto v0.0.0-20190930162913-45029607206a // indirect
|
||||
k8s.io/klog/v2 v2.80.1 // indirect
|
||||
k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect
|
||||
k8s.io/utils v0.0.0-20221107191617-1a15be271d1d // indirect
|
||||
k8s.io/klog/v2 v2.100.1 // indirect
|
||||
k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect
|
||||
k8s.io/utils v0.0.0-20230505201702-9f6742963106 // indirect
|
||||
moul.io/http2curl v1.0.0 // indirect
|
||||
sigs.k8s.io/controller-runtime v0.12.1 // indirect
|
||||
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect
|
||||
sigs.k8s.io/controller-runtime v0.14.6 // indirect
|
||||
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
|
||||
sigs.k8s.io/yaml v1.3.0 // indirect
|
||||
)
|
||||
|
||||
replace k8s.io/klog/v2 => github.com/Raffo/knolog v0.0.0-20211016155154-e4d5e0cc970a
|
||||
|
||||
@ -69,7 +69,7 @@ type cloudFlareDNS interface {
|
||||
ListZonesContext(ctx context.Context, opts ...cloudflare.ReqOption) (cloudflare.ZonesResponse, error)
|
||||
ZoneDetails(ctx context.Context, zoneID string) (cloudflare.Zone, error)
|
||||
ListDNSRecords(ctx context.Context, rc *cloudflare.ResourceContainer, rp cloudflare.ListDNSRecordsParams) ([]cloudflare.DNSRecord, *cloudflare.ResultInfo, error)
|
||||
CreateDNSRecord(ctx context.Context, rc *cloudflare.ResourceContainer, rp cloudflare.CreateDNSRecordParams) (*cloudflare.DNSRecordResponse, error)
|
||||
CreateDNSRecord(ctx context.Context, rc *cloudflare.ResourceContainer, rp cloudflare.CreateDNSRecordParams) (cloudflare.DNSRecord, error)
|
||||
DeleteDNSRecord(ctx context.Context, rc *cloudflare.ResourceContainer, recordID string) error
|
||||
UpdateDNSRecord(ctx context.Context, rc *cloudflare.ResourceContainer, rp cloudflare.UpdateDNSRecordParams) error
|
||||
}
|
||||
@ -90,7 +90,7 @@ func (z zoneService) ZoneIDByName(zoneName string) (string, error) {
|
||||
return z.service.ZoneIDByName(zoneName)
|
||||
}
|
||||
|
||||
func (z zoneService) CreateDNSRecord(ctx context.Context, rc *cloudflare.ResourceContainer, rp cloudflare.CreateDNSRecordParams) (*cloudflare.DNSRecordResponse, error) {
|
||||
func (z zoneService) CreateDNSRecord(ctx context.Context, rc *cloudflare.ResourceContainer, rp cloudflare.CreateDNSRecordParams) (cloudflare.DNSRecord, error) {
|
||||
return z.service.CreateDNSRecord(ctx, rc, rp)
|
||||
}
|
||||
|
||||
@ -99,7 +99,8 @@ func (z zoneService) ListDNSRecords(ctx context.Context, rc *cloudflare.Resource
|
||||
}
|
||||
|
||||
func (z zoneService) UpdateDNSRecord(ctx context.Context, rc *cloudflare.ResourceContainer, rp cloudflare.UpdateDNSRecordParams) error {
|
||||
return z.service.UpdateDNSRecord(ctx, rc, rp)
|
||||
_, err := z.service.UpdateDNSRecord(ctx, rc, rp)
|
||||
return err
|
||||
}
|
||||
|
||||
func (z zoneService) DeleteDNSRecord(ctx context.Context, rc *cloudflare.ResourceContainer, recordID string) error {
|
||||
@ -137,9 +138,20 @@ type RecordParamsTypes interface {
|
||||
cloudflare.UpdateDNSRecordParams | cloudflare.CreateDNSRecordParams
|
||||
}
|
||||
|
||||
// getRecordParam is a generic function that returns the appropriate Record Param based on the cloudFlareChange passed in
|
||||
func getRecordParam[T RecordParamsTypes](cfc cloudFlareChange) T {
|
||||
return T{
|
||||
// getUpdateDNSRecordParam is a function that returns the appropriate Record Param based on the cloudFlareChange passed in
|
||||
func getUpdateDNSRecordParam(cfc cloudFlareChange) cloudflare.UpdateDNSRecordParams {
|
||||
return cloudflare.UpdateDNSRecordParams{
|
||||
Name: cfc.ResourceRecord.Name,
|
||||
TTL: cfc.ResourceRecord.TTL,
|
||||
Proxied: cfc.ResourceRecord.Proxied,
|
||||
Type: cfc.ResourceRecord.Type,
|
||||
Content: cfc.ResourceRecord.Content,
|
||||
}
|
||||
}
|
||||
|
||||
// getCreateDNSRecordParam is a function that returns the appropriate Record Param based on the cloudFlareChange passed in
|
||||
func getCreateDNSRecordParam(cfc cloudFlareChange) cloudflare.CreateDNSRecordParams {
|
||||
return cloudflare.CreateDNSRecordParams{
|
||||
Name: cfc.ResourceRecord.Name,
|
||||
TTL: cfc.ResourceRecord.TTL,
|
||||
Proxied: cfc.ResourceRecord.Proxied,
|
||||
@ -334,7 +346,7 @@ func (p *CloudFlareProvider) submitChanges(ctx context.Context, changes []*cloud
|
||||
log.WithFields(logFields).Errorf("failed to find previous record: %v", change.ResourceRecord)
|
||||
continue
|
||||
}
|
||||
recordParam := getRecordParam[cloudflare.UpdateDNSRecordParams](*change)
|
||||
recordParam := getUpdateDNSRecordParam(*change)
|
||||
recordParam.ID = recordID
|
||||
err := p.Client.UpdateDNSRecord(ctx, resourceContainer, recordParam)
|
||||
if err != nil {
|
||||
@ -351,7 +363,7 @@ func (p *CloudFlareProvider) submitChanges(ctx context.Context, changes []*cloud
|
||||
log.WithFields(logFields).Errorf("failed to delete record: %v", err)
|
||||
}
|
||||
} else if change.Action == cloudFlareCreate {
|
||||
recordParam := getRecordParam[cloudflare.CreateDNSRecordParams](*change)
|
||||
recordParam := getCreateDNSRecordParam(*change)
|
||||
_, err := p.Client.CreateDNSRecord(ctx, resourceContainer, recordParam)
|
||||
if err != nil {
|
||||
log.WithFields(logFields).Errorf("failed to create record: %v", err)
|
||||
|
||||
@ -130,7 +130,7 @@ func getDNSRecordFromRecordParams(rp any) cloudflare.DNSRecord {
|
||||
}
|
||||
}
|
||||
|
||||
func (m *mockCloudFlareClient) CreateDNSRecord(ctx context.Context, rc *cloudflare.ResourceContainer, rp cloudflare.CreateDNSRecordParams) (*cloudflare.DNSRecordResponse, error) {
|
||||
func (m *mockCloudFlareClient) CreateDNSRecord(ctx context.Context, rc *cloudflare.ResourceContainer, rp cloudflare.CreateDNSRecordParams) (cloudflare.DNSRecord, error) {
|
||||
recordData := getDNSRecordFromRecordParams(rp)
|
||||
m.Actions = append(m.Actions, MockAction{
|
||||
Name: "Create",
|
||||
@ -141,7 +141,7 @@ func (m *mockCloudFlareClient) CreateDNSRecord(ctx context.Context, rc *cloudfla
|
||||
if zone, ok := m.Records[rc.Identifier]; ok {
|
||||
zone[rp.ID] = recordData
|
||||
}
|
||||
return nil, nil
|
||||
return cloudflare.DNSRecord{}, nil
|
||||
}
|
||||
|
||||
func (m *mockCloudFlareClient) ListDNSRecords(ctx context.Context, rc *cloudflare.ResourceContainer, rp cloudflare.ListDNSRecordsParams) ([]cloudflare.DNSRecord, *cloudflare.ResultInfo, error) {
|
||||
@ -680,7 +680,7 @@ func TestCloudflareProvider(t *testing.T) {
|
||||
|
||||
_ = os.Unsetenv("CF_API_TOKEN")
|
||||
tokenFile := "/tmp/cf_api_token"
|
||||
if err := os.WriteFile(tokenFile, []byte("abc123def"), 0644); err != nil {
|
||||
if err := os.WriteFile(tokenFile, []byte("abc123def"), 0o644); err != nil {
|
||||
t.Errorf("failed to write token file, %s", err)
|
||||
}
|
||||
_ = os.Setenv("CF_API_TOKEN", tokenFile)
|
||||
|
||||
@ -757,7 +757,7 @@ func (p *IBMCloudProvider) groupPrivateRecords(records []dnssvcsv1.ResourceRecor
|
||||
for _, records := range groups {
|
||||
targets := make([]string, len(records))
|
||||
for i, record := range records {
|
||||
data := record.Rdata.(map[string]interface{})
|
||||
data := record.Rdata
|
||||
log.Debugf("record data: %v", data)
|
||||
switch *record.Type {
|
||||
case "A":
|
||||
@ -820,18 +820,18 @@ func (p *IBMCloudProvider) newIBMCloudChange(action string, endpoint *endpoint.E
|
||||
}
|
||||
|
||||
if p.privateZone {
|
||||
var rData interface{}
|
||||
rData := make(map[string]interface{})
|
||||
switch endpoint.RecordType {
|
||||
case "A":
|
||||
rData = &dnssvcsv1.ResourceRecordInputRdataRdataARecord{
|
||||
rData[dnssvcsv1.CreateResourceRecordOptions_Type_A] = &dnssvcsv1.ResourceRecordInputRdataRdataARecord{
|
||||
Ip: core.StringPtr(target),
|
||||
}
|
||||
case "CNAME":
|
||||
rData = &dnssvcsv1.ResourceRecordInputRdataRdataCnameRecord{
|
||||
rData[dnssvcsv1.CreateResourceRecordOptions_Type_Cname] = &dnssvcsv1.ResourceRecordInputRdataRdataCnameRecord{
|
||||
Cname: core.StringPtr(target),
|
||||
}
|
||||
case "TXT":
|
||||
rData = &dnssvcsv1.ResourceRecordInputRdataRdataTxtRecord{
|
||||
rData[dnssvcsv1.CreateResourceRecordOptions_Type_Txt] = &dnssvcsv1.ResourceRecordInputRdataRdataTxtRecord{
|
||||
Text: core.StringPtr(target),
|
||||
}
|
||||
}
|
||||
@ -869,15 +869,15 @@ func (p *IBMCloudProvider) createRecord(ctx context.Context, zoneID string, chan
|
||||
}
|
||||
switch *change.PrivateResourceRecord.Type {
|
||||
case "A":
|
||||
data, _ := change.PrivateResourceRecord.Rdata.(*dnssvcsv1.ResourceRecordInputRdataRdataARecord)
|
||||
data, _ := change.PrivateResourceRecord.Rdata[dnssvcsv1.CreateResourceRecordOptions_Type_A].(*dnssvcsv1.ResourceRecordInputRdataRdataARecord)
|
||||
aData, _ := p.Client.NewResourceRecordInputRdataRdataARecord(*data.Ip)
|
||||
createResourceRecordOptions.SetRdata(aData)
|
||||
case "CNAME":
|
||||
data, _ := change.PrivateResourceRecord.Rdata.(*dnssvcsv1.ResourceRecordInputRdataRdataCnameRecord)
|
||||
data, _ := change.PrivateResourceRecord.Rdata[dnssvcsv1.CreateResourceRecordOptions_Type_Cname].(*dnssvcsv1.ResourceRecordInputRdataRdataCnameRecord)
|
||||
cnameData, _ := p.Client.NewResourceRecordInputRdataRdataCnameRecord(*data.Cname)
|
||||
createResourceRecordOptions.SetRdata(cnameData)
|
||||
case "TXT":
|
||||
data, _ := change.PrivateResourceRecord.Rdata.(*dnssvcsv1.ResourceRecordInputRdataRdataTxtRecord)
|
||||
data, _ := change.PrivateResourceRecord.Rdata[dnssvcsv1.CreateResourceRecordOptions_Type_Txt].(*dnssvcsv1.ResourceRecordInputRdataRdataTxtRecord)
|
||||
txtData, _ := p.Client.NewResourceRecordInputRdataRdataTxtRecord(*data.Text)
|
||||
createResourceRecordOptions.SetRdata(txtData)
|
||||
}
|
||||
@ -910,15 +910,15 @@ func (p *IBMCloudProvider) updateRecord(ctx context.Context, zoneID, recordID st
|
||||
}
|
||||
switch *change.PrivateResourceRecord.Type {
|
||||
case "A":
|
||||
data, _ := change.PrivateResourceRecord.Rdata.(*dnssvcsv1.ResourceRecordInputRdataRdataARecord)
|
||||
data, _ := change.PrivateResourceRecord.Rdata[dnssvcsv1.CreateResourceRecordOptions_Type_A].(*dnssvcsv1.ResourceRecordInputRdataRdataARecord)
|
||||
aData, _ := p.Client.NewResourceRecordUpdateInputRdataRdataARecord(*data.Ip)
|
||||
updateResourceRecordOptions.SetRdata(aData)
|
||||
case "CNAME":
|
||||
data, _ := change.PrivateResourceRecord.Rdata.(*dnssvcsv1.ResourceRecordInputRdataRdataCnameRecord)
|
||||
data, _ := change.PrivateResourceRecord.Rdata[dnssvcsv1.CreateResourceRecordOptions_Type_Cname].(*dnssvcsv1.ResourceRecordInputRdataRdataCnameRecord)
|
||||
cnameData, _ := p.Client.NewResourceRecordUpdateInputRdataRdataCnameRecord(*data.Cname)
|
||||
updateResourceRecordOptions.SetRdata(cnameData)
|
||||
case "TXT":
|
||||
data, _ := change.PrivateResourceRecord.Rdata.(*dnssvcsv1.ResourceRecordInputRdataRdataTxtRecord)
|
||||
data, _ := change.PrivateResourceRecord.Rdata[dnssvcsv1.CreateResourceRecordOptions_Type_Txt].(*dnssvcsv1.ResourceRecordInputRdataRdataTxtRecord)
|
||||
txtData, _ := p.Client.NewResourceRecordUpdateInputRdataRdataTxtRecord(*data.Text)
|
||||
updateResourceRecordOptions.SetRdata(txtData)
|
||||
}
|
||||
|
||||
@ -307,12 +307,9 @@ func (p *ProviderConfig) Records(ctx context.Context) (endpoints []*endpoint.End
|
||||
}
|
||||
|
||||
var resT []ibclient.RecordTXT
|
||||
objT := ibclient.NewRecordTXT(
|
||||
ibclient.RecordTXT{
|
||||
Zone: zone.Fqdn,
|
||||
View: p.view,
|
||||
},
|
||||
)
|
||||
objT := ibclient.NewEmptyRecordTXT()
|
||||
objT.Zone = zone.Fqdn
|
||||
objT.View = p.view
|
||||
err = p.client.GetObject(objT, "", searchParams, &resT)
|
||||
if err != nil && !isNotFoundError(err) {
|
||||
return nil, fmt.Errorf("could not fetch TXT records from zone '%s': %w", zone.Fqdn, err)
|
||||
@ -603,13 +600,10 @@ func (p *ProviderConfig) recordSet(ep *endpoint.Endpoint, getObject bool, target
|
||||
if target, err2 := strconv.Unquote(ep.Targets[0]); err2 == nil && !strings.Contains(ep.Targets[0], " ") {
|
||||
ep.Targets = endpoint.Targets{target}
|
||||
}
|
||||
obj := ibclient.NewRecordTXT(
|
||||
ibclient.RecordTXT{
|
||||
Name: ep.DNSName,
|
||||
Text: ep.Targets[0],
|
||||
View: p.view,
|
||||
},
|
||||
)
|
||||
obj := ibclient.NewEmptyRecordTXT()
|
||||
obj.Name = ep.DNSName
|
||||
obj.Text = ep.Targets[0]
|
||||
obj.View = p.view
|
||||
if getObject {
|
||||
queryParams := ibclient.NewQueryParams(false, map[string]string{"name": obj.Name})
|
||||
err = p.client.GetObject(obj, "", queryParams, &res)
|
||||
|
||||
@ -254,11 +254,8 @@ func (client *mockIBConnector) DeleteObject(ref string) (refRes string, err erro
|
||||
}
|
||||
case "record:txt":
|
||||
var records []ibclient.RecordTXT
|
||||
obj := ibclient.NewRecordTXT(
|
||||
ibclient.RecordTXT{
|
||||
Name: result[2],
|
||||
},
|
||||
)
|
||||
obj := ibclient.NewEmptyRecordTXT()
|
||||
obj.Name = result[2]
|
||||
client.GetObject(obj, ref, nil, &records)
|
||||
for _, record := range records {
|
||||
client.deletedEndpoints = append(
|
||||
@ -355,13 +352,11 @@ func createMockInfobloxObject(name, recordType, value string) ibclient.IBObject
|
||||
obj.Canonical = value
|
||||
return obj
|
||||
case endpoint.RecordTypeTXT:
|
||||
return ibclient.NewRecordTXT(
|
||||
ibclient.RecordTXT{
|
||||
Ref: ref,
|
||||
Name: name,
|
||||
Text: value,
|
||||
},
|
||||
)
|
||||
obj := ibclient.NewEmptyRecordTXT()
|
||||
obj.Name = name
|
||||
obj.Ref = ref
|
||||
obj.Text = value
|
||||
return obj
|
||||
case "HOST":
|
||||
obj := ibclient.NewEmptyHostRecord()
|
||||
obj.Name = name
|
||||
@ -738,7 +733,6 @@ func TestExtendedRequestNameRegExBuilder(t *testing.T) {
|
||||
assert.True(t, req.URL.Query().Get("name~") == "")
|
||||
}
|
||||
|
||||
|
||||
func TestExtendedRequestMaxResultsBuilder(t *testing.T) {
|
||||
hostCfg := ibclient.HostConfig{
|
||||
Host: "localhost",
|
||||
|
||||
@ -389,7 +389,6 @@ func (r rfc2136Provider) SendMessage(msg *dns.Msg) error {
|
||||
log.Debugf("SendMessage")
|
||||
|
||||
c := new(dns.Client)
|
||||
c.SingleInflight = true
|
||||
|
||||
if !r.insecure {
|
||||
if r.gssTsig {
|
||||
|
||||
@ -135,11 +135,12 @@ func (api *mockAPIService) DescribePrivateZoneRecordList(request *privatedns.Des
|
||||
|
||||
func (api *mockAPIService) DescribeDomainList(request *dnspod.DescribeDomainListRequest) (response *dnspod.DescribeDomainListResponse, err error) {
|
||||
response = dnspod.NewDescribeDomainListResponse()
|
||||
response.Response = &struct {
|
||||
DomainCountInfo *dnspod.DomainCountInfo `json:"DomainCountInfo,omitempty" name:"DomainCountInfo"`
|
||||
DomainList []*dnspod.DomainListItem `json:"DomainList,omitempty" name:"DomainList"`
|
||||
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
|
||||
}{}
|
||||
response.Response = &dnspod.DescribeDomainListResponseParams{
|
||||
DomainCountInfo: &dnspod.DomainCountInfo{
|
||||
AllTotal: common.Uint64Ptr(uint64(len(api.dnspodDomains))),
|
||||
},
|
||||
DomainList: api.dnspodDomains,
|
||||
}
|
||||
response.Response.DomainList = api.dnspodDomains
|
||||
response.Response.DomainCountInfo = &dnspod.DomainCountInfo{
|
||||
AllTotal: common.Uint64Ptr(uint64(len(api.dnspodDomains))),
|
||||
@ -149,11 +150,7 @@ func (api *mockAPIService) DescribeDomainList(request *dnspod.DescribeDomainList
|
||||
|
||||
func (api *mockAPIService) DescribeRecordList(request *dnspod.DescribeRecordListRequest) (response *dnspod.DescribeRecordListResponse, err error) {
|
||||
response = dnspod.NewDescribeRecordListResponse()
|
||||
response.Response = &struct {
|
||||
RecordCountInfo *dnspod.RecordCountInfo `json:"RecordCountInfo,omitempty" name:"RecordCountInfo"`
|
||||
RecordList []*dnspod.RecordListItem `json:"RecordList,omitempty" name:"RecordList"`
|
||||
RequestId *string `json:"RequestId,omitempty" name:"RequestId"`
|
||||
}{}
|
||||
response.Response = &dnspod.DescribeRecordListResponseParams{}
|
||||
if _, exist := api.dnspodRecords[*request.Domain]; !exist {
|
||||
response.Response.RecordList = make([]*dnspod.RecordListItem, 0)
|
||||
response.Response.RecordCountInfo = &dnspod.RecordCountInfo{
|
||||
|
||||
@ -149,7 +149,7 @@ func (sc *gatewaySource) Endpoints(ctx context.Context) ([]*endpoint.Endpoint, e
|
||||
|
||||
// apply template if host is missing on gateway
|
||||
if (sc.combineFQDNAnnotation || len(gwHostnames) == 0) && sc.fqdnTemplate != nil {
|
||||
iHostnames, err := execTemplate(sc.fqdnTemplate, &gateway)
|
||||
iHostnames, err := execTemplate(sc.fqdnTemplate, gateway)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -196,7 +196,7 @@ func (sc *gatewaySource) AddEventHandler(ctx context.Context, handler func()) {
|
||||
}
|
||||
|
||||
// filterByAnnotations filters a list of configs by a given annotation selector.
|
||||
func (sc *gatewaySource) filterByAnnotations(gateways []networkingv1alpha3.Gateway) ([]networkingv1alpha3.Gateway, error) {
|
||||
func (sc *gatewaySource) filterByAnnotations(gateways []*networkingv1alpha3.Gateway) ([]*networkingv1alpha3.Gateway, error) {
|
||||
labelSelector, err := metav1.ParseToLabelSelector(sc.annotationFilter)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -211,7 +211,7 @@ func (sc *gatewaySource) filterByAnnotations(gateways []networkingv1alpha3.Gatew
|
||||
return gateways, nil
|
||||
}
|
||||
|
||||
var filteredList []networkingv1alpha3.Gateway
|
||||
var filteredList []*networkingv1alpha3.Gateway
|
||||
|
||||
for _, gw := range gateways {
|
||||
// convert the annotations to an equivalent label selector
|
||||
@ -226,13 +226,13 @@ func (sc *gatewaySource) filterByAnnotations(gateways []networkingv1alpha3.Gatew
|
||||
return filteredList, nil
|
||||
}
|
||||
|
||||
func (sc *gatewaySource) setResourceLabel(gateway networkingv1alpha3.Gateway, endpoints []*endpoint.Endpoint) {
|
||||
func (sc *gatewaySource) setResourceLabel(gateway *networkingv1alpha3.Gateway, endpoints []*endpoint.Endpoint) {
|
||||
for _, ep := range endpoints {
|
||||
ep.Labels[endpoint.ResourceLabelKey] = fmt.Sprintf("gateway/%s/%s", gateway.Namespace, gateway.Name)
|
||||
}
|
||||
}
|
||||
|
||||
func (sc *gatewaySource) targetsFromGateway(gateway networkingv1alpha3.Gateway) (targets endpoint.Targets, err error) {
|
||||
func (sc *gatewaySource) targetsFromGateway(gateway *networkingv1alpha3.Gateway) (targets endpoint.Targets, err error) {
|
||||
targets = getTargetsFromTargetAnnotation(gateway.Annotations)
|
||||
if len(targets) > 0 {
|
||||
return
|
||||
@ -262,7 +262,7 @@ func (sc *gatewaySource) targetsFromGateway(gateway networkingv1alpha3.Gateway)
|
||||
}
|
||||
|
||||
// endpointsFromGatewayConfig extracts the endpoints from an Istio Gateway Config object
|
||||
func (sc *gatewaySource) endpointsFromGateway(hostnames []string, gateway networkingv1alpha3.Gateway) ([]*endpoint.Endpoint, error) {
|
||||
func (sc *gatewaySource) endpointsFromGateway(hostnames []string, gateway *networkingv1alpha3.Gateway) ([]*endpoint.Endpoint, error) {
|
||||
var endpoints []*endpoint.Endpoint
|
||||
|
||||
annotations := gateway.Annotations
|
||||
@ -289,7 +289,7 @@ func (sc *gatewaySource) endpointsFromGateway(hostnames []string, gateway networ
|
||||
return endpoints, nil
|
||||
}
|
||||
|
||||
func (sc *gatewaySource) hostNamesFromGateway(gateway networkingv1alpha3.Gateway) ([]string, error) {
|
||||
func (sc *gatewaySource) hostNamesFromGateway(gateway *networkingv1alpha3.Gateway) ([]string, error) {
|
||||
var hostnames []string
|
||||
for _, server := range gateway.Spec.Servers {
|
||||
for _, host := range server.Hosts {
|
||||
|
||||
@ -1192,7 +1192,7 @@ func testGatewayEndpoints(t *testing.T) {
|
||||
fakeIstioClient := istiofake.NewSimpleClientset()
|
||||
for _, config := range ti.configItems {
|
||||
gatewayCfg := config.Config()
|
||||
_, err := fakeIstioClient.NetworkingV1alpha3().Gateways(ti.targetNamespace).Create(context.Background(), &gatewayCfg, metav1.CreateOptions{})
|
||||
_, err := fakeIstioClient.NetworkingV1alpha3().Gateways(ti.targetNamespace).Create(context.Background(), gatewayCfg, metav1.CreateOptions{})
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
@ -1301,8 +1301,8 @@ type fakeGatewayConfig struct {
|
||||
selector map[string]string
|
||||
}
|
||||
|
||||
func (c fakeGatewayConfig) Config() networkingv1alpha3.Gateway {
|
||||
gw := networkingv1alpha3.Gateway{
|
||||
func (c fakeGatewayConfig) Config() *networkingv1alpha3.Gateway {
|
||||
gw := &networkingv1alpha3.Gateway{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: c.name,
|
||||
Namespace: c.namespace,
|
||||
|
||||
@ -214,7 +214,6 @@ func (sc *virtualServiceSource) getGateway(ctx context.Context, gatewayStr strin
|
||||
log.Debugf("Gateway %s referenced by VirtualService %s/%s not found: %v", gatewayStr, virtualService.Namespace, virtualService.Name, err)
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
return gateway, nil
|
||||
}
|
||||
|
||||
|
||||
@ -46,7 +46,7 @@ type VirtualServiceSuite struct {
|
||||
suite.Suite
|
||||
source Source
|
||||
lbServices []*v1.Service
|
||||
gwconfig networkingv1alpha3.Gateway
|
||||
gwconfig *networkingv1alpha3.Gateway
|
||||
vsconfig *networkingv1alpha3.VirtualService
|
||||
}
|
||||
|
||||
@ -80,7 +80,7 @@ func (suite *VirtualServiceSuite) SetupTest() {
|
||||
namespace: "istio-system",
|
||||
dnsnames: [][]string{{"*"}},
|
||||
}).Config()
|
||||
_, err = fakeIstioClient.NetworkingV1alpha3().Gateways(suite.gwconfig.Namespace).Create(context.Background(), &suite.gwconfig, metav1.CreateOptions{})
|
||||
_, err = fakeIstioClient.NetworkingV1alpha3().Gateways(suite.gwconfig.Namespace).Create(context.Background(), suite.gwconfig, metav1.CreateOptions{})
|
||||
suite.NoError(err, "should succeed")
|
||||
|
||||
suite.vsconfig = (fakeVirtualServiceConfig{
|
||||
@ -366,7 +366,7 @@ func testVirtualServiceBindsToGateway(t *testing.T) {
|
||||
t.Run(ti.title, func(t *testing.T) {
|
||||
vsconfig := ti.vsconfig.Config()
|
||||
gwconfig := ti.gwconfig.Config()
|
||||
require.Equal(t, ti.expected, virtualServiceBindsToGateway(vsconfig, &gwconfig, ti.vsHost))
|
||||
require.Equal(t, ti.expected, virtualServiceBindsToGateway(vsconfig, gwconfig, ti.vsHost))
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -1483,7 +1483,7 @@ func testVirtualServiceEndpoints(t *testing.T) {
|
||||
t.Run(ti.title, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
var gateways []networkingv1alpha3.Gateway
|
||||
var gateways []*networkingv1alpha3.Gateway
|
||||
var virtualservices []*networkingv1alpha3.VirtualService
|
||||
|
||||
for _, gwItem := range ti.gwConfigs {
|
||||
@ -1504,7 +1504,7 @@ func testVirtualServiceEndpoints(t *testing.T) {
|
||||
fakeIstioClient := istiofake.NewSimpleClientset()
|
||||
|
||||
for _, gateway := range gateways {
|
||||
_, err := fakeIstioClient.NetworkingV1alpha3().Gateways(gateway.Namespace).Create(context.Background(), &gateway, metav1.CreateOptions{})
|
||||
_, err := fakeIstioClient.NetworkingV1alpha3().Gateways(gateway.Namespace).Create(context.Background(), gateway, metav1.CreateOptions{})
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
@ -1585,7 +1585,7 @@ func newTestVirtualServiceSource(loadBalancerList []fakeIngressGatewayService, g
|
||||
gwObj := gw.Config()
|
||||
// use create instead of add
|
||||
// https://github.com/kubernetes/client-go/blob/92512ee2b8cf6696e9909245624175b7f0c971d9/testing/fixture.go#LL336C3-L336C52
|
||||
_, err := fakeIstioClient.NetworkingV1alpha3().Gateways(gw.namespace).Create(context.Background(), &gwObj, metav1.CreateOptions{})
|
||||
_, err := fakeIstioClient.NetworkingV1alpha3().Gateways(gw.namespace).Create(context.Background(), gwObj, metav1.CreateOptions{})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -1637,7 +1637,7 @@ func (c fakeVirtualServiceConfig) Config() *networkingv1alpha3.VirtualService {
|
||||
Namespace: c.namespace,
|
||||
Annotations: c.annotations,
|
||||
},
|
||||
Spec: vs,
|
||||
Spec: *vs.DeepCopy(),
|
||||
}
|
||||
}
|
||||
|
||||
@ -1751,7 +1751,13 @@ func TestVirtualServiceSourceGetGateway(t *testing.T) {
|
||||
} else {
|
||||
require.NoError(t, err)
|
||||
}
|
||||
assert.Equalf(t, tt.want, got, "getGateway(%v, %v, %v)", tt.args.ctx, tt.args.gatewayStr, tt.args.virtualService)
|
||||
if tt.want != nil && got != nil {
|
||||
tt.want.Spec.ProtoReflect()
|
||||
tt.want.Status.ProtoReflect()
|
||||
assert.Equalf(t, tt.want, got, "getGateway(%v, %v, %v)", tt.args.ctx, tt.args.gatewayStr, tt.args.virtualService)
|
||||
} else {
|
||||
assert.Equalf(t, tt.want, got, "getGateway(%v, %v, %v)", tt.args.ctx, tt.args.gatewayStr, tt.args.virtualService)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@ -21,6 +21,7 @@ import (
|
||||
"fmt"
|
||||
"sort"
|
||||
"text/template"
|
||||
"time"
|
||||
|
||||
routev1 "github.com/openshift/api/route/v1"
|
||||
versioned "github.com/openshift/client-go/route/clientset/versioned"
|
||||
@ -71,7 +72,7 @@ func NewOcpRouteSource(
|
||||
|
||||
// Use a shared informer to listen for add/update/delete of Routes in the specified namespace.
|
||||
// Set resync period to 0, to prevent processing when nothing has changed.
|
||||
informerFactory := extInformers.NewSharedInformerFactoryWithOptions(ocpClient, 0, extInformers.WithNamespace(namespace))
|
||||
informerFactory := extInformers.NewFilteredSharedInformerFactory(ocpClient, 0*time.Second, namespace, nil)
|
||||
informer := informerFactory.Route().V1().Routes()
|
||||
|
||||
// Add default resource event handlers to properly initialize informer.
|
||||
|
||||
@ -338,9 +338,9 @@ func matchLabelSelector(selector labels.Selector, srcAnnotations map[string]stri
|
||||
|
||||
type eventHandlerFunc func()
|
||||
|
||||
func (fn eventHandlerFunc) OnAdd(obj interface{}) { fn() }
|
||||
func (fn eventHandlerFunc) OnUpdate(oldObj, newObj interface{}) { fn() }
|
||||
func (fn eventHandlerFunc) OnDelete(obj interface{}) { fn() }
|
||||
func (fn eventHandlerFunc) OnAdd(obj interface{}, isInInitialList bool) { fn() }
|
||||
func (fn eventHandlerFunc) OnUpdate(oldObj, newObj interface{}) { fn() }
|
||||
func (fn eventHandlerFunc) OnDelete(obj interface{}) { fn() }
|
||||
|
||||
type informerFactory interface {
|
||||
WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user