mirror of
https://github.com/fluxcd/flagger.git
synced 2026-02-14 09:59:58 +00:00
Merge pull request #1832 from fluxcd/go1.25
Update dependencies to Kubernetes 1.34
This commit is contained in:
4
.github/workflows/build.yaml
vendored
4
.github/workflows/build.yaml
vendored
@@ -23,14 +23,14 @@ jobs:
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: 1.24.x
|
||||
go-version: 1.25.x
|
||||
cache-dependency-path: |
|
||||
**/go.sum
|
||||
**/go.mod
|
||||
- name: Download modules
|
||||
run: |
|
||||
go mod download
|
||||
go install golang.org/x/tools/cmd/goimports
|
||||
go install golang.org/x/tools/cmd/goimports@latest
|
||||
- name: Run linters
|
||||
run: make fmt test-codegen
|
||||
- name: Verify CRDs
|
||||
|
||||
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -31,7 +31,7 @@ jobs:
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: 1.24.x
|
||||
go-version: 1.25.x
|
||||
- uses: fluxcd/flux2/action@main
|
||||
- uses: sigstore/cosign-installer@v3.8.1
|
||||
- name: Prepare
|
||||
|
||||
2
.github/workflows/scan.yml
vendored
2
.github/workflows/scan.yml
vendored
@@ -34,7 +34,7 @@ jobs:
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: 1.24.x
|
||||
go-version: 1.25.x
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v3
|
||||
with:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
ARG GO_VERSION=1.24
|
||||
ARG GO_VERSION=1.25
|
||||
ARG XX_VERSION=1.6.1
|
||||
|
||||
FROM --platform=$BUILDPLATFORM tonistiigi/xx:${XX_VERSION} AS xx
|
||||
@@ -29,7 +29,7 @@ RUN xx-go build \
|
||||
-ldflags "-s -w -X github.com/fluxcd/flagger/pkg/version.REVISION=${REVISON}" \
|
||||
-a -o flagger ./cmd/flagger
|
||||
|
||||
FROM alpine:3.21
|
||||
FROM alpine:3.22
|
||||
|
||||
RUN apk --no-cache add ca-certificates
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM golang:1.24-alpine AS builder
|
||||
FROM golang:1.25-alpine AS builder
|
||||
|
||||
ARG TARGETPLATFORM
|
||||
ARG TARGETARCH
|
||||
|
||||
2
Makefile
2
Makefile
@@ -6,7 +6,7 @@ build:
|
||||
CGO_ENABLED=0 go build -a -o ./bin/flagger ./cmd/flagger
|
||||
|
||||
tidy:
|
||||
rm -f go.sum; go mod tidy -compat=1.24
|
||||
rm -f go.sum; go mod tidy -compat=1.25
|
||||
|
||||
vet:
|
||||
go vet ./...
|
||||
|
||||
122
go.mod
122
go.mod
@@ -1,109 +1,109 @@
|
||||
module github.com/fluxcd/flagger
|
||||
|
||||
go 1.24.0
|
||||
go 1.25.0
|
||||
|
||||
require (
|
||||
cloud.google.com/go/monitoring v1.24.1
|
||||
github.com/Masterminds/semver/v3 v3.3.1
|
||||
github.com/aws/aws-sdk-go v1.55.6
|
||||
cloud.google.com/go/monitoring v1.24.2
|
||||
github.com/Masterminds/semver/v3 v3.4.0
|
||||
github.com/aws/aws-sdk-go v1.55.8
|
||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
|
||||
github.com/go-logr/zapr v1.3.0
|
||||
github.com/google/go-cmp v0.7.0
|
||||
github.com/google/uuid v1.6.0
|
||||
github.com/googleapis/gax-go/v2 v2.14.1
|
||||
github.com/hashicorp/go-retryablehttp v0.7.7
|
||||
github.com/googleapis/gax-go/v2 v2.15.0
|
||||
github.com/hashicorp/go-retryablehttp v0.7.8
|
||||
github.com/influxdata/influxdb-client-go/v2 v2.14.0
|
||||
github.com/prometheus/client_golang v1.21.1
|
||||
github.com/prometheus/client_golang v1.23.2
|
||||
github.com/signalfx/signalflow-client-go v0.1.0
|
||||
github.com/signalfx/signalfx-go v1.46.0
|
||||
github.com/stretchr/testify v1.10.0
|
||||
github.com/signalfx/signalfx-go v1.53.0
|
||||
github.com/stretchr/testify v1.11.1
|
||||
go.uber.org/zap v1.27.0
|
||||
golang.org/x/sync v0.12.0
|
||||
google.golang.org/api v0.228.0
|
||||
google.golang.org/genproto v0.0.0-20250324211829-b45e905df463
|
||||
google.golang.org/grpc v1.71.0
|
||||
google.golang.org/protobuf v1.36.6
|
||||
golang.org/x/sync v0.17.0
|
||||
google.golang.org/api v0.252.0
|
||||
google.golang.org/genproto v0.0.0-20250603155806-513f23925822
|
||||
google.golang.org/grpc v1.76.0
|
||||
google.golang.org/protobuf v1.36.10
|
||||
gopkg.in/h2non/gock.v1 v1.1.2
|
||||
k8s.io/api v0.32.3
|
||||
k8s.io/apimachinery v0.32.3
|
||||
k8s.io/client-go v0.32.3
|
||||
k8s.io/code-generator v0.31.4
|
||||
k8s.io/api v0.34.1
|
||||
k8s.io/apimachinery v0.34.1
|
||||
k8s.io/client-go v0.34.1
|
||||
k8s.io/code-generator v0.34.1
|
||||
k8s.io/klog/v2 v2.130.1
|
||||
knative.dev/serving v0.44.0
|
||||
knative.dev/serving v0.46.6
|
||||
)
|
||||
|
||||
require (
|
||||
cloud.google.com/go/auth v0.15.0 // indirect
|
||||
cloud.google.com/go/auth v0.17.0 // indirect
|
||||
cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect
|
||||
cloud.google.com/go/compute/metadata v0.6.0 // indirect
|
||||
cloud.google.com/go/compute/metadata v0.9.0 // indirect
|
||||
github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/blendle/zapdriver v1.3.1 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
||||
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
|
||||
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
|
||||
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
|
||||
github.com/go-logr/logr v1.4.2 // indirect
|
||||
github.com/emicklei/go-restful/v3 v3.12.2 // indirect
|
||||
github.com/evanphx/json-patch/v5 v5.9.11 // indirect
|
||||
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
|
||||
github.com/go-logr/logr v1.4.3 // indirect
|
||||
github.com/go-logr/stdr v1.2.2 // indirect
|
||||
github.com/go-openapi/jsonpointer v0.21.0 // indirect
|
||||
github.com/go-openapi/jsonreference v0.21.0 // indirect
|
||||
github.com/go-openapi/swag v0.23.0 // indirect
|
||||
github.com/gogo/protobuf v1.3.2 // indirect
|
||||
github.com/golang/protobuf v1.5.4 // indirect
|
||||
github.com/google/gnostic-models v0.6.8 // indirect
|
||||
github.com/google/go-containerregistry v0.13.0 // indirect
|
||||
github.com/google/gofuzz v1.2.0 // indirect
|
||||
github.com/google/gnostic-models v0.7.0 // indirect
|
||||
github.com/google/go-containerregistry v0.20.3 // indirect
|
||||
github.com/google/s2a-go v0.1.9 // indirect
|
||||
github.com/googleapis/enterprise-certificate-proxy v0.3.6 // indirect
|
||||
github.com/gorilla/websocket v1.5.3 // indirect
|
||||
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect
|
||||
github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 // indirect
|
||||
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
|
||||
github.com/influxdata/line-protocol v0.0.0-20210922203350-b1ad95c89adf // indirect
|
||||
github.com/jmespath/go-jmespath v0.4.1-0.20220621161143-b0104c826a24 // indirect
|
||||
github.com/josharian/intern v1.0.0 // indirect
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/klauspost/compress v1.17.11 // indirect
|
||||
github.com/kylelemons/godebug v1.1.0 // indirect
|
||||
github.com/mailru/easyjson v0.7.7 // indirect
|
||||
github.com/mailru/easyjson v0.9.0 // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
|
||||
github.com/oapi-codegen/runtime v1.0.0 // indirect
|
||||
github.com/opencontainers/go-digest v1.0.0 // indirect
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
|
||||
github.com/prometheus/client_model v0.6.1 // indirect
|
||||
github.com/prometheus/common v0.62.0 // indirect
|
||||
github.com/prometheus/procfs v0.15.1 // indirect
|
||||
github.com/spf13/pflag v1.0.5 // indirect
|
||||
github.com/prometheus/client_model v0.6.2 // indirect
|
||||
github.com/prometheus/common v0.66.1 // indirect
|
||||
github.com/prometheus/procfs v0.17.0 // indirect
|
||||
github.com/spf13/pflag v1.0.6 // indirect
|
||||
github.com/x448/float16 v0.8.4 // indirect
|
||||
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.59.0 // indirect
|
||||
go.opentelemetry.io/otel v1.34.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.34.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.34.0 // indirect
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 // indirect
|
||||
go.opentelemetry.io/otel v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/metric v1.37.0 // indirect
|
||||
go.opentelemetry.io/otel/trace v1.37.0 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
golang.org/x/crypto v0.36.0 // indirect
|
||||
golang.org/x/mod v0.22.0 // indirect
|
||||
golang.org/x/net v0.37.0 // indirect
|
||||
golang.org/x/oauth2 v0.28.0 // indirect
|
||||
golang.org/x/sys v0.31.0 // indirect
|
||||
golang.org/x/term v0.30.0 // indirect
|
||||
golang.org/x/text v0.23.0 // indirect
|
||||
golang.org/x/time v0.11.0 // indirect
|
||||
golang.org/x/tools v0.29.0 // indirect
|
||||
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250313205543-e70fdf4c4cb4 // indirect
|
||||
go.yaml.in/yaml/v2 v2.4.2 // indirect
|
||||
go.yaml.in/yaml/v3 v3.0.4 // indirect
|
||||
golang.org/x/crypto v0.42.0 // indirect
|
||||
golang.org/x/mod v0.28.0 // indirect
|
||||
golang.org/x/net v0.44.0 // indirect
|
||||
golang.org/x/oauth2 v0.31.0 // indirect
|
||||
golang.org/x/sys v0.36.0 // indirect
|
||||
golang.org/x/term v0.35.0 // indirect
|
||||
golang.org/x/text v0.29.0 // indirect
|
||||
golang.org/x/time v0.13.0 // indirect
|
||||
golang.org/x/tools v0.37.0 // indirect
|
||||
gomodules.xyz/jsonpatch/v2 v2.5.0 // indirect
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20250804133106-a7a43d27e69b // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20251002232023-7c0ddcbb5797 // indirect
|
||||
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
|
||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
k8s.io/gengo/v2 v2.0.0-20240911193312-2b36238f13e9 // indirect
|
||||
k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f // indirect
|
||||
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 // indirect
|
||||
knative.dev/networking v0.0.0-20250117155906-67d1c274ba6a // indirect
|
||||
knative.dev/pkg v0.0.0-20250117084104-c43477f0052b // indirect
|
||||
sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.4.2 // indirect
|
||||
sigs.k8s.io/yaml v1.4.0 // indirect
|
||||
k8s.io/gengo/v2 v2.0.0-20250604051438-85fd79dbfd9f // indirect
|
||||
k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b // indirect
|
||||
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 // indirect
|
||||
knative.dev/networking v0.0.0-20250902160145-7dad473f6351 // indirect
|
||||
knative.dev/pkg v0.0.0-20250909011231-077dcf0d00e8 // indirect
|
||||
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
|
||||
sigs.k8s.io/randfill v1.0.0 // indirect
|
||||
sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect
|
||||
sigs.k8s.io/yaml v1.6.0 // indirect
|
||||
)
|
||||
|
||||
283
go.sum
283
go.sum
@@ -1,54 +1,51 @@
|
||||
cloud.google.com/go/auth v0.15.0 h1:Ly0u4aA5vG/fsSsxu98qCQBemXtAtJf+95z9HK+cxps=
|
||||
cloud.google.com/go/auth v0.15.0/go.mod h1:WJDGqZ1o9E9wKIL+IwStfyn/+s59zl4Bi+1KQNVXLZ8=
|
||||
cloud.google.com/go/auth v0.17.0 h1:74yCm7hCj2rUyyAocqnFzsAYXgJhrG26XCFimrc/Kz4=
|
||||
cloud.google.com/go/auth v0.17.0/go.mod h1:6wv/t5/6rOPAX4fJiRjKkJCvswLwdet7G8+UGXt7nCQ=
|
||||
cloud.google.com/go/auth/oauth2adapt v0.2.8 h1:keo8NaayQZ6wimpNSmW5OPc283g65QNIiLpZnkHRbnc=
|
||||
cloud.google.com/go/auth/oauth2adapt v0.2.8/go.mod h1:XQ9y31RkqZCcwJWNSx2Xvric3RrU88hAYYbjDWYDL+c=
|
||||
cloud.google.com/go/compute/metadata v0.6.0 h1:A6hENjEsCDtC1k8byVsgwvVcioamEHvZ4j01OwKxG9I=
|
||||
cloud.google.com/go/compute/metadata v0.6.0/go.mod h1:FjyFAW1MW0C203CEOMDTu3Dk1FlqW3Rga40jzHL4hfg=
|
||||
cloud.google.com/go/monitoring v1.24.1 h1:vKiypZVFD/5a3BbQMvI4gZdl8445ITzXFh257XBgrS0=
|
||||
cloud.google.com/go/monitoring v1.24.1/go.mod h1:Z05d1/vn9NaujqY2voG6pVQXoJGbp+r3laV+LySt9K0=
|
||||
contrib.go.opencensus.io/exporter/ocagent v0.7.1-0.20200907061046-05415f1de66d h1:LblfooH1lKOpp1hIhukktmSAxFkqMPFk9KR6iZ0MJNI=
|
||||
contrib.go.opencensus.io/exporter/ocagent v0.7.1-0.20200907061046-05415f1de66d/go.mod h1:IshRmMJBhDfFj5Y67nVhMYTTIze91RUeT73ipWKs/GY=
|
||||
contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg=
|
||||
contrib.go.opencensus.io/exporter/prometheus v0.4.2/go.mod h1:dvEHbiKmgvbr5pjaF9fpw1KeYcjrnC1J8B+JKjsZyRQ=
|
||||
github.com/Masterminds/semver/v3 v3.3.1 h1:QtNSWtVZ3nBfk8mAOu/B6v7FMJ+NHTIgUPi7rj+4nv4=
|
||||
github.com/Masterminds/semver/v3 v3.3.1/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
|
||||
cloud.google.com/go/compute/metadata v0.9.0 h1:pDUj4QMoPejqq20dK0Pg2N4yG9zIkYGdBtwLoEkH9Zs=
|
||||
cloud.google.com/go/compute/metadata v0.9.0/go.mod h1:E0bWwX5wTnLPedCKqk3pJmVgCBSM6qQI1yTBdEb3C10=
|
||||
cloud.google.com/go/monitoring v1.24.2 h1:5OTsoJ1dXYIiMiuL+sYscLc9BumrL3CarVLL7dd7lHM=
|
||||
cloud.google.com/go/monitoring v1.24.2/go.mod h1:x7yzPWcgDRnPEv3sI+jJGBkwl5qINf+6qY4eq0I9B4U=
|
||||
github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0=
|
||||
github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
|
||||
github.com/RaveNoX/go-jsoncommentstrip v1.0.0/go.mod h1:78ihd09MekBnJnxpICcwzCMzGrKSKYe4AqU6PDYYpjk=
|
||||
github.com/apapsch/go-jsonmerge/v2 v2.0.0 h1:axGnT1gRIfimI7gJifB699GoE/oq+F2MU7Dml6nw9rQ=
|
||||
github.com/apapsch/go-jsonmerge/v2 v2.0.0/go.mod h1:lvDnEdqiQrp0O42VQGgmlKpxL1AP2+08jFMw88y4klk=
|
||||
github.com/aws/aws-sdk-go v1.55.6 h1:cSg4pvZ3m8dgYcgqB97MrcdjUmZ1BeMYKUxMMB89IPk=
|
||||
github.com/aws/aws-sdk-go v1.55.6/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU=
|
||||
github.com/aws/aws-sdk-go v1.55.8 h1:JRmEUbU52aJQZ2AjX4q4Wu7t4uZjOu71uyNmaWlUkJQ=
|
||||
github.com/aws/aws-sdk-go v1.55.8/go.mod h1:ZkViS9AqA6otK+JBBNH2++sx1sgxrPKcSzPPvQkUtXk=
|
||||
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
|
||||
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
|
||||
github.com/blendle/zapdriver v1.3.1 h1:C3dydBOWYRiOk+B8X9IVZ5IOe+7cl+tGOexN4QqHfpE=
|
||||
github.com/blendle/zapdriver v1.3.1/go.mod h1:mdXfREi6u5MArG4j9fewC+FGnXaBR+T4Ox4J2u4eHCc=
|
||||
github.com/bmatcuk/doublestar v1.1.1/go.mod h1:UD6OnuiIn0yFxxA2le/rnRU1G4RaI4UvFv1sNto9p6w=
|
||||
github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g=
|
||||
github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw=
|
||||
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
|
||||
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||
github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443 h1:aQ3y1lwWyqYPiWZThqv1aFbZMiM9vblcSArJRf2Irls=
|
||||
github.com/cncf/xds/go v0.0.0-20250501225837-2ac532fd4443/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
|
||||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/emicklei/go-restful/v3 v3.12.1 h1:PJMDIM/ak7btuL8Ex0iYET9hxM3CI2sjZtzpL63nKAU=
|
||||
github.com/emicklei/go-restful/v3 v3.12.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
|
||||
github.com/emicklei/go-restful/v3 v3.12.2 h1:DhwDP0vY3k8ZzE0RunuJy8GhNpPL6zqLkDf9B/a0/xU=
|
||||
github.com/emicklei/go-restful/v3 v3.12.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
|
||||
github.com/envoyproxy/go-control-plane v0.13.4 h1:zEqyPVyku6IvWCFwux4x9RxkLOMUL+1vC9xUFv5l2/M=
|
||||
github.com/envoyproxy/go-control-plane/envoy v1.32.4 h1:jb83lalDRZSpPWW2Z7Mck/8kXZ5CQAFYVjQcdVIr83A=
|
||||
github.com/envoyproxy/go-control-plane/envoy v1.32.4/go.mod h1:Gzjc5k8JcJswLjAx1Zm+wSYE20UrLtt7JZMWiWQXQEw=
|
||||
github.com/envoyproxy/protoc-gen-validate v1.2.1 h1:DEo3O99U8j4hBFwbJfrz9VtgcDfUKS7KJ7spH3d86P8=
|
||||
github.com/envoyproxy/protoc-gen-validate v1.2.1/go.mod h1:d/C80l/jxXLdfEIhX1W2TmLfsJ31lvEjwamM4DxlWXU=
|
||||
github.com/evanphx/json-patch v5.9.0+incompatible h1:fBXyNpNMuTTDdquAq/uisOr2lShz4oaXpDTX2bLe7ls=
|
||||
github.com/evanphx/json-patch v5.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
|
||||
github.com/evanphx/json-patch/v5 v5.9.0 h1:kcBlZQbplgElYIlo/n1hJbls2z/1awpXxpRi0/FOJfg=
|
||||
github.com/evanphx/json-patch/v5 v5.9.0/go.mod h1:VNkHZ/282BpEyt/tObQO8s5CMPmYYq14uClGH4abBuQ=
|
||||
github.com/evanphx/json-patch/v5 v5.9.11 h1:/8HVnzMq13/3x9TPvjG08wUGqBTmZBsCWzjTM0wiaDU=
|
||||
github.com/evanphx/json-patch/v5 v5.9.11/go.mod h1:3j+LviiESTElxA4p3EMKAB9HXj3/XEtnUf6OZxqIQTM=
|
||||
github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
|
||||
github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE=
|
||||
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
|
||||
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
|
||||
github.com/fxamacker/cbor/v2 v2.7.0 h1:iM5WgngdRBanHcxugY4JySA0nk1wZorNOpTgCMedv5E=
|
||||
github.com/fxamacker/cbor/v2 v2.7.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ=
|
||||
github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU=
|
||||
github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0=
|
||||
github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA=
|
||||
github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs=
|
||||
github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM=
|
||||
github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ=
|
||||
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
|
||||
github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
|
||||
github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
||||
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
|
||||
github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
|
||||
github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
|
||||
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
|
||||
github.com/go-logr/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ=
|
||||
@@ -63,20 +60,15 @@ github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1v
|
||||
github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8=
|
||||
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
|
||||
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=
|
||||
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
|
||||
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
|
||||
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
|
||||
github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I=
|
||||
github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U=
|
||||
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
github.com/google/gnostic-models v0.7.0 h1:qwTtogB15McXDaNqTZdzPJRHvaVJlAl+HVQnLmJEJxo=
|
||||
github.com/google/gnostic-models v0.7.0/go.mod h1:whL5G0m6dmc5cPxKc5bdKdEN3UjI7OUGxBlw57miDrQ=
|
||||
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
|
||||
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
|
||||
github.com/google/go-containerregistry v0.13.0 h1:y1C7Z3e149OJbOPDBxLYR8ITPz8dTKqQwjErKVHJC8k=
|
||||
github.com/google/go-containerregistry v0.13.0/go.mod h1:J9FQ+eSS4a1aC2GNZxvNpbWhgp0487v+cgiilB4FqDo=
|
||||
github.com/google/go-containerregistry v0.20.3 h1:oNx7IdTI936V8CQRveCjaxOiegWwvM7kqkbXTpyiovI=
|
||||
github.com/google/go-containerregistry v0.20.3/go.mod h1:w00pIgBRDVUDFM6bq+Qx8lwNWK+cxgCuX1vd3PIBDNI=
|
||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0=
|
||||
github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||
github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db h1:097atOisP2aRj7vFgYQBbFN4U4JNXUNYpxael3UzMyo=
|
||||
github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144=
|
||||
github.com/google/s2a-go v0.1.9 h1:LGD7gtMgezd8a/Xak7mEWL0PjoTQFvpRudN895yqKW0=
|
||||
@@ -85,20 +77,18 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/googleapis/enterprise-certificate-proxy v0.3.6 h1:GW/XbdyBFQ8Qe+YAmFU9uHLo7OnF5tL52HFAgMmyrf4=
|
||||
github.com/googleapis/enterprise-certificate-proxy v0.3.6/go.mod h1:MkHOF77EYAE7qfSuSS9PU6g4Nt4e11cnsDUowfwewLA=
|
||||
github.com/googleapis/gax-go/v2 v2.14.1 h1:hb0FFeiPaQskmvakKu5EbCbpntQn48jyHuvrkurSS/Q=
|
||||
github.com/googleapis/gax-go/v2 v2.14.1/go.mod h1:Hb/NubMaVM88SrNkvl8X/o8XWwDJEPqouaLeN2IUxoA=
|
||||
github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg=
|
||||
github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.21.0 h1:CWyXh/jylQWp2dtiV33mY4iSSp6yf4lmn+c7/tN+ObI=
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.21.0/go.mod h1:nCLIt0w3Ept2NwF8ThLmrppXsfT07oC8k0XNDxd8sVU=
|
||||
github.com/googleapis/gax-go/v2 v2.15.0 h1:SyjDc1mGgZU5LncH8gimWo9lW1DtIfPibOG81vgd/bo=
|
||||
github.com/googleapis/gax-go/v2 v2.15.0/go.mod h1:zVVkkxAQHa1RQpg9z2AUCMnKhi0Qld9rcmyfL1OZhoc=
|
||||
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 h1:JeSE6pjso5THxAzdVpqr6/geYxZytqFMBCOtn/ujyeo=
|
||||
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674/go.mod h1:r4w70xmWCQKmi1ONH4KIaBptdivuRPyosB9RmPlGEwA=
|
||||
github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 h1:2VTzZjLZBgl62/EtslCrtky5vbi9dd7HrQPQIx6wqiw=
|
||||
github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI=
|
||||
github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ=
|
||||
github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
|
||||
github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k=
|
||||
github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M=
|
||||
github.com/hashicorp/go-retryablehttp v0.7.7 h1:C8hUCYzor8PIfXHa4UrZkU4VvK8o9ISHxT2Q8+VepXU=
|
||||
github.com/hashicorp/go-retryablehttp v0.7.7/go.mod h1:pkQpWZeYWskR+D1tR2O5OcBFOxfA7DoAO6xtkuQnHTk=
|
||||
github.com/hashicorp/go-retryablehttp v0.7.8 h1:ylXZWnqa7Lhqpk0L1P1LzDtGcCR0rPVUrx/c8Unxc48=
|
||||
github.com/hashicorp/go-retryablehttp v0.7.8/go.mod h1:rjiScheydd+CxvumBsIrFKlx3iS0jrZ7LvzFGFmuKbw=
|
||||
github.com/influxdata/influxdb-client-go/v2 v2.14.0 h1:AjbBfJuq+QoaXNcrova8smSjwJdUHnwvfjMF71M1iI4=
|
||||
github.com/influxdata/influxdb-client-go/v2 v2.14.0/go.mod h1:Ahpm3QXKMJslpXl3IftVLVezreAUtBOTZssDrjZEFHI=
|
||||
github.com/influxdata/line-protocol v0.0.0-20210922203350-b1ad95c89adf h1:7JTmneyiNEwVBOHSjoMxiWAqB992atOeepeFYegn5RU=
|
||||
@@ -114,16 +104,16 @@ github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHm
|
||||
github.com/juju/gnuflag v0.0.0-20171113085948-2ce1bb71843d/go.mod h1:2PavIy+JPciBPrBUjwbNvtwB6RQlve+hkpll6QSNmOE=
|
||||
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
|
||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
||||
github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc=
|
||||
github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0=
|
||||
github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo=
|
||||
github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ=
|
||||
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
|
||||
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
|
||||
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
|
||||
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
|
||||
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
|
||||
github.com/mailru/easyjson v0.9.0 h1:PrnmzHw7262yW8sTBwxi1PdJA3Iw/EKBa8psRf7d9a4=
|
||||
github.com/mailru/easyjson v0.9.0/go.mod h1:1+xMtQp2MRNVL/V1bOzuP3aP8VNwRW55fQUto+XFtTU=
|
||||
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
|
||||
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
|
||||
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
|
||||
@@ -131,8 +121,9 @@ github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D
|
||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
|
||||
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
||||
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee h1:W5t00kpgFdJifH4BDsTlE89Zl93FEloxaWZfGcifgq8=
|
||||
github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
|
||||
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
|
||||
github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32 h1:W6apQkHrMkS0Muv8G/TipAy/FJl/rCYT0+EuS8+Z0z4=
|
||||
@@ -148,54 +139,54 @@ github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3I
|
||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 h1:GFCKgmp0tecUJ0sJuv4pzYCqS9+RGSn52M3FUwPs+uo=
|
||||
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
|
||||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/prometheus/client_golang v1.21.1 h1:DOvXXTqVzvkIewV/CDPFdejpMCGeMcbGCQ8YOmu+Ibk=
|
||||
github.com/prometheus/client_golang v1.21.1/go.mod h1:U9NM32ykUErtVBxdvD3zfi+EuFkkaBvMb09mIfe0Zgg=
|
||||
github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E=
|
||||
github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY=
|
||||
github.com/prometheus/common v0.62.0 h1:xasJaQlnWAeyHdUBeGjXmutelfJHWMRr+Fg4QszZ2Io=
|
||||
github.com/prometheus/common v0.62.0/go.mod h1:vyBcEuLSvWos9B1+CyL7JZ2up+uFzXhkqml0W5zIY1I=
|
||||
github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc=
|
||||
github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk=
|
||||
github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0=
|
||||
github.com/prometheus/statsd_exporter v0.22.7/go.mod h1:N/TevpjkIh9ccs6nuzY3jQn9dFqnUakOjnEuMPJJJnI=
|
||||
github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o=
|
||||
github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg=
|
||||
github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk=
|
||||
github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE=
|
||||
github.com/prometheus/common v0.66.1 h1:h5E0h5/Y8niHc5DlaLlWLArTQI7tMrsfQjHV+d9ZoGs=
|
||||
github.com/prometheus/common v0.66.1/go.mod h1:gcaUsgf3KfRSwHY4dIMXLPV0K/Wg1oZ8+SbZk/HH/dA=
|
||||
github.com/prometheus/procfs v0.17.0 h1:FuLQ+05u4ZI+SS/w9+BWEM2TXiHKsUQ9TADiRH7DuK0=
|
||||
github.com/prometheus/procfs v0.17.0/go.mod h1:oPQLaDAMRbA+u8H5Pbfq+dl3VDAvHxMUOVhe0wYB2zw=
|
||||
github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
|
||||
github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
|
||||
github.com/signalfx/signalflow-client-go v0.1.0 h1:aqyt+st3/y8x8JtuwYRL9pOkOTJb+KeCoRWi0SuY5vw=
|
||||
github.com/signalfx/signalflow-client-go v0.1.0/go.mod h1:mY4DTAZuLHyMNGBjSrNdCg5kUU0hSkYjukAnjsVbsQs=
|
||||
github.com/signalfx/signalfx-go v1.46.0 h1:bNPUmoOGjFCyVYz6arShOot4AnZe2knqw9N+UyZ+nMw=
|
||||
github.com/signalfx/signalfx-go v1.46.0/go.mod h1:I30umyhRTu8mPpEtMzEbG0z9wOYjkUKTp9U0gFxFsmk=
|
||||
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
|
||||
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||
github.com/signalfx/signalfx-go v1.53.0 h1:TMQDuj/Kyom8Xtb7NFuvV7URfCuTRjTrLyD0BroUDmM=
|
||||
github.com/signalfx/signalfx-go v1.53.0/go.mod h1:CHt+/W1qd62tXxNqG7ZUB9pEsEAOD6tuvdlyDNIOO1s=
|
||||
github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o=
|
||||
github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
|
||||
github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=
|
||||
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
|
||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
|
||||
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
|
||||
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
|
||||
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
|
||||
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
|
||||
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
|
||||
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
||||
go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0=
|
||||
go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo=
|
||||
go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA=
|
||||
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.59.0 h1:rgMkmiGfix9vFJDcDi1PK8WEQP4FLQwLDfhp5ZLpFeE=
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.59.0/go.mod h1:ijPqXp5P6IRRByFVVg9DY8P5HkxkHE5ARIa+86aXPf4=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.59.0 h1:CV7UdSGJt/Ao6Gp4CXckLxVRRsRgDHoI8XjbL3PDl8s=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.59.0/go.mod h1:FRmFuRJfag1IZ2dPkHnEoSFVgTVPUd2qf5Vi69hLb8I=
|
||||
go.opentelemetry.io/otel v1.34.0 h1:zRLXxLCgL1WyKsPVrgbSdMN4c0FMkDAskSTQP+0hdUY=
|
||||
go.opentelemetry.io/otel v1.34.0/go.mod h1:OWFPOQ+h4G8xpyjgqo4SxJYdDQ/qmRH+wivy7zzx9oI=
|
||||
go.opentelemetry.io/otel/metric v1.34.0 h1:+eTR3U0MyfWjRDhmFMxe2SsW64QrZ84AOhvqS7Y+PoQ=
|
||||
go.opentelemetry.io/otel/metric v1.34.0/go.mod h1:CEDrp0fy2D0MvkXE+dPV7cMi8tWZwX3dmaIhwPOaqHE=
|
||||
go.opentelemetry.io/otel/sdk v1.34.0 h1:95zS4k/2GOy069d321O8jWgYsW3MzVV+KuSPKp7Wr1A=
|
||||
go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.34.0 h1:5CeK9ujjbFVL5c1PhLuStg1wxA7vQv7ce1EK0Gyvahk=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.34.0/go.mod h1:jQ/r8Ze28zRKoNRdkjCZxfs6YvBTG1+YIqyFVFYec5w=
|
||||
go.opentelemetry.io/otel/trace v1.34.0 h1:+ouXS2V8Rd4hp4580a8q23bg0azF2nI8cqLYnC8mh/k=
|
||||
go.opentelemetry.io/otel/trace v1.34.0/go.mod h1:Svm7lSjQD7kG7KJ/MUHPVXSDGz2OX4h0M2jHBhmSfRE=
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0 h1:q4XOmH/0opmeuJtPsbFNivyl7bCt7yRBbeEm2sC/XtQ=
|
||||
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.61.0/go.mod h1:snMWehoOh2wsEwnvvwtDyFCxVeDAODenXHtn5vzrKjo=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.62.0 h1:Hf9xI/XLML9ElpiHVDNwvqI0hIFlzV8dgIr35kV1kRU=
|
||||
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.62.0/go.mod h1:NfchwuyNoMcZ5MLHwPrODwUF1HWCXWrL31s8gSAdIKY=
|
||||
go.opentelemetry.io/otel v1.37.0 h1:9zhNfelUvx0KBfu/gb+ZgeAfAgtWrfHJZcAqFC228wQ=
|
||||
go.opentelemetry.io/otel v1.37.0/go.mod h1:ehE/umFRLnuLa/vSccNq9oS1ErUlkkK71gMcN34UG8I=
|
||||
go.opentelemetry.io/otel/metric v1.37.0 h1:mvwbQS5m0tbmqML4NqK+e3aDiO02vsf/WgbsdpcPoZE=
|
||||
go.opentelemetry.io/otel/metric v1.37.0/go.mod h1:04wGrZurHYKOc+RKeye86GwKiTb9FKm1WHtO+4EVr2E=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0 h1:ItB0QUqnjesGRvNcmAcU0LyvkVyGJ2xftD29bWdDvKI=
|
||||
go.opentelemetry.io/otel/sdk v1.37.0/go.mod h1:VredYzxUvuo2q3WRcDnKDjbdvmO0sCzOvVAiY+yUkAg=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0 h1:90lI228XrB9jCMuSdA0673aubgRobVZFhbjxHHspCPc=
|
||||
go.opentelemetry.io/otel/sdk/metric v1.37.0/go.mod h1:cNen4ZWfiD37l5NhS+Keb5RXVWZWpRE+9WyVCpbo5ps=
|
||||
go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4=
|
||||
go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0=
|
||||
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
||||
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
|
||||
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
|
||||
@@ -205,65 +196,71 @@ go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN8
|
||||
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
|
||||
go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
|
||||
go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
|
||||
go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI=
|
||||
go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU=
|
||||
go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
|
||||
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
||||
golang.org/x/crypto v0.36.0 h1:AnAEvhDddvBdpY+uR+MyHmuZzzNqXSe/GvuDeob5L34=
|
||||
golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc=
|
||||
golang.org/x/crypto v0.42.0 h1:chiH31gIWm57EkTXpwnqf8qeuMUi0yekh6mT2AvFlqI=
|
||||
golang.org/x/crypto v0.42.0/go.mod h1:4+rDnOTJhQCx2q7/j6rAN5XDw8kPjeaXEUR2eL94ix8=
|
||||
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
||||
golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4=
|
||||
golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
|
||||
golang.org/x/mod v0.28.0 h1:gQBtGhjxykdjY9YhZpSlZIsbnaE2+PgjfLWUQTnoZ1U=
|
||||
golang.org/x/mod v0.28.0/go.mod h1:yfB/L0NOf/kmEbXjzCPOx1iK1fRutOydrCMsqRhEBxI=
|
||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
||||
golang.org/x/net v0.37.0 h1:1zLorHbz+LYj7MQlSf1+2tPIIgibq2eL5xkrGk6f+2c=
|
||||
golang.org/x/net v0.37.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
|
||||
golang.org/x/oauth2 v0.28.0 h1:CrgCKl8PPAVtLnU3c+EDw6x11699EWlsDeWNWKdIOkc=
|
||||
golang.org/x/oauth2 v0.28.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8=
|
||||
golang.org/x/net v0.44.0 h1:evd8IRDyfNBMBTTY5XRF1vaZlD+EmWx6x8PkhR04H/I=
|
||||
golang.org/x/net v0.44.0/go.mod h1:ECOoLqd5U3Lhyeyo/QDCEVQ4sNgYsqvCZ722XogGieY=
|
||||
golang.org/x/oauth2 v0.31.0 h1:8Fq0yVZLh4j4YA47vHKFTa9Ew5XIrCP8LC6UeNZnLxo=
|
||||
golang.org/x/oauth2 v0.31.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw=
|
||||
golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
|
||||
golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug=
|
||||
golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik=
|
||||
golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
|
||||
golang.org/x/term v0.30.0 h1:PQ39fJZ+mfadBm0y5WlL4vlM7Sx1Hgf13sMIY2+QS9Y=
|
||||
golang.org/x/term v0.30.0/go.mod h1:NYYFdzHoI5wRh/h5tDMdMqCqPJZEuNqVR5xJLd/n67g=
|
||||
golang.org/x/sys v0.36.0 h1:KVRy2GtZBrk1cBYA7MKu5bEZFxQk4NIDV6RLVcC8o0k=
|
||||
golang.org/x/sys v0.36.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
|
||||
golang.org/x/term v0.35.0 h1:bZBVKBudEyhRcajGcNc3jIfWPqV4y/Kt2XcoigOWtDQ=
|
||||
golang.org/x/term v0.35.0/go.mod h1:TPGtkTLesOwf2DE8CgVYiZinHAOuy5AYUYT1lENIZnA=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY=
|
||||
golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4=
|
||||
golang.org/x/time v0.11.0 h1:/bpjEDfN9tkoN/ryeYHnv5hcMlc8ncjMcM4XBk5NWV0=
|
||||
golang.org/x/time v0.11.0/go.mod h1:CDIdPxbZBQxdj6cxyCIdrNogrJKMJ7pr37NYpMcMDSg=
|
||||
golang.org/x/text v0.29.0 h1:1neNs90w9YzJ9BocxfsQNHKuAT4pkghyXc4nhZ6sJvk=
|
||||
golang.org/x/text v0.29.0/go.mod h1:7MhJOA9CD2qZyOKYazxdYMF85OwPdEr9jTtBpO7ydH4=
|
||||
golang.org/x/time v0.13.0 h1:eUlYslOIt32DgYD6utsuUeHs4d7AsEYLuIAdg7FlYgI=
|
||||
golang.org/x/time v0.13.0/go.mod h1:eL/Oa2bBBK0TkX57Fyni+NgnyQQN4LitPmob2Hjnqw4=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
||||
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
|
||||
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
||||
golang.org/x/tools v0.29.0 h1:Xx0h3TtM9rzQpQuR4dKLrdglAmCEN5Oi+P74JdhdzXE=
|
||||
golang.org/x/tools v0.29.0/go.mod h1:KMQVMRsVxU6nHCFXrBPhDB8XncLNLM0lIy/F14RP588=
|
||||
golang.org/x/tools v0.37.0 h1:DVSRzp7FwePZW356yEAChSdNcQo6Nsp+fex1SUW09lE=
|
||||
golang.org/x/tools v0.37.0/go.mod h1:MBN5QPQtLMHVdvsbtarmTNukZDdgwdwlO5qGacAzF0w=
|
||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||
gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw=
|
||||
gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY=
|
||||
google.golang.org/api v0.228.0 h1:X2DJ/uoWGnY5obVjewbp8icSL5U4FzuCfy9OjbLSnLs=
|
||||
google.golang.org/api v0.228.0/go.mod h1:wNvRS1Pbe8r4+IfBIniV8fwCpGwTrYa+kMUDiC5z5a4=
|
||||
google.golang.org/genproto v0.0.0-20250324211829-b45e905df463 h1:qEFnJI6AnfZk0NNe8YTyXQh5i//Zxi4gBHwRgp76qpw=
|
||||
google.golang.org/genproto v0.0.0-20250324211829-b45e905df463/go.mod h1:SqIx1NV9hcvqdLHo7uNZDS5lrUJybQ3evo3+z/WBfA0=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb h1:p31xT4yrYrSM/G4Sn2+TNUkVhFCbG9y8itM2S6Th950=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:jbe3Bkdp+Dh2IrslsFCklNhweNTBgSYanP1UXhJDhKg=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250313205543-e70fdf4c4cb4 h1:iK2jbkWL86DXjEx0qiHcRE9dE4/Ahua5k6V8OWFb//c=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20250313205543-e70fdf4c4cb4/go.mod h1:LuRYeWDFV6WOn90g357N17oMCaxpgCnbi/44qJvDn2I=
|
||||
google.golang.org/grpc v1.71.0 h1:kF77BGdPTQ4/JZWMlb9VpJ5pa25aqvVqogsxNHHdeBg=
|
||||
google.golang.org/grpc v1.71.0/go.mod h1:H0GRtasmQOh9LkFoCPDu3ZrwUtD1YGE+b2vYBYd/8Ec=
|
||||
google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY=
|
||||
google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY=
|
||||
gomodules.xyz/jsonpatch/v2 v2.5.0 h1:JELs8RLM12qJGXU4u/TO3V25KW8GreMKl9pdkk14RM0=
|
||||
gomodules.xyz/jsonpatch/v2 v2.5.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY=
|
||||
gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk=
|
||||
gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E=
|
||||
google.golang.org/api v0.252.0 h1:xfKJeAJaMwb8OC9fesr369rjciQ704AjU/psjkKURSI=
|
||||
google.golang.org/api v0.252.0/go.mod h1:dnHOv81x5RAmumZ7BWLShB/u7JZNeyalImxHmtTHxqw=
|
||||
google.golang.org/genproto v0.0.0-20250603155806-513f23925822 h1:rHWScKit0gvAPuOnu87KpaYtjK5zBMLcULh7gxkCXu4=
|
||||
google.golang.org/genproto v0.0.0-20250603155806-513f23925822/go.mod h1:HubltRL7rMh0LfnQPkMH4NPDFEWp0jw3vixw7jEM53s=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20250804133106-a7a43d27e69b h1:ULiyYQ0FdsJhwwZUwbaXpZF5yUE3h+RA+gxvBu37ucc=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20250804133106-a7a43d27e69b/go.mod h1:oDOGiMSXHL4sDTJvFvIB9nRQCGdLP1o/iVaqQK8zB+M=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20251002232023-7c0ddcbb5797 h1:CirRxTOwnRWVLKzDNrs0CXAaVozJoR4G9xvdRecrdpk=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20251002232023-7c0ddcbb5797/go.mod h1:HSkG/KdJWusxU1F6CNrwNDjBMgisKxGnc5dAZfT0mjQ=
|
||||
google.golang.org/grpc v1.76.0 h1:UnVkv1+uMLYXoIz6o7chp59WfQUYA2ex/BXQ9rHZu7A=
|
||||
google.golang.org/grpc v1.76.0/go.mod h1:Ju12QI8M6iQJtbcsV+awF5a4hfJMLi4X0JLo94ULZ6c=
|
||||
google.golang.org/protobuf v1.36.10 h1:AYd7cD/uASjIL6Q9LiTjz8JLcrh/88q5UObnmY3aOOE=
|
||||
google.golang.org/protobuf v1.36.10/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
||||
@@ -278,31 +275,33 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
k8s.io/api v0.32.3 h1:Hw7KqxRusq+6QSplE3NYG4MBxZw1BZnq4aP4cJVINls=
|
||||
k8s.io/api v0.32.3/go.mod h1:2wEDTXADtm/HA7CCMD8D8bK4yuBUptzaRhYcYEEYA3k=
|
||||
k8s.io/apimachinery v0.32.3 h1:JmDuDarhDmA/Li7j3aPrwhpNBA94Nvk5zLeOge9HH1U=
|
||||
k8s.io/apimachinery v0.32.3/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE=
|
||||
k8s.io/client-go v0.32.3 h1:RKPVltzopkSgHS7aS98QdscAgtgah/+zmpAogooIqVU=
|
||||
k8s.io/client-go v0.32.3/go.mod h1:3v0+3k4IcT9bXTc4V2rt+d2ZPPG700Xy6Oi0Gdl2PaY=
|
||||
k8s.io/code-generator v0.31.4 h1:Vu+8fKz+239rKiVDHFVHgjQ162cg5iUQPtTyQbwXeQw=
|
||||
k8s.io/code-generator v0.31.4/go.mod h1:yMDt13Kn7m4MMZ4LxB1KBzdZjEyxzdT4b4qXq+lnI90=
|
||||
k8s.io/gengo/v2 v2.0.0-20240911193312-2b36238f13e9 h1:si3PfKm8dDYxgfbeA6orqrtLkvvIeH8UqffFJDl0bz4=
|
||||
k8s.io/gengo/v2 v2.0.0-20240911193312-2b36238f13e9/go.mod h1:EJykeLsmFC60UQbYJezXkEsG2FLrt0GPNkU5iK5GWxU=
|
||||
k8s.io/api v0.34.1 h1:jC+153630BMdlFukegoEL8E/yT7aLyQkIVuwhmwDgJM=
|
||||
k8s.io/api v0.34.1/go.mod h1:SB80FxFtXn5/gwzCoN6QCtPD7Vbu5w2n1S0J5gFfTYk=
|
||||
k8s.io/apimachinery v0.34.1 h1:dTlxFls/eikpJxmAC7MVE8oOeP1zryV7iRyIjB0gky4=
|
||||
k8s.io/apimachinery v0.34.1/go.mod h1:/GwIlEcWuTX9zKIg2mbw0LRFIsXwrfoVxn+ef0X13lw=
|
||||
k8s.io/client-go v0.34.1 h1:ZUPJKgXsnKwVwmKKdPfw4tB58+7/Ik3CrjOEhsiZ7mY=
|
||||
k8s.io/client-go v0.34.1/go.mod h1:kA8v0FP+tk6sZA0yKLRG67LWjqufAoSHA2xVGKw9Of8=
|
||||
k8s.io/code-generator v0.34.1 h1:WpphT26E+j7tEgIUfFr5WfbJrktCGzB3JoJH9149xYc=
|
||||
k8s.io/code-generator v0.34.1/go.mod h1:DeWjekbDnJWRwpw3s0Jat87c+e0TgkxoR4ar608yqvg=
|
||||
k8s.io/gengo/v2 v2.0.0-20250604051438-85fd79dbfd9f h1:SLb+kxmzfA87x4E4brQzB33VBbT2+x7Zq9ROIHmGn9Q=
|
||||
k8s.io/gengo/v2 v2.0.0-20250604051438-85fd79dbfd9f/go.mod h1:EJykeLsmFC60UQbYJezXkEsG2FLrt0GPNkU5iK5GWxU=
|
||||
k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
|
||||
k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
|
||||
k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f h1:GA7//TjRY9yWGy1poLzYYJJ4JRdzg3+O6e8I+e+8T5Y=
|
||||
k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f/go.mod h1:R/HEjbvWI0qdfb8viZUeVZm0X6IZnxAydC7YU42CMw4=
|
||||
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 h1:M3sRQVHv7vB20Xc2ybTt7ODCeFj6JSWYFzOFnYeS6Ro=
|
||||
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
|
||||
knative.dev/networking v0.0.0-20250117155906-67d1c274ba6a h1:FaDPXtv42+AkYh/mE269pttPSZ3fDVAjJiEsYUaM4SM=
|
||||
knative.dev/networking v0.0.0-20250117155906-67d1c274ba6a/go.mod h1:AIKYMfZydhwXR/60c/3KXEnqEnH6aNEEqulifdqJVcQ=
|
||||
knative.dev/pkg v0.0.0-20250117084104-c43477f0052b h1:a+gP7Yzu5NmoX2w1p8nfTgmSKF+aHLKGzqYT82ijJTw=
|
||||
knative.dev/pkg v0.0.0-20250117084104-c43477f0052b/go.mod h1:bedSpkdLybR6JhL1J7XDLpd+JMKM/x8M5Apr80i5TeE=
|
||||
knative.dev/serving v0.44.0 h1:c6TXhoSAI6eXt0/1ET3C69jMWYA4ES9FskSan/fBaac=
|
||||
knative.dev/serving v0.44.0/go.mod h1:9bFONngDZtkdYZkP5ko9LDS9ZelnFY9SaPoHKG0vFxs=
|
||||
sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 h1:/Rv+M11QRah1itp8VhT6HoVx1Ray9eB4DBr+K+/sCJ8=
|
||||
sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3/go.mod h1:18nIHnGi6636UCz6m8i4DhaJ65T6EruyzmoQqI2BVDo=
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.4.2 h1:MdmvkGuXi/8io6ixD5wud3vOLwc1rj0aNqRlpuvjmwA=
|
||||
sigs.k8s.io/structured-merge-diff/v4 v4.4.2/go.mod h1:N8f93tFZh9U6vpxwRArLiikrE5/2tiu1w1AGfACIGE4=
|
||||
sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E=
|
||||
sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY=
|
||||
k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b h1:MloQ9/bdJyIu9lb1PzujOPolHyvO06MXG5TUIj2mNAA=
|
||||
k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b/go.mod h1:UZ2yyWbFTpuhSbFhv24aGNOdoRdJZgsIObGBUaYVsts=
|
||||
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8tmbZBHi4zVsl1Y=
|
||||
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
|
||||
knative.dev/networking v0.0.0-20250902160145-7dad473f6351 h1:Gv/UqbN0AK+ORoT5e2Kg+3+uMW/y9CCdhpXKxYaVV6k=
|
||||
knative.dev/networking v0.0.0-20250902160145-7dad473f6351/go.mod h1:P/fAhhVDgmLt1ugFX8vBvdSDiUOw2P4SGcjbzoZ02Xw=
|
||||
knative.dev/pkg v0.0.0-20250909011231-077dcf0d00e8 h1:n0BMHXIem9MyDkK4vfA4Vzdxaf1e+EeLJ6k+8exCjjI=
|
||||
knative.dev/pkg v0.0.0-20250909011231-077dcf0d00e8/go.mod h1:a1amDzo4YIUNuGeDgEz/uDHs5MQVYI1DXnRnEpWCAts=
|
||||
knative.dev/serving v0.46.6 h1:jmVF560qnepNBG69VEbNRtknGFwZtGEyR1QSlNuoKmk=
|
||||
knative.dev/serving v0.46.6/go.mod h1:mY7uXQo49PnxxM6UJWfnSAi6OqFEPM03dpWc8xsH3+I=
|
||||
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 h1:gBQPwqORJ8d8/YNZWEjoZs7npUVDpVXUUOFfW6CgAqE=
|
||||
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg=
|
||||
sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU=
|
||||
sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY=
|
||||
sigs.k8s.io/structured-merge-diff/v6 v6.3.0 h1:jTijUJbW353oVOd9oTlifJqOGEkUw2jB/fXCbTiQEco=
|
||||
sigs.k8s.io/structured-merge-diff/v6 v6.3.0/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE=
|
||||
sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs=
|
||||
sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4=
|
||||
|
||||
@@ -19,8 +19,8 @@ limitations under the License.
|
||||
package versioned
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
fmt "fmt"
|
||||
http "net/http"
|
||||
|
||||
apisixv2 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/apisix/v2"
|
||||
appmeshv1beta1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/appmesh/v1beta1"
|
||||
|
||||
@@ -52,6 +52,7 @@ import (
|
||||
fakesplitv1alpha3 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/smi/v1alpha3/fake"
|
||||
traefikv1alpha1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/traefik/v1alpha1"
|
||||
faketraefikv1alpha1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/traefik/v1alpha1/fake"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apimachinery/pkg/watch"
|
||||
"k8s.io/client-go/discovery"
|
||||
@@ -79,9 +80,13 @@ func NewSimpleClientset(objects ...runtime.Object) *Clientset {
|
||||
cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake}
|
||||
cs.AddReactor("*", "*", testing.ObjectReaction(o))
|
||||
cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) {
|
||||
var opts metav1.ListOptions
|
||||
if watchActcion, ok := action.(testing.WatchActionImpl); ok {
|
||||
opts = watchActcion.ListOptions
|
||||
}
|
||||
gvr := action.GetResource()
|
||||
ns := action.GetNamespace()
|
||||
watch, err := o.Watch(gvr, ns)
|
||||
watch, err := o.Watch(gvr, ns, opts)
|
||||
if err != nil {
|
||||
return false, nil, err
|
||||
}
|
||||
|
||||
@@ -19,10 +19,10 @@ limitations under the License.
|
||||
package v2
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
http "net/http"
|
||||
|
||||
v2 "github.com/fluxcd/flagger/pkg/apis/apisix/v2"
|
||||
"github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
apisixv2 "github.com/fluxcd/flagger/pkg/apis/apisix/v2"
|
||||
scheme "github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
@@ -45,9 +45,7 @@ func (c *ApisixV2Client) ApisixRoutes(namespace string) ApisixRouteInterface {
|
||||
// where httpClient was generated with rest.HTTPClientFor(c).
|
||||
func NewForConfig(c *rest.Config) (*ApisixV2Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
setConfigDefaults(&config)
|
||||
httpClient, err := rest.HTTPClientFor(&config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -59,9 +57,7 @@ func NewForConfig(c *rest.Config) (*ApisixV2Client, error) {
|
||||
// Note the http client provided takes precedence over the configured transport values.
|
||||
func NewForConfigAndClient(c *rest.Config, h *http.Client) (*ApisixV2Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
setConfigDefaults(&config)
|
||||
client, err := rest.RESTClientForConfigAndClient(&config, h)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -84,17 +80,15 @@ func New(c rest.Interface) *ApisixV2Client {
|
||||
return &ApisixV2Client{c}
|
||||
}
|
||||
|
||||
func setConfigDefaults(config *rest.Config) error {
|
||||
gv := v2.SchemeGroupVersion
|
||||
func setConfigDefaults(config *rest.Config) {
|
||||
gv := apisixv2.SchemeGroupVersion
|
||||
config.GroupVersion = &gv
|
||||
config.APIPath = "/apis"
|
||||
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
|
||||
config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion()
|
||||
|
||||
if config.UserAgent == "" {
|
||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
|
||||
@@ -19,9 +19,9 @@ limitations under the License.
|
||||
package v2
|
||||
|
||||
import (
|
||||
"context"
|
||||
context "context"
|
||||
|
||||
v2 "github.com/fluxcd/flagger/pkg/apis/apisix/v2"
|
||||
apisixv2 "github.com/fluxcd/flagger/pkg/apis/apisix/v2"
|
||||
scheme "github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
@@ -37,33 +37,34 @@ type ApisixRoutesGetter interface {
|
||||
|
||||
// ApisixRouteInterface has methods to work with ApisixRoute resources.
|
||||
type ApisixRouteInterface interface {
|
||||
Create(ctx context.Context, apisixRoute *v2.ApisixRoute, opts v1.CreateOptions) (*v2.ApisixRoute, error)
|
||||
Update(ctx context.Context, apisixRoute *v2.ApisixRoute, opts v1.UpdateOptions) (*v2.ApisixRoute, error)
|
||||
Create(ctx context.Context, apisixRoute *apisixv2.ApisixRoute, opts v1.CreateOptions) (*apisixv2.ApisixRoute, error)
|
||||
Update(ctx context.Context, apisixRoute *apisixv2.ApisixRoute, opts v1.UpdateOptions) (*apisixv2.ApisixRoute, error)
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
UpdateStatus(ctx context.Context, apisixRoute *v2.ApisixRoute, opts v1.UpdateOptions) (*v2.ApisixRoute, error)
|
||||
UpdateStatus(ctx context.Context, apisixRoute *apisixv2.ApisixRoute, opts v1.UpdateOptions) (*apisixv2.ApisixRoute, error)
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v2.ApisixRoute, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v2.ApisixRouteList, error)
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*apisixv2.ApisixRoute, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*apisixv2.ApisixRouteList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.ApisixRoute, err error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *apisixv2.ApisixRoute, err error)
|
||||
ApisixRouteExpansion
|
||||
}
|
||||
|
||||
// apisixRoutes implements ApisixRouteInterface
|
||||
type apisixRoutes struct {
|
||||
*gentype.ClientWithList[*v2.ApisixRoute, *v2.ApisixRouteList]
|
||||
*gentype.ClientWithList[*apisixv2.ApisixRoute, *apisixv2.ApisixRouteList]
|
||||
}
|
||||
|
||||
// newApisixRoutes returns a ApisixRoutes
|
||||
func newApisixRoutes(c *ApisixV2Client, namespace string) *apisixRoutes {
|
||||
return &apisixRoutes{
|
||||
gentype.NewClientWithList[*v2.ApisixRoute, *v2.ApisixRouteList](
|
||||
gentype.NewClientWithList[*apisixv2.ApisixRoute, *apisixv2.ApisixRouteList](
|
||||
"apisixroutes",
|
||||
c.RESTClient(),
|
||||
scheme.ParameterCodec,
|
||||
namespace,
|
||||
func() *v2.ApisixRoute { return &v2.ApisixRoute{} },
|
||||
func() *v2.ApisixRouteList { return &v2.ApisixRouteList{} }),
|
||||
func() *apisixv2.ApisixRoute { return &apisixv2.ApisixRoute{} },
|
||||
func() *apisixv2.ApisixRouteList { return &apisixv2.ApisixRouteList{} },
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ type FakeApisixV2 struct {
|
||||
}
|
||||
|
||||
func (c *FakeApisixV2) ApisixRoutes(namespace string) v2.ApisixRouteInterface {
|
||||
return &FakeApisixRoutes{c, namespace}
|
||||
return newFakeApisixRoutes(c, namespace)
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
|
||||
@@ -19,129 +19,30 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v2 "github.com/fluxcd/flagger/pkg/apis/apisix/v2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
apisixv2 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/apisix/v2"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
)
|
||||
|
||||
// FakeApisixRoutes implements ApisixRouteInterface
|
||||
type FakeApisixRoutes struct {
|
||||
// fakeApisixRoutes implements ApisixRouteInterface
|
||||
type fakeApisixRoutes struct {
|
||||
*gentype.FakeClientWithList[*v2.ApisixRoute, *v2.ApisixRouteList]
|
||||
Fake *FakeApisixV2
|
||||
ns string
|
||||
}
|
||||
|
||||
var apisixroutesResource = v2.SchemeGroupVersion.WithResource("apisixroutes")
|
||||
|
||||
var apisixroutesKind = v2.SchemeGroupVersion.WithKind("ApisixRoute")
|
||||
|
||||
// Get takes name of the apisixRoute, and returns the corresponding apisixRoute object, and an error if there is any.
|
||||
func (c *FakeApisixRoutes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v2.ApisixRoute, err error) {
|
||||
emptyResult := &v2.ApisixRoute{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetActionWithOptions(apisixroutesResource, c.ns, name, options), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
func newFakeApisixRoutes(fake *FakeApisixV2, namespace string) apisixv2.ApisixRouteInterface {
|
||||
return &fakeApisixRoutes{
|
||||
gentype.NewFakeClientWithList[*v2.ApisixRoute, *v2.ApisixRouteList](
|
||||
fake.Fake,
|
||||
namespace,
|
||||
v2.SchemeGroupVersion.WithResource("apisixroutes"),
|
||||
v2.SchemeGroupVersion.WithKind("ApisixRoute"),
|
||||
func() *v2.ApisixRoute { return &v2.ApisixRoute{} },
|
||||
func() *v2.ApisixRouteList { return &v2.ApisixRouteList{} },
|
||||
func(dst, src *v2.ApisixRouteList) { dst.ListMeta = src.ListMeta },
|
||||
func(list *v2.ApisixRouteList) []*v2.ApisixRoute { return gentype.ToPointerSlice(list.Items) },
|
||||
func(list *v2.ApisixRouteList, items []*v2.ApisixRoute) { list.Items = gentype.FromPointerSlice(items) },
|
||||
),
|
||||
fake,
|
||||
}
|
||||
return obj.(*v2.ApisixRoute), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ApisixRoutes that match those selectors.
|
||||
func (c *FakeApisixRoutes) List(ctx context.Context, opts v1.ListOptions) (result *v2.ApisixRouteList, err error) {
|
||||
emptyResult := &v2.ApisixRouteList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListActionWithOptions(apisixroutesResource, apisixroutesKind, c.ns, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v2.ApisixRouteList{ListMeta: obj.(*v2.ApisixRouteList).ListMeta}
|
||||
for _, item := range obj.(*v2.ApisixRouteList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested apisixRoutes.
|
||||
func (c *FakeApisixRoutes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchActionWithOptions(apisixroutesResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a apisixRoute and creates it. Returns the server's representation of the apisixRoute, and an error, if there is any.
|
||||
func (c *FakeApisixRoutes) Create(ctx context.Context, apisixRoute *v2.ApisixRoute, opts v1.CreateOptions) (result *v2.ApisixRoute, err error) {
|
||||
emptyResult := &v2.ApisixRoute{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateActionWithOptions(apisixroutesResource, c.ns, apisixRoute, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v2.ApisixRoute), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a apisixRoute and updates it. Returns the server's representation of the apisixRoute, and an error, if there is any.
|
||||
func (c *FakeApisixRoutes) Update(ctx context.Context, apisixRoute *v2.ApisixRoute, opts v1.UpdateOptions) (result *v2.ApisixRoute, err error) {
|
||||
emptyResult := &v2.ApisixRoute{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateActionWithOptions(apisixroutesResource, c.ns, apisixRoute, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v2.ApisixRoute), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeApisixRoutes) UpdateStatus(ctx context.Context, apisixRoute *v2.ApisixRoute, opts v1.UpdateOptions) (result *v2.ApisixRoute, err error) {
|
||||
emptyResult := &v2.ApisixRoute{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceActionWithOptions(apisixroutesResource, "status", c.ns, apisixRoute, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v2.ApisixRoute), err
|
||||
}
|
||||
|
||||
// Delete takes name of the apisixRoute and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeApisixRoutes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteActionWithOptions(apisixroutesResource, c.ns, name, opts), &v2.ApisixRoute{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeApisixRoutes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionActionWithOptions(apisixroutesResource, c.ns, opts, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v2.ApisixRouteList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched apisixRoute.
|
||||
func (c *FakeApisixRoutes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v2.ApisixRoute, err error) {
|
||||
emptyResult := &v2.ApisixRoute{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceActionWithOptions(apisixroutesResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v2.ApisixRoute), err
|
||||
}
|
||||
|
||||
@@ -19,10 +19,10 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
http "net/http"
|
||||
|
||||
v1beta1 "github.com/fluxcd/flagger/pkg/apis/appmesh/v1beta1"
|
||||
"github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
appmeshv1beta1 "github.com/fluxcd/flagger/pkg/apis/appmesh/v1beta1"
|
||||
scheme "github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
@@ -55,9 +55,7 @@ func (c *AppmeshV1beta1Client) VirtualServices(namespace string) VirtualServiceI
|
||||
// where httpClient was generated with rest.HTTPClientFor(c).
|
||||
func NewForConfig(c *rest.Config) (*AppmeshV1beta1Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
setConfigDefaults(&config)
|
||||
httpClient, err := rest.HTTPClientFor(&config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -69,9 +67,7 @@ func NewForConfig(c *rest.Config) (*AppmeshV1beta1Client, error) {
|
||||
// Note the http client provided takes precedence over the configured transport values.
|
||||
func NewForConfigAndClient(c *rest.Config, h *http.Client) (*AppmeshV1beta1Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
setConfigDefaults(&config)
|
||||
client, err := rest.RESTClientForConfigAndClient(&config, h)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -94,17 +90,15 @@ func New(c rest.Interface) *AppmeshV1beta1Client {
|
||||
return &AppmeshV1beta1Client{c}
|
||||
}
|
||||
|
||||
func setConfigDefaults(config *rest.Config) error {
|
||||
gv := v1beta1.SchemeGroupVersion
|
||||
func setConfigDefaults(config *rest.Config) {
|
||||
gv := appmeshv1beta1.SchemeGroupVersion
|
||||
config.GroupVersion = &gv
|
||||
config.APIPath = "/apis"
|
||||
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
|
||||
config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion()
|
||||
|
||||
if config.UserAgent == "" {
|
||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
|
||||
@@ -29,15 +29,15 @@ type FakeAppmeshV1beta1 struct {
|
||||
}
|
||||
|
||||
func (c *FakeAppmeshV1beta1) Meshes() v1beta1.MeshInterface {
|
||||
return &FakeMeshes{c}
|
||||
return newFakeMeshes(c)
|
||||
}
|
||||
|
||||
func (c *FakeAppmeshV1beta1) VirtualNodes(namespace string) v1beta1.VirtualNodeInterface {
|
||||
return &FakeVirtualNodes{c, namespace}
|
||||
return newFakeVirtualNodes(c, namespace)
|
||||
}
|
||||
|
||||
func (c *FakeAppmeshV1beta1) VirtualServices(namespace string) v1beta1.VirtualServiceInterface {
|
||||
return &FakeVirtualServices{c, namespace}
|
||||
return newFakeVirtualServices(c, namespace)
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
|
||||
@@ -19,120 +19,30 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1beta1 "github.com/fluxcd/flagger/pkg/apis/appmesh/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
appmeshv1beta1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/appmesh/v1beta1"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
)
|
||||
|
||||
// FakeMeshes implements MeshInterface
|
||||
type FakeMeshes struct {
|
||||
// fakeMeshes implements MeshInterface
|
||||
type fakeMeshes struct {
|
||||
*gentype.FakeClientWithList[*v1beta1.Mesh, *v1beta1.MeshList]
|
||||
Fake *FakeAppmeshV1beta1
|
||||
}
|
||||
|
||||
var meshesResource = v1beta1.SchemeGroupVersion.WithResource("meshes")
|
||||
|
||||
var meshesKind = v1beta1.SchemeGroupVersion.WithKind("Mesh")
|
||||
|
||||
// Get takes name of the mesh, and returns the corresponding mesh object, and an error if there is any.
|
||||
func (c *FakeMeshes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Mesh, err error) {
|
||||
emptyResult := &v1beta1.Mesh{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetActionWithOptions(meshesResource, name, options), emptyResult)
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
func newFakeMeshes(fake *FakeAppmeshV1beta1) appmeshv1beta1.MeshInterface {
|
||||
return &fakeMeshes{
|
||||
gentype.NewFakeClientWithList[*v1beta1.Mesh, *v1beta1.MeshList](
|
||||
fake.Fake,
|
||||
"",
|
||||
v1beta1.SchemeGroupVersion.WithResource("meshes"),
|
||||
v1beta1.SchemeGroupVersion.WithKind("Mesh"),
|
||||
func() *v1beta1.Mesh { return &v1beta1.Mesh{} },
|
||||
func() *v1beta1.MeshList { return &v1beta1.MeshList{} },
|
||||
func(dst, src *v1beta1.MeshList) { dst.ListMeta = src.ListMeta },
|
||||
func(list *v1beta1.MeshList) []*v1beta1.Mesh { return gentype.ToPointerSlice(list.Items) },
|
||||
func(list *v1beta1.MeshList, items []*v1beta1.Mesh) { list.Items = gentype.FromPointerSlice(items) },
|
||||
),
|
||||
fake,
|
||||
}
|
||||
return obj.(*v1beta1.Mesh), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Meshes that match those selectors.
|
||||
func (c *FakeMeshes) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.MeshList, err error) {
|
||||
emptyResult := &v1beta1.MeshList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListActionWithOptions(meshesResource, meshesKind, opts), emptyResult)
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1beta1.MeshList{ListMeta: obj.(*v1beta1.MeshList).ListMeta}
|
||||
for _, item := range obj.(*v1beta1.MeshList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested meshes.
|
||||
func (c *FakeMeshes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewRootWatchActionWithOptions(meshesResource, opts))
|
||||
}
|
||||
|
||||
// Create takes the representation of a mesh and creates it. Returns the server's representation of the mesh, and an error, if there is any.
|
||||
func (c *FakeMeshes) Create(ctx context.Context, mesh *v1beta1.Mesh, opts v1.CreateOptions) (result *v1beta1.Mesh, err error) {
|
||||
emptyResult := &v1beta1.Mesh{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateActionWithOptions(meshesResource, mesh, opts), emptyResult)
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1beta1.Mesh), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a mesh and updates it. Returns the server's representation of the mesh, and an error, if there is any.
|
||||
func (c *FakeMeshes) Update(ctx context.Context, mesh *v1beta1.Mesh, opts v1.UpdateOptions) (result *v1beta1.Mesh, err error) {
|
||||
emptyResult := &v1beta1.Mesh{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateActionWithOptions(meshesResource, mesh, opts), emptyResult)
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1beta1.Mesh), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeMeshes) UpdateStatus(ctx context.Context, mesh *v1beta1.Mesh, opts v1.UpdateOptions) (result *v1beta1.Mesh, err error) {
|
||||
emptyResult := &v1beta1.Mesh{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateSubresourceActionWithOptions(meshesResource, "status", mesh, opts), emptyResult)
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1beta1.Mesh), err
|
||||
}
|
||||
|
||||
// Delete takes name of the mesh and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeMeshes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewRootDeleteActionWithOptions(meshesResource, name, opts), &v1beta1.Mesh{})
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeMeshes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionActionWithOptions(meshesResource, opts, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1beta1.MeshList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched mesh.
|
||||
func (c *FakeMeshes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Mesh, err error) {
|
||||
emptyResult := &v1beta1.Mesh{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceActionWithOptions(meshesResource, name, pt, data, opts, subresources...), emptyResult)
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1beta1.Mesh), err
|
||||
}
|
||||
|
||||
@@ -19,129 +19,32 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1beta1 "github.com/fluxcd/flagger/pkg/apis/appmesh/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
appmeshv1beta1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/appmesh/v1beta1"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
)
|
||||
|
||||
// FakeVirtualNodes implements VirtualNodeInterface
|
||||
type FakeVirtualNodes struct {
|
||||
// fakeVirtualNodes implements VirtualNodeInterface
|
||||
type fakeVirtualNodes struct {
|
||||
*gentype.FakeClientWithList[*v1beta1.VirtualNode, *v1beta1.VirtualNodeList]
|
||||
Fake *FakeAppmeshV1beta1
|
||||
ns string
|
||||
}
|
||||
|
||||
var virtualnodesResource = v1beta1.SchemeGroupVersion.WithResource("virtualnodes")
|
||||
|
||||
var virtualnodesKind = v1beta1.SchemeGroupVersion.WithKind("VirtualNode")
|
||||
|
||||
// Get takes name of the virtualNode, and returns the corresponding virtualNode object, and an error if there is any.
|
||||
func (c *FakeVirtualNodes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.VirtualNode, err error) {
|
||||
emptyResult := &v1beta1.VirtualNode{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetActionWithOptions(virtualnodesResource, c.ns, name, options), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
func newFakeVirtualNodes(fake *FakeAppmeshV1beta1, namespace string) appmeshv1beta1.VirtualNodeInterface {
|
||||
return &fakeVirtualNodes{
|
||||
gentype.NewFakeClientWithList[*v1beta1.VirtualNode, *v1beta1.VirtualNodeList](
|
||||
fake.Fake,
|
||||
namespace,
|
||||
v1beta1.SchemeGroupVersion.WithResource("virtualnodes"),
|
||||
v1beta1.SchemeGroupVersion.WithKind("VirtualNode"),
|
||||
func() *v1beta1.VirtualNode { return &v1beta1.VirtualNode{} },
|
||||
func() *v1beta1.VirtualNodeList { return &v1beta1.VirtualNodeList{} },
|
||||
func(dst, src *v1beta1.VirtualNodeList) { dst.ListMeta = src.ListMeta },
|
||||
func(list *v1beta1.VirtualNodeList) []*v1beta1.VirtualNode { return gentype.ToPointerSlice(list.Items) },
|
||||
func(list *v1beta1.VirtualNodeList, items []*v1beta1.VirtualNode) {
|
||||
list.Items = gentype.FromPointerSlice(items)
|
||||
},
|
||||
),
|
||||
fake,
|
||||
}
|
||||
return obj.(*v1beta1.VirtualNode), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of VirtualNodes that match those selectors.
|
||||
func (c *FakeVirtualNodes) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.VirtualNodeList, err error) {
|
||||
emptyResult := &v1beta1.VirtualNodeList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListActionWithOptions(virtualnodesResource, virtualnodesKind, c.ns, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1beta1.VirtualNodeList{ListMeta: obj.(*v1beta1.VirtualNodeList).ListMeta}
|
||||
for _, item := range obj.(*v1beta1.VirtualNodeList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested virtualNodes.
|
||||
func (c *FakeVirtualNodes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchActionWithOptions(virtualnodesResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a virtualNode and creates it. Returns the server's representation of the virtualNode, and an error, if there is any.
|
||||
func (c *FakeVirtualNodes) Create(ctx context.Context, virtualNode *v1beta1.VirtualNode, opts v1.CreateOptions) (result *v1beta1.VirtualNode, err error) {
|
||||
emptyResult := &v1beta1.VirtualNode{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateActionWithOptions(virtualnodesResource, c.ns, virtualNode, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1beta1.VirtualNode), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a virtualNode and updates it. Returns the server's representation of the virtualNode, and an error, if there is any.
|
||||
func (c *FakeVirtualNodes) Update(ctx context.Context, virtualNode *v1beta1.VirtualNode, opts v1.UpdateOptions) (result *v1beta1.VirtualNode, err error) {
|
||||
emptyResult := &v1beta1.VirtualNode{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateActionWithOptions(virtualnodesResource, c.ns, virtualNode, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1beta1.VirtualNode), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeVirtualNodes) UpdateStatus(ctx context.Context, virtualNode *v1beta1.VirtualNode, opts v1.UpdateOptions) (result *v1beta1.VirtualNode, err error) {
|
||||
emptyResult := &v1beta1.VirtualNode{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceActionWithOptions(virtualnodesResource, "status", c.ns, virtualNode, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1beta1.VirtualNode), err
|
||||
}
|
||||
|
||||
// Delete takes name of the virtualNode and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeVirtualNodes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteActionWithOptions(virtualnodesResource, c.ns, name, opts), &v1beta1.VirtualNode{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeVirtualNodes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionActionWithOptions(virtualnodesResource, c.ns, opts, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1beta1.VirtualNodeList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched virtualNode.
|
||||
func (c *FakeVirtualNodes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.VirtualNode, err error) {
|
||||
emptyResult := &v1beta1.VirtualNode{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceActionWithOptions(virtualnodesResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1beta1.VirtualNode), err
|
||||
}
|
||||
|
||||
@@ -19,129 +19,34 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1beta1 "github.com/fluxcd/flagger/pkg/apis/appmesh/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
appmeshv1beta1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/appmesh/v1beta1"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
)
|
||||
|
||||
// FakeVirtualServices implements VirtualServiceInterface
|
||||
type FakeVirtualServices struct {
|
||||
// fakeVirtualServices implements VirtualServiceInterface
|
||||
type fakeVirtualServices struct {
|
||||
*gentype.FakeClientWithList[*v1beta1.VirtualService, *v1beta1.VirtualServiceList]
|
||||
Fake *FakeAppmeshV1beta1
|
||||
ns string
|
||||
}
|
||||
|
||||
var virtualservicesResource = v1beta1.SchemeGroupVersion.WithResource("virtualservices")
|
||||
|
||||
var virtualservicesKind = v1beta1.SchemeGroupVersion.WithKind("VirtualService")
|
||||
|
||||
// Get takes name of the virtualService, and returns the corresponding virtualService object, and an error if there is any.
|
||||
func (c *FakeVirtualServices) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.VirtualService, err error) {
|
||||
emptyResult := &v1beta1.VirtualService{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetActionWithOptions(virtualservicesResource, c.ns, name, options), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
func newFakeVirtualServices(fake *FakeAppmeshV1beta1, namespace string) appmeshv1beta1.VirtualServiceInterface {
|
||||
return &fakeVirtualServices{
|
||||
gentype.NewFakeClientWithList[*v1beta1.VirtualService, *v1beta1.VirtualServiceList](
|
||||
fake.Fake,
|
||||
namespace,
|
||||
v1beta1.SchemeGroupVersion.WithResource("virtualservices"),
|
||||
v1beta1.SchemeGroupVersion.WithKind("VirtualService"),
|
||||
func() *v1beta1.VirtualService { return &v1beta1.VirtualService{} },
|
||||
func() *v1beta1.VirtualServiceList { return &v1beta1.VirtualServiceList{} },
|
||||
func(dst, src *v1beta1.VirtualServiceList) { dst.ListMeta = src.ListMeta },
|
||||
func(list *v1beta1.VirtualServiceList) []*v1beta1.VirtualService {
|
||||
return gentype.ToPointerSlice(list.Items)
|
||||
},
|
||||
func(list *v1beta1.VirtualServiceList, items []*v1beta1.VirtualService) {
|
||||
list.Items = gentype.FromPointerSlice(items)
|
||||
},
|
||||
),
|
||||
fake,
|
||||
}
|
||||
return obj.(*v1beta1.VirtualService), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of VirtualServices that match those selectors.
|
||||
func (c *FakeVirtualServices) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.VirtualServiceList, err error) {
|
||||
emptyResult := &v1beta1.VirtualServiceList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListActionWithOptions(virtualservicesResource, virtualservicesKind, c.ns, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1beta1.VirtualServiceList{ListMeta: obj.(*v1beta1.VirtualServiceList).ListMeta}
|
||||
for _, item := range obj.(*v1beta1.VirtualServiceList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested virtualServices.
|
||||
func (c *FakeVirtualServices) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchActionWithOptions(virtualservicesResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a virtualService and creates it. Returns the server's representation of the virtualService, and an error, if there is any.
|
||||
func (c *FakeVirtualServices) Create(ctx context.Context, virtualService *v1beta1.VirtualService, opts v1.CreateOptions) (result *v1beta1.VirtualService, err error) {
|
||||
emptyResult := &v1beta1.VirtualService{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateActionWithOptions(virtualservicesResource, c.ns, virtualService, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1beta1.VirtualService), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a virtualService and updates it. Returns the server's representation of the virtualService, and an error, if there is any.
|
||||
func (c *FakeVirtualServices) Update(ctx context.Context, virtualService *v1beta1.VirtualService, opts v1.UpdateOptions) (result *v1beta1.VirtualService, err error) {
|
||||
emptyResult := &v1beta1.VirtualService{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateActionWithOptions(virtualservicesResource, c.ns, virtualService, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1beta1.VirtualService), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeVirtualServices) UpdateStatus(ctx context.Context, virtualService *v1beta1.VirtualService, opts v1.UpdateOptions) (result *v1beta1.VirtualService, err error) {
|
||||
emptyResult := &v1beta1.VirtualService{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceActionWithOptions(virtualservicesResource, "status", c.ns, virtualService, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1beta1.VirtualService), err
|
||||
}
|
||||
|
||||
// Delete takes name of the virtualService and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeVirtualServices) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteActionWithOptions(virtualservicesResource, c.ns, name, opts), &v1beta1.VirtualService{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeVirtualServices) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionActionWithOptions(virtualservicesResource, c.ns, opts, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1beta1.VirtualServiceList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched virtualService.
|
||||
func (c *FakeVirtualServices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.VirtualService, err error) {
|
||||
emptyResult := &v1beta1.VirtualService{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceActionWithOptions(virtualservicesResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1beta1.VirtualService), err
|
||||
}
|
||||
|
||||
@@ -19,9 +19,9 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"context"
|
||||
context "context"
|
||||
|
||||
v1beta1 "github.com/fluxcd/flagger/pkg/apis/appmesh/v1beta1"
|
||||
appmeshv1beta1 "github.com/fluxcd/flagger/pkg/apis/appmesh/v1beta1"
|
||||
scheme "github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
@@ -37,33 +37,34 @@ type MeshesGetter interface {
|
||||
|
||||
// MeshInterface has methods to work with Mesh resources.
|
||||
type MeshInterface interface {
|
||||
Create(ctx context.Context, mesh *v1beta1.Mesh, opts v1.CreateOptions) (*v1beta1.Mesh, error)
|
||||
Update(ctx context.Context, mesh *v1beta1.Mesh, opts v1.UpdateOptions) (*v1beta1.Mesh, error)
|
||||
Create(ctx context.Context, mesh *appmeshv1beta1.Mesh, opts v1.CreateOptions) (*appmeshv1beta1.Mesh, error)
|
||||
Update(ctx context.Context, mesh *appmeshv1beta1.Mesh, opts v1.UpdateOptions) (*appmeshv1beta1.Mesh, error)
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
UpdateStatus(ctx context.Context, mesh *v1beta1.Mesh, opts v1.UpdateOptions) (*v1beta1.Mesh, error)
|
||||
UpdateStatus(ctx context.Context, mesh *appmeshv1beta1.Mesh, opts v1.UpdateOptions) (*appmeshv1beta1.Mesh, error)
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.Mesh, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.MeshList, error)
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*appmeshv1beta1.Mesh, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*appmeshv1beta1.MeshList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Mesh, err error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *appmeshv1beta1.Mesh, err error)
|
||||
MeshExpansion
|
||||
}
|
||||
|
||||
// meshes implements MeshInterface
|
||||
type meshes struct {
|
||||
*gentype.ClientWithList[*v1beta1.Mesh, *v1beta1.MeshList]
|
||||
*gentype.ClientWithList[*appmeshv1beta1.Mesh, *appmeshv1beta1.MeshList]
|
||||
}
|
||||
|
||||
// newMeshes returns a Meshes
|
||||
func newMeshes(c *AppmeshV1beta1Client) *meshes {
|
||||
return &meshes{
|
||||
gentype.NewClientWithList[*v1beta1.Mesh, *v1beta1.MeshList](
|
||||
gentype.NewClientWithList[*appmeshv1beta1.Mesh, *appmeshv1beta1.MeshList](
|
||||
"meshes",
|
||||
c.RESTClient(),
|
||||
scheme.ParameterCodec,
|
||||
"",
|
||||
func() *v1beta1.Mesh { return &v1beta1.Mesh{} },
|
||||
func() *v1beta1.MeshList { return &v1beta1.MeshList{} }),
|
||||
func() *appmeshv1beta1.Mesh { return &appmeshv1beta1.Mesh{} },
|
||||
func() *appmeshv1beta1.MeshList { return &appmeshv1beta1.MeshList{} },
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,9 +19,9 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"context"
|
||||
context "context"
|
||||
|
||||
v1beta1 "github.com/fluxcd/flagger/pkg/apis/appmesh/v1beta1"
|
||||
appmeshv1beta1 "github.com/fluxcd/flagger/pkg/apis/appmesh/v1beta1"
|
||||
scheme "github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
@@ -37,33 +37,34 @@ type VirtualNodesGetter interface {
|
||||
|
||||
// VirtualNodeInterface has methods to work with VirtualNode resources.
|
||||
type VirtualNodeInterface interface {
|
||||
Create(ctx context.Context, virtualNode *v1beta1.VirtualNode, opts v1.CreateOptions) (*v1beta1.VirtualNode, error)
|
||||
Update(ctx context.Context, virtualNode *v1beta1.VirtualNode, opts v1.UpdateOptions) (*v1beta1.VirtualNode, error)
|
||||
Create(ctx context.Context, virtualNode *appmeshv1beta1.VirtualNode, opts v1.CreateOptions) (*appmeshv1beta1.VirtualNode, error)
|
||||
Update(ctx context.Context, virtualNode *appmeshv1beta1.VirtualNode, opts v1.UpdateOptions) (*appmeshv1beta1.VirtualNode, error)
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
UpdateStatus(ctx context.Context, virtualNode *v1beta1.VirtualNode, opts v1.UpdateOptions) (*v1beta1.VirtualNode, error)
|
||||
UpdateStatus(ctx context.Context, virtualNode *appmeshv1beta1.VirtualNode, opts v1.UpdateOptions) (*appmeshv1beta1.VirtualNode, error)
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.VirtualNode, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.VirtualNodeList, error)
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*appmeshv1beta1.VirtualNode, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*appmeshv1beta1.VirtualNodeList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.VirtualNode, err error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *appmeshv1beta1.VirtualNode, err error)
|
||||
VirtualNodeExpansion
|
||||
}
|
||||
|
||||
// virtualNodes implements VirtualNodeInterface
|
||||
type virtualNodes struct {
|
||||
*gentype.ClientWithList[*v1beta1.VirtualNode, *v1beta1.VirtualNodeList]
|
||||
*gentype.ClientWithList[*appmeshv1beta1.VirtualNode, *appmeshv1beta1.VirtualNodeList]
|
||||
}
|
||||
|
||||
// newVirtualNodes returns a VirtualNodes
|
||||
func newVirtualNodes(c *AppmeshV1beta1Client, namespace string) *virtualNodes {
|
||||
return &virtualNodes{
|
||||
gentype.NewClientWithList[*v1beta1.VirtualNode, *v1beta1.VirtualNodeList](
|
||||
gentype.NewClientWithList[*appmeshv1beta1.VirtualNode, *appmeshv1beta1.VirtualNodeList](
|
||||
"virtualnodes",
|
||||
c.RESTClient(),
|
||||
scheme.ParameterCodec,
|
||||
namespace,
|
||||
func() *v1beta1.VirtualNode { return &v1beta1.VirtualNode{} },
|
||||
func() *v1beta1.VirtualNodeList { return &v1beta1.VirtualNodeList{} }),
|
||||
func() *appmeshv1beta1.VirtualNode { return &appmeshv1beta1.VirtualNode{} },
|
||||
func() *appmeshv1beta1.VirtualNodeList { return &appmeshv1beta1.VirtualNodeList{} },
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,9 +19,9 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"context"
|
||||
context "context"
|
||||
|
||||
v1beta1 "github.com/fluxcd/flagger/pkg/apis/appmesh/v1beta1"
|
||||
appmeshv1beta1 "github.com/fluxcd/flagger/pkg/apis/appmesh/v1beta1"
|
||||
scheme "github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
@@ -37,33 +37,34 @@ type VirtualServicesGetter interface {
|
||||
|
||||
// VirtualServiceInterface has methods to work with VirtualService resources.
|
||||
type VirtualServiceInterface interface {
|
||||
Create(ctx context.Context, virtualService *v1beta1.VirtualService, opts v1.CreateOptions) (*v1beta1.VirtualService, error)
|
||||
Update(ctx context.Context, virtualService *v1beta1.VirtualService, opts v1.UpdateOptions) (*v1beta1.VirtualService, error)
|
||||
Create(ctx context.Context, virtualService *appmeshv1beta1.VirtualService, opts v1.CreateOptions) (*appmeshv1beta1.VirtualService, error)
|
||||
Update(ctx context.Context, virtualService *appmeshv1beta1.VirtualService, opts v1.UpdateOptions) (*appmeshv1beta1.VirtualService, error)
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
UpdateStatus(ctx context.Context, virtualService *v1beta1.VirtualService, opts v1.UpdateOptions) (*v1beta1.VirtualService, error)
|
||||
UpdateStatus(ctx context.Context, virtualService *appmeshv1beta1.VirtualService, opts v1.UpdateOptions) (*appmeshv1beta1.VirtualService, error)
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.VirtualService, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.VirtualServiceList, error)
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*appmeshv1beta1.VirtualService, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*appmeshv1beta1.VirtualServiceList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.VirtualService, err error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *appmeshv1beta1.VirtualService, err error)
|
||||
VirtualServiceExpansion
|
||||
}
|
||||
|
||||
// virtualServices implements VirtualServiceInterface
|
||||
type virtualServices struct {
|
||||
*gentype.ClientWithList[*v1beta1.VirtualService, *v1beta1.VirtualServiceList]
|
||||
*gentype.ClientWithList[*appmeshv1beta1.VirtualService, *appmeshv1beta1.VirtualServiceList]
|
||||
}
|
||||
|
||||
// newVirtualServices returns a VirtualServices
|
||||
func newVirtualServices(c *AppmeshV1beta1Client, namespace string) *virtualServices {
|
||||
return &virtualServices{
|
||||
gentype.NewClientWithList[*v1beta1.VirtualService, *v1beta1.VirtualServiceList](
|
||||
gentype.NewClientWithList[*appmeshv1beta1.VirtualService, *appmeshv1beta1.VirtualServiceList](
|
||||
"virtualservices",
|
||||
c.RESTClient(),
|
||||
scheme.ParameterCodec,
|
||||
namespace,
|
||||
func() *v1beta1.VirtualService { return &v1beta1.VirtualService{} },
|
||||
func() *v1beta1.VirtualServiceList { return &v1beta1.VirtualServiceList{} }),
|
||||
func() *appmeshv1beta1.VirtualService { return &appmeshv1beta1.VirtualService{} },
|
||||
func() *appmeshv1beta1.VirtualServiceList { return &appmeshv1beta1.VirtualServiceList{} },
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,10 +19,10 @@ limitations under the License.
|
||||
package v1beta2
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
http "net/http"
|
||||
|
||||
v1beta2 "github.com/fluxcd/flagger/pkg/apis/appmesh/v1beta2"
|
||||
"github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
appmeshv1beta2 "github.com/fluxcd/flagger/pkg/apis/appmesh/v1beta2"
|
||||
scheme "github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
@@ -55,9 +55,7 @@ func (c *AppmeshV1beta2Client) VirtualServices(namespace string) VirtualServiceI
|
||||
// where httpClient was generated with rest.HTTPClientFor(c).
|
||||
func NewForConfig(c *rest.Config) (*AppmeshV1beta2Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
setConfigDefaults(&config)
|
||||
httpClient, err := rest.HTTPClientFor(&config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -69,9 +67,7 @@ func NewForConfig(c *rest.Config) (*AppmeshV1beta2Client, error) {
|
||||
// Note the http client provided takes precedence over the configured transport values.
|
||||
func NewForConfigAndClient(c *rest.Config, h *http.Client) (*AppmeshV1beta2Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
setConfigDefaults(&config)
|
||||
client, err := rest.RESTClientForConfigAndClient(&config, h)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -94,17 +90,15 @@ func New(c rest.Interface) *AppmeshV1beta2Client {
|
||||
return &AppmeshV1beta2Client{c}
|
||||
}
|
||||
|
||||
func setConfigDefaults(config *rest.Config) error {
|
||||
gv := v1beta2.SchemeGroupVersion
|
||||
func setConfigDefaults(config *rest.Config) {
|
||||
gv := appmeshv1beta2.SchemeGroupVersion
|
||||
config.GroupVersion = &gv
|
||||
config.APIPath = "/apis"
|
||||
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
|
||||
config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion()
|
||||
|
||||
if config.UserAgent == "" {
|
||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
|
||||
@@ -29,15 +29,15 @@ type FakeAppmeshV1beta2 struct {
|
||||
}
|
||||
|
||||
func (c *FakeAppmeshV1beta2) VirtualNodes(namespace string) v1beta2.VirtualNodeInterface {
|
||||
return &FakeVirtualNodes{c, namespace}
|
||||
return newFakeVirtualNodes(c, namespace)
|
||||
}
|
||||
|
||||
func (c *FakeAppmeshV1beta2) VirtualRouters(namespace string) v1beta2.VirtualRouterInterface {
|
||||
return &FakeVirtualRouters{c, namespace}
|
||||
return newFakeVirtualRouters(c, namespace)
|
||||
}
|
||||
|
||||
func (c *FakeAppmeshV1beta2) VirtualServices(namespace string) v1beta2.VirtualServiceInterface {
|
||||
return &FakeVirtualServices{c, namespace}
|
||||
return newFakeVirtualServices(c, namespace)
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
|
||||
@@ -19,129 +19,32 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1beta2 "github.com/fluxcd/flagger/pkg/apis/appmesh/v1beta2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
appmeshv1beta2 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/appmesh/v1beta2"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
)
|
||||
|
||||
// FakeVirtualNodes implements VirtualNodeInterface
|
||||
type FakeVirtualNodes struct {
|
||||
// fakeVirtualNodes implements VirtualNodeInterface
|
||||
type fakeVirtualNodes struct {
|
||||
*gentype.FakeClientWithList[*v1beta2.VirtualNode, *v1beta2.VirtualNodeList]
|
||||
Fake *FakeAppmeshV1beta2
|
||||
ns string
|
||||
}
|
||||
|
||||
var virtualnodesResource = v1beta2.SchemeGroupVersion.WithResource("virtualnodes")
|
||||
|
||||
var virtualnodesKind = v1beta2.SchemeGroupVersion.WithKind("VirtualNode")
|
||||
|
||||
// Get takes name of the virtualNode, and returns the corresponding virtualNode object, and an error if there is any.
|
||||
func (c *FakeVirtualNodes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.VirtualNode, err error) {
|
||||
emptyResult := &v1beta2.VirtualNode{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetActionWithOptions(virtualnodesResource, c.ns, name, options), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
func newFakeVirtualNodes(fake *FakeAppmeshV1beta2, namespace string) appmeshv1beta2.VirtualNodeInterface {
|
||||
return &fakeVirtualNodes{
|
||||
gentype.NewFakeClientWithList[*v1beta2.VirtualNode, *v1beta2.VirtualNodeList](
|
||||
fake.Fake,
|
||||
namespace,
|
||||
v1beta2.SchemeGroupVersion.WithResource("virtualnodes"),
|
||||
v1beta2.SchemeGroupVersion.WithKind("VirtualNode"),
|
||||
func() *v1beta2.VirtualNode { return &v1beta2.VirtualNode{} },
|
||||
func() *v1beta2.VirtualNodeList { return &v1beta2.VirtualNodeList{} },
|
||||
func(dst, src *v1beta2.VirtualNodeList) { dst.ListMeta = src.ListMeta },
|
||||
func(list *v1beta2.VirtualNodeList) []*v1beta2.VirtualNode { return gentype.ToPointerSlice(list.Items) },
|
||||
func(list *v1beta2.VirtualNodeList, items []*v1beta2.VirtualNode) {
|
||||
list.Items = gentype.FromPointerSlice(items)
|
||||
},
|
||||
),
|
||||
fake,
|
||||
}
|
||||
return obj.(*v1beta2.VirtualNode), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of VirtualNodes that match those selectors.
|
||||
func (c *FakeVirtualNodes) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.VirtualNodeList, err error) {
|
||||
emptyResult := &v1beta2.VirtualNodeList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListActionWithOptions(virtualnodesResource, virtualnodesKind, c.ns, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1beta2.VirtualNodeList{ListMeta: obj.(*v1beta2.VirtualNodeList).ListMeta}
|
||||
for _, item := range obj.(*v1beta2.VirtualNodeList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested virtualNodes.
|
||||
func (c *FakeVirtualNodes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchActionWithOptions(virtualnodesResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a virtualNode and creates it. Returns the server's representation of the virtualNode, and an error, if there is any.
|
||||
func (c *FakeVirtualNodes) Create(ctx context.Context, virtualNode *v1beta2.VirtualNode, opts v1.CreateOptions) (result *v1beta2.VirtualNode, err error) {
|
||||
emptyResult := &v1beta2.VirtualNode{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateActionWithOptions(virtualnodesResource, c.ns, virtualNode, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1beta2.VirtualNode), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a virtualNode and updates it. Returns the server's representation of the virtualNode, and an error, if there is any.
|
||||
func (c *FakeVirtualNodes) Update(ctx context.Context, virtualNode *v1beta2.VirtualNode, opts v1.UpdateOptions) (result *v1beta2.VirtualNode, err error) {
|
||||
emptyResult := &v1beta2.VirtualNode{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateActionWithOptions(virtualnodesResource, c.ns, virtualNode, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1beta2.VirtualNode), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeVirtualNodes) UpdateStatus(ctx context.Context, virtualNode *v1beta2.VirtualNode, opts v1.UpdateOptions) (result *v1beta2.VirtualNode, err error) {
|
||||
emptyResult := &v1beta2.VirtualNode{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceActionWithOptions(virtualnodesResource, "status", c.ns, virtualNode, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1beta2.VirtualNode), err
|
||||
}
|
||||
|
||||
// Delete takes name of the virtualNode and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeVirtualNodes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteActionWithOptions(virtualnodesResource, c.ns, name, opts), &v1beta2.VirtualNode{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeVirtualNodes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionActionWithOptions(virtualnodesResource, c.ns, opts, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1beta2.VirtualNodeList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched virtualNode.
|
||||
func (c *FakeVirtualNodes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.VirtualNode, err error) {
|
||||
emptyResult := &v1beta2.VirtualNode{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceActionWithOptions(virtualnodesResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1beta2.VirtualNode), err
|
||||
}
|
||||
|
||||
@@ -19,129 +19,34 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1beta2 "github.com/fluxcd/flagger/pkg/apis/appmesh/v1beta2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
appmeshv1beta2 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/appmesh/v1beta2"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
)
|
||||
|
||||
// FakeVirtualRouters implements VirtualRouterInterface
|
||||
type FakeVirtualRouters struct {
|
||||
// fakeVirtualRouters implements VirtualRouterInterface
|
||||
type fakeVirtualRouters struct {
|
||||
*gentype.FakeClientWithList[*v1beta2.VirtualRouter, *v1beta2.VirtualRouterList]
|
||||
Fake *FakeAppmeshV1beta2
|
||||
ns string
|
||||
}
|
||||
|
||||
var virtualroutersResource = v1beta2.SchemeGroupVersion.WithResource("virtualrouters")
|
||||
|
||||
var virtualroutersKind = v1beta2.SchemeGroupVersion.WithKind("VirtualRouter")
|
||||
|
||||
// Get takes name of the virtualRouter, and returns the corresponding virtualRouter object, and an error if there is any.
|
||||
func (c *FakeVirtualRouters) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.VirtualRouter, err error) {
|
||||
emptyResult := &v1beta2.VirtualRouter{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetActionWithOptions(virtualroutersResource, c.ns, name, options), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
func newFakeVirtualRouters(fake *FakeAppmeshV1beta2, namespace string) appmeshv1beta2.VirtualRouterInterface {
|
||||
return &fakeVirtualRouters{
|
||||
gentype.NewFakeClientWithList[*v1beta2.VirtualRouter, *v1beta2.VirtualRouterList](
|
||||
fake.Fake,
|
||||
namespace,
|
||||
v1beta2.SchemeGroupVersion.WithResource("virtualrouters"),
|
||||
v1beta2.SchemeGroupVersion.WithKind("VirtualRouter"),
|
||||
func() *v1beta2.VirtualRouter { return &v1beta2.VirtualRouter{} },
|
||||
func() *v1beta2.VirtualRouterList { return &v1beta2.VirtualRouterList{} },
|
||||
func(dst, src *v1beta2.VirtualRouterList) { dst.ListMeta = src.ListMeta },
|
||||
func(list *v1beta2.VirtualRouterList) []*v1beta2.VirtualRouter {
|
||||
return gentype.ToPointerSlice(list.Items)
|
||||
},
|
||||
func(list *v1beta2.VirtualRouterList, items []*v1beta2.VirtualRouter) {
|
||||
list.Items = gentype.FromPointerSlice(items)
|
||||
},
|
||||
),
|
||||
fake,
|
||||
}
|
||||
return obj.(*v1beta2.VirtualRouter), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of VirtualRouters that match those selectors.
|
||||
func (c *FakeVirtualRouters) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.VirtualRouterList, err error) {
|
||||
emptyResult := &v1beta2.VirtualRouterList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListActionWithOptions(virtualroutersResource, virtualroutersKind, c.ns, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1beta2.VirtualRouterList{ListMeta: obj.(*v1beta2.VirtualRouterList).ListMeta}
|
||||
for _, item := range obj.(*v1beta2.VirtualRouterList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested virtualRouters.
|
||||
func (c *FakeVirtualRouters) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchActionWithOptions(virtualroutersResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a virtualRouter and creates it. Returns the server's representation of the virtualRouter, and an error, if there is any.
|
||||
func (c *FakeVirtualRouters) Create(ctx context.Context, virtualRouter *v1beta2.VirtualRouter, opts v1.CreateOptions) (result *v1beta2.VirtualRouter, err error) {
|
||||
emptyResult := &v1beta2.VirtualRouter{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateActionWithOptions(virtualroutersResource, c.ns, virtualRouter, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1beta2.VirtualRouter), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a virtualRouter and updates it. Returns the server's representation of the virtualRouter, and an error, if there is any.
|
||||
func (c *FakeVirtualRouters) Update(ctx context.Context, virtualRouter *v1beta2.VirtualRouter, opts v1.UpdateOptions) (result *v1beta2.VirtualRouter, err error) {
|
||||
emptyResult := &v1beta2.VirtualRouter{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateActionWithOptions(virtualroutersResource, c.ns, virtualRouter, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1beta2.VirtualRouter), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeVirtualRouters) UpdateStatus(ctx context.Context, virtualRouter *v1beta2.VirtualRouter, opts v1.UpdateOptions) (result *v1beta2.VirtualRouter, err error) {
|
||||
emptyResult := &v1beta2.VirtualRouter{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceActionWithOptions(virtualroutersResource, "status", c.ns, virtualRouter, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1beta2.VirtualRouter), err
|
||||
}
|
||||
|
||||
// Delete takes name of the virtualRouter and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeVirtualRouters) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteActionWithOptions(virtualroutersResource, c.ns, name, opts), &v1beta2.VirtualRouter{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeVirtualRouters) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionActionWithOptions(virtualroutersResource, c.ns, opts, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1beta2.VirtualRouterList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched virtualRouter.
|
||||
func (c *FakeVirtualRouters) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.VirtualRouter, err error) {
|
||||
emptyResult := &v1beta2.VirtualRouter{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceActionWithOptions(virtualroutersResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1beta2.VirtualRouter), err
|
||||
}
|
||||
|
||||
@@ -19,129 +19,34 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1beta2 "github.com/fluxcd/flagger/pkg/apis/appmesh/v1beta2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
appmeshv1beta2 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/appmesh/v1beta2"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
)
|
||||
|
||||
// FakeVirtualServices implements VirtualServiceInterface
|
||||
type FakeVirtualServices struct {
|
||||
// fakeVirtualServices implements VirtualServiceInterface
|
||||
type fakeVirtualServices struct {
|
||||
*gentype.FakeClientWithList[*v1beta2.VirtualService, *v1beta2.VirtualServiceList]
|
||||
Fake *FakeAppmeshV1beta2
|
||||
ns string
|
||||
}
|
||||
|
||||
var virtualservicesResource = v1beta2.SchemeGroupVersion.WithResource("virtualservices")
|
||||
|
||||
var virtualservicesKind = v1beta2.SchemeGroupVersion.WithKind("VirtualService")
|
||||
|
||||
// Get takes name of the virtualService, and returns the corresponding virtualService object, and an error if there is any.
|
||||
func (c *FakeVirtualServices) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta2.VirtualService, err error) {
|
||||
emptyResult := &v1beta2.VirtualService{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetActionWithOptions(virtualservicesResource, c.ns, name, options), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
func newFakeVirtualServices(fake *FakeAppmeshV1beta2, namespace string) appmeshv1beta2.VirtualServiceInterface {
|
||||
return &fakeVirtualServices{
|
||||
gentype.NewFakeClientWithList[*v1beta2.VirtualService, *v1beta2.VirtualServiceList](
|
||||
fake.Fake,
|
||||
namespace,
|
||||
v1beta2.SchemeGroupVersion.WithResource("virtualservices"),
|
||||
v1beta2.SchemeGroupVersion.WithKind("VirtualService"),
|
||||
func() *v1beta2.VirtualService { return &v1beta2.VirtualService{} },
|
||||
func() *v1beta2.VirtualServiceList { return &v1beta2.VirtualServiceList{} },
|
||||
func(dst, src *v1beta2.VirtualServiceList) { dst.ListMeta = src.ListMeta },
|
||||
func(list *v1beta2.VirtualServiceList) []*v1beta2.VirtualService {
|
||||
return gentype.ToPointerSlice(list.Items)
|
||||
},
|
||||
func(list *v1beta2.VirtualServiceList, items []*v1beta2.VirtualService) {
|
||||
list.Items = gentype.FromPointerSlice(items)
|
||||
},
|
||||
),
|
||||
fake,
|
||||
}
|
||||
return obj.(*v1beta2.VirtualService), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of VirtualServices that match those selectors.
|
||||
func (c *FakeVirtualServices) List(ctx context.Context, opts v1.ListOptions) (result *v1beta2.VirtualServiceList, err error) {
|
||||
emptyResult := &v1beta2.VirtualServiceList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListActionWithOptions(virtualservicesResource, virtualservicesKind, c.ns, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1beta2.VirtualServiceList{ListMeta: obj.(*v1beta2.VirtualServiceList).ListMeta}
|
||||
for _, item := range obj.(*v1beta2.VirtualServiceList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested virtualServices.
|
||||
func (c *FakeVirtualServices) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchActionWithOptions(virtualservicesResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a virtualService and creates it. Returns the server's representation of the virtualService, and an error, if there is any.
|
||||
func (c *FakeVirtualServices) Create(ctx context.Context, virtualService *v1beta2.VirtualService, opts v1.CreateOptions) (result *v1beta2.VirtualService, err error) {
|
||||
emptyResult := &v1beta2.VirtualService{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateActionWithOptions(virtualservicesResource, c.ns, virtualService, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1beta2.VirtualService), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a virtualService and updates it. Returns the server's representation of the virtualService, and an error, if there is any.
|
||||
func (c *FakeVirtualServices) Update(ctx context.Context, virtualService *v1beta2.VirtualService, opts v1.UpdateOptions) (result *v1beta2.VirtualService, err error) {
|
||||
emptyResult := &v1beta2.VirtualService{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateActionWithOptions(virtualservicesResource, c.ns, virtualService, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1beta2.VirtualService), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeVirtualServices) UpdateStatus(ctx context.Context, virtualService *v1beta2.VirtualService, opts v1.UpdateOptions) (result *v1beta2.VirtualService, err error) {
|
||||
emptyResult := &v1beta2.VirtualService{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceActionWithOptions(virtualservicesResource, "status", c.ns, virtualService, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1beta2.VirtualService), err
|
||||
}
|
||||
|
||||
// Delete takes name of the virtualService and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeVirtualServices) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteActionWithOptions(virtualservicesResource, c.ns, name, opts), &v1beta2.VirtualService{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeVirtualServices) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionActionWithOptions(virtualservicesResource, c.ns, opts, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1beta2.VirtualServiceList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched virtualService.
|
||||
func (c *FakeVirtualServices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.VirtualService, err error) {
|
||||
emptyResult := &v1beta2.VirtualService{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceActionWithOptions(virtualservicesResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1beta2.VirtualService), err
|
||||
}
|
||||
|
||||
@@ -19,9 +19,9 @@ limitations under the License.
|
||||
package v1beta2
|
||||
|
||||
import (
|
||||
"context"
|
||||
context "context"
|
||||
|
||||
v1beta2 "github.com/fluxcd/flagger/pkg/apis/appmesh/v1beta2"
|
||||
appmeshv1beta2 "github.com/fluxcd/flagger/pkg/apis/appmesh/v1beta2"
|
||||
scheme "github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
@@ -37,33 +37,34 @@ type VirtualNodesGetter interface {
|
||||
|
||||
// VirtualNodeInterface has methods to work with VirtualNode resources.
|
||||
type VirtualNodeInterface interface {
|
||||
Create(ctx context.Context, virtualNode *v1beta2.VirtualNode, opts v1.CreateOptions) (*v1beta2.VirtualNode, error)
|
||||
Update(ctx context.Context, virtualNode *v1beta2.VirtualNode, opts v1.UpdateOptions) (*v1beta2.VirtualNode, error)
|
||||
Create(ctx context.Context, virtualNode *appmeshv1beta2.VirtualNode, opts v1.CreateOptions) (*appmeshv1beta2.VirtualNode, error)
|
||||
Update(ctx context.Context, virtualNode *appmeshv1beta2.VirtualNode, opts v1.UpdateOptions) (*appmeshv1beta2.VirtualNode, error)
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
UpdateStatus(ctx context.Context, virtualNode *v1beta2.VirtualNode, opts v1.UpdateOptions) (*v1beta2.VirtualNode, error)
|
||||
UpdateStatus(ctx context.Context, virtualNode *appmeshv1beta2.VirtualNode, opts v1.UpdateOptions) (*appmeshv1beta2.VirtualNode, error)
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta2.VirtualNode, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1beta2.VirtualNodeList, error)
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*appmeshv1beta2.VirtualNode, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*appmeshv1beta2.VirtualNodeList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.VirtualNode, err error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *appmeshv1beta2.VirtualNode, err error)
|
||||
VirtualNodeExpansion
|
||||
}
|
||||
|
||||
// virtualNodes implements VirtualNodeInterface
|
||||
type virtualNodes struct {
|
||||
*gentype.ClientWithList[*v1beta2.VirtualNode, *v1beta2.VirtualNodeList]
|
||||
*gentype.ClientWithList[*appmeshv1beta2.VirtualNode, *appmeshv1beta2.VirtualNodeList]
|
||||
}
|
||||
|
||||
// newVirtualNodes returns a VirtualNodes
|
||||
func newVirtualNodes(c *AppmeshV1beta2Client, namespace string) *virtualNodes {
|
||||
return &virtualNodes{
|
||||
gentype.NewClientWithList[*v1beta2.VirtualNode, *v1beta2.VirtualNodeList](
|
||||
gentype.NewClientWithList[*appmeshv1beta2.VirtualNode, *appmeshv1beta2.VirtualNodeList](
|
||||
"virtualnodes",
|
||||
c.RESTClient(),
|
||||
scheme.ParameterCodec,
|
||||
namespace,
|
||||
func() *v1beta2.VirtualNode { return &v1beta2.VirtualNode{} },
|
||||
func() *v1beta2.VirtualNodeList { return &v1beta2.VirtualNodeList{} }),
|
||||
func() *appmeshv1beta2.VirtualNode { return &appmeshv1beta2.VirtualNode{} },
|
||||
func() *appmeshv1beta2.VirtualNodeList { return &appmeshv1beta2.VirtualNodeList{} },
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,9 +19,9 @@ limitations under the License.
|
||||
package v1beta2
|
||||
|
||||
import (
|
||||
"context"
|
||||
context "context"
|
||||
|
||||
v1beta2 "github.com/fluxcd/flagger/pkg/apis/appmesh/v1beta2"
|
||||
appmeshv1beta2 "github.com/fluxcd/flagger/pkg/apis/appmesh/v1beta2"
|
||||
scheme "github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
@@ -37,33 +37,34 @@ type VirtualRoutersGetter interface {
|
||||
|
||||
// VirtualRouterInterface has methods to work with VirtualRouter resources.
|
||||
type VirtualRouterInterface interface {
|
||||
Create(ctx context.Context, virtualRouter *v1beta2.VirtualRouter, opts v1.CreateOptions) (*v1beta2.VirtualRouter, error)
|
||||
Update(ctx context.Context, virtualRouter *v1beta2.VirtualRouter, opts v1.UpdateOptions) (*v1beta2.VirtualRouter, error)
|
||||
Create(ctx context.Context, virtualRouter *appmeshv1beta2.VirtualRouter, opts v1.CreateOptions) (*appmeshv1beta2.VirtualRouter, error)
|
||||
Update(ctx context.Context, virtualRouter *appmeshv1beta2.VirtualRouter, opts v1.UpdateOptions) (*appmeshv1beta2.VirtualRouter, error)
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
UpdateStatus(ctx context.Context, virtualRouter *v1beta2.VirtualRouter, opts v1.UpdateOptions) (*v1beta2.VirtualRouter, error)
|
||||
UpdateStatus(ctx context.Context, virtualRouter *appmeshv1beta2.VirtualRouter, opts v1.UpdateOptions) (*appmeshv1beta2.VirtualRouter, error)
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta2.VirtualRouter, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1beta2.VirtualRouterList, error)
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*appmeshv1beta2.VirtualRouter, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*appmeshv1beta2.VirtualRouterList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.VirtualRouter, err error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *appmeshv1beta2.VirtualRouter, err error)
|
||||
VirtualRouterExpansion
|
||||
}
|
||||
|
||||
// virtualRouters implements VirtualRouterInterface
|
||||
type virtualRouters struct {
|
||||
*gentype.ClientWithList[*v1beta2.VirtualRouter, *v1beta2.VirtualRouterList]
|
||||
*gentype.ClientWithList[*appmeshv1beta2.VirtualRouter, *appmeshv1beta2.VirtualRouterList]
|
||||
}
|
||||
|
||||
// newVirtualRouters returns a VirtualRouters
|
||||
func newVirtualRouters(c *AppmeshV1beta2Client, namespace string) *virtualRouters {
|
||||
return &virtualRouters{
|
||||
gentype.NewClientWithList[*v1beta2.VirtualRouter, *v1beta2.VirtualRouterList](
|
||||
gentype.NewClientWithList[*appmeshv1beta2.VirtualRouter, *appmeshv1beta2.VirtualRouterList](
|
||||
"virtualrouters",
|
||||
c.RESTClient(),
|
||||
scheme.ParameterCodec,
|
||||
namespace,
|
||||
func() *v1beta2.VirtualRouter { return &v1beta2.VirtualRouter{} },
|
||||
func() *v1beta2.VirtualRouterList { return &v1beta2.VirtualRouterList{} }),
|
||||
func() *appmeshv1beta2.VirtualRouter { return &appmeshv1beta2.VirtualRouter{} },
|
||||
func() *appmeshv1beta2.VirtualRouterList { return &appmeshv1beta2.VirtualRouterList{} },
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,9 +19,9 @@ limitations under the License.
|
||||
package v1beta2
|
||||
|
||||
import (
|
||||
"context"
|
||||
context "context"
|
||||
|
||||
v1beta2 "github.com/fluxcd/flagger/pkg/apis/appmesh/v1beta2"
|
||||
appmeshv1beta2 "github.com/fluxcd/flagger/pkg/apis/appmesh/v1beta2"
|
||||
scheme "github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
@@ -37,33 +37,34 @@ type VirtualServicesGetter interface {
|
||||
|
||||
// VirtualServiceInterface has methods to work with VirtualService resources.
|
||||
type VirtualServiceInterface interface {
|
||||
Create(ctx context.Context, virtualService *v1beta2.VirtualService, opts v1.CreateOptions) (*v1beta2.VirtualService, error)
|
||||
Update(ctx context.Context, virtualService *v1beta2.VirtualService, opts v1.UpdateOptions) (*v1beta2.VirtualService, error)
|
||||
Create(ctx context.Context, virtualService *appmeshv1beta2.VirtualService, opts v1.CreateOptions) (*appmeshv1beta2.VirtualService, error)
|
||||
Update(ctx context.Context, virtualService *appmeshv1beta2.VirtualService, opts v1.UpdateOptions) (*appmeshv1beta2.VirtualService, error)
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
UpdateStatus(ctx context.Context, virtualService *v1beta2.VirtualService, opts v1.UpdateOptions) (*v1beta2.VirtualService, error)
|
||||
UpdateStatus(ctx context.Context, virtualService *appmeshv1beta2.VirtualService, opts v1.UpdateOptions) (*appmeshv1beta2.VirtualService, error)
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta2.VirtualService, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1beta2.VirtualServiceList, error)
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*appmeshv1beta2.VirtualService, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*appmeshv1beta2.VirtualServiceList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta2.VirtualService, err error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *appmeshv1beta2.VirtualService, err error)
|
||||
VirtualServiceExpansion
|
||||
}
|
||||
|
||||
// virtualServices implements VirtualServiceInterface
|
||||
type virtualServices struct {
|
||||
*gentype.ClientWithList[*v1beta2.VirtualService, *v1beta2.VirtualServiceList]
|
||||
*gentype.ClientWithList[*appmeshv1beta2.VirtualService, *appmeshv1beta2.VirtualServiceList]
|
||||
}
|
||||
|
||||
// newVirtualServices returns a VirtualServices
|
||||
func newVirtualServices(c *AppmeshV1beta2Client, namespace string) *virtualServices {
|
||||
return &virtualServices{
|
||||
gentype.NewClientWithList[*v1beta2.VirtualService, *v1beta2.VirtualServiceList](
|
||||
gentype.NewClientWithList[*appmeshv1beta2.VirtualService, *appmeshv1beta2.VirtualServiceList](
|
||||
"virtualservices",
|
||||
c.RESTClient(),
|
||||
scheme.ParameterCodec,
|
||||
namespace,
|
||||
func() *v1beta2.VirtualService { return &v1beta2.VirtualService{} },
|
||||
func() *v1beta2.VirtualServiceList { return &v1beta2.VirtualServiceList{} }),
|
||||
func() *appmeshv1beta2.VirtualService { return &appmeshv1beta2.VirtualService{} },
|
||||
func() *appmeshv1beta2.VirtualServiceList { return &appmeshv1beta2.VirtualServiceList{} },
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,9 +19,9 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"context"
|
||||
context "context"
|
||||
|
||||
v1beta1 "github.com/fluxcd/flagger/pkg/apis/flagger/v1beta1"
|
||||
flaggerv1beta1 "github.com/fluxcd/flagger/pkg/apis/flagger/v1beta1"
|
||||
scheme "github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
@@ -37,33 +37,34 @@ type AlertProvidersGetter interface {
|
||||
|
||||
// AlertProviderInterface has methods to work with AlertProvider resources.
|
||||
type AlertProviderInterface interface {
|
||||
Create(ctx context.Context, alertProvider *v1beta1.AlertProvider, opts v1.CreateOptions) (*v1beta1.AlertProvider, error)
|
||||
Update(ctx context.Context, alertProvider *v1beta1.AlertProvider, opts v1.UpdateOptions) (*v1beta1.AlertProvider, error)
|
||||
Create(ctx context.Context, alertProvider *flaggerv1beta1.AlertProvider, opts v1.CreateOptions) (*flaggerv1beta1.AlertProvider, error)
|
||||
Update(ctx context.Context, alertProvider *flaggerv1beta1.AlertProvider, opts v1.UpdateOptions) (*flaggerv1beta1.AlertProvider, error)
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
UpdateStatus(ctx context.Context, alertProvider *v1beta1.AlertProvider, opts v1.UpdateOptions) (*v1beta1.AlertProvider, error)
|
||||
UpdateStatus(ctx context.Context, alertProvider *flaggerv1beta1.AlertProvider, opts v1.UpdateOptions) (*flaggerv1beta1.AlertProvider, error)
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.AlertProvider, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.AlertProviderList, error)
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*flaggerv1beta1.AlertProvider, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*flaggerv1beta1.AlertProviderList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.AlertProvider, err error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *flaggerv1beta1.AlertProvider, err error)
|
||||
AlertProviderExpansion
|
||||
}
|
||||
|
||||
// alertProviders implements AlertProviderInterface
|
||||
type alertProviders struct {
|
||||
*gentype.ClientWithList[*v1beta1.AlertProvider, *v1beta1.AlertProviderList]
|
||||
*gentype.ClientWithList[*flaggerv1beta1.AlertProvider, *flaggerv1beta1.AlertProviderList]
|
||||
}
|
||||
|
||||
// newAlertProviders returns a AlertProviders
|
||||
func newAlertProviders(c *FlaggerV1beta1Client, namespace string) *alertProviders {
|
||||
return &alertProviders{
|
||||
gentype.NewClientWithList[*v1beta1.AlertProvider, *v1beta1.AlertProviderList](
|
||||
gentype.NewClientWithList[*flaggerv1beta1.AlertProvider, *flaggerv1beta1.AlertProviderList](
|
||||
"alertproviders",
|
||||
c.RESTClient(),
|
||||
scheme.ParameterCodec,
|
||||
namespace,
|
||||
func() *v1beta1.AlertProvider { return &v1beta1.AlertProvider{} },
|
||||
func() *v1beta1.AlertProviderList { return &v1beta1.AlertProviderList{} }),
|
||||
func() *flaggerv1beta1.AlertProvider { return &flaggerv1beta1.AlertProvider{} },
|
||||
func() *flaggerv1beta1.AlertProviderList { return &flaggerv1beta1.AlertProviderList{} },
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,9 +19,9 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"context"
|
||||
context "context"
|
||||
|
||||
v1beta1 "github.com/fluxcd/flagger/pkg/apis/flagger/v1beta1"
|
||||
flaggerv1beta1 "github.com/fluxcd/flagger/pkg/apis/flagger/v1beta1"
|
||||
scheme "github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
@@ -37,33 +37,34 @@ type CanariesGetter interface {
|
||||
|
||||
// CanaryInterface has methods to work with Canary resources.
|
||||
type CanaryInterface interface {
|
||||
Create(ctx context.Context, canary *v1beta1.Canary, opts v1.CreateOptions) (*v1beta1.Canary, error)
|
||||
Update(ctx context.Context, canary *v1beta1.Canary, opts v1.UpdateOptions) (*v1beta1.Canary, error)
|
||||
Create(ctx context.Context, canary *flaggerv1beta1.Canary, opts v1.CreateOptions) (*flaggerv1beta1.Canary, error)
|
||||
Update(ctx context.Context, canary *flaggerv1beta1.Canary, opts v1.UpdateOptions) (*flaggerv1beta1.Canary, error)
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
UpdateStatus(ctx context.Context, canary *v1beta1.Canary, opts v1.UpdateOptions) (*v1beta1.Canary, error)
|
||||
UpdateStatus(ctx context.Context, canary *flaggerv1beta1.Canary, opts v1.UpdateOptions) (*flaggerv1beta1.Canary, error)
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.Canary, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.CanaryList, error)
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*flaggerv1beta1.Canary, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*flaggerv1beta1.CanaryList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Canary, err error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *flaggerv1beta1.Canary, err error)
|
||||
CanaryExpansion
|
||||
}
|
||||
|
||||
// canaries implements CanaryInterface
|
||||
type canaries struct {
|
||||
*gentype.ClientWithList[*v1beta1.Canary, *v1beta1.CanaryList]
|
||||
*gentype.ClientWithList[*flaggerv1beta1.Canary, *flaggerv1beta1.CanaryList]
|
||||
}
|
||||
|
||||
// newCanaries returns a Canaries
|
||||
func newCanaries(c *FlaggerV1beta1Client, namespace string) *canaries {
|
||||
return &canaries{
|
||||
gentype.NewClientWithList[*v1beta1.Canary, *v1beta1.CanaryList](
|
||||
gentype.NewClientWithList[*flaggerv1beta1.Canary, *flaggerv1beta1.CanaryList](
|
||||
"canaries",
|
||||
c.RESTClient(),
|
||||
scheme.ParameterCodec,
|
||||
namespace,
|
||||
func() *v1beta1.Canary { return &v1beta1.Canary{} },
|
||||
func() *v1beta1.CanaryList { return &v1beta1.CanaryList{} }),
|
||||
func() *flaggerv1beta1.Canary { return &flaggerv1beta1.Canary{} },
|
||||
func() *flaggerv1beta1.CanaryList { return &flaggerv1beta1.CanaryList{} },
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,129 +19,34 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1beta1 "github.com/fluxcd/flagger/pkg/apis/flagger/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
flaggerv1beta1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/flagger/v1beta1"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
)
|
||||
|
||||
// FakeAlertProviders implements AlertProviderInterface
|
||||
type FakeAlertProviders struct {
|
||||
// fakeAlertProviders implements AlertProviderInterface
|
||||
type fakeAlertProviders struct {
|
||||
*gentype.FakeClientWithList[*v1beta1.AlertProvider, *v1beta1.AlertProviderList]
|
||||
Fake *FakeFlaggerV1beta1
|
||||
ns string
|
||||
}
|
||||
|
||||
var alertprovidersResource = v1beta1.SchemeGroupVersion.WithResource("alertproviders")
|
||||
|
||||
var alertprovidersKind = v1beta1.SchemeGroupVersion.WithKind("AlertProvider")
|
||||
|
||||
// Get takes name of the alertProvider, and returns the corresponding alertProvider object, and an error if there is any.
|
||||
func (c *FakeAlertProviders) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.AlertProvider, err error) {
|
||||
emptyResult := &v1beta1.AlertProvider{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetActionWithOptions(alertprovidersResource, c.ns, name, options), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
func newFakeAlertProviders(fake *FakeFlaggerV1beta1, namespace string) flaggerv1beta1.AlertProviderInterface {
|
||||
return &fakeAlertProviders{
|
||||
gentype.NewFakeClientWithList[*v1beta1.AlertProvider, *v1beta1.AlertProviderList](
|
||||
fake.Fake,
|
||||
namespace,
|
||||
v1beta1.SchemeGroupVersion.WithResource("alertproviders"),
|
||||
v1beta1.SchemeGroupVersion.WithKind("AlertProvider"),
|
||||
func() *v1beta1.AlertProvider { return &v1beta1.AlertProvider{} },
|
||||
func() *v1beta1.AlertProviderList { return &v1beta1.AlertProviderList{} },
|
||||
func(dst, src *v1beta1.AlertProviderList) { dst.ListMeta = src.ListMeta },
|
||||
func(list *v1beta1.AlertProviderList) []*v1beta1.AlertProvider {
|
||||
return gentype.ToPointerSlice(list.Items)
|
||||
},
|
||||
func(list *v1beta1.AlertProviderList, items []*v1beta1.AlertProvider) {
|
||||
list.Items = gentype.FromPointerSlice(items)
|
||||
},
|
||||
),
|
||||
fake,
|
||||
}
|
||||
return obj.(*v1beta1.AlertProvider), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of AlertProviders that match those selectors.
|
||||
func (c *FakeAlertProviders) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.AlertProviderList, err error) {
|
||||
emptyResult := &v1beta1.AlertProviderList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListActionWithOptions(alertprovidersResource, alertprovidersKind, c.ns, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1beta1.AlertProviderList{ListMeta: obj.(*v1beta1.AlertProviderList).ListMeta}
|
||||
for _, item := range obj.(*v1beta1.AlertProviderList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested alertProviders.
|
||||
func (c *FakeAlertProviders) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchActionWithOptions(alertprovidersResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a alertProvider and creates it. Returns the server's representation of the alertProvider, and an error, if there is any.
|
||||
func (c *FakeAlertProviders) Create(ctx context.Context, alertProvider *v1beta1.AlertProvider, opts v1.CreateOptions) (result *v1beta1.AlertProvider, err error) {
|
||||
emptyResult := &v1beta1.AlertProvider{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateActionWithOptions(alertprovidersResource, c.ns, alertProvider, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1beta1.AlertProvider), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a alertProvider and updates it. Returns the server's representation of the alertProvider, and an error, if there is any.
|
||||
func (c *FakeAlertProviders) Update(ctx context.Context, alertProvider *v1beta1.AlertProvider, opts v1.UpdateOptions) (result *v1beta1.AlertProvider, err error) {
|
||||
emptyResult := &v1beta1.AlertProvider{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateActionWithOptions(alertprovidersResource, c.ns, alertProvider, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1beta1.AlertProvider), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeAlertProviders) UpdateStatus(ctx context.Context, alertProvider *v1beta1.AlertProvider, opts v1.UpdateOptions) (result *v1beta1.AlertProvider, err error) {
|
||||
emptyResult := &v1beta1.AlertProvider{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceActionWithOptions(alertprovidersResource, "status", c.ns, alertProvider, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1beta1.AlertProvider), err
|
||||
}
|
||||
|
||||
// Delete takes name of the alertProvider and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeAlertProviders) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteActionWithOptions(alertprovidersResource, c.ns, name, opts), &v1beta1.AlertProvider{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeAlertProviders) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionActionWithOptions(alertprovidersResource, c.ns, opts, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1beta1.AlertProviderList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched alertProvider.
|
||||
func (c *FakeAlertProviders) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.AlertProvider, err error) {
|
||||
emptyResult := &v1beta1.AlertProvider{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceActionWithOptions(alertprovidersResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1beta1.AlertProvider), err
|
||||
}
|
||||
|
||||
@@ -19,129 +19,30 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1beta1 "github.com/fluxcd/flagger/pkg/apis/flagger/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
flaggerv1beta1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/flagger/v1beta1"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
)
|
||||
|
||||
// FakeCanaries implements CanaryInterface
|
||||
type FakeCanaries struct {
|
||||
// fakeCanaries implements CanaryInterface
|
||||
type fakeCanaries struct {
|
||||
*gentype.FakeClientWithList[*v1beta1.Canary, *v1beta1.CanaryList]
|
||||
Fake *FakeFlaggerV1beta1
|
||||
ns string
|
||||
}
|
||||
|
||||
var canariesResource = v1beta1.SchemeGroupVersion.WithResource("canaries")
|
||||
|
||||
var canariesKind = v1beta1.SchemeGroupVersion.WithKind("Canary")
|
||||
|
||||
// Get takes name of the canary, and returns the corresponding canary object, and an error if there is any.
|
||||
func (c *FakeCanaries) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.Canary, err error) {
|
||||
emptyResult := &v1beta1.Canary{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetActionWithOptions(canariesResource, c.ns, name, options), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
func newFakeCanaries(fake *FakeFlaggerV1beta1, namespace string) flaggerv1beta1.CanaryInterface {
|
||||
return &fakeCanaries{
|
||||
gentype.NewFakeClientWithList[*v1beta1.Canary, *v1beta1.CanaryList](
|
||||
fake.Fake,
|
||||
namespace,
|
||||
v1beta1.SchemeGroupVersion.WithResource("canaries"),
|
||||
v1beta1.SchemeGroupVersion.WithKind("Canary"),
|
||||
func() *v1beta1.Canary { return &v1beta1.Canary{} },
|
||||
func() *v1beta1.CanaryList { return &v1beta1.CanaryList{} },
|
||||
func(dst, src *v1beta1.CanaryList) { dst.ListMeta = src.ListMeta },
|
||||
func(list *v1beta1.CanaryList) []*v1beta1.Canary { return gentype.ToPointerSlice(list.Items) },
|
||||
func(list *v1beta1.CanaryList, items []*v1beta1.Canary) { list.Items = gentype.FromPointerSlice(items) },
|
||||
),
|
||||
fake,
|
||||
}
|
||||
return obj.(*v1beta1.Canary), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Canaries that match those selectors.
|
||||
func (c *FakeCanaries) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.CanaryList, err error) {
|
||||
emptyResult := &v1beta1.CanaryList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListActionWithOptions(canariesResource, canariesKind, c.ns, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1beta1.CanaryList{ListMeta: obj.(*v1beta1.CanaryList).ListMeta}
|
||||
for _, item := range obj.(*v1beta1.CanaryList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested canaries.
|
||||
func (c *FakeCanaries) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchActionWithOptions(canariesResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a canary and creates it. Returns the server's representation of the canary, and an error, if there is any.
|
||||
func (c *FakeCanaries) Create(ctx context.Context, canary *v1beta1.Canary, opts v1.CreateOptions) (result *v1beta1.Canary, err error) {
|
||||
emptyResult := &v1beta1.Canary{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateActionWithOptions(canariesResource, c.ns, canary, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1beta1.Canary), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a canary and updates it. Returns the server's representation of the canary, and an error, if there is any.
|
||||
func (c *FakeCanaries) Update(ctx context.Context, canary *v1beta1.Canary, opts v1.UpdateOptions) (result *v1beta1.Canary, err error) {
|
||||
emptyResult := &v1beta1.Canary{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateActionWithOptions(canariesResource, c.ns, canary, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1beta1.Canary), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeCanaries) UpdateStatus(ctx context.Context, canary *v1beta1.Canary, opts v1.UpdateOptions) (result *v1beta1.Canary, err error) {
|
||||
emptyResult := &v1beta1.Canary{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceActionWithOptions(canariesResource, "status", c.ns, canary, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1beta1.Canary), err
|
||||
}
|
||||
|
||||
// Delete takes name of the canary and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeCanaries) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteActionWithOptions(canariesResource, c.ns, name, opts), &v1beta1.Canary{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeCanaries) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionActionWithOptions(canariesResource, c.ns, opts, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1beta1.CanaryList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched canary.
|
||||
func (c *FakeCanaries) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.Canary, err error) {
|
||||
emptyResult := &v1beta1.Canary{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceActionWithOptions(canariesResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1beta1.Canary), err
|
||||
}
|
||||
|
||||
@@ -29,15 +29,15 @@ type FakeFlaggerV1beta1 struct {
|
||||
}
|
||||
|
||||
func (c *FakeFlaggerV1beta1) AlertProviders(namespace string) v1beta1.AlertProviderInterface {
|
||||
return &FakeAlertProviders{c, namespace}
|
||||
return newFakeAlertProviders(c, namespace)
|
||||
}
|
||||
|
||||
func (c *FakeFlaggerV1beta1) Canaries(namespace string) v1beta1.CanaryInterface {
|
||||
return &FakeCanaries{c, namespace}
|
||||
return newFakeCanaries(c, namespace)
|
||||
}
|
||||
|
||||
func (c *FakeFlaggerV1beta1) MetricTemplates(namespace string) v1beta1.MetricTemplateInterface {
|
||||
return &FakeMetricTemplates{c, namespace}
|
||||
return newFakeMetricTemplates(c, namespace)
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
|
||||
@@ -19,129 +19,34 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1beta1 "github.com/fluxcd/flagger/pkg/apis/flagger/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
flaggerv1beta1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/flagger/v1beta1"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
)
|
||||
|
||||
// FakeMetricTemplates implements MetricTemplateInterface
|
||||
type FakeMetricTemplates struct {
|
||||
// fakeMetricTemplates implements MetricTemplateInterface
|
||||
type fakeMetricTemplates struct {
|
||||
*gentype.FakeClientWithList[*v1beta1.MetricTemplate, *v1beta1.MetricTemplateList]
|
||||
Fake *FakeFlaggerV1beta1
|
||||
ns string
|
||||
}
|
||||
|
||||
var metrictemplatesResource = v1beta1.SchemeGroupVersion.WithResource("metrictemplates")
|
||||
|
||||
var metrictemplatesKind = v1beta1.SchemeGroupVersion.WithKind("MetricTemplate")
|
||||
|
||||
// Get takes name of the metricTemplate, and returns the corresponding metricTemplate object, and an error if there is any.
|
||||
func (c *FakeMetricTemplates) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.MetricTemplate, err error) {
|
||||
emptyResult := &v1beta1.MetricTemplate{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetActionWithOptions(metrictemplatesResource, c.ns, name, options), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
func newFakeMetricTemplates(fake *FakeFlaggerV1beta1, namespace string) flaggerv1beta1.MetricTemplateInterface {
|
||||
return &fakeMetricTemplates{
|
||||
gentype.NewFakeClientWithList[*v1beta1.MetricTemplate, *v1beta1.MetricTemplateList](
|
||||
fake.Fake,
|
||||
namespace,
|
||||
v1beta1.SchemeGroupVersion.WithResource("metrictemplates"),
|
||||
v1beta1.SchemeGroupVersion.WithKind("MetricTemplate"),
|
||||
func() *v1beta1.MetricTemplate { return &v1beta1.MetricTemplate{} },
|
||||
func() *v1beta1.MetricTemplateList { return &v1beta1.MetricTemplateList{} },
|
||||
func(dst, src *v1beta1.MetricTemplateList) { dst.ListMeta = src.ListMeta },
|
||||
func(list *v1beta1.MetricTemplateList) []*v1beta1.MetricTemplate {
|
||||
return gentype.ToPointerSlice(list.Items)
|
||||
},
|
||||
func(list *v1beta1.MetricTemplateList, items []*v1beta1.MetricTemplate) {
|
||||
list.Items = gentype.FromPointerSlice(items)
|
||||
},
|
||||
),
|
||||
fake,
|
||||
}
|
||||
return obj.(*v1beta1.MetricTemplate), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of MetricTemplates that match those selectors.
|
||||
func (c *FakeMetricTemplates) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.MetricTemplateList, err error) {
|
||||
emptyResult := &v1beta1.MetricTemplateList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListActionWithOptions(metrictemplatesResource, metrictemplatesKind, c.ns, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1beta1.MetricTemplateList{ListMeta: obj.(*v1beta1.MetricTemplateList).ListMeta}
|
||||
for _, item := range obj.(*v1beta1.MetricTemplateList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested metricTemplates.
|
||||
func (c *FakeMetricTemplates) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchActionWithOptions(metrictemplatesResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a metricTemplate and creates it. Returns the server's representation of the metricTemplate, and an error, if there is any.
|
||||
func (c *FakeMetricTemplates) Create(ctx context.Context, metricTemplate *v1beta1.MetricTemplate, opts v1.CreateOptions) (result *v1beta1.MetricTemplate, err error) {
|
||||
emptyResult := &v1beta1.MetricTemplate{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateActionWithOptions(metrictemplatesResource, c.ns, metricTemplate, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1beta1.MetricTemplate), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a metricTemplate and updates it. Returns the server's representation of the metricTemplate, and an error, if there is any.
|
||||
func (c *FakeMetricTemplates) Update(ctx context.Context, metricTemplate *v1beta1.MetricTemplate, opts v1.UpdateOptions) (result *v1beta1.MetricTemplate, err error) {
|
||||
emptyResult := &v1beta1.MetricTemplate{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateActionWithOptions(metrictemplatesResource, c.ns, metricTemplate, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1beta1.MetricTemplate), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeMetricTemplates) UpdateStatus(ctx context.Context, metricTemplate *v1beta1.MetricTemplate, opts v1.UpdateOptions) (result *v1beta1.MetricTemplate, err error) {
|
||||
emptyResult := &v1beta1.MetricTemplate{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceActionWithOptions(metrictemplatesResource, "status", c.ns, metricTemplate, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1beta1.MetricTemplate), err
|
||||
}
|
||||
|
||||
// Delete takes name of the metricTemplate and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeMetricTemplates) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteActionWithOptions(metrictemplatesResource, c.ns, name, opts), &v1beta1.MetricTemplate{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeMetricTemplates) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionActionWithOptions(metrictemplatesResource, c.ns, opts, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1beta1.MetricTemplateList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched metricTemplate.
|
||||
func (c *FakeMetricTemplates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.MetricTemplate, err error) {
|
||||
emptyResult := &v1beta1.MetricTemplate{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceActionWithOptions(metrictemplatesResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1beta1.MetricTemplate), err
|
||||
}
|
||||
|
||||
@@ -19,10 +19,10 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
http "net/http"
|
||||
|
||||
v1beta1 "github.com/fluxcd/flagger/pkg/apis/flagger/v1beta1"
|
||||
"github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
flaggerv1beta1 "github.com/fluxcd/flagger/pkg/apis/flagger/v1beta1"
|
||||
scheme "github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
@@ -55,9 +55,7 @@ func (c *FlaggerV1beta1Client) MetricTemplates(namespace string) MetricTemplateI
|
||||
// where httpClient was generated with rest.HTTPClientFor(c).
|
||||
func NewForConfig(c *rest.Config) (*FlaggerV1beta1Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
setConfigDefaults(&config)
|
||||
httpClient, err := rest.HTTPClientFor(&config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -69,9 +67,7 @@ func NewForConfig(c *rest.Config) (*FlaggerV1beta1Client, error) {
|
||||
// Note the http client provided takes precedence over the configured transport values.
|
||||
func NewForConfigAndClient(c *rest.Config, h *http.Client) (*FlaggerV1beta1Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
setConfigDefaults(&config)
|
||||
client, err := rest.RESTClientForConfigAndClient(&config, h)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -94,17 +90,15 @@ func New(c rest.Interface) *FlaggerV1beta1Client {
|
||||
return &FlaggerV1beta1Client{c}
|
||||
}
|
||||
|
||||
func setConfigDefaults(config *rest.Config) error {
|
||||
gv := v1beta1.SchemeGroupVersion
|
||||
func setConfigDefaults(config *rest.Config) {
|
||||
gv := flaggerv1beta1.SchemeGroupVersion
|
||||
config.GroupVersion = &gv
|
||||
config.APIPath = "/apis"
|
||||
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
|
||||
config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion()
|
||||
|
||||
if config.UserAgent == "" {
|
||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
|
||||
@@ -19,9 +19,9 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"context"
|
||||
context "context"
|
||||
|
||||
v1beta1 "github.com/fluxcd/flagger/pkg/apis/flagger/v1beta1"
|
||||
flaggerv1beta1 "github.com/fluxcd/flagger/pkg/apis/flagger/v1beta1"
|
||||
scheme "github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
@@ -37,33 +37,34 @@ type MetricTemplatesGetter interface {
|
||||
|
||||
// MetricTemplateInterface has methods to work with MetricTemplate resources.
|
||||
type MetricTemplateInterface interface {
|
||||
Create(ctx context.Context, metricTemplate *v1beta1.MetricTemplate, opts v1.CreateOptions) (*v1beta1.MetricTemplate, error)
|
||||
Update(ctx context.Context, metricTemplate *v1beta1.MetricTemplate, opts v1.UpdateOptions) (*v1beta1.MetricTemplate, error)
|
||||
Create(ctx context.Context, metricTemplate *flaggerv1beta1.MetricTemplate, opts v1.CreateOptions) (*flaggerv1beta1.MetricTemplate, error)
|
||||
Update(ctx context.Context, metricTemplate *flaggerv1beta1.MetricTemplate, opts v1.UpdateOptions) (*flaggerv1beta1.MetricTemplate, error)
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
UpdateStatus(ctx context.Context, metricTemplate *v1beta1.MetricTemplate, opts v1.UpdateOptions) (*v1beta1.MetricTemplate, error)
|
||||
UpdateStatus(ctx context.Context, metricTemplate *flaggerv1beta1.MetricTemplate, opts v1.UpdateOptions) (*flaggerv1beta1.MetricTemplate, error)
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.MetricTemplate, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.MetricTemplateList, error)
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*flaggerv1beta1.MetricTemplate, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*flaggerv1beta1.MetricTemplateList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.MetricTemplate, err error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *flaggerv1beta1.MetricTemplate, err error)
|
||||
MetricTemplateExpansion
|
||||
}
|
||||
|
||||
// metricTemplates implements MetricTemplateInterface
|
||||
type metricTemplates struct {
|
||||
*gentype.ClientWithList[*v1beta1.MetricTemplate, *v1beta1.MetricTemplateList]
|
||||
*gentype.ClientWithList[*flaggerv1beta1.MetricTemplate, *flaggerv1beta1.MetricTemplateList]
|
||||
}
|
||||
|
||||
// newMetricTemplates returns a MetricTemplates
|
||||
func newMetricTemplates(c *FlaggerV1beta1Client, namespace string) *metricTemplates {
|
||||
return &metricTemplates{
|
||||
gentype.NewClientWithList[*v1beta1.MetricTemplate, *v1beta1.MetricTemplateList](
|
||||
gentype.NewClientWithList[*flaggerv1beta1.MetricTemplate, *flaggerv1beta1.MetricTemplateList](
|
||||
"metrictemplates",
|
||||
c.RESTClient(),
|
||||
scheme.ParameterCodec,
|
||||
namespace,
|
||||
func() *v1beta1.MetricTemplate { return &v1beta1.MetricTemplate{} },
|
||||
func() *v1beta1.MetricTemplateList { return &v1beta1.MetricTemplateList{} }),
|
||||
func() *flaggerv1beta1.MetricTemplate { return &flaggerv1beta1.MetricTemplate{} },
|
||||
func() *flaggerv1beta1.MetricTemplateList { return &flaggerv1beta1.MetricTemplateList{} },
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ type FakeGatewayapiV1 struct {
|
||||
}
|
||||
|
||||
func (c *FakeGatewayapiV1) HTTPRoutes(namespace string) v1.HTTPRouteInterface {
|
||||
return &FakeHTTPRoutes{c, namespace}
|
||||
return newFakeHTTPRoutes(c, namespace)
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
|
||||
@@ -19,129 +19,30 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1 "github.com/fluxcd/flagger/pkg/apis/gatewayapi/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
gatewayapiv1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/gatewayapi/v1"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
)
|
||||
|
||||
// FakeHTTPRoutes implements HTTPRouteInterface
|
||||
type FakeHTTPRoutes struct {
|
||||
// fakeHTTPRoutes implements HTTPRouteInterface
|
||||
type fakeHTTPRoutes struct {
|
||||
*gentype.FakeClientWithList[*v1.HTTPRoute, *v1.HTTPRouteList]
|
||||
Fake *FakeGatewayapiV1
|
||||
ns string
|
||||
}
|
||||
|
||||
var httproutesResource = v1.SchemeGroupVersion.WithResource("httproutes")
|
||||
|
||||
var httproutesKind = v1.SchemeGroupVersion.WithKind("HTTPRoute")
|
||||
|
||||
// Get takes name of the hTTPRoute, and returns the corresponding hTTPRoute object, and an error if there is any.
|
||||
func (c *FakeHTTPRoutes) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.HTTPRoute, err error) {
|
||||
emptyResult := &v1.HTTPRoute{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetActionWithOptions(httproutesResource, c.ns, name, options), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
func newFakeHTTPRoutes(fake *FakeGatewayapiV1, namespace string) gatewayapiv1.HTTPRouteInterface {
|
||||
return &fakeHTTPRoutes{
|
||||
gentype.NewFakeClientWithList[*v1.HTTPRoute, *v1.HTTPRouteList](
|
||||
fake.Fake,
|
||||
namespace,
|
||||
v1.SchemeGroupVersion.WithResource("httproutes"),
|
||||
v1.SchemeGroupVersion.WithKind("HTTPRoute"),
|
||||
func() *v1.HTTPRoute { return &v1.HTTPRoute{} },
|
||||
func() *v1.HTTPRouteList { return &v1.HTTPRouteList{} },
|
||||
func(dst, src *v1.HTTPRouteList) { dst.ListMeta = src.ListMeta },
|
||||
func(list *v1.HTTPRouteList) []*v1.HTTPRoute { return gentype.ToPointerSlice(list.Items) },
|
||||
func(list *v1.HTTPRouteList, items []*v1.HTTPRoute) { list.Items = gentype.FromPointerSlice(items) },
|
||||
),
|
||||
fake,
|
||||
}
|
||||
return obj.(*v1.HTTPRoute), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of HTTPRoutes that match those selectors.
|
||||
func (c *FakeHTTPRoutes) List(ctx context.Context, opts metav1.ListOptions) (result *v1.HTTPRouteList, err error) {
|
||||
emptyResult := &v1.HTTPRouteList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListActionWithOptions(httproutesResource, httproutesKind, c.ns, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1.HTTPRouteList{ListMeta: obj.(*v1.HTTPRouteList).ListMeta}
|
||||
for _, item := range obj.(*v1.HTTPRouteList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested hTTPRoutes.
|
||||
func (c *FakeHTTPRoutes) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchActionWithOptions(httproutesResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a hTTPRoute and creates it. Returns the server's representation of the hTTPRoute, and an error, if there is any.
|
||||
func (c *FakeHTTPRoutes) Create(ctx context.Context, hTTPRoute *v1.HTTPRoute, opts metav1.CreateOptions) (result *v1.HTTPRoute, err error) {
|
||||
emptyResult := &v1.HTTPRoute{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateActionWithOptions(httproutesResource, c.ns, hTTPRoute, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1.HTTPRoute), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a hTTPRoute and updates it. Returns the server's representation of the hTTPRoute, and an error, if there is any.
|
||||
func (c *FakeHTTPRoutes) Update(ctx context.Context, hTTPRoute *v1.HTTPRoute, opts metav1.UpdateOptions) (result *v1.HTTPRoute, err error) {
|
||||
emptyResult := &v1.HTTPRoute{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateActionWithOptions(httproutesResource, c.ns, hTTPRoute, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1.HTTPRoute), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeHTTPRoutes) UpdateStatus(ctx context.Context, hTTPRoute *v1.HTTPRoute, opts metav1.UpdateOptions) (result *v1.HTTPRoute, err error) {
|
||||
emptyResult := &v1.HTTPRoute{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceActionWithOptions(httproutesResource, "status", c.ns, hTTPRoute, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1.HTTPRoute), err
|
||||
}
|
||||
|
||||
// Delete takes name of the hTTPRoute and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeHTTPRoutes) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteActionWithOptions(httproutesResource, c.ns, name, opts), &v1.HTTPRoute{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeHTTPRoutes) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionActionWithOptions(httproutesResource, c.ns, opts, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1.HTTPRouteList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched hTTPRoute.
|
||||
func (c *FakeHTTPRoutes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.HTTPRoute, err error) {
|
||||
emptyResult := &v1.HTTPRoute{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceActionWithOptions(httproutesResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1.HTTPRoute), err
|
||||
}
|
||||
|
||||
@@ -19,10 +19,10 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
http "net/http"
|
||||
|
||||
v1 "github.com/fluxcd/flagger/pkg/apis/gatewayapi/v1"
|
||||
"github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
gatewayapiv1 "github.com/fluxcd/flagger/pkg/apis/gatewayapi/v1"
|
||||
scheme "github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
@@ -45,9 +45,7 @@ func (c *GatewayapiV1Client) HTTPRoutes(namespace string) HTTPRouteInterface {
|
||||
// where httpClient was generated with rest.HTTPClientFor(c).
|
||||
func NewForConfig(c *rest.Config) (*GatewayapiV1Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
setConfigDefaults(&config)
|
||||
httpClient, err := rest.HTTPClientFor(&config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -59,9 +57,7 @@ func NewForConfig(c *rest.Config) (*GatewayapiV1Client, error) {
|
||||
// Note the http client provided takes precedence over the configured transport values.
|
||||
func NewForConfigAndClient(c *rest.Config, h *http.Client) (*GatewayapiV1Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
setConfigDefaults(&config)
|
||||
client, err := rest.RESTClientForConfigAndClient(&config, h)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -84,17 +80,15 @@ func New(c rest.Interface) *GatewayapiV1Client {
|
||||
return &GatewayapiV1Client{c}
|
||||
}
|
||||
|
||||
func setConfigDefaults(config *rest.Config) error {
|
||||
gv := v1.SchemeGroupVersion
|
||||
func setConfigDefaults(config *rest.Config) {
|
||||
gv := gatewayapiv1.SchemeGroupVersion
|
||||
config.GroupVersion = &gv
|
||||
config.APIPath = "/apis"
|
||||
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
|
||||
config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion()
|
||||
|
||||
if config.UserAgent == "" {
|
||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
|
||||
@@ -19,9 +19,9 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
context "context"
|
||||
|
||||
v1 "github.com/fluxcd/flagger/pkg/apis/gatewayapi/v1"
|
||||
gatewayapiv1 "github.com/fluxcd/flagger/pkg/apis/gatewayapi/v1"
|
||||
scheme "github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
@@ -37,33 +37,34 @@ type HTTPRoutesGetter interface {
|
||||
|
||||
// HTTPRouteInterface has methods to work with HTTPRoute resources.
|
||||
type HTTPRouteInterface interface {
|
||||
Create(ctx context.Context, hTTPRoute *v1.HTTPRoute, opts metav1.CreateOptions) (*v1.HTTPRoute, error)
|
||||
Update(ctx context.Context, hTTPRoute *v1.HTTPRoute, opts metav1.UpdateOptions) (*v1.HTTPRoute, error)
|
||||
Create(ctx context.Context, hTTPRoute *gatewayapiv1.HTTPRoute, opts metav1.CreateOptions) (*gatewayapiv1.HTTPRoute, error)
|
||||
Update(ctx context.Context, hTTPRoute *gatewayapiv1.HTTPRoute, opts metav1.UpdateOptions) (*gatewayapiv1.HTTPRoute, error)
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
UpdateStatus(ctx context.Context, hTTPRoute *v1.HTTPRoute, opts metav1.UpdateOptions) (*v1.HTTPRoute, error)
|
||||
UpdateStatus(ctx context.Context, hTTPRoute *gatewayapiv1.HTTPRoute, opts metav1.UpdateOptions) (*gatewayapiv1.HTTPRoute, error)
|
||||
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.HTTPRoute, error)
|
||||
List(ctx context.Context, opts metav1.ListOptions) (*v1.HTTPRouteList, error)
|
||||
Get(ctx context.Context, name string, opts metav1.GetOptions) (*gatewayapiv1.HTTPRoute, error)
|
||||
List(ctx context.Context, opts metav1.ListOptions) (*gatewayapiv1.HTTPRouteList, error)
|
||||
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.HTTPRoute, err error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *gatewayapiv1.HTTPRoute, err error)
|
||||
HTTPRouteExpansion
|
||||
}
|
||||
|
||||
// hTTPRoutes implements HTTPRouteInterface
|
||||
type hTTPRoutes struct {
|
||||
*gentype.ClientWithList[*v1.HTTPRoute, *v1.HTTPRouteList]
|
||||
*gentype.ClientWithList[*gatewayapiv1.HTTPRoute, *gatewayapiv1.HTTPRouteList]
|
||||
}
|
||||
|
||||
// newHTTPRoutes returns a HTTPRoutes
|
||||
func newHTTPRoutes(c *GatewayapiV1Client, namespace string) *hTTPRoutes {
|
||||
return &hTTPRoutes{
|
||||
gentype.NewClientWithList[*v1.HTTPRoute, *v1.HTTPRouteList](
|
||||
gentype.NewClientWithList[*gatewayapiv1.HTTPRoute, *gatewayapiv1.HTTPRouteList](
|
||||
"httproutes",
|
||||
c.RESTClient(),
|
||||
scheme.ParameterCodec,
|
||||
namespace,
|
||||
func() *v1.HTTPRoute { return &v1.HTTPRoute{} },
|
||||
func() *v1.HTTPRouteList { return &v1.HTTPRouteList{} }),
|
||||
func() *gatewayapiv1.HTTPRoute { return &gatewayapiv1.HTTPRoute{} },
|
||||
func() *gatewayapiv1.HTTPRouteList { return &gatewayapiv1.HTTPRouteList{} },
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ type FakeGatewayapiV1beta1 struct {
|
||||
}
|
||||
|
||||
func (c *FakeGatewayapiV1beta1) HTTPRoutes(namespace string) v1beta1.HTTPRouteInterface {
|
||||
return &FakeHTTPRoutes{c, namespace}
|
||||
return newFakeHTTPRoutes(c, namespace)
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
|
||||
@@ -19,129 +19,32 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1beta1 "github.com/fluxcd/flagger/pkg/apis/gatewayapi/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
gatewayapiv1beta1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/gatewayapi/v1beta1"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
)
|
||||
|
||||
// FakeHTTPRoutes implements HTTPRouteInterface
|
||||
type FakeHTTPRoutes struct {
|
||||
// fakeHTTPRoutes implements HTTPRouteInterface
|
||||
type fakeHTTPRoutes struct {
|
||||
*gentype.FakeClientWithList[*v1beta1.HTTPRoute, *v1beta1.HTTPRouteList]
|
||||
Fake *FakeGatewayapiV1beta1
|
||||
ns string
|
||||
}
|
||||
|
||||
var httproutesResource = v1beta1.SchemeGroupVersion.WithResource("httproutes")
|
||||
|
||||
var httproutesKind = v1beta1.SchemeGroupVersion.WithKind("HTTPRoute")
|
||||
|
||||
// Get takes name of the hTTPRoute, and returns the corresponding hTTPRoute object, and an error if there is any.
|
||||
func (c *FakeHTTPRoutes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.HTTPRoute, err error) {
|
||||
emptyResult := &v1beta1.HTTPRoute{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetActionWithOptions(httproutesResource, c.ns, name, options), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
func newFakeHTTPRoutes(fake *FakeGatewayapiV1beta1, namespace string) gatewayapiv1beta1.HTTPRouteInterface {
|
||||
return &fakeHTTPRoutes{
|
||||
gentype.NewFakeClientWithList[*v1beta1.HTTPRoute, *v1beta1.HTTPRouteList](
|
||||
fake.Fake,
|
||||
namespace,
|
||||
v1beta1.SchemeGroupVersion.WithResource("httproutes"),
|
||||
v1beta1.SchemeGroupVersion.WithKind("HTTPRoute"),
|
||||
func() *v1beta1.HTTPRoute { return &v1beta1.HTTPRoute{} },
|
||||
func() *v1beta1.HTTPRouteList { return &v1beta1.HTTPRouteList{} },
|
||||
func(dst, src *v1beta1.HTTPRouteList) { dst.ListMeta = src.ListMeta },
|
||||
func(list *v1beta1.HTTPRouteList) []*v1beta1.HTTPRoute { return gentype.ToPointerSlice(list.Items) },
|
||||
func(list *v1beta1.HTTPRouteList, items []*v1beta1.HTTPRoute) {
|
||||
list.Items = gentype.FromPointerSlice(items)
|
||||
},
|
||||
),
|
||||
fake,
|
||||
}
|
||||
return obj.(*v1beta1.HTTPRoute), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of HTTPRoutes that match those selectors.
|
||||
func (c *FakeHTTPRoutes) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.HTTPRouteList, err error) {
|
||||
emptyResult := &v1beta1.HTTPRouteList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListActionWithOptions(httproutesResource, httproutesKind, c.ns, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1beta1.HTTPRouteList{ListMeta: obj.(*v1beta1.HTTPRouteList).ListMeta}
|
||||
for _, item := range obj.(*v1beta1.HTTPRouteList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested hTTPRoutes.
|
||||
func (c *FakeHTTPRoutes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchActionWithOptions(httproutesResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a hTTPRoute and creates it. Returns the server's representation of the hTTPRoute, and an error, if there is any.
|
||||
func (c *FakeHTTPRoutes) Create(ctx context.Context, hTTPRoute *v1beta1.HTTPRoute, opts v1.CreateOptions) (result *v1beta1.HTTPRoute, err error) {
|
||||
emptyResult := &v1beta1.HTTPRoute{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateActionWithOptions(httproutesResource, c.ns, hTTPRoute, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1beta1.HTTPRoute), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a hTTPRoute and updates it. Returns the server's representation of the hTTPRoute, and an error, if there is any.
|
||||
func (c *FakeHTTPRoutes) Update(ctx context.Context, hTTPRoute *v1beta1.HTTPRoute, opts v1.UpdateOptions) (result *v1beta1.HTTPRoute, err error) {
|
||||
emptyResult := &v1beta1.HTTPRoute{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateActionWithOptions(httproutesResource, c.ns, hTTPRoute, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1beta1.HTTPRoute), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeHTTPRoutes) UpdateStatus(ctx context.Context, hTTPRoute *v1beta1.HTTPRoute, opts v1.UpdateOptions) (result *v1beta1.HTTPRoute, err error) {
|
||||
emptyResult := &v1beta1.HTTPRoute{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceActionWithOptions(httproutesResource, "status", c.ns, hTTPRoute, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1beta1.HTTPRoute), err
|
||||
}
|
||||
|
||||
// Delete takes name of the hTTPRoute and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeHTTPRoutes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteActionWithOptions(httproutesResource, c.ns, name, opts), &v1beta1.HTTPRoute{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeHTTPRoutes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionActionWithOptions(httproutesResource, c.ns, opts, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1beta1.HTTPRouteList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched hTTPRoute.
|
||||
func (c *FakeHTTPRoutes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.HTTPRoute, err error) {
|
||||
emptyResult := &v1beta1.HTTPRoute{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceActionWithOptions(httproutesResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1beta1.HTTPRoute), err
|
||||
}
|
||||
|
||||
@@ -19,10 +19,10 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
http "net/http"
|
||||
|
||||
v1beta1 "github.com/fluxcd/flagger/pkg/apis/gatewayapi/v1beta1"
|
||||
"github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
gatewayapiv1beta1 "github.com/fluxcd/flagger/pkg/apis/gatewayapi/v1beta1"
|
||||
scheme "github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
@@ -45,9 +45,7 @@ func (c *GatewayapiV1beta1Client) HTTPRoutes(namespace string) HTTPRouteInterfac
|
||||
// where httpClient was generated with rest.HTTPClientFor(c).
|
||||
func NewForConfig(c *rest.Config) (*GatewayapiV1beta1Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
setConfigDefaults(&config)
|
||||
httpClient, err := rest.HTTPClientFor(&config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -59,9 +57,7 @@ func NewForConfig(c *rest.Config) (*GatewayapiV1beta1Client, error) {
|
||||
// Note the http client provided takes precedence over the configured transport values.
|
||||
func NewForConfigAndClient(c *rest.Config, h *http.Client) (*GatewayapiV1beta1Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
setConfigDefaults(&config)
|
||||
client, err := rest.RESTClientForConfigAndClient(&config, h)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -84,17 +80,15 @@ func New(c rest.Interface) *GatewayapiV1beta1Client {
|
||||
return &GatewayapiV1beta1Client{c}
|
||||
}
|
||||
|
||||
func setConfigDefaults(config *rest.Config) error {
|
||||
gv := v1beta1.SchemeGroupVersion
|
||||
func setConfigDefaults(config *rest.Config) {
|
||||
gv := gatewayapiv1beta1.SchemeGroupVersion
|
||||
config.GroupVersion = &gv
|
||||
config.APIPath = "/apis"
|
||||
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
|
||||
config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion()
|
||||
|
||||
if config.UserAgent == "" {
|
||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
|
||||
@@ -19,9 +19,9 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"context"
|
||||
context "context"
|
||||
|
||||
v1beta1 "github.com/fluxcd/flagger/pkg/apis/gatewayapi/v1beta1"
|
||||
gatewayapiv1beta1 "github.com/fluxcd/flagger/pkg/apis/gatewayapi/v1beta1"
|
||||
scheme "github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
@@ -37,33 +37,34 @@ type HTTPRoutesGetter interface {
|
||||
|
||||
// HTTPRouteInterface has methods to work with HTTPRoute resources.
|
||||
type HTTPRouteInterface interface {
|
||||
Create(ctx context.Context, hTTPRoute *v1beta1.HTTPRoute, opts v1.CreateOptions) (*v1beta1.HTTPRoute, error)
|
||||
Update(ctx context.Context, hTTPRoute *v1beta1.HTTPRoute, opts v1.UpdateOptions) (*v1beta1.HTTPRoute, error)
|
||||
Create(ctx context.Context, hTTPRoute *gatewayapiv1beta1.HTTPRoute, opts v1.CreateOptions) (*gatewayapiv1beta1.HTTPRoute, error)
|
||||
Update(ctx context.Context, hTTPRoute *gatewayapiv1beta1.HTTPRoute, opts v1.UpdateOptions) (*gatewayapiv1beta1.HTTPRoute, error)
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
UpdateStatus(ctx context.Context, hTTPRoute *v1beta1.HTTPRoute, opts v1.UpdateOptions) (*v1beta1.HTTPRoute, error)
|
||||
UpdateStatus(ctx context.Context, hTTPRoute *gatewayapiv1beta1.HTTPRoute, opts v1.UpdateOptions) (*gatewayapiv1beta1.HTTPRoute, error)
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.HTTPRoute, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.HTTPRouteList, error)
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*gatewayapiv1beta1.HTTPRoute, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*gatewayapiv1beta1.HTTPRouteList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.HTTPRoute, err error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *gatewayapiv1beta1.HTTPRoute, err error)
|
||||
HTTPRouteExpansion
|
||||
}
|
||||
|
||||
// hTTPRoutes implements HTTPRouteInterface
|
||||
type hTTPRoutes struct {
|
||||
*gentype.ClientWithList[*v1beta1.HTTPRoute, *v1beta1.HTTPRouteList]
|
||||
*gentype.ClientWithList[*gatewayapiv1beta1.HTTPRoute, *gatewayapiv1beta1.HTTPRouteList]
|
||||
}
|
||||
|
||||
// newHTTPRoutes returns a HTTPRoutes
|
||||
func newHTTPRoutes(c *GatewayapiV1beta1Client, namespace string) *hTTPRoutes {
|
||||
return &hTTPRoutes{
|
||||
gentype.NewClientWithList[*v1beta1.HTTPRoute, *v1beta1.HTTPRouteList](
|
||||
gentype.NewClientWithList[*gatewayapiv1beta1.HTTPRoute, *gatewayapiv1beta1.HTTPRouteList](
|
||||
"httproutes",
|
||||
c.RESTClient(),
|
||||
scheme.ParameterCodec,
|
||||
namespace,
|
||||
func() *v1beta1.HTTPRoute { return &v1beta1.HTTPRoute{} },
|
||||
func() *v1beta1.HTTPRouteList { return &v1beta1.HTTPRouteList{} }),
|
||||
func() *gatewayapiv1beta1.HTTPRoute { return &gatewayapiv1beta1.HTTPRoute{} },
|
||||
func() *gatewayapiv1beta1.HTTPRouteList { return &gatewayapiv1beta1.HTTPRouteList{} },
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ type FakeGlooV1 struct {
|
||||
}
|
||||
|
||||
func (c *FakeGlooV1) Upstreams(namespace string) v1.UpstreamInterface {
|
||||
return &FakeUpstreams{c, namespace}
|
||||
return newFakeUpstreams(c, namespace)
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
|
||||
@@ -19,116 +19,30 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1 "github.com/fluxcd/flagger/pkg/apis/gloo/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
gloov1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/gloo/v1"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
)
|
||||
|
||||
// FakeUpstreams implements UpstreamInterface
|
||||
type FakeUpstreams struct {
|
||||
// fakeUpstreams implements UpstreamInterface
|
||||
type fakeUpstreams struct {
|
||||
*gentype.FakeClientWithList[*v1.Upstream, *v1.UpstreamList]
|
||||
Fake *FakeGlooV1
|
||||
ns string
|
||||
}
|
||||
|
||||
var upstreamsResource = v1.SchemeGroupVersion.WithResource("upstreams")
|
||||
|
||||
var upstreamsKind = v1.SchemeGroupVersion.WithKind("Upstream")
|
||||
|
||||
// Get takes name of the upstream, and returns the corresponding upstream object, and an error if there is any.
|
||||
func (c *FakeUpstreams) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.Upstream, err error) {
|
||||
emptyResult := &v1.Upstream{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetActionWithOptions(upstreamsResource, c.ns, name, options), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
func newFakeUpstreams(fake *FakeGlooV1, namespace string) gloov1.UpstreamInterface {
|
||||
return &fakeUpstreams{
|
||||
gentype.NewFakeClientWithList[*v1.Upstream, *v1.UpstreamList](
|
||||
fake.Fake,
|
||||
namespace,
|
||||
v1.SchemeGroupVersion.WithResource("upstreams"),
|
||||
v1.SchemeGroupVersion.WithKind("Upstream"),
|
||||
func() *v1.Upstream { return &v1.Upstream{} },
|
||||
func() *v1.UpstreamList { return &v1.UpstreamList{} },
|
||||
func(dst, src *v1.UpstreamList) { dst.ListMeta = src.ListMeta },
|
||||
func(list *v1.UpstreamList) []*v1.Upstream { return gentype.ToPointerSlice(list.Items) },
|
||||
func(list *v1.UpstreamList, items []*v1.Upstream) { list.Items = gentype.FromPointerSlice(items) },
|
||||
),
|
||||
fake,
|
||||
}
|
||||
return obj.(*v1.Upstream), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of Upstreams that match those selectors.
|
||||
func (c *FakeUpstreams) List(ctx context.Context, opts metav1.ListOptions) (result *v1.UpstreamList, err error) {
|
||||
emptyResult := &v1.UpstreamList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListActionWithOptions(upstreamsResource, upstreamsKind, c.ns, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1.UpstreamList{ListMeta: obj.(*v1.UpstreamList).ListMeta}
|
||||
for _, item := range obj.(*v1.UpstreamList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested upstreams.
|
||||
func (c *FakeUpstreams) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchActionWithOptions(upstreamsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a upstream and creates it. Returns the server's representation of the upstream, and an error, if there is any.
|
||||
func (c *FakeUpstreams) Create(ctx context.Context, upstream *v1.Upstream, opts metav1.CreateOptions) (result *v1.Upstream, err error) {
|
||||
emptyResult := &v1.Upstream{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateActionWithOptions(upstreamsResource, c.ns, upstream, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1.Upstream), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a upstream and updates it. Returns the server's representation of the upstream, and an error, if there is any.
|
||||
func (c *FakeUpstreams) Update(ctx context.Context, upstream *v1.Upstream, opts metav1.UpdateOptions) (result *v1.Upstream, err error) {
|
||||
emptyResult := &v1.Upstream{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateActionWithOptions(upstreamsResource, c.ns, upstream, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1.Upstream), err
|
||||
}
|
||||
|
||||
// Delete takes name of the upstream and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeUpstreams) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteActionWithOptions(upstreamsResource, c.ns, name, opts), &v1.Upstream{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeUpstreams) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionActionWithOptions(upstreamsResource, c.ns, opts, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1.UpstreamList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched upstream.
|
||||
func (c *FakeUpstreams) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Upstream, err error) {
|
||||
emptyResult := &v1.Upstream{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceActionWithOptions(upstreamsResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1.Upstream), err
|
||||
}
|
||||
|
||||
@@ -19,10 +19,10 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
http "net/http"
|
||||
|
||||
v1 "github.com/fluxcd/flagger/pkg/apis/gloo/v1"
|
||||
"github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
gloov1 "github.com/fluxcd/flagger/pkg/apis/gloo/v1"
|
||||
scheme "github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
@@ -45,9 +45,7 @@ func (c *GlooV1Client) Upstreams(namespace string) UpstreamInterface {
|
||||
// where httpClient was generated with rest.HTTPClientFor(c).
|
||||
func NewForConfig(c *rest.Config) (*GlooV1Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
setConfigDefaults(&config)
|
||||
httpClient, err := rest.HTTPClientFor(&config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -59,9 +57,7 @@ func NewForConfig(c *rest.Config) (*GlooV1Client, error) {
|
||||
// Note the http client provided takes precedence over the configured transport values.
|
||||
func NewForConfigAndClient(c *rest.Config, h *http.Client) (*GlooV1Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
setConfigDefaults(&config)
|
||||
client, err := rest.RESTClientForConfigAndClient(&config, h)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -84,17 +80,15 @@ func New(c rest.Interface) *GlooV1Client {
|
||||
return &GlooV1Client{c}
|
||||
}
|
||||
|
||||
func setConfigDefaults(config *rest.Config) error {
|
||||
gv := v1.SchemeGroupVersion
|
||||
func setConfigDefaults(config *rest.Config) {
|
||||
gv := gloov1.SchemeGroupVersion
|
||||
config.GroupVersion = &gv
|
||||
config.APIPath = "/apis"
|
||||
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
|
||||
config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion()
|
||||
|
||||
if config.UserAgent == "" {
|
||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
|
||||
@@ -19,9 +19,9 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
context "context"
|
||||
|
||||
v1 "github.com/fluxcd/flagger/pkg/apis/gloo/v1"
|
||||
gloov1 "github.com/fluxcd/flagger/pkg/apis/gloo/v1"
|
||||
scheme "github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
@@ -37,31 +37,32 @@ type UpstreamsGetter interface {
|
||||
|
||||
// UpstreamInterface has methods to work with Upstream resources.
|
||||
type UpstreamInterface interface {
|
||||
Create(ctx context.Context, upstream *v1.Upstream, opts metav1.CreateOptions) (*v1.Upstream, error)
|
||||
Update(ctx context.Context, upstream *v1.Upstream, opts metav1.UpdateOptions) (*v1.Upstream, error)
|
||||
Create(ctx context.Context, upstream *gloov1.Upstream, opts metav1.CreateOptions) (*gloov1.Upstream, error)
|
||||
Update(ctx context.Context, upstream *gloov1.Upstream, opts metav1.UpdateOptions) (*gloov1.Upstream, error)
|
||||
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.Upstream, error)
|
||||
List(ctx context.Context, opts metav1.ListOptions) (*v1.UpstreamList, error)
|
||||
Get(ctx context.Context, name string, opts metav1.GetOptions) (*gloov1.Upstream, error)
|
||||
List(ctx context.Context, opts metav1.ListOptions) (*gloov1.UpstreamList, error)
|
||||
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.Upstream, err error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *gloov1.Upstream, err error)
|
||||
UpstreamExpansion
|
||||
}
|
||||
|
||||
// upstreams implements UpstreamInterface
|
||||
type upstreams struct {
|
||||
*gentype.ClientWithList[*v1.Upstream, *v1.UpstreamList]
|
||||
*gentype.ClientWithList[*gloov1.Upstream, *gloov1.UpstreamList]
|
||||
}
|
||||
|
||||
// newUpstreams returns a Upstreams
|
||||
func newUpstreams(c *GlooV1Client, namespace string) *upstreams {
|
||||
return &upstreams{
|
||||
gentype.NewClientWithList[*v1.Upstream, *v1.UpstreamList](
|
||||
gentype.NewClientWithList[*gloov1.Upstream, *gloov1.UpstreamList](
|
||||
"upstreams",
|
||||
c.RESTClient(),
|
||||
scheme.ParameterCodec,
|
||||
namespace,
|
||||
func() *v1.Upstream { return &v1.Upstream{} },
|
||||
func() *v1.UpstreamList { return &v1.UpstreamList{} }),
|
||||
func() *gloov1.Upstream { return &gloov1.Upstream{} },
|
||||
func() *gloov1.UpstreamList { return &gloov1.UpstreamList{} },
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ type FakeGatewayV1 struct {
|
||||
}
|
||||
|
||||
func (c *FakeGatewayV1) RouteTables(namespace string) v1.RouteTableInterface {
|
||||
return &FakeRouteTables{c, namespace}
|
||||
return newFakeRouteTables(c, namespace)
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
|
||||
@@ -19,116 +19,30 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1 "github.com/fluxcd/flagger/pkg/apis/gloogateway/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
gloogatewayv1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/gloogateway/v1"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
)
|
||||
|
||||
// FakeRouteTables implements RouteTableInterface
|
||||
type FakeRouteTables struct {
|
||||
// fakeRouteTables implements RouteTableInterface
|
||||
type fakeRouteTables struct {
|
||||
*gentype.FakeClientWithList[*v1.RouteTable, *v1.RouteTableList]
|
||||
Fake *FakeGatewayV1
|
||||
ns string
|
||||
}
|
||||
|
||||
var routetablesResource = v1.SchemeGroupVersion.WithResource("routetables")
|
||||
|
||||
var routetablesKind = v1.SchemeGroupVersion.WithKind("RouteTable")
|
||||
|
||||
// Get takes name of the routeTable, and returns the corresponding routeTable object, and an error if there is any.
|
||||
func (c *FakeRouteTables) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.RouteTable, err error) {
|
||||
emptyResult := &v1.RouteTable{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetActionWithOptions(routetablesResource, c.ns, name, options), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
func newFakeRouteTables(fake *FakeGatewayV1, namespace string) gloogatewayv1.RouteTableInterface {
|
||||
return &fakeRouteTables{
|
||||
gentype.NewFakeClientWithList[*v1.RouteTable, *v1.RouteTableList](
|
||||
fake.Fake,
|
||||
namespace,
|
||||
v1.SchemeGroupVersion.WithResource("routetables"),
|
||||
v1.SchemeGroupVersion.WithKind("RouteTable"),
|
||||
func() *v1.RouteTable { return &v1.RouteTable{} },
|
||||
func() *v1.RouteTableList { return &v1.RouteTableList{} },
|
||||
func(dst, src *v1.RouteTableList) { dst.ListMeta = src.ListMeta },
|
||||
func(list *v1.RouteTableList) []*v1.RouteTable { return gentype.ToPointerSlice(list.Items) },
|
||||
func(list *v1.RouteTableList, items []*v1.RouteTable) { list.Items = gentype.FromPointerSlice(items) },
|
||||
),
|
||||
fake,
|
||||
}
|
||||
return obj.(*v1.RouteTable), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of RouteTables that match those selectors.
|
||||
func (c *FakeRouteTables) List(ctx context.Context, opts metav1.ListOptions) (result *v1.RouteTableList, err error) {
|
||||
emptyResult := &v1.RouteTableList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListActionWithOptions(routetablesResource, routetablesKind, c.ns, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1.RouteTableList{ListMeta: obj.(*v1.RouteTableList).ListMeta}
|
||||
for _, item := range obj.(*v1.RouteTableList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested routeTables.
|
||||
func (c *FakeRouteTables) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchActionWithOptions(routetablesResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a routeTable and creates it. Returns the server's representation of the routeTable, and an error, if there is any.
|
||||
func (c *FakeRouteTables) Create(ctx context.Context, routeTable *v1.RouteTable, opts metav1.CreateOptions) (result *v1.RouteTable, err error) {
|
||||
emptyResult := &v1.RouteTable{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateActionWithOptions(routetablesResource, c.ns, routeTable, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1.RouteTable), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a routeTable and updates it. Returns the server's representation of the routeTable, and an error, if there is any.
|
||||
func (c *FakeRouteTables) Update(ctx context.Context, routeTable *v1.RouteTable, opts metav1.UpdateOptions) (result *v1.RouteTable, err error) {
|
||||
emptyResult := &v1.RouteTable{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateActionWithOptions(routetablesResource, c.ns, routeTable, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1.RouteTable), err
|
||||
}
|
||||
|
||||
// Delete takes name of the routeTable and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeRouteTables) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteActionWithOptions(routetablesResource, c.ns, name, opts), &v1.RouteTable{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeRouteTables) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionActionWithOptions(routetablesResource, c.ns, opts, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1.RouteTableList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched routeTable.
|
||||
func (c *FakeRouteTables) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.RouteTable, err error) {
|
||||
emptyResult := &v1.RouteTable{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceActionWithOptions(routetablesResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1.RouteTable), err
|
||||
}
|
||||
|
||||
@@ -19,10 +19,10 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
http "net/http"
|
||||
|
||||
v1 "github.com/fluxcd/flagger/pkg/apis/gloogateway/v1"
|
||||
"github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
gloogatewayv1 "github.com/fluxcd/flagger/pkg/apis/gloogateway/v1"
|
||||
scheme "github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
@@ -45,9 +45,7 @@ func (c *GatewayV1Client) RouteTables(namespace string) RouteTableInterface {
|
||||
// where httpClient was generated with rest.HTTPClientFor(c).
|
||||
func NewForConfig(c *rest.Config) (*GatewayV1Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
setConfigDefaults(&config)
|
||||
httpClient, err := rest.HTTPClientFor(&config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -59,9 +57,7 @@ func NewForConfig(c *rest.Config) (*GatewayV1Client, error) {
|
||||
// Note the http client provided takes precedence over the configured transport values.
|
||||
func NewForConfigAndClient(c *rest.Config, h *http.Client) (*GatewayV1Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
setConfigDefaults(&config)
|
||||
client, err := rest.RESTClientForConfigAndClient(&config, h)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -84,17 +80,15 @@ func New(c rest.Interface) *GatewayV1Client {
|
||||
return &GatewayV1Client{c}
|
||||
}
|
||||
|
||||
func setConfigDefaults(config *rest.Config) error {
|
||||
gv := v1.SchemeGroupVersion
|
||||
func setConfigDefaults(config *rest.Config) {
|
||||
gv := gloogatewayv1.SchemeGroupVersion
|
||||
config.GroupVersion = &gv
|
||||
config.APIPath = "/apis"
|
||||
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
|
||||
config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion()
|
||||
|
||||
if config.UserAgent == "" {
|
||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
|
||||
@@ -19,9 +19,9 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
context "context"
|
||||
|
||||
v1 "github.com/fluxcd/flagger/pkg/apis/gloogateway/v1"
|
||||
gloogatewayv1 "github.com/fluxcd/flagger/pkg/apis/gloogateway/v1"
|
||||
scheme "github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
@@ -37,31 +37,32 @@ type RouteTablesGetter interface {
|
||||
|
||||
// RouteTableInterface has methods to work with RouteTable resources.
|
||||
type RouteTableInterface interface {
|
||||
Create(ctx context.Context, routeTable *v1.RouteTable, opts metav1.CreateOptions) (*v1.RouteTable, error)
|
||||
Update(ctx context.Context, routeTable *v1.RouteTable, opts metav1.UpdateOptions) (*v1.RouteTable, error)
|
||||
Create(ctx context.Context, routeTable *gloogatewayv1.RouteTable, opts metav1.CreateOptions) (*gloogatewayv1.RouteTable, error)
|
||||
Update(ctx context.Context, routeTable *gloogatewayv1.RouteTable, opts metav1.UpdateOptions) (*gloogatewayv1.RouteTable, error)
|
||||
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.RouteTable, error)
|
||||
List(ctx context.Context, opts metav1.ListOptions) (*v1.RouteTableList, error)
|
||||
Get(ctx context.Context, name string, opts metav1.GetOptions) (*gloogatewayv1.RouteTable, error)
|
||||
List(ctx context.Context, opts metav1.ListOptions) (*gloogatewayv1.RouteTableList, error)
|
||||
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.RouteTable, err error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *gloogatewayv1.RouteTable, err error)
|
||||
RouteTableExpansion
|
||||
}
|
||||
|
||||
// routeTables implements RouteTableInterface
|
||||
type routeTables struct {
|
||||
*gentype.ClientWithList[*v1.RouteTable, *v1.RouteTableList]
|
||||
*gentype.ClientWithList[*gloogatewayv1.RouteTable, *gloogatewayv1.RouteTableList]
|
||||
}
|
||||
|
||||
// newRouteTables returns a RouteTables
|
||||
func newRouteTables(c *GatewayV1Client, namespace string) *routeTables {
|
||||
return &routeTables{
|
||||
gentype.NewClientWithList[*v1.RouteTable, *v1.RouteTableList](
|
||||
gentype.NewClientWithList[*gloogatewayv1.RouteTable, *gloogatewayv1.RouteTableList](
|
||||
"routetables",
|
||||
c.RESTClient(),
|
||||
scheme.ParameterCodec,
|
||||
namespace,
|
||||
func() *v1.RouteTable { return &v1.RouteTable{} },
|
||||
func() *v1.RouteTableList { return &v1.RouteTableList{} }),
|
||||
func() *gloogatewayv1.RouteTable { return &gloogatewayv1.RouteTable{} },
|
||||
func() *gloogatewayv1.RouteTableList { return &gloogatewayv1.RouteTableList{} },
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,9 +19,9 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"context"
|
||||
context "context"
|
||||
|
||||
v1beta1 "github.com/fluxcd/flagger/pkg/apis/istio/v1beta1"
|
||||
istiov1beta1 "github.com/fluxcd/flagger/pkg/apis/istio/v1beta1"
|
||||
scheme "github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
@@ -37,31 +37,32 @@ type DestinationRulesGetter interface {
|
||||
|
||||
// DestinationRuleInterface has methods to work with DestinationRule resources.
|
||||
type DestinationRuleInterface interface {
|
||||
Create(ctx context.Context, destinationRule *v1beta1.DestinationRule, opts v1.CreateOptions) (*v1beta1.DestinationRule, error)
|
||||
Update(ctx context.Context, destinationRule *v1beta1.DestinationRule, opts v1.UpdateOptions) (*v1beta1.DestinationRule, error)
|
||||
Create(ctx context.Context, destinationRule *istiov1beta1.DestinationRule, opts v1.CreateOptions) (*istiov1beta1.DestinationRule, error)
|
||||
Update(ctx context.Context, destinationRule *istiov1beta1.DestinationRule, opts v1.UpdateOptions) (*istiov1beta1.DestinationRule, error)
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.DestinationRule, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.DestinationRuleList, error)
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*istiov1beta1.DestinationRule, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*istiov1beta1.DestinationRuleList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.DestinationRule, err error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *istiov1beta1.DestinationRule, err error)
|
||||
DestinationRuleExpansion
|
||||
}
|
||||
|
||||
// destinationRules implements DestinationRuleInterface
|
||||
type destinationRules struct {
|
||||
*gentype.ClientWithList[*v1beta1.DestinationRule, *v1beta1.DestinationRuleList]
|
||||
*gentype.ClientWithList[*istiov1beta1.DestinationRule, *istiov1beta1.DestinationRuleList]
|
||||
}
|
||||
|
||||
// newDestinationRules returns a DestinationRules
|
||||
func newDestinationRules(c *NetworkingV1beta1Client, namespace string) *destinationRules {
|
||||
return &destinationRules{
|
||||
gentype.NewClientWithList[*v1beta1.DestinationRule, *v1beta1.DestinationRuleList](
|
||||
gentype.NewClientWithList[*istiov1beta1.DestinationRule, *istiov1beta1.DestinationRuleList](
|
||||
"destinationrules",
|
||||
c.RESTClient(),
|
||||
scheme.ParameterCodec,
|
||||
namespace,
|
||||
func() *v1beta1.DestinationRule { return &v1beta1.DestinationRule{} },
|
||||
func() *v1beta1.DestinationRuleList { return &v1beta1.DestinationRuleList{} }),
|
||||
func() *istiov1beta1.DestinationRule { return &istiov1beta1.DestinationRule{} },
|
||||
func() *istiov1beta1.DestinationRuleList { return &istiov1beta1.DestinationRuleList{} },
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,116 +19,34 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1beta1 "github.com/fluxcd/flagger/pkg/apis/istio/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
istiov1beta1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/istio/v1beta1"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
)
|
||||
|
||||
// FakeDestinationRules implements DestinationRuleInterface
|
||||
type FakeDestinationRules struct {
|
||||
// fakeDestinationRules implements DestinationRuleInterface
|
||||
type fakeDestinationRules struct {
|
||||
*gentype.FakeClientWithList[*v1beta1.DestinationRule, *v1beta1.DestinationRuleList]
|
||||
Fake *FakeNetworkingV1beta1
|
||||
ns string
|
||||
}
|
||||
|
||||
var destinationrulesResource = v1beta1.SchemeGroupVersion.WithResource("destinationrules")
|
||||
|
||||
var destinationrulesKind = v1beta1.SchemeGroupVersion.WithKind("DestinationRule")
|
||||
|
||||
// Get takes name of the destinationRule, and returns the corresponding destinationRule object, and an error if there is any.
|
||||
func (c *FakeDestinationRules) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.DestinationRule, err error) {
|
||||
emptyResult := &v1beta1.DestinationRule{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetActionWithOptions(destinationrulesResource, c.ns, name, options), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
func newFakeDestinationRules(fake *FakeNetworkingV1beta1, namespace string) istiov1beta1.DestinationRuleInterface {
|
||||
return &fakeDestinationRules{
|
||||
gentype.NewFakeClientWithList[*v1beta1.DestinationRule, *v1beta1.DestinationRuleList](
|
||||
fake.Fake,
|
||||
namespace,
|
||||
v1beta1.SchemeGroupVersion.WithResource("destinationrules"),
|
||||
v1beta1.SchemeGroupVersion.WithKind("DestinationRule"),
|
||||
func() *v1beta1.DestinationRule { return &v1beta1.DestinationRule{} },
|
||||
func() *v1beta1.DestinationRuleList { return &v1beta1.DestinationRuleList{} },
|
||||
func(dst, src *v1beta1.DestinationRuleList) { dst.ListMeta = src.ListMeta },
|
||||
func(list *v1beta1.DestinationRuleList) []*v1beta1.DestinationRule {
|
||||
return gentype.ToPointerSlice(list.Items)
|
||||
},
|
||||
func(list *v1beta1.DestinationRuleList, items []*v1beta1.DestinationRule) {
|
||||
list.Items = gentype.FromPointerSlice(items)
|
||||
},
|
||||
),
|
||||
fake,
|
||||
}
|
||||
return obj.(*v1beta1.DestinationRule), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of DestinationRules that match those selectors.
|
||||
func (c *FakeDestinationRules) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.DestinationRuleList, err error) {
|
||||
emptyResult := &v1beta1.DestinationRuleList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListActionWithOptions(destinationrulesResource, destinationrulesKind, c.ns, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1beta1.DestinationRuleList{ListMeta: obj.(*v1beta1.DestinationRuleList).ListMeta}
|
||||
for _, item := range obj.(*v1beta1.DestinationRuleList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested destinationRules.
|
||||
func (c *FakeDestinationRules) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchActionWithOptions(destinationrulesResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a destinationRule and creates it. Returns the server's representation of the destinationRule, and an error, if there is any.
|
||||
func (c *FakeDestinationRules) Create(ctx context.Context, destinationRule *v1beta1.DestinationRule, opts v1.CreateOptions) (result *v1beta1.DestinationRule, err error) {
|
||||
emptyResult := &v1beta1.DestinationRule{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateActionWithOptions(destinationrulesResource, c.ns, destinationRule, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1beta1.DestinationRule), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a destinationRule and updates it. Returns the server's representation of the destinationRule, and an error, if there is any.
|
||||
func (c *FakeDestinationRules) Update(ctx context.Context, destinationRule *v1beta1.DestinationRule, opts v1.UpdateOptions) (result *v1beta1.DestinationRule, err error) {
|
||||
emptyResult := &v1beta1.DestinationRule{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateActionWithOptions(destinationrulesResource, c.ns, destinationRule, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1beta1.DestinationRule), err
|
||||
}
|
||||
|
||||
// Delete takes name of the destinationRule and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeDestinationRules) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteActionWithOptions(destinationrulesResource, c.ns, name, opts), &v1beta1.DestinationRule{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeDestinationRules) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionActionWithOptions(destinationrulesResource, c.ns, opts, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1beta1.DestinationRuleList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched destinationRule.
|
||||
func (c *FakeDestinationRules) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.DestinationRule, err error) {
|
||||
emptyResult := &v1beta1.DestinationRule{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceActionWithOptions(destinationrulesResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1beta1.DestinationRule), err
|
||||
}
|
||||
|
||||
@@ -29,11 +29,11 @@ type FakeNetworkingV1beta1 struct {
|
||||
}
|
||||
|
||||
func (c *FakeNetworkingV1beta1) DestinationRules(namespace string) v1beta1.DestinationRuleInterface {
|
||||
return &FakeDestinationRules{c, namespace}
|
||||
return newFakeDestinationRules(c, namespace)
|
||||
}
|
||||
|
||||
func (c *FakeNetworkingV1beta1) VirtualServices(namespace string) v1beta1.VirtualServiceInterface {
|
||||
return &FakeVirtualServices{c, namespace}
|
||||
return newFakeVirtualServices(c, namespace)
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
|
||||
@@ -19,116 +19,34 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1beta1 "github.com/fluxcd/flagger/pkg/apis/istio/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
istiov1beta1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/istio/v1beta1"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
)
|
||||
|
||||
// FakeVirtualServices implements VirtualServiceInterface
|
||||
type FakeVirtualServices struct {
|
||||
// fakeVirtualServices implements VirtualServiceInterface
|
||||
type fakeVirtualServices struct {
|
||||
*gentype.FakeClientWithList[*v1beta1.VirtualService, *v1beta1.VirtualServiceList]
|
||||
Fake *FakeNetworkingV1beta1
|
||||
ns string
|
||||
}
|
||||
|
||||
var virtualservicesResource = v1beta1.SchemeGroupVersion.WithResource("virtualservices")
|
||||
|
||||
var virtualservicesKind = v1beta1.SchemeGroupVersion.WithKind("VirtualService")
|
||||
|
||||
// Get takes name of the virtualService, and returns the corresponding virtualService object, and an error if there is any.
|
||||
func (c *FakeVirtualServices) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.VirtualService, err error) {
|
||||
emptyResult := &v1beta1.VirtualService{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetActionWithOptions(virtualservicesResource, c.ns, name, options), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
func newFakeVirtualServices(fake *FakeNetworkingV1beta1, namespace string) istiov1beta1.VirtualServiceInterface {
|
||||
return &fakeVirtualServices{
|
||||
gentype.NewFakeClientWithList[*v1beta1.VirtualService, *v1beta1.VirtualServiceList](
|
||||
fake.Fake,
|
||||
namespace,
|
||||
v1beta1.SchemeGroupVersion.WithResource("virtualservices"),
|
||||
v1beta1.SchemeGroupVersion.WithKind("VirtualService"),
|
||||
func() *v1beta1.VirtualService { return &v1beta1.VirtualService{} },
|
||||
func() *v1beta1.VirtualServiceList { return &v1beta1.VirtualServiceList{} },
|
||||
func(dst, src *v1beta1.VirtualServiceList) { dst.ListMeta = src.ListMeta },
|
||||
func(list *v1beta1.VirtualServiceList) []*v1beta1.VirtualService {
|
||||
return gentype.ToPointerSlice(list.Items)
|
||||
},
|
||||
func(list *v1beta1.VirtualServiceList, items []*v1beta1.VirtualService) {
|
||||
list.Items = gentype.FromPointerSlice(items)
|
||||
},
|
||||
),
|
||||
fake,
|
||||
}
|
||||
return obj.(*v1beta1.VirtualService), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of VirtualServices that match those selectors.
|
||||
func (c *FakeVirtualServices) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.VirtualServiceList, err error) {
|
||||
emptyResult := &v1beta1.VirtualServiceList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListActionWithOptions(virtualservicesResource, virtualservicesKind, c.ns, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1beta1.VirtualServiceList{ListMeta: obj.(*v1beta1.VirtualServiceList).ListMeta}
|
||||
for _, item := range obj.(*v1beta1.VirtualServiceList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested virtualServices.
|
||||
func (c *FakeVirtualServices) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchActionWithOptions(virtualservicesResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a virtualService and creates it. Returns the server's representation of the virtualService, and an error, if there is any.
|
||||
func (c *FakeVirtualServices) Create(ctx context.Context, virtualService *v1beta1.VirtualService, opts v1.CreateOptions) (result *v1beta1.VirtualService, err error) {
|
||||
emptyResult := &v1beta1.VirtualService{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateActionWithOptions(virtualservicesResource, c.ns, virtualService, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1beta1.VirtualService), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a virtualService and updates it. Returns the server's representation of the virtualService, and an error, if there is any.
|
||||
func (c *FakeVirtualServices) Update(ctx context.Context, virtualService *v1beta1.VirtualService, opts v1.UpdateOptions) (result *v1beta1.VirtualService, err error) {
|
||||
emptyResult := &v1beta1.VirtualService{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateActionWithOptions(virtualservicesResource, c.ns, virtualService, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1beta1.VirtualService), err
|
||||
}
|
||||
|
||||
// Delete takes name of the virtualService and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeVirtualServices) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteActionWithOptions(virtualservicesResource, c.ns, name, opts), &v1beta1.VirtualService{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeVirtualServices) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionActionWithOptions(virtualservicesResource, c.ns, opts, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1beta1.VirtualServiceList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched virtualService.
|
||||
func (c *FakeVirtualServices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.VirtualService, err error) {
|
||||
emptyResult := &v1beta1.VirtualService{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceActionWithOptions(virtualservicesResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1beta1.VirtualService), err
|
||||
}
|
||||
|
||||
@@ -19,10 +19,10 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
http "net/http"
|
||||
|
||||
v1beta1 "github.com/fluxcd/flagger/pkg/apis/istio/v1beta1"
|
||||
"github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
istiov1beta1 "github.com/fluxcd/flagger/pkg/apis/istio/v1beta1"
|
||||
scheme "github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
@@ -50,9 +50,7 @@ func (c *NetworkingV1beta1Client) VirtualServices(namespace string) VirtualServi
|
||||
// where httpClient was generated with rest.HTTPClientFor(c).
|
||||
func NewForConfig(c *rest.Config) (*NetworkingV1beta1Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
setConfigDefaults(&config)
|
||||
httpClient, err := rest.HTTPClientFor(&config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -64,9 +62,7 @@ func NewForConfig(c *rest.Config) (*NetworkingV1beta1Client, error) {
|
||||
// Note the http client provided takes precedence over the configured transport values.
|
||||
func NewForConfigAndClient(c *rest.Config, h *http.Client) (*NetworkingV1beta1Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
setConfigDefaults(&config)
|
||||
client, err := rest.RESTClientForConfigAndClient(&config, h)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -89,17 +85,15 @@ func New(c rest.Interface) *NetworkingV1beta1Client {
|
||||
return &NetworkingV1beta1Client{c}
|
||||
}
|
||||
|
||||
func setConfigDefaults(config *rest.Config) error {
|
||||
gv := v1beta1.SchemeGroupVersion
|
||||
func setConfigDefaults(config *rest.Config) {
|
||||
gv := istiov1beta1.SchemeGroupVersion
|
||||
config.GroupVersion = &gv
|
||||
config.APIPath = "/apis"
|
||||
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
|
||||
config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion()
|
||||
|
||||
if config.UserAgent == "" {
|
||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
|
||||
@@ -19,9 +19,9 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"context"
|
||||
context "context"
|
||||
|
||||
v1beta1 "github.com/fluxcd/flagger/pkg/apis/istio/v1beta1"
|
||||
istiov1beta1 "github.com/fluxcd/flagger/pkg/apis/istio/v1beta1"
|
||||
scheme "github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
@@ -37,31 +37,32 @@ type VirtualServicesGetter interface {
|
||||
|
||||
// VirtualServiceInterface has methods to work with VirtualService resources.
|
||||
type VirtualServiceInterface interface {
|
||||
Create(ctx context.Context, virtualService *v1beta1.VirtualService, opts v1.CreateOptions) (*v1beta1.VirtualService, error)
|
||||
Update(ctx context.Context, virtualService *v1beta1.VirtualService, opts v1.UpdateOptions) (*v1beta1.VirtualService, error)
|
||||
Create(ctx context.Context, virtualService *istiov1beta1.VirtualService, opts v1.CreateOptions) (*istiov1beta1.VirtualService, error)
|
||||
Update(ctx context.Context, virtualService *istiov1beta1.VirtualService, opts v1.UpdateOptions) (*istiov1beta1.VirtualService, error)
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.VirtualService, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.VirtualServiceList, error)
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*istiov1beta1.VirtualService, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*istiov1beta1.VirtualServiceList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.VirtualService, err error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *istiov1beta1.VirtualService, err error)
|
||||
VirtualServiceExpansion
|
||||
}
|
||||
|
||||
// virtualServices implements VirtualServiceInterface
|
||||
type virtualServices struct {
|
||||
*gentype.ClientWithList[*v1beta1.VirtualService, *v1beta1.VirtualServiceList]
|
||||
*gentype.ClientWithList[*istiov1beta1.VirtualService, *istiov1beta1.VirtualServiceList]
|
||||
}
|
||||
|
||||
// newVirtualServices returns a VirtualServices
|
||||
func newVirtualServices(c *NetworkingV1beta1Client, namespace string) *virtualServices {
|
||||
return &virtualServices{
|
||||
gentype.NewClientWithList[*v1beta1.VirtualService, *v1beta1.VirtualServiceList](
|
||||
gentype.NewClientWithList[*istiov1beta1.VirtualService, *istiov1beta1.VirtualServiceList](
|
||||
"virtualservices",
|
||||
c.RESTClient(),
|
||||
scheme.ParameterCodec,
|
||||
namespace,
|
||||
func() *v1beta1.VirtualService { return &v1beta1.VirtualService{} },
|
||||
func() *v1beta1.VirtualServiceList { return &v1beta1.VirtualServiceList{} }),
|
||||
func() *istiov1beta1.VirtualService { return &istiov1beta1.VirtualService{} },
|
||||
func() *istiov1beta1.VirtualServiceList { return &istiov1beta1.VirtualServiceList{} },
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ type FakeKedaV1alpha1 struct {
|
||||
}
|
||||
|
||||
func (c *FakeKedaV1alpha1) ScaledObjects(namespace string) v1alpha1.ScaledObjectInterface {
|
||||
return &FakeScaledObjects{c, namespace}
|
||||
return newFakeScaledObjects(c, namespace)
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
|
||||
@@ -19,129 +19,34 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1alpha1 "github.com/fluxcd/flagger/pkg/apis/keda/v1alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
kedav1alpha1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/keda/v1alpha1"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
)
|
||||
|
||||
// FakeScaledObjects implements ScaledObjectInterface
|
||||
type FakeScaledObjects struct {
|
||||
// fakeScaledObjects implements ScaledObjectInterface
|
||||
type fakeScaledObjects struct {
|
||||
*gentype.FakeClientWithList[*v1alpha1.ScaledObject, *v1alpha1.ScaledObjectList]
|
||||
Fake *FakeKedaV1alpha1
|
||||
ns string
|
||||
}
|
||||
|
||||
var scaledobjectsResource = v1alpha1.SchemeGroupVersion.WithResource("scaledobjects")
|
||||
|
||||
var scaledobjectsKind = v1alpha1.SchemeGroupVersion.WithKind("ScaledObject")
|
||||
|
||||
// Get takes name of the scaledObject, and returns the corresponding scaledObject object, and an error if there is any.
|
||||
func (c *FakeScaledObjects) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.ScaledObject, err error) {
|
||||
emptyResult := &v1alpha1.ScaledObject{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetActionWithOptions(scaledobjectsResource, c.ns, name, options), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
func newFakeScaledObjects(fake *FakeKedaV1alpha1, namespace string) kedav1alpha1.ScaledObjectInterface {
|
||||
return &fakeScaledObjects{
|
||||
gentype.NewFakeClientWithList[*v1alpha1.ScaledObject, *v1alpha1.ScaledObjectList](
|
||||
fake.Fake,
|
||||
namespace,
|
||||
v1alpha1.SchemeGroupVersion.WithResource("scaledobjects"),
|
||||
v1alpha1.SchemeGroupVersion.WithKind("ScaledObject"),
|
||||
func() *v1alpha1.ScaledObject { return &v1alpha1.ScaledObject{} },
|
||||
func() *v1alpha1.ScaledObjectList { return &v1alpha1.ScaledObjectList{} },
|
||||
func(dst, src *v1alpha1.ScaledObjectList) { dst.ListMeta = src.ListMeta },
|
||||
func(list *v1alpha1.ScaledObjectList) []*v1alpha1.ScaledObject {
|
||||
return gentype.ToPointerSlice(list.Items)
|
||||
},
|
||||
func(list *v1alpha1.ScaledObjectList, items []*v1alpha1.ScaledObject) {
|
||||
list.Items = gentype.FromPointerSlice(items)
|
||||
},
|
||||
),
|
||||
fake,
|
||||
}
|
||||
return obj.(*v1alpha1.ScaledObject), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of ScaledObjects that match those selectors.
|
||||
func (c *FakeScaledObjects) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.ScaledObjectList, err error) {
|
||||
emptyResult := &v1alpha1.ScaledObjectList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListActionWithOptions(scaledobjectsResource, scaledobjectsKind, c.ns, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha1.ScaledObjectList{ListMeta: obj.(*v1alpha1.ScaledObjectList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha1.ScaledObjectList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested scaledObjects.
|
||||
func (c *FakeScaledObjects) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchActionWithOptions(scaledobjectsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a scaledObject and creates it. Returns the server's representation of the scaledObject, and an error, if there is any.
|
||||
func (c *FakeScaledObjects) Create(ctx context.Context, scaledObject *v1alpha1.ScaledObject, opts v1.CreateOptions) (result *v1alpha1.ScaledObject, err error) {
|
||||
emptyResult := &v1alpha1.ScaledObject{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateActionWithOptions(scaledobjectsResource, c.ns, scaledObject, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1alpha1.ScaledObject), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a scaledObject and updates it. Returns the server's representation of the scaledObject, and an error, if there is any.
|
||||
func (c *FakeScaledObjects) Update(ctx context.Context, scaledObject *v1alpha1.ScaledObject, opts v1.UpdateOptions) (result *v1alpha1.ScaledObject, err error) {
|
||||
emptyResult := &v1alpha1.ScaledObject{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateActionWithOptions(scaledobjectsResource, c.ns, scaledObject, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1alpha1.ScaledObject), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeScaledObjects) UpdateStatus(ctx context.Context, scaledObject *v1alpha1.ScaledObject, opts v1.UpdateOptions) (result *v1alpha1.ScaledObject, err error) {
|
||||
emptyResult := &v1alpha1.ScaledObject{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceActionWithOptions(scaledobjectsResource, "status", c.ns, scaledObject, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1alpha1.ScaledObject), err
|
||||
}
|
||||
|
||||
// Delete takes name of the scaledObject and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeScaledObjects) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteActionWithOptions(scaledobjectsResource, c.ns, name, opts), &v1alpha1.ScaledObject{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeScaledObjects) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionActionWithOptions(scaledobjectsResource, c.ns, opts, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1alpha1.ScaledObjectList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched scaledObject.
|
||||
func (c *FakeScaledObjects) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ScaledObject, err error) {
|
||||
emptyResult := &v1alpha1.ScaledObject{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceActionWithOptions(scaledobjectsResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1alpha1.ScaledObject), err
|
||||
}
|
||||
|
||||
@@ -19,10 +19,10 @@ limitations under the License.
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
http "net/http"
|
||||
|
||||
v1alpha1 "github.com/fluxcd/flagger/pkg/apis/keda/v1alpha1"
|
||||
"github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
kedav1alpha1 "github.com/fluxcd/flagger/pkg/apis/keda/v1alpha1"
|
||||
scheme "github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
@@ -45,9 +45,7 @@ func (c *KedaV1alpha1Client) ScaledObjects(namespace string) ScaledObjectInterfa
|
||||
// where httpClient was generated with rest.HTTPClientFor(c).
|
||||
func NewForConfig(c *rest.Config) (*KedaV1alpha1Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
setConfigDefaults(&config)
|
||||
httpClient, err := rest.HTTPClientFor(&config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -59,9 +57,7 @@ func NewForConfig(c *rest.Config) (*KedaV1alpha1Client, error) {
|
||||
// Note the http client provided takes precedence over the configured transport values.
|
||||
func NewForConfigAndClient(c *rest.Config, h *http.Client) (*KedaV1alpha1Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
setConfigDefaults(&config)
|
||||
client, err := rest.RESTClientForConfigAndClient(&config, h)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -84,17 +80,15 @@ func New(c rest.Interface) *KedaV1alpha1Client {
|
||||
return &KedaV1alpha1Client{c}
|
||||
}
|
||||
|
||||
func setConfigDefaults(config *rest.Config) error {
|
||||
gv := v1alpha1.SchemeGroupVersion
|
||||
func setConfigDefaults(config *rest.Config) {
|
||||
gv := kedav1alpha1.SchemeGroupVersion
|
||||
config.GroupVersion = &gv
|
||||
config.APIPath = "/apis"
|
||||
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
|
||||
config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion()
|
||||
|
||||
if config.UserAgent == "" {
|
||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
|
||||
@@ -19,9 +19,9 @@ limitations under the License.
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"context"
|
||||
context "context"
|
||||
|
||||
v1alpha1 "github.com/fluxcd/flagger/pkg/apis/keda/v1alpha1"
|
||||
kedav1alpha1 "github.com/fluxcd/flagger/pkg/apis/keda/v1alpha1"
|
||||
scheme "github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
@@ -37,33 +37,34 @@ type ScaledObjectsGetter interface {
|
||||
|
||||
// ScaledObjectInterface has methods to work with ScaledObject resources.
|
||||
type ScaledObjectInterface interface {
|
||||
Create(ctx context.Context, scaledObject *v1alpha1.ScaledObject, opts v1.CreateOptions) (*v1alpha1.ScaledObject, error)
|
||||
Update(ctx context.Context, scaledObject *v1alpha1.ScaledObject, opts v1.UpdateOptions) (*v1alpha1.ScaledObject, error)
|
||||
Create(ctx context.Context, scaledObject *kedav1alpha1.ScaledObject, opts v1.CreateOptions) (*kedav1alpha1.ScaledObject, error)
|
||||
Update(ctx context.Context, scaledObject *kedav1alpha1.ScaledObject, opts v1.UpdateOptions) (*kedav1alpha1.ScaledObject, error)
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
UpdateStatus(ctx context.Context, scaledObject *v1alpha1.ScaledObject, opts v1.UpdateOptions) (*v1alpha1.ScaledObject, error)
|
||||
UpdateStatus(ctx context.Context, scaledObject *kedav1alpha1.ScaledObject, opts v1.UpdateOptions) (*kedav1alpha1.ScaledObject, error)
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.ScaledObject, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.ScaledObjectList, error)
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*kedav1alpha1.ScaledObject, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*kedav1alpha1.ScaledObjectList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.ScaledObject, err error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *kedav1alpha1.ScaledObject, err error)
|
||||
ScaledObjectExpansion
|
||||
}
|
||||
|
||||
// scaledObjects implements ScaledObjectInterface
|
||||
type scaledObjects struct {
|
||||
*gentype.ClientWithList[*v1alpha1.ScaledObject, *v1alpha1.ScaledObjectList]
|
||||
*gentype.ClientWithList[*kedav1alpha1.ScaledObject, *kedav1alpha1.ScaledObjectList]
|
||||
}
|
||||
|
||||
// newScaledObjects returns a ScaledObjects
|
||||
func newScaledObjects(c *KedaV1alpha1Client, namespace string) *scaledObjects {
|
||||
return &scaledObjects{
|
||||
gentype.NewClientWithList[*v1alpha1.ScaledObject, *v1alpha1.ScaledObjectList](
|
||||
gentype.NewClientWithList[*kedav1alpha1.ScaledObject, *kedav1alpha1.ScaledObjectList](
|
||||
"scaledobjects",
|
||||
c.RESTClient(),
|
||||
scheme.ParameterCodec,
|
||||
namespace,
|
||||
func() *v1alpha1.ScaledObject { return &v1alpha1.ScaledObject{} },
|
||||
func() *v1alpha1.ScaledObjectList { return &v1alpha1.ScaledObjectList{} }),
|
||||
func() *kedav1alpha1.ScaledObject { return &kedav1alpha1.ScaledObject{} },
|
||||
func() *kedav1alpha1.ScaledObjectList { return &kedav1alpha1.ScaledObjectList{} },
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ type FakeKumaV1alpha1 struct {
|
||||
}
|
||||
|
||||
func (c *FakeKumaV1alpha1) TrafficRoutes() v1alpha1.TrafficRouteInterface {
|
||||
return &FakeTrafficRoutes{c}
|
||||
return newFakeTrafficRoutes(c)
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
|
||||
@@ -19,108 +19,34 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1alpha1 "github.com/fluxcd/flagger/pkg/apis/kuma/v1alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
kumav1alpha1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/kuma/v1alpha1"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
)
|
||||
|
||||
// FakeTrafficRoutes implements TrafficRouteInterface
|
||||
type FakeTrafficRoutes struct {
|
||||
// fakeTrafficRoutes implements TrafficRouteInterface
|
||||
type fakeTrafficRoutes struct {
|
||||
*gentype.FakeClientWithList[*v1alpha1.TrafficRoute, *v1alpha1.TrafficRouteList]
|
||||
Fake *FakeKumaV1alpha1
|
||||
}
|
||||
|
||||
var trafficroutesResource = v1alpha1.SchemeGroupVersion.WithResource("trafficroutes")
|
||||
|
||||
var trafficroutesKind = v1alpha1.SchemeGroupVersion.WithKind("TrafficRoute")
|
||||
|
||||
// Get takes name of the trafficRoute, and returns the corresponding trafficRoute object, and an error if there is any.
|
||||
func (c *FakeTrafficRoutes) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.TrafficRoute, err error) {
|
||||
emptyResult := &v1alpha1.TrafficRoute{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootGetActionWithOptions(trafficroutesResource, name, options), emptyResult)
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
func newFakeTrafficRoutes(fake *FakeKumaV1alpha1) kumav1alpha1.TrafficRouteInterface {
|
||||
return &fakeTrafficRoutes{
|
||||
gentype.NewFakeClientWithList[*v1alpha1.TrafficRoute, *v1alpha1.TrafficRouteList](
|
||||
fake.Fake,
|
||||
"",
|
||||
v1alpha1.SchemeGroupVersion.WithResource("trafficroutes"),
|
||||
v1alpha1.SchemeGroupVersion.WithKind("TrafficRoute"),
|
||||
func() *v1alpha1.TrafficRoute { return &v1alpha1.TrafficRoute{} },
|
||||
func() *v1alpha1.TrafficRouteList { return &v1alpha1.TrafficRouteList{} },
|
||||
func(dst, src *v1alpha1.TrafficRouteList) { dst.ListMeta = src.ListMeta },
|
||||
func(list *v1alpha1.TrafficRouteList) []*v1alpha1.TrafficRoute {
|
||||
return gentype.ToPointerSlice(list.Items)
|
||||
},
|
||||
func(list *v1alpha1.TrafficRouteList, items []*v1alpha1.TrafficRoute) {
|
||||
list.Items = gentype.FromPointerSlice(items)
|
||||
},
|
||||
),
|
||||
fake,
|
||||
}
|
||||
return obj.(*v1alpha1.TrafficRoute), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of TrafficRoutes that match those selectors.
|
||||
func (c *FakeTrafficRoutes) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.TrafficRouteList, err error) {
|
||||
emptyResult := &v1alpha1.TrafficRouteList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootListActionWithOptions(trafficroutesResource, trafficroutesKind, opts), emptyResult)
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha1.TrafficRouteList{ListMeta: obj.(*v1alpha1.TrafficRouteList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha1.TrafficRouteList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested trafficRoutes.
|
||||
func (c *FakeTrafficRoutes) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewRootWatchActionWithOptions(trafficroutesResource, opts))
|
||||
}
|
||||
|
||||
// Create takes the representation of a trafficRoute and creates it. Returns the server's representation of the trafficRoute, and an error, if there is any.
|
||||
func (c *FakeTrafficRoutes) Create(ctx context.Context, trafficRoute *v1alpha1.TrafficRoute, opts v1.CreateOptions) (result *v1alpha1.TrafficRoute, err error) {
|
||||
emptyResult := &v1alpha1.TrafficRoute{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootCreateActionWithOptions(trafficroutesResource, trafficRoute, opts), emptyResult)
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1alpha1.TrafficRoute), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a trafficRoute and updates it. Returns the server's representation of the trafficRoute, and an error, if there is any.
|
||||
func (c *FakeTrafficRoutes) Update(ctx context.Context, trafficRoute *v1alpha1.TrafficRoute, opts v1.UpdateOptions) (result *v1alpha1.TrafficRoute, err error) {
|
||||
emptyResult := &v1alpha1.TrafficRoute{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootUpdateActionWithOptions(trafficroutesResource, trafficRoute, opts), emptyResult)
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1alpha1.TrafficRoute), err
|
||||
}
|
||||
|
||||
// Delete takes name of the trafficRoute and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeTrafficRoutes) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewRootDeleteActionWithOptions(trafficroutesResource, name, opts), &v1alpha1.TrafficRoute{})
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeTrafficRoutes) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewRootDeleteCollectionActionWithOptions(trafficroutesResource, opts, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1alpha1.TrafficRouteList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched trafficRoute.
|
||||
func (c *FakeTrafficRoutes) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.TrafficRoute, err error) {
|
||||
emptyResult := &v1alpha1.TrafficRoute{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewRootPatchSubresourceActionWithOptions(trafficroutesResource, name, pt, data, opts, subresources...), emptyResult)
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1alpha1.TrafficRoute), err
|
||||
}
|
||||
|
||||
@@ -19,10 +19,10 @@ limitations under the License.
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
http "net/http"
|
||||
|
||||
v1alpha1 "github.com/fluxcd/flagger/pkg/apis/kuma/v1alpha1"
|
||||
"github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
kumav1alpha1 "github.com/fluxcd/flagger/pkg/apis/kuma/v1alpha1"
|
||||
scheme "github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
@@ -45,9 +45,7 @@ func (c *KumaV1alpha1Client) TrafficRoutes() TrafficRouteInterface {
|
||||
// where httpClient was generated with rest.HTTPClientFor(c).
|
||||
func NewForConfig(c *rest.Config) (*KumaV1alpha1Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
setConfigDefaults(&config)
|
||||
httpClient, err := rest.HTTPClientFor(&config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -59,9 +57,7 @@ func NewForConfig(c *rest.Config) (*KumaV1alpha1Client, error) {
|
||||
// Note the http client provided takes precedence over the configured transport values.
|
||||
func NewForConfigAndClient(c *rest.Config, h *http.Client) (*KumaV1alpha1Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
setConfigDefaults(&config)
|
||||
client, err := rest.RESTClientForConfigAndClient(&config, h)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -84,17 +80,15 @@ func New(c rest.Interface) *KumaV1alpha1Client {
|
||||
return &KumaV1alpha1Client{c}
|
||||
}
|
||||
|
||||
func setConfigDefaults(config *rest.Config) error {
|
||||
gv := v1alpha1.SchemeGroupVersion
|
||||
func setConfigDefaults(config *rest.Config) {
|
||||
gv := kumav1alpha1.SchemeGroupVersion
|
||||
config.GroupVersion = &gv
|
||||
config.APIPath = "/apis"
|
||||
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
|
||||
config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion()
|
||||
|
||||
if config.UserAgent == "" {
|
||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
|
||||
@@ -19,9 +19,9 @@ limitations under the License.
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"context"
|
||||
context "context"
|
||||
|
||||
v1alpha1 "github.com/fluxcd/flagger/pkg/apis/kuma/v1alpha1"
|
||||
kumav1alpha1 "github.com/fluxcd/flagger/pkg/apis/kuma/v1alpha1"
|
||||
scheme "github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
@@ -37,31 +37,32 @@ type TrafficRoutesGetter interface {
|
||||
|
||||
// TrafficRouteInterface has methods to work with TrafficRoute resources.
|
||||
type TrafficRouteInterface interface {
|
||||
Create(ctx context.Context, trafficRoute *v1alpha1.TrafficRoute, opts v1.CreateOptions) (*v1alpha1.TrafficRoute, error)
|
||||
Update(ctx context.Context, trafficRoute *v1alpha1.TrafficRoute, opts v1.UpdateOptions) (*v1alpha1.TrafficRoute, error)
|
||||
Create(ctx context.Context, trafficRoute *kumav1alpha1.TrafficRoute, opts v1.CreateOptions) (*kumav1alpha1.TrafficRoute, error)
|
||||
Update(ctx context.Context, trafficRoute *kumav1alpha1.TrafficRoute, opts v1.UpdateOptions) (*kumav1alpha1.TrafficRoute, error)
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.TrafficRoute, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.TrafficRouteList, error)
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*kumav1alpha1.TrafficRoute, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*kumav1alpha1.TrafficRouteList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.TrafficRoute, err error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *kumav1alpha1.TrafficRoute, err error)
|
||||
TrafficRouteExpansion
|
||||
}
|
||||
|
||||
// trafficRoutes implements TrafficRouteInterface
|
||||
type trafficRoutes struct {
|
||||
*gentype.ClientWithList[*v1alpha1.TrafficRoute, *v1alpha1.TrafficRouteList]
|
||||
*gentype.ClientWithList[*kumav1alpha1.TrafficRoute, *kumav1alpha1.TrafficRouteList]
|
||||
}
|
||||
|
||||
// newTrafficRoutes returns a TrafficRoutes
|
||||
func newTrafficRoutes(c *KumaV1alpha1Client) *trafficRoutes {
|
||||
return &trafficRoutes{
|
||||
gentype.NewClientWithList[*v1alpha1.TrafficRoute, *v1alpha1.TrafficRouteList](
|
||||
gentype.NewClientWithList[*kumav1alpha1.TrafficRoute, *kumav1alpha1.TrafficRouteList](
|
||||
"trafficroutes",
|
||||
c.RESTClient(),
|
||||
scheme.ParameterCodec,
|
||||
"",
|
||||
func() *v1alpha1.TrafficRoute { return &v1alpha1.TrafficRoute{} },
|
||||
func() *v1alpha1.TrafficRouteList { return &v1alpha1.TrafficRouteList{} }),
|
||||
func() *kumav1alpha1.TrafficRoute { return &kumav1alpha1.TrafficRoute{} },
|
||||
func() *kumav1alpha1.TrafficRouteList { return &kumav1alpha1.TrafficRouteList{} },
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,129 +19,30 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1 "github.com/fluxcd/flagger/pkg/apis/projectcontour/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
projectcontourv1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/projectcontour/v1"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
)
|
||||
|
||||
// FakeHTTPProxies implements HTTPProxyInterface
|
||||
type FakeHTTPProxies struct {
|
||||
// fakeHTTPProxies implements HTTPProxyInterface
|
||||
type fakeHTTPProxies struct {
|
||||
*gentype.FakeClientWithList[*v1.HTTPProxy, *v1.HTTPProxyList]
|
||||
Fake *FakeProjectcontourV1
|
||||
ns string
|
||||
}
|
||||
|
||||
var httpproxiesResource = v1.SchemeGroupVersion.WithResource("httpproxies")
|
||||
|
||||
var httpproxiesKind = v1.SchemeGroupVersion.WithKind("HTTPProxy")
|
||||
|
||||
// Get takes name of the hTTPProxy, and returns the corresponding hTTPProxy object, and an error if there is any.
|
||||
func (c *FakeHTTPProxies) Get(ctx context.Context, name string, options metav1.GetOptions) (result *v1.HTTPProxy, err error) {
|
||||
emptyResult := &v1.HTTPProxy{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetActionWithOptions(httpproxiesResource, c.ns, name, options), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
func newFakeHTTPProxies(fake *FakeProjectcontourV1, namespace string) projectcontourv1.HTTPProxyInterface {
|
||||
return &fakeHTTPProxies{
|
||||
gentype.NewFakeClientWithList[*v1.HTTPProxy, *v1.HTTPProxyList](
|
||||
fake.Fake,
|
||||
namespace,
|
||||
v1.SchemeGroupVersion.WithResource("httpproxies"),
|
||||
v1.SchemeGroupVersion.WithKind("HTTPProxy"),
|
||||
func() *v1.HTTPProxy { return &v1.HTTPProxy{} },
|
||||
func() *v1.HTTPProxyList { return &v1.HTTPProxyList{} },
|
||||
func(dst, src *v1.HTTPProxyList) { dst.ListMeta = src.ListMeta },
|
||||
func(list *v1.HTTPProxyList) []*v1.HTTPProxy { return gentype.ToPointerSlice(list.Items) },
|
||||
func(list *v1.HTTPProxyList, items []*v1.HTTPProxy) { list.Items = gentype.FromPointerSlice(items) },
|
||||
),
|
||||
fake,
|
||||
}
|
||||
return obj.(*v1.HTTPProxy), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of HTTPProxies that match those selectors.
|
||||
func (c *FakeHTTPProxies) List(ctx context.Context, opts metav1.ListOptions) (result *v1.HTTPProxyList, err error) {
|
||||
emptyResult := &v1.HTTPProxyList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListActionWithOptions(httpproxiesResource, httpproxiesKind, c.ns, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1.HTTPProxyList{ListMeta: obj.(*v1.HTTPProxyList).ListMeta}
|
||||
for _, item := range obj.(*v1.HTTPProxyList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested hTTPProxies.
|
||||
func (c *FakeHTTPProxies) Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchActionWithOptions(httpproxiesResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a hTTPProxy and creates it. Returns the server's representation of the hTTPProxy, and an error, if there is any.
|
||||
func (c *FakeHTTPProxies) Create(ctx context.Context, hTTPProxy *v1.HTTPProxy, opts metav1.CreateOptions) (result *v1.HTTPProxy, err error) {
|
||||
emptyResult := &v1.HTTPProxy{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateActionWithOptions(httpproxiesResource, c.ns, hTTPProxy, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1.HTTPProxy), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a hTTPProxy and updates it. Returns the server's representation of the hTTPProxy, and an error, if there is any.
|
||||
func (c *FakeHTTPProxies) Update(ctx context.Context, hTTPProxy *v1.HTTPProxy, opts metav1.UpdateOptions) (result *v1.HTTPProxy, err error) {
|
||||
emptyResult := &v1.HTTPProxy{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateActionWithOptions(httpproxiesResource, c.ns, hTTPProxy, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1.HTTPProxy), err
|
||||
}
|
||||
|
||||
// UpdateStatus was generated because the type contains a Status member.
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
func (c *FakeHTTPProxies) UpdateStatus(ctx context.Context, hTTPProxy *v1.HTTPProxy, opts metav1.UpdateOptions) (result *v1.HTTPProxy, err error) {
|
||||
emptyResult := &v1.HTTPProxy{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateSubresourceActionWithOptions(httpproxiesResource, "status", c.ns, hTTPProxy, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1.HTTPProxy), err
|
||||
}
|
||||
|
||||
// Delete takes name of the hTTPProxy and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeHTTPProxies) Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteActionWithOptions(httpproxiesResource, c.ns, name, opts), &v1.HTTPProxy{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeHTTPProxies) DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionActionWithOptions(httpproxiesResource, c.ns, opts, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1.HTTPProxyList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched hTTPProxy.
|
||||
func (c *FakeHTTPProxies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.HTTPProxy, err error) {
|
||||
emptyResult := &v1.HTTPProxy{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceActionWithOptions(httpproxiesResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1.HTTPProxy), err
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ type FakeProjectcontourV1 struct {
|
||||
}
|
||||
|
||||
func (c *FakeProjectcontourV1) HTTPProxies(namespace string) v1.HTTPProxyInterface {
|
||||
return &FakeHTTPProxies{c, namespace}
|
||||
return newFakeHTTPProxies(c, namespace)
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
|
||||
@@ -19,9 +19,9 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
context "context"
|
||||
|
||||
v1 "github.com/fluxcd/flagger/pkg/apis/projectcontour/v1"
|
||||
projectcontourv1 "github.com/fluxcd/flagger/pkg/apis/projectcontour/v1"
|
||||
scheme "github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
@@ -37,33 +37,34 @@ type HTTPProxiesGetter interface {
|
||||
|
||||
// HTTPProxyInterface has methods to work with HTTPProxy resources.
|
||||
type HTTPProxyInterface interface {
|
||||
Create(ctx context.Context, hTTPProxy *v1.HTTPProxy, opts metav1.CreateOptions) (*v1.HTTPProxy, error)
|
||||
Update(ctx context.Context, hTTPProxy *v1.HTTPProxy, opts metav1.UpdateOptions) (*v1.HTTPProxy, error)
|
||||
Create(ctx context.Context, hTTPProxy *projectcontourv1.HTTPProxy, opts metav1.CreateOptions) (*projectcontourv1.HTTPProxy, error)
|
||||
Update(ctx context.Context, hTTPProxy *projectcontourv1.HTTPProxy, opts metav1.UpdateOptions) (*projectcontourv1.HTTPProxy, error)
|
||||
// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
|
||||
UpdateStatus(ctx context.Context, hTTPProxy *v1.HTTPProxy, opts metav1.UpdateOptions) (*v1.HTTPProxy, error)
|
||||
UpdateStatus(ctx context.Context, hTTPProxy *projectcontourv1.HTTPProxy, opts metav1.UpdateOptions) (*projectcontourv1.HTTPProxy, error)
|
||||
Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts metav1.GetOptions) (*v1.HTTPProxy, error)
|
||||
List(ctx context.Context, opts metav1.ListOptions) (*v1.HTTPProxyList, error)
|
||||
Get(ctx context.Context, name string, opts metav1.GetOptions) (*projectcontourv1.HTTPProxy, error)
|
||||
List(ctx context.Context, opts metav1.ListOptions) (*projectcontourv1.HTTPProxyList, error)
|
||||
Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *v1.HTTPProxy, err error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *projectcontourv1.HTTPProxy, err error)
|
||||
HTTPProxyExpansion
|
||||
}
|
||||
|
||||
// hTTPProxies implements HTTPProxyInterface
|
||||
type hTTPProxies struct {
|
||||
*gentype.ClientWithList[*v1.HTTPProxy, *v1.HTTPProxyList]
|
||||
*gentype.ClientWithList[*projectcontourv1.HTTPProxy, *projectcontourv1.HTTPProxyList]
|
||||
}
|
||||
|
||||
// newHTTPProxies returns a HTTPProxies
|
||||
func newHTTPProxies(c *ProjectcontourV1Client, namespace string) *hTTPProxies {
|
||||
return &hTTPProxies{
|
||||
gentype.NewClientWithList[*v1.HTTPProxy, *v1.HTTPProxyList](
|
||||
gentype.NewClientWithList[*projectcontourv1.HTTPProxy, *projectcontourv1.HTTPProxyList](
|
||||
"httpproxies",
|
||||
c.RESTClient(),
|
||||
scheme.ParameterCodec,
|
||||
namespace,
|
||||
func() *v1.HTTPProxy { return &v1.HTTPProxy{} },
|
||||
func() *v1.HTTPProxyList { return &v1.HTTPProxyList{} }),
|
||||
func() *projectcontourv1.HTTPProxy { return &projectcontourv1.HTTPProxy{} },
|
||||
func() *projectcontourv1.HTTPProxyList { return &projectcontourv1.HTTPProxyList{} },
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,10 +19,10 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
http "net/http"
|
||||
|
||||
v1 "github.com/fluxcd/flagger/pkg/apis/projectcontour/v1"
|
||||
"github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
projectcontourv1 "github.com/fluxcd/flagger/pkg/apis/projectcontour/v1"
|
||||
scheme "github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
@@ -45,9 +45,7 @@ func (c *ProjectcontourV1Client) HTTPProxies(namespace string) HTTPProxyInterfac
|
||||
// where httpClient was generated with rest.HTTPClientFor(c).
|
||||
func NewForConfig(c *rest.Config) (*ProjectcontourV1Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
setConfigDefaults(&config)
|
||||
httpClient, err := rest.HTTPClientFor(&config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -59,9 +57,7 @@ func NewForConfig(c *rest.Config) (*ProjectcontourV1Client, error) {
|
||||
// Note the http client provided takes precedence over the configured transport values.
|
||||
func NewForConfigAndClient(c *rest.Config, h *http.Client) (*ProjectcontourV1Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
setConfigDefaults(&config)
|
||||
client, err := rest.RESTClientForConfigAndClient(&config, h)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -84,17 +80,15 @@ func New(c rest.Interface) *ProjectcontourV1Client {
|
||||
return &ProjectcontourV1Client{c}
|
||||
}
|
||||
|
||||
func setConfigDefaults(config *rest.Config) error {
|
||||
gv := v1.SchemeGroupVersion
|
||||
func setConfigDefaults(config *rest.Config) {
|
||||
gv := projectcontourv1.SchemeGroupVersion
|
||||
config.GroupVersion = &gv
|
||||
config.APIPath = "/apis"
|
||||
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
|
||||
config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion()
|
||||
|
||||
if config.UserAgent == "" {
|
||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
|
||||
@@ -29,7 +29,7 @@ type FakeSplitV1alpha1 struct {
|
||||
}
|
||||
|
||||
func (c *FakeSplitV1alpha1) TrafficSplits(namespace string) v1alpha1.TrafficSplitInterface {
|
||||
return &FakeTrafficSplits{c, namespace}
|
||||
return newFakeTrafficSplits(c, namespace)
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
|
||||
@@ -19,116 +19,34 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1alpha1 "github.com/fluxcd/flagger/pkg/apis/smi/v1alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
smiv1alpha1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/smi/v1alpha1"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
)
|
||||
|
||||
// FakeTrafficSplits implements TrafficSplitInterface
|
||||
type FakeTrafficSplits struct {
|
||||
// fakeTrafficSplits implements TrafficSplitInterface
|
||||
type fakeTrafficSplits struct {
|
||||
*gentype.FakeClientWithList[*v1alpha1.TrafficSplit, *v1alpha1.TrafficSplitList]
|
||||
Fake *FakeSplitV1alpha1
|
||||
ns string
|
||||
}
|
||||
|
||||
var trafficsplitsResource = v1alpha1.SchemeGroupVersion.WithResource("trafficsplits")
|
||||
|
||||
var trafficsplitsKind = v1alpha1.SchemeGroupVersion.WithKind("TrafficSplit")
|
||||
|
||||
// Get takes name of the trafficSplit, and returns the corresponding trafficSplit object, and an error if there is any.
|
||||
func (c *FakeTrafficSplits) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.TrafficSplit, err error) {
|
||||
emptyResult := &v1alpha1.TrafficSplit{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetActionWithOptions(trafficsplitsResource, c.ns, name, options), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
func newFakeTrafficSplits(fake *FakeSplitV1alpha1, namespace string) smiv1alpha1.TrafficSplitInterface {
|
||||
return &fakeTrafficSplits{
|
||||
gentype.NewFakeClientWithList[*v1alpha1.TrafficSplit, *v1alpha1.TrafficSplitList](
|
||||
fake.Fake,
|
||||
namespace,
|
||||
v1alpha1.SchemeGroupVersion.WithResource("trafficsplits"),
|
||||
v1alpha1.SchemeGroupVersion.WithKind("TrafficSplit"),
|
||||
func() *v1alpha1.TrafficSplit { return &v1alpha1.TrafficSplit{} },
|
||||
func() *v1alpha1.TrafficSplitList { return &v1alpha1.TrafficSplitList{} },
|
||||
func(dst, src *v1alpha1.TrafficSplitList) { dst.ListMeta = src.ListMeta },
|
||||
func(list *v1alpha1.TrafficSplitList) []*v1alpha1.TrafficSplit {
|
||||
return gentype.ToPointerSlice(list.Items)
|
||||
},
|
||||
func(list *v1alpha1.TrafficSplitList, items []*v1alpha1.TrafficSplit) {
|
||||
list.Items = gentype.FromPointerSlice(items)
|
||||
},
|
||||
),
|
||||
fake,
|
||||
}
|
||||
return obj.(*v1alpha1.TrafficSplit), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of TrafficSplits that match those selectors.
|
||||
func (c *FakeTrafficSplits) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.TrafficSplitList, err error) {
|
||||
emptyResult := &v1alpha1.TrafficSplitList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListActionWithOptions(trafficsplitsResource, trafficsplitsKind, c.ns, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha1.TrafficSplitList{ListMeta: obj.(*v1alpha1.TrafficSplitList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha1.TrafficSplitList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested trafficSplits.
|
||||
func (c *FakeTrafficSplits) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchActionWithOptions(trafficsplitsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a trafficSplit and creates it. Returns the server's representation of the trafficSplit, and an error, if there is any.
|
||||
func (c *FakeTrafficSplits) Create(ctx context.Context, trafficSplit *v1alpha1.TrafficSplit, opts v1.CreateOptions) (result *v1alpha1.TrafficSplit, err error) {
|
||||
emptyResult := &v1alpha1.TrafficSplit{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateActionWithOptions(trafficsplitsResource, c.ns, trafficSplit, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1alpha1.TrafficSplit), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a trafficSplit and updates it. Returns the server's representation of the trafficSplit, and an error, if there is any.
|
||||
func (c *FakeTrafficSplits) Update(ctx context.Context, trafficSplit *v1alpha1.TrafficSplit, opts v1.UpdateOptions) (result *v1alpha1.TrafficSplit, err error) {
|
||||
emptyResult := &v1alpha1.TrafficSplit{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateActionWithOptions(trafficsplitsResource, c.ns, trafficSplit, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1alpha1.TrafficSplit), err
|
||||
}
|
||||
|
||||
// Delete takes name of the trafficSplit and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeTrafficSplits) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteActionWithOptions(trafficsplitsResource, c.ns, name, opts), &v1alpha1.TrafficSplit{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeTrafficSplits) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionActionWithOptions(trafficsplitsResource, c.ns, opts, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1alpha1.TrafficSplitList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched trafficSplit.
|
||||
func (c *FakeTrafficSplits) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.TrafficSplit, err error) {
|
||||
emptyResult := &v1alpha1.TrafficSplit{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceActionWithOptions(trafficsplitsResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1alpha1.TrafficSplit), err
|
||||
}
|
||||
|
||||
@@ -19,10 +19,10 @@ limitations under the License.
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
http "net/http"
|
||||
|
||||
v1alpha1 "github.com/fluxcd/flagger/pkg/apis/smi/v1alpha1"
|
||||
"github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
smiv1alpha1 "github.com/fluxcd/flagger/pkg/apis/smi/v1alpha1"
|
||||
scheme "github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
@@ -45,9 +45,7 @@ func (c *SplitV1alpha1Client) TrafficSplits(namespace string) TrafficSplitInterf
|
||||
// where httpClient was generated with rest.HTTPClientFor(c).
|
||||
func NewForConfig(c *rest.Config) (*SplitV1alpha1Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
setConfigDefaults(&config)
|
||||
httpClient, err := rest.HTTPClientFor(&config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -59,9 +57,7 @@ func NewForConfig(c *rest.Config) (*SplitV1alpha1Client, error) {
|
||||
// Note the http client provided takes precedence over the configured transport values.
|
||||
func NewForConfigAndClient(c *rest.Config, h *http.Client) (*SplitV1alpha1Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
setConfigDefaults(&config)
|
||||
client, err := rest.RESTClientForConfigAndClient(&config, h)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -84,17 +80,15 @@ func New(c rest.Interface) *SplitV1alpha1Client {
|
||||
return &SplitV1alpha1Client{c}
|
||||
}
|
||||
|
||||
func setConfigDefaults(config *rest.Config) error {
|
||||
gv := v1alpha1.SchemeGroupVersion
|
||||
func setConfigDefaults(config *rest.Config) {
|
||||
gv := smiv1alpha1.SchemeGroupVersion
|
||||
config.GroupVersion = &gv
|
||||
config.APIPath = "/apis"
|
||||
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
|
||||
config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion()
|
||||
|
||||
if config.UserAgent == "" {
|
||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
|
||||
@@ -19,9 +19,9 @@ limitations under the License.
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"context"
|
||||
context "context"
|
||||
|
||||
v1alpha1 "github.com/fluxcd/flagger/pkg/apis/smi/v1alpha1"
|
||||
smiv1alpha1 "github.com/fluxcd/flagger/pkg/apis/smi/v1alpha1"
|
||||
scheme "github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
@@ -37,31 +37,32 @@ type TrafficSplitsGetter interface {
|
||||
|
||||
// TrafficSplitInterface has methods to work with TrafficSplit resources.
|
||||
type TrafficSplitInterface interface {
|
||||
Create(ctx context.Context, trafficSplit *v1alpha1.TrafficSplit, opts v1.CreateOptions) (*v1alpha1.TrafficSplit, error)
|
||||
Update(ctx context.Context, trafficSplit *v1alpha1.TrafficSplit, opts v1.UpdateOptions) (*v1alpha1.TrafficSplit, error)
|
||||
Create(ctx context.Context, trafficSplit *smiv1alpha1.TrafficSplit, opts v1.CreateOptions) (*smiv1alpha1.TrafficSplit, error)
|
||||
Update(ctx context.Context, trafficSplit *smiv1alpha1.TrafficSplit, opts v1.UpdateOptions) (*smiv1alpha1.TrafficSplit, error)
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.TrafficSplit, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.TrafficSplitList, error)
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*smiv1alpha1.TrafficSplit, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*smiv1alpha1.TrafficSplitList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.TrafficSplit, err error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *smiv1alpha1.TrafficSplit, err error)
|
||||
TrafficSplitExpansion
|
||||
}
|
||||
|
||||
// trafficSplits implements TrafficSplitInterface
|
||||
type trafficSplits struct {
|
||||
*gentype.ClientWithList[*v1alpha1.TrafficSplit, *v1alpha1.TrafficSplitList]
|
||||
*gentype.ClientWithList[*smiv1alpha1.TrafficSplit, *smiv1alpha1.TrafficSplitList]
|
||||
}
|
||||
|
||||
// newTrafficSplits returns a TrafficSplits
|
||||
func newTrafficSplits(c *SplitV1alpha1Client, namespace string) *trafficSplits {
|
||||
return &trafficSplits{
|
||||
gentype.NewClientWithList[*v1alpha1.TrafficSplit, *v1alpha1.TrafficSplitList](
|
||||
gentype.NewClientWithList[*smiv1alpha1.TrafficSplit, *smiv1alpha1.TrafficSplitList](
|
||||
"trafficsplits",
|
||||
c.RESTClient(),
|
||||
scheme.ParameterCodec,
|
||||
namespace,
|
||||
func() *v1alpha1.TrafficSplit { return &v1alpha1.TrafficSplit{} },
|
||||
func() *v1alpha1.TrafficSplitList { return &v1alpha1.TrafficSplitList{} }),
|
||||
func() *smiv1alpha1.TrafficSplit { return &smiv1alpha1.TrafficSplit{} },
|
||||
func() *smiv1alpha1.TrafficSplitList { return &smiv1alpha1.TrafficSplitList{} },
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ type FakeSplitV1alpha2 struct {
|
||||
}
|
||||
|
||||
func (c *FakeSplitV1alpha2) TrafficSplits(namespace string) v1alpha2.TrafficSplitInterface {
|
||||
return &FakeTrafficSplits{c, namespace}
|
||||
return newFakeTrafficSplits(c, namespace)
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
|
||||
@@ -19,116 +19,34 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1alpha2 "github.com/fluxcd/flagger/pkg/apis/smi/v1alpha2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
smiv1alpha2 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/smi/v1alpha2"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
)
|
||||
|
||||
// FakeTrafficSplits implements TrafficSplitInterface
|
||||
type FakeTrafficSplits struct {
|
||||
// fakeTrafficSplits implements TrafficSplitInterface
|
||||
type fakeTrafficSplits struct {
|
||||
*gentype.FakeClientWithList[*v1alpha2.TrafficSplit, *v1alpha2.TrafficSplitList]
|
||||
Fake *FakeSplitV1alpha2
|
||||
ns string
|
||||
}
|
||||
|
||||
var trafficsplitsResource = v1alpha2.SchemeGroupVersion.WithResource("trafficsplits")
|
||||
|
||||
var trafficsplitsKind = v1alpha2.SchemeGroupVersion.WithKind("TrafficSplit")
|
||||
|
||||
// Get takes name of the trafficSplit, and returns the corresponding trafficSplit object, and an error if there is any.
|
||||
func (c *FakeTrafficSplits) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha2.TrafficSplit, err error) {
|
||||
emptyResult := &v1alpha2.TrafficSplit{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetActionWithOptions(trafficsplitsResource, c.ns, name, options), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
func newFakeTrafficSplits(fake *FakeSplitV1alpha2, namespace string) smiv1alpha2.TrafficSplitInterface {
|
||||
return &fakeTrafficSplits{
|
||||
gentype.NewFakeClientWithList[*v1alpha2.TrafficSplit, *v1alpha2.TrafficSplitList](
|
||||
fake.Fake,
|
||||
namespace,
|
||||
v1alpha2.SchemeGroupVersion.WithResource("trafficsplits"),
|
||||
v1alpha2.SchemeGroupVersion.WithKind("TrafficSplit"),
|
||||
func() *v1alpha2.TrafficSplit { return &v1alpha2.TrafficSplit{} },
|
||||
func() *v1alpha2.TrafficSplitList { return &v1alpha2.TrafficSplitList{} },
|
||||
func(dst, src *v1alpha2.TrafficSplitList) { dst.ListMeta = src.ListMeta },
|
||||
func(list *v1alpha2.TrafficSplitList) []*v1alpha2.TrafficSplit {
|
||||
return gentype.ToPointerSlice(list.Items)
|
||||
},
|
||||
func(list *v1alpha2.TrafficSplitList, items []*v1alpha2.TrafficSplit) {
|
||||
list.Items = gentype.FromPointerSlice(items)
|
||||
},
|
||||
),
|
||||
fake,
|
||||
}
|
||||
return obj.(*v1alpha2.TrafficSplit), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of TrafficSplits that match those selectors.
|
||||
func (c *FakeTrafficSplits) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha2.TrafficSplitList, err error) {
|
||||
emptyResult := &v1alpha2.TrafficSplitList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListActionWithOptions(trafficsplitsResource, trafficsplitsKind, c.ns, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha2.TrafficSplitList{ListMeta: obj.(*v1alpha2.TrafficSplitList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha2.TrafficSplitList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested trafficSplits.
|
||||
func (c *FakeTrafficSplits) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchActionWithOptions(trafficsplitsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a trafficSplit and creates it. Returns the server's representation of the trafficSplit, and an error, if there is any.
|
||||
func (c *FakeTrafficSplits) Create(ctx context.Context, trafficSplit *v1alpha2.TrafficSplit, opts v1.CreateOptions) (result *v1alpha2.TrafficSplit, err error) {
|
||||
emptyResult := &v1alpha2.TrafficSplit{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateActionWithOptions(trafficsplitsResource, c.ns, trafficSplit, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1alpha2.TrafficSplit), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a trafficSplit and updates it. Returns the server's representation of the trafficSplit, and an error, if there is any.
|
||||
func (c *FakeTrafficSplits) Update(ctx context.Context, trafficSplit *v1alpha2.TrafficSplit, opts v1.UpdateOptions) (result *v1alpha2.TrafficSplit, err error) {
|
||||
emptyResult := &v1alpha2.TrafficSplit{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateActionWithOptions(trafficsplitsResource, c.ns, trafficSplit, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1alpha2.TrafficSplit), err
|
||||
}
|
||||
|
||||
// Delete takes name of the trafficSplit and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeTrafficSplits) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteActionWithOptions(trafficsplitsResource, c.ns, name, opts), &v1alpha2.TrafficSplit{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeTrafficSplits) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionActionWithOptions(trafficsplitsResource, c.ns, opts, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1alpha2.TrafficSplitList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched trafficSplit.
|
||||
func (c *FakeTrafficSplits) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.TrafficSplit, err error) {
|
||||
emptyResult := &v1alpha2.TrafficSplit{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceActionWithOptions(trafficsplitsResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1alpha2.TrafficSplit), err
|
||||
}
|
||||
|
||||
@@ -19,10 +19,10 @@ limitations under the License.
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
http "net/http"
|
||||
|
||||
v1alpha2 "github.com/fluxcd/flagger/pkg/apis/smi/v1alpha2"
|
||||
"github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
smiv1alpha2 "github.com/fluxcd/flagger/pkg/apis/smi/v1alpha2"
|
||||
scheme "github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
@@ -45,9 +45,7 @@ func (c *SplitV1alpha2Client) TrafficSplits(namespace string) TrafficSplitInterf
|
||||
// where httpClient was generated with rest.HTTPClientFor(c).
|
||||
func NewForConfig(c *rest.Config) (*SplitV1alpha2Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
setConfigDefaults(&config)
|
||||
httpClient, err := rest.HTTPClientFor(&config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -59,9 +57,7 @@ func NewForConfig(c *rest.Config) (*SplitV1alpha2Client, error) {
|
||||
// Note the http client provided takes precedence over the configured transport values.
|
||||
func NewForConfigAndClient(c *rest.Config, h *http.Client) (*SplitV1alpha2Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
setConfigDefaults(&config)
|
||||
client, err := rest.RESTClientForConfigAndClient(&config, h)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -84,17 +80,15 @@ func New(c rest.Interface) *SplitV1alpha2Client {
|
||||
return &SplitV1alpha2Client{c}
|
||||
}
|
||||
|
||||
func setConfigDefaults(config *rest.Config) error {
|
||||
gv := v1alpha2.SchemeGroupVersion
|
||||
func setConfigDefaults(config *rest.Config) {
|
||||
gv := smiv1alpha2.SchemeGroupVersion
|
||||
config.GroupVersion = &gv
|
||||
config.APIPath = "/apis"
|
||||
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
|
||||
config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion()
|
||||
|
||||
if config.UserAgent == "" {
|
||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
|
||||
@@ -19,9 +19,9 @@ limitations under the License.
|
||||
package v1alpha2
|
||||
|
||||
import (
|
||||
"context"
|
||||
context "context"
|
||||
|
||||
v1alpha2 "github.com/fluxcd/flagger/pkg/apis/smi/v1alpha2"
|
||||
smiv1alpha2 "github.com/fluxcd/flagger/pkg/apis/smi/v1alpha2"
|
||||
scheme "github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
@@ -37,31 +37,32 @@ type TrafficSplitsGetter interface {
|
||||
|
||||
// TrafficSplitInterface has methods to work with TrafficSplit resources.
|
||||
type TrafficSplitInterface interface {
|
||||
Create(ctx context.Context, trafficSplit *v1alpha2.TrafficSplit, opts v1.CreateOptions) (*v1alpha2.TrafficSplit, error)
|
||||
Update(ctx context.Context, trafficSplit *v1alpha2.TrafficSplit, opts v1.UpdateOptions) (*v1alpha2.TrafficSplit, error)
|
||||
Create(ctx context.Context, trafficSplit *smiv1alpha2.TrafficSplit, opts v1.CreateOptions) (*smiv1alpha2.TrafficSplit, error)
|
||||
Update(ctx context.Context, trafficSplit *smiv1alpha2.TrafficSplit, opts v1.UpdateOptions) (*smiv1alpha2.TrafficSplit, error)
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha2.TrafficSplit, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1alpha2.TrafficSplitList, error)
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*smiv1alpha2.TrafficSplit, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*smiv1alpha2.TrafficSplitList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha2.TrafficSplit, err error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *smiv1alpha2.TrafficSplit, err error)
|
||||
TrafficSplitExpansion
|
||||
}
|
||||
|
||||
// trafficSplits implements TrafficSplitInterface
|
||||
type trafficSplits struct {
|
||||
*gentype.ClientWithList[*v1alpha2.TrafficSplit, *v1alpha2.TrafficSplitList]
|
||||
*gentype.ClientWithList[*smiv1alpha2.TrafficSplit, *smiv1alpha2.TrafficSplitList]
|
||||
}
|
||||
|
||||
// newTrafficSplits returns a TrafficSplits
|
||||
func newTrafficSplits(c *SplitV1alpha2Client, namespace string) *trafficSplits {
|
||||
return &trafficSplits{
|
||||
gentype.NewClientWithList[*v1alpha2.TrafficSplit, *v1alpha2.TrafficSplitList](
|
||||
gentype.NewClientWithList[*smiv1alpha2.TrafficSplit, *smiv1alpha2.TrafficSplitList](
|
||||
"trafficsplits",
|
||||
c.RESTClient(),
|
||||
scheme.ParameterCodec,
|
||||
namespace,
|
||||
func() *v1alpha2.TrafficSplit { return &v1alpha2.TrafficSplit{} },
|
||||
func() *v1alpha2.TrafficSplitList { return &v1alpha2.TrafficSplitList{} }),
|
||||
func() *smiv1alpha2.TrafficSplit { return &smiv1alpha2.TrafficSplit{} },
|
||||
func() *smiv1alpha2.TrafficSplitList { return &smiv1alpha2.TrafficSplitList{} },
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ type FakeSplitV1alpha3 struct {
|
||||
}
|
||||
|
||||
func (c *FakeSplitV1alpha3) TrafficSplits(namespace string) v1alpha3.TrafficSplitInterface {
|
||||
return &FakeTrafficSplits{c, namespace}
|
||||
return newFakeTrafficSplits(c, namespace)
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
|
||||
@@ -19,116 +19,34 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1alpha3 "github.com/fluxcd/flagger/pkg/apis/smi/v1alpha3"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
smiv1alpha3 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/smi/v1alpha3"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
)
|
||||
|
||||
// FakeTrafficSplits implements TrafficSplitInterface
|
||||
type FakeTrafficSplits struct {
|
||||
// fakeTrafficSplits implements TrafficSplitInterface
|
||||
type fakeTrafficSplits struct {
|
||||
*gentype.FakeClientWithList[*v1alpha3.TrafficSplit, *v1alpha3.TrafficSplitList]
|
||||
Fake *FakeSplitV1alpha3
|
||||
ns string
|
||||
}
|
||||
|
||||
var trafficsplitsResource = v1alpha3.SchemeGroupVersion.WithResource("trafficsplits")
|
||||
|
||||
var trafficsplitsKind = v1alpha3.SchemeGroupVersion.WithKind("TrafficSplit")
|
||||
|
||||
// Get takes name of the trafficSplit, and returns the corresponding trafficSplit object, and an error if there is any.
|
||||
func (c *FakeTrafficSplits) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha3.TrafficSplit, err error) {
|
||||
emptyResult := &v1alpha3.TrafficSplit{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetActionWithOptions(trafficsplitsResource, c.ns, name, options), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
func newFakeTrafficSplits(fake *FakeSplitV1alpha3, namespace string) smiv1alpha3.TrafficSplitInterface {
|
||||
return &fakeTrafficSplits{
|
||||
gentype.NewFakeClientWithList[*v1alpha3.TrafficSplit, *v1alpha3.TrafficSplitList](
|
||||
fake.Fake,
|
||||
namespace,
|
||||
v1alpha3.SchemeGroupVersion.WithResource("trafficsplits"),
|
||||
v1alpha3.SchemeGroupVersion.WithKind("TrafficSplit"),
|
||||
func() *v1alpha3.TrafficSplit { return &v1alpha3.TrafficSplit{} },
|
||||
func() *v1alpha3.TrafficSplitList { return &v1alpha3.TrafficSplitList{} },
|
||||
func(dst, src *v1alpha3.TrafficSplitList) { dst.ListMeta = src.ListMeta },
|
||||
func(list *v1alpha3.TrafficSplitList) []*v1alpha3.TrafficSplit {
|
||||
return gentype.ToPointerSlice(list.Items)
|
||||
},
|
||||
func(list *v1alpha3.TrafficSplitList, items []*v1alpha3.TrafficSplit) {
|
||||
list.Items = gentype.FromPointerSlice(items)
|
||||
},
|
||||
),
|
||||
fake,
|
||||
}
|
||||
return obj.(*v1alpha3.TrafficSplit), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of TrafficSplits that match those selectors.
|
||||
func (c *FakeTrafficSplits) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha3.TrafficSplitList, err error) {
|
||||
emptyResult := &v1alpha3.TrafficSplitList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListActionWithOptions(trafficsplitsResource, trafficsplitsKind, c.ns, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha3.TrafficSplitList{ListMeta: obj.(*v1alpha3.TrafficSplitList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha3.TrafficSplitList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested trafficSplits.
|
||||
func (c *FakeTrafficSplits) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchActionWithOptions(trafficsplitsResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a trafficSplit and creates it. Returns the server's representation of the trafficSplit, and an error, if there is any.
|
||||
func (c *FakeTrafficSplits) Create(ctx context.Context, trafficSplit *v1alpha3.TrafficSplit, opts v1.CreateOptions) (result *v1alpha3.TrafficSplit, err error) {
|
||||
emptyResult := &v1alpha3.TrafficSplit{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateActionWithOptions(trafficsplitsResource, c.ns, trafficSplit, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1alpha3.TrafficSplit), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a trafficSplit and updates it. Returns the server's representation of the trafficSplit, and an error, if there is any.
|
||||
func (c *FakeTrafficSplits) Update(ctx context.Context, trafficSplit *v1alpha3.TrafficSplit, opts v1.UpdateOptions) (result *v1alpha3.TrafficSplit, err error) {
|
||||
emptyResult := &v1alpha3.TrafficSplit{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateActionWithOptions(trafficsplitsResource, c.ns, trafficSplit, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1alpha3.TrafficSplit), err
|
||||
}
|
||||
|
||||
// Delete takes name of the trafficSplit and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeTrafficSplits) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteActionWithOptions(trafficsplitsResource, c.ns, name, opts), &v1alpha3.TrafficSplit{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeTrafficSplits) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionActionWithOptions(trafficsplitsResource, c.ns, opts, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1alpha3.TrafficSplitList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched trafficSplit.
|
||||
func (c *FakeTrafficSplits) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.TrafficSplit, err error) {
|
||||
emptyResult := &v1alpha3.TrafficSplit{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceActionWithOptions(trafficsplitsResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1alpha3.TrafficSplit), err
|
||||
}
|
||||
|
||||
@@ -19,10 +19,10 @@ limitations under the License.
|
||||
package v1alpha3
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
http "net/http"
|
||||
|
||||
v1alpha3 "github.com/fluxcd/flagger/pkg/apis/smi/v1alpha3"
|
||||
"github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
smiv1alpha3 "github.com/fluxcd/flagger/pkg/apis/smi/v1alpha3"
|
||||
scheme "github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
@@ -45,9 +45,7 @@ func (c *SplitV1alpha3Client) TrafficSplits(namespace string) TrafficSplitInterf
|
||||
// where httpClient was generated with rest.HTTPClientFor(c).
|
||||
func NewForConfig(c *rest.Config) (*SplitV1alpha3Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
setConfigDefaults(&config)
|
||||
httpClient, err := rest.HTTPClientFor(&config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -59,9 +57,7 @@ func NewForConfig(c *rest.Config) (*SplitV1alpha3Client, error) {
|
||||
// Note the http client provided takes precedence over the configured transport values.
|
||||
func NewForConfigAndClient(c *rest.Config, h *http.Client) (*SplitV1alpha3Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
setConfigDefaults(&config)
|
||||
client, err := rest.RESTClientForConfigAndClient(&config, h)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -84,17 +80,15 @@ func New(c rest.Interface) *SplitV1alpha3Client {
|
||||
return &SplitV1alpha3Client{c}
|
||||
}
|
||||
|
||||
func setConfigDefaults(config *rest.Config) error {
|
||||
gv := v1alpha3.SchemeGroupVersion
|
||||
func setConfigDefaults(config *rest.Config) {
|
||||
gv := smiv1alpha3.SchemeGroupVersion
|
||||
config.GroupVersion = &gv
|
||||
config.APIPath = "/apis"
|
||||
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
|
||||
config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion()
|
||||
|
||||
if config.UserAgent == "" {
|
||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
|
||||
@@ -19,9 +19,9 @@ limitations under the License.
|
||||
package v1alpha3
|
||||
|
||||
import (
|
||||
"context"
|
||||
context "context"
|
||||
|
||||
v1alpha3 "github.com/fluxcd/flagger/pkg/apis/smi/v1alpha3"
|
||||
smiv1alpha3 "github.com/fluxcd/flagger/pkg/apis/smi/v1alpha3"
|
||||
scheme "github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
@@ -37,31 +37,32 @@ type TrafficSplitsGetter interface {
|
||||
|
||||
// TrafficSplitInterface has methods to work with TrafficSplit resources.
|
||||
type TrafficSplitInterface interface {
|
||||
Create(ctx context.Context, trafficSplit *v1alpha3.TrafficSplit, opts v1.CreateOptions) (*v1alpha3.TrafficSplit, error)
|
||||
Update(ctx context.Context, trafficSplit *v1alpha3.TrafficSplit, opts v1.UpdateOptions) (*v1alpha3.TrafficSplit, error)
|
||||
Create(ctx context.Context, trafficSplit *smiv1alpha3.TrafficSplit, opts v1.CreateOptions) (*smiv1alpha3.TrafficSplit, error)
|
||||
Update(ctx context.Context, trafficSplit *smiv1alpha3.TrafficSplit, opts v1.UpdateOptions) (*smiv1alpha3.TrafficSplit, error)
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha3.TrafficSplit, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1alpha3.TrafficSplitList, error)
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*smiv1alpha3.TrafficSplit, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*smiv1alpha3.TrafficSplitList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha3.TrafficSplit, err error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *smiv1alpha3.TrafficSplit, err error)
|
||||
TrafficSplitExpansion
|
||||
}
|
||||
|
||||
// trafficSplits implements TrafficSplitInterface
|
||||
type trafficSplits struct {
|
||||
*gentype.ClientWithList[*v1alpha3.TrafficSplit, *v1alpha3.TrafficSplitList]
|
||||
*gentype.ClientWithList[*smiv1alpha3.TrafficSplit, *smiv1alpha3.TrafficSplitList]
|
||||
}
|
||||
|
||||
// newTrafficSplits returns a TrafficSplits
|
||||
func newTrafficSplits(c *SplitV1alpha3Client, namespace string) *trafficSplits {
|
||||
return &trafficSplits{
|
||||
gentype.NewClientWithList[*v1alpha3.TrafficSplit, *v1alpha3.TrafficSplitList](
|
||||
gentype.NewClientWithList[*smiv1alpha3.TrafficSplit, *smiv1alpha3.TrafficSplitList](
|
||||
"trafficsplits",
|
||||
c.RESTClient(),
|
||||
scheme.ParameterCodec,
|
||||
namespace,
|
||||
func() *v1alpha3.TrafficSplit { return &v1alpha3.TrafficSplit{} },
|
||||
func() *v1alpha3.TrafficSplitList { return &v1alpha3.TrafficSplitList{} }),
|
||||
func() *smiv1alpha3.TrafficSplit { return &smiv1alpha3.TrafficSplit{} },
|
||||
func() *smiv1alpha3.TrafficSplitList { return &smiv1alpha3.TrafficSplitList{} },
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ type FakeTraefikV1alpha1 struct {
|
||||
}
|
||||
|
||||
func (c *FakeTraefikV1alpha1) TraefikServices(namespace string) v1alpha1.TraefikServiceInterface {
|
||||
return &FakeTraefikServices{c, namespace}
|
||||
return newFakeTraefikServices(c, namespace)
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
|
||||
@@ -19,116 +19,34 @@ limitations under the License.
|
||||
package fake
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
v1alpha1 "github.com/fluxcd/flagger/pkg/apis/traefik/v1alpha1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
labels "k8s.io/apimachinery/pkg/labels"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
testing "k8s.io/client-go/testing"
|
||||
traefikv1alpha1 "github.com/fluxcd/flagger/pkg/client/clientset/versioned/typed/traefik/v1alpha1"
|
||||
gentype "k8s.io/client-go/gentype"
|
||||
)
|
||||
|
||||
// FakeTraefikServices implements TraefikServiceInterface
|
||||
type FakeTraefikServices struct {
|
||||
// fakeTraefikServices implements TraefikServiceInterface
|
||||
type fakeTraefikServices struct {
|
||||
*gentype.FakeClientWithList[*v1alpha1.TraefikService, *v1alpha1.TraefikServiceList]
|
||||
Fake *FakeTraefikV1alpha1
|
||||
ns string
|
||||
}
|
||||
|
||||
var traefikservicesResource = v1alpha1.SchemeGroupVersion.WithResource("traefikservices")
|
||||
|
||||
var traefikservicesKind = v1alpha1.SchemeGroupVersion.WithKind("TraefikService")
|
||||
|
||||
// Get takes name of the traefikService, and returns the corresponding traefikService object, and an error if there is any.
|
||||
func (c *FakeTraefikServices) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.TraefikService, err error) {
|
||||
emptyResult := &v1alpha1.TraefikService{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewGetActionWithOptions(traefikservicesResource, c.ns, name, options), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
func newFakeTraefikServices(fake *FakeTraefikV1alpha1, namespace string) traefikv1alpha1.TraefikServiceInterface {
|
||||
return &fakeTraefikServices{
|
||||
gentype.NewFakeClientWithList[*v1alpha1.TraefikService, *v1alpha1.TraefikServiceList](
|
||||
fake.Fake,
|
||||
namespace,
|
||||
v1alpha1.SchemeGroupVersion.WithResource("traefikservices"),
|
||||
v1alpha1.SchemeGroupVersion.WithKind("TraefikService"),
|
||||
func() *v1alpha1.TraefikService { return &v1alpha1.TraefikService{} },
|
||||
func() *v1alpha1.TraefikServiceList { return &v1alpha1.TraefikServiceList{} },
|
||||
func(dst, src *v1alpha1.TraefikServiceList) { dst.ListMeta = src.ListMeta },
|
||||
func(list *v1alpha1.TraefikServiceList) []*v1alpha1.TraefikService {
|
||||
return gentype.ToPointerSlice(list.Items)
|
||||
},
|
||||
func(list *v1alpha1.TraefikServiceList, items []*v1alpha1.TraefikService) {
|
||||
list.Items = gentype.FromPointerSlice(items)
|
||||
},
|
||||
),
|
||||
fake,
|
||||
}
|
||||
return obj.(*v1alpha1.TraefikService), err
|
||||
}
|
||||
|
||||
// List takes label and field selectors, and returns the list of TraefikServices that match those selectors.
|
||||
func (c *FakeTraefikServices) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.TraefikServiceList, err error) {
|
||||
emptyResult := &v1alpha1.TraefikServiceList{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewListActionWithOptions(traefikservicesResource, traefikservicesKind, c.ns, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
|
||||
label, _, _ := testing.ExtractFromListOptions(opts)
|
||||
if label == nil {
|
||||
label = labels.Everything()
|
||||
}
|
||||
list := &v1alpha1.TraefikServiceList{ListMeta: obj.(*v1alpha1.TraefikServiceList).ListMeta}
|
||||
for _, item := range obj.(*v1alpha1.TraefikServiceList).Items {
|
||||
if label.Matches(labels.Set(item.Labels)) {
|
||||
list.Items = append(list.Items, item)
|
||||
}
|
||||
}
|
||||
return list, err
|
||||
}
|
||||
|
||||
// Watch returns a watch.Interface that watches the requested traefikServices.
|
||||
func (c *FakeTraefikServices) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
|
||||
return c.Fake.
|
||||
InvokesWatch(testing.NewWatchActionWithOptions(traefikservicesResource, c.ns, opts))
|
||||
|
||||
}
|
||||
|
||||
// Create takes the representation of a traefikService and creates it. Returns the server's representation of the traefikService, and an error, if there is any.
|
||||
func (c *FakeTraefikServices) Create(ctx context.Context, traefikService *v1alpha1.TraefikService, opts v1.CreateOptions) (result *v1alpha1.TraefikService, err error) {
|
||||
emptyResult := &v1alpha1.TraefikService{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewCreateActionWithOptions(traefikservicesResource, c.ns, traefikService, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1alpha1.TraefikService), err
|
||||
}
|
||||
|
||||
// Update takes the representation of a traefikService and updates it. Returns the server's representation of the traefikService, and an error, if there is any.
|
||||
func (c *FakeTraefikServices) Update(ctx context.Context, traefikService *v1alpha1.TraefikService, opts v1.UpdateOptions) (result *v1alpha1.TraefikService, err error) {
|
||||
emptyResult := &v1alpha1.TraefikService{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewUpdateActionWithOptions(traefikservicesResource, c.ns, traefikService, opts), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1alpha1.TraefikService), err
|
||||
}
|
||||
|
||||
// Delete takes name of the traefikService and deletes it. Returns an error if one occurs.
|
||||
func (c *FakeTraefikServices) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
|
||||
_, err := c.Fake.
|
||||
Invokes(testing.NewDeleteActionWithOptions(traefikservicesResource, c.ns, name, opts), &v1alpha1.TraefikService{})
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *FakeTraefikServices) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
|
||||
action := testing.NewDeleteCollectionActionWithOptions(traefikservicesResource, c.ns, opts, listOpts)
|
||||
|
||||
_, err := c.Fake.Invokes(action, &v1alpha1.TraefikServiceList{})
|
||||
return err
|
||||
}
|
||||
|
||||
// Patch applies the patch and returns the patched traefikService.
|
||||
func (c *FakeTraefikServices) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.TraefikService, err error) {
|
||||
emptyResult := &v1alpha1.TraefikService{}
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceActionWithOptions(traefikservicesResource, c.ns, name, pt, data, opts, subresources...), emptyResult)
|
||||
|
||||
if obj == nil {
|
||||
return emptyResult, err
|
||||
}
|
||||
return obj.(*v1alpha1.TraefikService), err
|
||||
}
|
||||
|
||||
@@ -19,10 +19,10 @@ limitations under the License.
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
http "net/http"
|
||||
|
||||
v1alpha1 "github.com/fluxcd/flagger/pkg/apis/traefik/v1alpha1"
|
||||
"github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
traefikv1alpha1 "github.com/fluxcd/flagger/pkg/apis/traefik/v1alpha1"
|
||||
scheme "github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
@@ -45,9 +45,7 @@ func (c *TraefikV1alpha1Client) TraefikServices(namespace string) TraefikService
|
||||
// where httpClient was generated with rest.HTTPClientFor(c).
|
||||
func NewForConfig(c *rest.Config) (*TraefikV1alpha1Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
setConfigDefaults(&config)
|
||||
httpClient, err := rest.HTTPClientFor(&config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -59,9 +57,7 @@ func NewForConfig(c *rest.Config) (*TraefikV1alpha1Client, error) {
|
||||
// Note the http client provided takes precedence over the configured transport values.
|
||||
func NewForConfigAndClient(c *rest.Config, h *http.Client) (*TraefikV1alpha1Client, error) {
|
||||
config := *c
|
||||
if err := setConfigDefaults(&config); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
setConfigDefaults(&config)
|
||||
client, err := rest.RESTClientForConfigAndClient(&config, h)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -84,17 +80,15 @@ func New(c rest.Interface) *TraefikV1alpha1Client {
|
||||
return &TraefikV1alpha1Client{c}
|
||||
}
|
||||
|
||||
func setConfigDefaults(config *rest.Config) error {
|
||||
gv := v1alpha1.SchemeGroupVersion
|
||||
func setConfigDefaults(config *rest.Config) {
|
||||
gv := traefikv1alpha1.SchemeGroupVersion
|
||||
config.GroupVersion = &gv
|
||||
config.APIPath = "/apis"
|
||||
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
|
||||
config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion()
|
||||
|
||||
if config.UserAgent == "" {
|
||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// RESTClient returns a RESTClient that is used to communicate
|
||||
|
||||
@@ -19,9 +19,9 @@ limitations under the License.
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
"context"
|
||||
context "context"
|
||||
|
||||
v1alpha1 "github.com/fluxcd/flagger/pkg/apis/traefik/v1alpha1"
|
||||
traefikv1alpha1 "github.com/fluxcd/flagger/pkg/apis/traefik/v1alpha1"
|
||||
scheme "github.com/fluxcd/flagger/pkg/client/clientset/versioned/scheme"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
types "k8s.io/apimachinery/pkg/types"
|
||||
@@ -37,31 +37,32 @@ type TraefikServicesGetter interface {
|
||||
|
||||
// TraefikServiceInterface has methods to work with TraefikService resources.
|
||||
type TraefikServiceInterface interface {
|
||||
Create(ctx context.Context, traefikService *v1alpha1.TraefikService, opts v1.CreateOptions) (*v1alpha1.TraefikService, error)
|
||||
Update(ctx context.Context, traefikService *v1alpha1.TraefikService, opts v1.UpdateOptions) (*v1alpha1.TraefikService, error)
|
||||
Create(ctx context.Context, traefikService *traefikv1alpha1.TraefikService, opts v1.CreateOptions) (*traefikv1alpha1.TraefikService, error)
|
||||
Update(ctx context.Context, traefikService *traefikv1alpha1.TraefikService, opts v1.UpdateOptions) (*traefikv1alpha1.TraefikService, error)
|
||||
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
|
||||
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.TraefikService, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.TraefikServiceList, error)
|
||||
Get(ctx context.Context, name string, opts v1.GetOptions) (*traefikv1alpha1.TraefikService, error)
|
||||
List(ctx context.Context, opts v1.ListOptions) (*traefikv1alpha1.TraefikServiceList, error)
|
||||
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.TraefikService, err error)
|
||||
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *traefikv1alpha1.TraefikService, err error)
|
||||
TraefikServiceExpansion
|
||||
}
|
||||
|
||||
// traefikServices implements TraefikServiceInterface
|
||||
type traefikServices struct {
|
||||
*gentype.ClientWithList[*v1alpha1.TraefikService, *v1alpha1.TraefikServiceList]
|
||||
*gentype.ClientWithList[*traefikv1alpha1.TraefikService, *traefikv1alpha1.TraefikServiceList]
|
||||
}
|
||||
|
||||
// newTraefikServices returns a TraefikServices
|
||||
func newTraefikServices(c *TraefikV1alpha1Client, namespace string) *traefikServices {
|
||||
return &traefikServices{
|
||||
gentype.NewClientWithList[*v1alpha1.TraefikService, *v1alpha1.TraefikServiceList](
|
||||
gentype.NewClientWithList[*traefikv1alpha1.TraefikService, *traefikv1alpha1.TraefikServiceList](
|
||||
"traefikservices",
|
||||
c.RESTClient(),
|
||||
scheme.ParameterCodec,
|
||||
namespace,
|
||||
func() *v1alpha1.TraefikService { return &v1alpha1.TraefikService{} },
|
||||
func() *v1alpha1.TraefikServiceList { return &v1alpha1.TraefikServiceList{} }),
|
||||
func() *traefikv1alpha1.TraefikService { return &traefikv1alpha1.TraefikService{} },
|
||||
func() *traefikv1alpha1.TraefikServiceList { return &traefikv1alpha1.TraefikServiceList{} },
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,13 +19,13 @@ limitations under the License.
|
||||
package v2
|
||||
|
||||
import (
|
||||
"context"
|
||||
context "context"
|
||||
time "time"
|
||||
|
||||
apisixv2 "github.com/fluxcd/flagger/pkg/apis/apisix/v2"
|
||||
apisapisixv2 "github.com/fluxcd/flagger/pkg/apis/apisix/v2"
|
||||
versioned "github.com/fluxcd/flagger/pkg/client/clientset/versioned"
|
||||
internalinterfaces "github.com/fluxcd/flagger/pkg/client/informers/externalversions/internalinterfaces"
|
||||
v2 "github.com/fluxcd/flagger/pkg/client/listers/apisix/v2"
|
||||
apisixv2 "github.com/fluxcd/flagger/pkg/client/listers/apisix/v2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
@@ -36,7 +36,7 @@ import (
|
||||
// ApisixRoutes.
|
||||
type ApisixRouteInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v2.ApisixRouteLister
|
||||
Lister() apisixv2.ApisixRouteLister
|
||||
}
|
||||
|
||||
type apisixRouteInformer struct {
|
||||
@@ -62,16 +62,28 @@ func NewFilteredApisixRouteInformer(client versioned.Interface, namespace string
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ApisixV2().ApisixRoutes(namespace).List(context.TODO(), options)
|
||||
return client.ApisixV2().ApisixRoutes(namespace).List(context.Background(), options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ApisixV2().ApisixRoutes(namespace).Watch(context.TODO(), options)
|
||||
return client.ApisixV2().ApisixRoutes(namespace).Watch(context.Background(), options)
|
||||
},
|
||||
ListWithContextFunc: func(ctx context.Context, options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ApisixV2().ApisixRoutes(namespace).List(ctx, options)
|
||||
},
|
||||
WatchFuncWithContext: func(ctx context.Context, options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.ApisixV2().ApisixRoutes(namespace).Watch(ctx, options)
|
||||
},
|
||||
},
|
||||
&apisixv2.ApisixRoute{},
|
||||
&apisapisixv2.ApisixRoute{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
@@ -82,9 +94,9 @@ func (f *apisixRouteInformer) defaultInformer(client versioned.Interface, resync
|
||||
}
|
||||
|
||||
func (f *apisixRouteInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&apisixv2.ApisixRoute{}, f.defaultInformer)
|
||||
return f.factory.InformerFor(&apisapisixv2.ApisixRoute{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *apisixRouteInformer) Lister() v2.ApisixRouteLister {
|
||||
return v2.NewApisixRouteLister(f.Informer().GetIndexer())
|
||||
func (f *apisixRouteInformer) Lister() apisixv2.ApisixRouteLister {
|
||||
return apisixv2.NewApisixRouteLister(f.Informer().GetIndexer())
|
||||
}
|
||||
|
||||
@@ -19,13 +19,13 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"context"
|
||||
context "context"
|
||||
time "time"
|
||||
|
||||
appmeshv1beta1 "github.com/fluxcd/flagger/pkg/apis/appmesh/v1beta1"
|
||||
apisappmeshv1beta1 "github.com/fluxcd/flagger/pkg/apis/appmesh/v1beta1"
|
||||
versioned "github.com/fluxcd/flagger/pkg/client/clientset/versioned"
|
||||
internalinterfaces "github.com/fluxcd/flagger/pkg/client/informers/externalversions/internalinterfaces"
|
||||
v1beta1 "github.com/fluxcd/flagger/pkg/client/listers/appmesh/v1beta1"
|
||||
appmeshv1beta1 "github.com/fluxcd/flagger/pkg/client/listers/appmesh/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
@@ -36,7 +36,7 @@ import (
|
||||
// Meshes.
|
||||
type MeshInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1beta1.MeshLister
|
||||
Lister() appmeshv1beta1.MeshLister
|
||||
}
|
||||
|
||||
type meshInformer struct {
|
||||
@@ -61,16 +61,28 @@ func NewFilteredMeshInformer(client versioned.Interface, resyncPeriod time.Durat
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.AppmeshV1beta1().Meshes().List(context.TODO(), options)
|
||||
return client.AppmeshV1beta1().Meshes().List(context.Background(), options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.AppmeshV1beta1().Meshes().Watch(context.TODO(), options)
|
||||
return client.AppmeshV1beta1().Meshes().Watch(context.Background(), options)
|
||||
},
|
||||
ListWithContextFunc: func(ctx context.Context, options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.AppmeshV1beta1().Meshes().List(ctx, options)
|
||||
},
|
||||
WatchFuncWithContext: func(ctx context.Context, options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.AppmeshV1beta1().Meshes().Watch(ctx, options)
|
||||
},
|
||||
},
|
||||
&appmeshv1beta1.Mesh{},
|
||||
&apisappmeshv1beta1.Mesh{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
@@ -81,9 +93,9 @@ func (f *meshInformer) defaultInformer(client versioned.Interface, resyncPeriod
|
||||
}
|
||||
|
||||
func (f *meshInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&appmeshv1beta1.Mesh{}, f.defaultInformer)
|
||||
return f.factory.InformerFor(&apisappmeshv1beta1.Mesh{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *meshInformer) Lister() v1beta1.MeshLister {
|
||||
return v1beta1.NewMeshLister(f.Informer().GetIndexer())
|
||||
func (f *meshInformer) Lister() appmeshv1beta1.MeshLister {
|
||||
return appmeshv1beta1.NewMeshLister(f.Informer().GetIndexer())
|
||||
}
|
||||
|
||||
@@ -19,13 +19,13 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"context"
|
||||
context "context"
|
||||
time "time"
|
||||
|
||||
appmeshv1beta1 "github.com/fluxcd/flagger/pkg/apis/appmesh/v1beta1"
|
||||
apisappmeshv1beta1 "github.com/fluxcd/flagger/pkg/apis/appmesh/v1beta1"
|
||||
versioned "github.com/fluxcd/flagger/pkg/client/clientset/versioned"
|
||||
internalinterfaces "github.com/fluxcd/flagger/pkg/client/informers/externalversions/internalinterfaces"
|
||||
v1beta1 "github.com/fluxcd/flagger/pkg/client/listers/appmesh/v1beta1"
|
||||
appmeshv1beta1 "github.com/fluxcd/flagger/pkg/client/listers/appmesh/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
@@ -36,7 +36,7 @@ import (
|
||||
// VirtualNodes.
|
||||
type VirtualNodeInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1beta1.VirtualNodeLister
|
||||
Lister() appmeshv1beta1.VirtualNodeLister
|
||||
}
|
||||
|
||||
type virtualNodeInformer struct {
|
||||
@@ -62,16 +62,28 @@ func NewFilteredVirtualNodeInformer(client versioned.Interface, namespace string
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.AppmeshV1beta1().VirtualNodes(namespace).List(context.TODO(), options)
|
||||
return client.AppmeshV1beta1().VirtualNodes(namespace).List(context.Background(), options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.AppmeshV1beta1().VirtualNodes(namespace).Watch(context.TODO(), options)
|
||||
return client.AppmeshV1beta1().VirtualNodes(namespace).Watch(context.Background(), options)
|
||||
},
|
||||
ListWithContextFunc: func(ctx context.Context, options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.AppmeshV1beta1().VirtualNodes(namespace).List(ctx, options)
|
||||
},
|
||||
WatchFuncWithContext: func(ctx context.Context, options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.AppmeshV1beta1().VirtualNodes(namespace).Watch(ctx, options)
|
||||
},
|
||||
},
|
||||
&appmeshv1beta1.VirtualNode{},
|
||||
&apisappmeshv1beta1.VirtualNode{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
@@ -82,9 +94,9 @@ func (f *virtualNodeInformer) defaultInformer(client versioned.Interface, resync
|
||||
}
|
||||
|
||||
func (f *virtualNodeInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&appmeshv1beta1.VirtualNode{}, f.defaultInformer)
|
||||
return f.factory.InformerFor(&apisappmeshv1beta1.VirtualNode{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *virtualNodeInformer) Lister() v1beta1.VirtualNodeLister {
|
||||
return v1beta1.NewVirtualNodeLister(f.Informer().GetIndexer())
|
||||
func (f *virtualNodeInformer) Lister() appmeshv1beta1.VirtualNodeLister {
|
||||
return appmeshv1beta1.NewVirtualNodeLister(f.Informer().GetIndexer())
|
||||
}
|
||||
|
||||
@@ -19,13 +19,13 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"context"
|
||||
context "context"
|
||||
time "time"
|
||||
|
||||
appmeshv1beta1 "github.com/fluxcd/flagger/pkg/apis/appmesh/v1beta1"
|
||||
apisappmeshv1beta1 "github.com/fluxcd/flagger/pkg/apis/appmesh/v1beta1"
|
||||
versioned "github.com/fluxcd/flagger/pkg/client/clientset/versioned"
|
||||
internalinterfaces "github.com/fluxcd/flagger/pkg/client/informers/externalversions/internalinterfaces"
|
||||
v1beta1 "github.com/fluxcd/flagger/pkg/client/listers/appmesh/v1beta1"
|
||||
appmeshv1beta1 "github.com/fluxcd/flagger/pkg/client/listers/appmesh/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
@@ -36,7 +36,7 @@ import (
|
||||
// VirtualServices.
|
||||
type VirtualServiceInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1beta1.VirtualServiceLister
|
||||
Lister() appmeshv1beta1.VirtualServiceLister
|
||||
}
|
||||
|
||||
type virtualServiceInformer struct {
|
||||
@@ -62,16 +62,28 @@ func NewFilteredVirtualServiceInformer(client versioned.Interface, namespace str
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.AppmeshV1beta1().VirtualServices(namespace).List(context.TODO(), options)
|
||||
return client.AppmeshV1beta1().VirtualServices(namespace).List(context.Background(), options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.AppmeshV1beta1().VirtualServices(namespace).Watch(context.TODO(), options)
|
||||
return client.AppmeshV1beta1().VirtualServices(namespace).Watch(context.Background(), options)
|
||||
},
|
||||
ListWithContextFunc: func(ctx context.Context, options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.AppmeshV1beta1().VirtualServices(namespace).List(ctx, options)
|
||||
},
|
||||
WatchFuncWithContext: func(ctx context.Context, options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.AppmeshV1beta1().VirtualServices(namespace).Watch(ctx, options)
|
||||
},
|
||||
},
|
||||
&appmeshv1beta1.VirtualService{},
|
||||
&apisappmeshv1beta1.VirtualService{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
@@ -82,9 +94,9 @@ func (f *virtualServiceInformer) defaultInformer(client versioned.Interface, res
|
||||
}
|
||||
|
||||
func (f *virtualServiceInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&appmeshv1beta1.VirtualService{}, f.defaultInformer)
|
||||
return f.factory.InformerFor(&apisappmeshv1beta1.VirtualService{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *virtualServiceInformer) Lister() v1beta1.VirtualServiceLister {
|
||||
return v1beta1.NewVirtualServiceLister(f.Informer().GetIndexer())
|
||||
func (f *virtualServiceInformer) Lister() appmeshv1beta1.VirtualServiceLister {
|
||||
return appmeshv1beta1.NewVirtualServiceLister(f.Informer().GetIndexer())
|
||||
}
|
||||
|
||||
@@ -19,13 +19,13 @@ limitations under the License.
|
||||
package v1beta2
|
||||
|
||||
import (
|
||||
"context"
|
||||
context "context"
|
||||
time "time"
|
||||
|
||||
appmeshv1beta2 "github.com/fluxcd/flagger/pkg/apis/appmesh/v1beta2"
|
||||
apisappmeshv1beta2 "github.com/fluxcd/flagger/pkg/apis/appmesh/v1beta2"
|
||||
versioned "github.com/fluxcd/flagger/pkg/client/clientset/versioned"
|
||||
internalinterfaces "github.com/fluxcd/flagger/pkg/client/informers/externalversions/internalinterfaces"
|
||||
v1beta2 "github.com/fluxcd/flagger/pkg/client/listers/appmesh/v1beta2"
|
||||
appmeshv1beta2 "github.com/fluxcd/flagger/pkg/client/listers/appmesh/v1beta2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
@@ -36,7 +36,7 @@ import (
|
||||
// VirtualNodes.
|
||||
type VirtualNodeInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1beta2.VirtualNodeLister
|
||||
Lister() appmeshv1beta2.VirtualNodeLister
|
||||
}
|
||||
|
||||
type virtualNodeInformer struct {
|
||||
@@ -62,16 +62,28 @@ func NewFilteredVirtualNodeInformer(client versioned.Interface, namespace string
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.AppmeshV1beta2().VirtualNodes(namespace).List(context.TODO(), options)
|
||||
return client.AppmeshV1beta2().VirtualNodes(namespace).List(context.Background(), options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.AppmeshV1beta2().VirtualNodes(namespace).Watch(context.TODO(), options)
|
||||
return client.AppmeshV1beta2().VirtualNodes(namespace).Watch(context.Background(), options)
|
||||
},
|
||||
ListWithContextFunc: func(ctx context.Context, options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.AppmeshV1beta2().VirtualNodes(namespace).List(ctx, options)
|
||||
},
|
||||
WatchFuncWithContext: func(ctx context.Context, options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.AppmeshV1beta2().VirtualNodes(namespace).Watch(ctx, options)
|
||||
},
|
||||
},
|
||||
&appmeshv1beta2.VirtualNode{},
|
||||
&apisappmeshv1beta2.VirtualNode{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
@@ -82,9 +94,9 @@ func (f *virtualNodeInformer) defaultInformer(client versioned.Interface, resync
|
||||
}
|
||||
|
||||
func (f *virtualNodeInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&appmeshv1beta2.VirtualNode{}, f.defaultInformer)
|
||||
return f.factory.InformerFor(&apisappmeshv1beta2.VirtualNode{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *virtualNodeInformer) Lister() v1beta2.VirtualNodeLister {
|
||||
return v1beta2.NewVirtualNodeLister(f.Informer().GetIndexer())
|
||||
func (f *virtualNodeInformer) Lister() appmeshv1beta2.VirtualNodeLister {
|
||||
return appmeshv1beta2.NewVirtualNodeLister(f.Informer().GetIndexer())
|
||||
}
|
||||
|
||||
@@ -19,13 +19,13 @@ limitations under the License.
|
||||
package v1beta2
|
||||
|
||||
import (
|
||||
"context"
|
||||
context "context"
|
||||
time "time"
|
||||
|
||||
appmeshv1beta2 "github.com/fluxcd/flagger/pkg/apis/appmesh/v1beta2"
|
||||
apisappmeshv1beta2 "github.com/fluxcd/flagger/pkg/apis/appmesh/v1beta2"
|
||||
versioned "github.com/fluxcd/flagger/pkg/client/clientset/versioned"
|
||||
internalinterfaces "github.com/fluxcd/flagger/pkg/client/informers/externalversions/internalinterfaces"
|
||||
v1beta2 "github.com/fluxcd/flagger/pkg/client/listers/appmesh/v1beta2"
|
||||
appmeshv1beta2 "github.com/fluxcd/flagger/pkg/client/listers/appmesh/v1beta2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
@@ -36,7 +36,7 @@ import (
|
||||
// VirtualRouters.
|
||||
type VirtualRouterInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1beta2.VirtualRouterLister
|
||||
Lister() appmeshv1beta2.VirtualRouterLister
|
||||
}
|
||||
|
||||
type virtualRouterInformer struct {
|
||||
@@ -62,16 +62,28 @@ func NewFilteredVirtualRouterInformer(client versioned.Interface, namespace stri
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.AppmeshV1beta2().VirtualRouters(namespace).List(context.TODO(), options)
|
||||
return client.AppmeshV1beta2().VirtualRouters(namespace).List(context.Background(), options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.AppmeshV1beta2().VirtualRouters(namespace).Watch(context.TODO(), options)
|
||||
return client.AppmeshV1beta2().VirtualRouters(namespace).Watch(context.Background(), options)
|
||||
},
|
||||
ListWithContextFunc: func(ctx context.Context, options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.AppmeshV1beta2().VirtualRouters(namespace).List(ctx, options)
|
||||
},
|
||||
WatchFuncWithContext: func(ctx context.Context, options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.AppmeshV1beta2().VirtualRouters(namespace).Watch(ctx, options)
|
||||
},
|
||||
},
|
||||
&appmeshv1beta2.VirtualRouter{},
|
||||
&apisappmeshv1beta2.VirtualRouter{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
@@ -82,9 +94,9 @@ func (f *virtualRouterInformer) defaultInformer(client versioned.Interface, resy
|
||||
}
|
||||
|
||||
func (f *virtualRouterInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&appmeshv1beta2.VirtualRouter{}, f.defaultInformer)
|
||||
return f.factory.InformerFor(&apisappmeshv1beta2.VirtualRouter{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *virtualRouterInformer) Lister() v1beta2.VirtualRouterLister {
|
||||
return v1beta2.NewVirtualRouterLister(f.Informer().GetIndexer())
|
||||
func (f *virtualRouterInformer) Lister() appmeshv1beta2.VirtualRouterLister {
|
||||
return appmeshv1beta2.NewVirtualRouterLister(f.Informer().GetIndexer())
|
||||
}
|
||||
|
||||
@@ -19,13 +19,13 @@ limitations under the License.
|
||||
package v1beta2
|
||||
|
||||
import (
|
||||
"context"
|
||||
context "context"
|
||||
time "time"
|
||||
|
||||
appmeshv1beta2 "github.com/fluxcd/flagger/pkg/apis/appmesh/v1beta2"
|
||||
apisappmeshv1beta2 "github.com/fluxcd/flagger/pkg/apis/appmesh/v1beta2"
|
||||
versioned "github.com/fluxcd/flagger/pkg/client/clientset/versioned"
|
||||
internalinterfaces "github.com/fluxcd/flagger/pkg/client/informers/externalversions/internalinterfaces"
|
||||
v1beta2 "github.com/fluxcd/flagger/pkg/client/listers/appmesh/v1beta2"
|
||||
appmeshv1beta2 "github.com/fluxcd/flagger/pkg/client/listers/appmesh/v1beta2"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
@@ -36,7 +36,7 @@ import (
|
||||
// VirtualServices.
|
||||
type VirtualServiceInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1beta2.VirtualServiceLister
|
||||
Lister() appmeshv1beta2.VirtualServiceLister
|
||||
}
|
||||
|
||||
type virtualServiceInformer struct {
|
||||
@@ -62,16 +62,28 @@ func NewFilteredVirtualServiceInformer(client versioned.Interface, namespace str
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.AppmeshV1beta2().VirtualServices(namespace).List(context.TODO(), options)
|
||||
return client.AppmeshV1beta2().VirtualServices(namespace).List(context.Background(), options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.AppmeshV1beta2().VirtualServices(namespace).Watch(context.TODO(), options)
|
||||
return client.AppmeshV1beta2().VirtualServices(namespace).Watch(context.Background(), options)
|
||||
},
|
||||
ListWithContextFunc: func(ctx context.Context, options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.AppmeshV1beta2().VirtualServices(namespace).List(ctx, options)
|
||||
},
|
||||
WatchFuncWithContext: func(ctx context.Context, options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.AppmeshV1beta2().VirtualServices(namespace).Watch(ctx, options)
|
||||
},
|
||||
},
|
||||
&appmeshv1beta2.VirtualService{},
|
||||
&apisappmeshv1beta2.VirtualService{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
@@ -82,9 +94,9 @@ func (f *virtualServiceInformer) defaultInformer(client versioned.Interface, res
|
||||
}
|
||||
|
||||
func (f *virtualServiceInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&appmeshv1beta2.VirtualService{}, f.defaultInformer)
|
||||
return f.factory.InformerFor(&apisappmeshv1beta2.VirtualService{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *virtualServiceInformer) Lister() v1beta2.VirtualServiceLister {
|
||||
return v1beta2.NewVirtualServiceLister(f.Informer().GetIndexer())
|
||||
func (f *virtualServiceInformer) Lister() appmeshv1beta2.VirtualServiceLister {
|
||||
return appmeshv1beta2.NewVirtualServiceLister(f.Informer().GetIndexer())
|
||||
}
|
||||
|
||||
@@ -19,13 +19,13 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"context"
|
||||
context "context"
|
||||
time "time"
|
||||
|
||||
flaggerv1beta1 "github.com/fluxcd/flagger/pkg/apis/flagger/v1beta1"
|
||||
apisflaggerv1beta1 "github.com/fluxcd/flagger/pkg/apis/flagger/v1beta1"
|
||||
versioned "github.com/fluxcd/flagger/pkg/client/clientset/versioned"
|
||||
internalinterfaces "github.com/fluxcd/flagger/pkg/client/informers/externalversions/internalinterfaces"
|
||||
v1beta1 "github.com/fluxcd/flagger/pkg/client/listers/flagger/v1beta1"
|
||||
flaggerv1beta1 "github.com/fluxcd/flagger/pkg/client/listers/flagger/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
@@ -36,7 +36,7 @@ import (
|
||||
// AlertProviders.
|
||||
type AlertProviderInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1beta1.AlertProviderLister
|
||||
Lister() flaggerv1beta1.AlertProviderLister
|
||||
}
|
||||
|
||||
type alertProviderInformer struct {
|
||||
@@ -62,16 +62,28 @@ func NewFilteredAlertProviderInformer(client versioned.Interface, namespace stri
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.FlaggerV1beta1().AlertProviders(namespace).List(context.TODO(), options)
|
||||
return client.FlaggerV1beta1().AlertProviders(namespace).List(context.Background(), options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.FlaggerV1beta1().AlertProviders(namespace).Watch(context.TODO(), options)
|
||||
return client.FlaggerV1beta1().AlertProviders(namespace).Watch(context.Background(), options)
|
||||
},
|
||||
ListWithContextFunc: func(ctx context.Context, options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.FlaggerV1beta1().AlertProviders(namespace).List(ctx, options)
|
||||
},
|
||||
WatchFuncWithContext: func(ctx context.Context, options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.FlaggerV1beta1().AlertProviders(namespace).Watch(ctx, options)
|
||||
},
|
||||
},
|
||||
&flaggerv1beta1.AlertProvider{},
|
||||
&apisflaggerv1beta1.AlertProvider{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
@@ -82,9 +94,9 @@ func (f *alertProviderInformer) defaultInformer(client versioned.Interface, resy
|
||||
}
|
||||
|
||||
func (f *alertProviderInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&flaggerv1beta1.AlertProvider{}, f.defaultInformer)
|
||||
return f.factory.InformerFor(&apisflaggerv1beta1.AlertProvider{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *alertProviderInformer) Lister() v1beta1.AlertProviderLister {
|
||||
return v1beta1.NewAlertProviderLister(f.Informer().GetIndexer())
|
||||
func (f *alertProviderInformer) Lister() flaggerv1beta1.AlertProviderLister {
|
||||
return flaggerv1beta1.NewAlertProviderLister(f.Informer().GetIndexer())
|
||||
}
|
||||
|
||||
@@ -19,13 +19,13 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"context"
|
||||
context "context"
|
||||
time "time"
|
||||
|
||||
flaggerv1beta1 "github.com/fluxcd/flagger/pkg/apis/flagger/v1beta1"
|
||||
apisflaggerv1beta1 "github.com/fluxcd/flagger/pkg/apis/flagger/v1beta1"
|
||||
versioned "github.com/fluxcd/flagger/pkg/client/clientset/versioned"
|
||||
internalinterfaces "github.com/fluxcd/flagger/pkg/client/informers/externalversions/internalinterfaces"
|
||||
v1beta1 "github.com/fluxcd/flagger/pkg/client/listers/flagger/v1beta1"
|
||||
flaggerv1beta1 "github.com/fluxcd/flagger/pkg/client/listers/flagger/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
@@ -36,7 +36,7 @@ import (
|
||||
// Canaries.
|
||||
type CanaryInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1beta1.CanaryLister
|
||||
Lister() flaggerv1beta1.CanaryLister
|
||||
}
|
||||
|
||||
type canaryInformer struct {
|
||||
@@ -62,16 +62,28 @@ func NewFilteredCanaryInformer(client versioned.Interface, namespace string, res
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.FlaggerV1beta1().Canaries(namespace).List(context.TODO(), options)
|
||||
return client.FlaggerV1beta1().Canaries(namespace).List(context.Background(), options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.FlaggerV1beta1().Canaries(namespace).Watch(context.TODO(), options)
|
||||
return client.FlaggerV1beta1().Canaries(namespace).Watch(context.Background(), options)
|
||||
},
|
||||
ListWithContextFunc: func(ctx context.Context, options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.FlaggerV1beta1().Canaries(namespace).List(ctx, options)
|
||||
},
|
||||
WatchFuncWithContext: func(ctx context.Context, options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.FlaggerV1beta1().Canaries(namespace).Watch(ctx, options)
|
||||
},
|
||||
},
|
||||
&flaggerv1beta1.Canary{},
|
||||
&apisflaggerv1beta1.Canary{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
@@ -82,9 +94,9 @@ func (f *canaryInformer) defaultInformer(client versioned.Interface, resyncPerio
|
||||
}
|
||||
|
||||
func (f *canaryInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&flaggerv1beta1.Canary{}, f.defaultInformer)
|
||||
return f.factory.InformerFor(&apisflaggerv1beta1.Canary{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *canaryInformer) Lister() v1beta1.CanaryLister {
|
||||
return v1beta1.NewCanaryLister(f.Informer().GetIndexer())
|
||||
func (f *canaryInformer) Lister() flaggerv1beta1.CanaryLister {
|
||||
return flaggerv1beta1.NewCanaryLister(f.Informer().GetIndexer())
|
||||
}
|
||||
|
||||
@@ -19,13 +19,13 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"context"
|
||||
context "context"
|
||||
time "time"
|
||||
|
||||
flaggerv1beta1 "github.com/fluxcd/flagger/pkg/apis/flagger/v1beta1"
|
||||
apisflaggerv1beta1 "github.com/fluxcd/flagger/pkg/apis/flagger/v1beta1"
|
||||
versioned "github.com/fluxcd/flagger/pkg/client/clientset/versioned"
|
||||
internalinterfaces "github.com/fluxcd/flagger/pkg/client/informers/externalversions/internalinterfaces"
|
||||
v1beta1 "github.com/fluxcd/flagger/pkg/client/listers/flagger/v1beta1"
|
||||
flaggerv1beta1 "github.com/fluxcd/flagger/pkg/client/listers/flagger/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
@@ -36,7 +36,7 @@ import (
|
||||
// MetricTemplates.
|
||||
type MetricTemplateInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1beta1.MetricTemplateLister
|
||||
Lister() flaggerv1beta1.MetricTemplateLister
|
||||
}
|
||||
|
||||
type metricTemplateInformer struct {
|
||||
@@ -62,16 +62,28 @@ func NewFilteredMetricTemplateInformer(client versioned.Interface, namespace str
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.FlaggerV1beta1().MetricTemplates(namespace).List(context.TODO(), options)
|
||||
return client.FlaggerV1beta1().MetricTemplates(namespace).List(context.Background(), options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.FlaggerV1beta1().MetricTemplates(namespace).Watch(context.TODO(), options)
|
||||
return client.FlaggerV1beta1().MetricTemplates(namespace).Watch(context.Background(), options)
|
||||
},
|
||||
ListWithContextFunc: func(ctx context.Context, options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.FlaggerV1beta1().MetricTemplates(namespace).List(ctx, options)
|
||||
},
|
||||
WatchFuncWithContext: func(ctx context.Context, options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.FlaggerV1beta1().MetricTemplates(namespace).Watch(ctx, options)
|
||||
},
|
||||
},
|
||||
&flaggerv1beta1.MetricTemplate{},
|
||||
&apisflaggerv1beta1.MetricTemplate{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
@@ -82,9 +94,9 @@ func (f *metricTemplateInformer) defaultInformer(client versioned.Interface, res
|
||||
}
|
||||
|
||||
func (f *metricTemplateInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&flaggerv1beta1.MetricTemplate{}, f.defaultInformer)
|
||||
return f.factory.InformerFor(&apisflaggerv1beta1.MetricTemplate{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *metricTemplateInformer) Lister() v1beta1.MetricTemplateLister {
|
||||
return v1beta1.NewMetricTemplateLister(f.Informer().GetIndexer())
|
||||
func (f *metricTemplateInformer) Lister() flaggerv1beta1.MetricTemplateLister {
|
||||
return flaggerv1beta1.NewMetricTemplateLister(f.Informer().GetIndexer())
|
||||
}
|
||||
|
||||
@@ -19,13 +19,13 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
"context"
|
||||
context "context"
|
||||
time "time"
|
||||
|
||||
gatewayapiv1 "github.com/fluxcd/flagger/pkg/apis/gatewayapi/v1"
|
||||
apisgatewayapiv1 "github.com/fluxcd/flagger/pkg/apis/gatewayapi/v1"
|
||||
versioned "github.com/fluxcd/flagger/pkg/client/clientset/versioned"
|
||||
internalinterfaces "github.com/fluxcd/flagger/pkg/client/informers/externalversions/internalinterfaces"
|
||||
v1 "github.com/fluxcd/flagger/pkg/client/listers/gatewayapi/v1"
|
||||
gatewayapiv1 "github.com/fluxcd/flagger/pkg/client/listers/gatewayapi/v1"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
@@ -36,7 +36,7 @@ import (
|
||||
// HTTPRoutes.
|
||||
type HTTPRouteInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1.HTTPRouteLister
|
||||
Lister() gatewayapiv1.HTTPRouteLister
|
||||
}
|
||||
|
||||
type hTTPRouteInformer struct {
|
||||
@@ -62,16 +62,28 @@ func NewFilteredHTTPRouteInformer(client versioned.Interface, namespace string,
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.GatewayapiV1().HTTPRoutes(namespace).List(context.TODO(), options)
|
||||
return client.GatewayapiV1().HTTPRoutes(namespace).List(context.Background(), options)
|
||||
},
|
||||
WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.GatewayapiV1().HTTPRoutes(namespace).Watch(context.TODO(), options)
|
||||
return client.GatewayapiV1().HTTPRoutes(namespace).Watch(context.Background(), options)
|
||||
},
|
||||
ListWithContextFunc: func(ctx context.Context, options metav1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.GatewayapiV1().HTTPRoutes(namespace).List(ctx, options)
|
||||
},
|
||||
WatchFuncWithContext: func(ctx context.Context, options metav1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.GatewayapiV1().HTTPRoutes(namespace).Watch(ctx, options)
|
||||
},
|
||||
},
|
||||
&gatewayapiv1.HTTPRoute{},
|
||||
&apisgatewayapiv1.HTTPRoute{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
@@ -82,9 +94,9 @@ func (f *hTTPRouteInformer) defaultInformer(client versioned.Interface, resyncPe
|
||||
}
|
||||
|
||||
func (f *hTTPRouteInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&gatewayapiv1.HTTPRoute{}, f.defaultInformer)
|
||||
return f.factory.InformerFor(&apisgatewayapiv1.HTTPRoute{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *hTTPRouteInformer) Lister() v1.HTTPRouteLister {
|
||||
return v1.NewHTTPRouteLister(f.Informer().GetIndexer())
|
||||
func (f *hTTPRouteInformer) Lister() gatewayapiv1.HTTPRouteLister {
|
||||
return gatewayapiv1.NewHTTPRouteLister(f.Informer().GetIndexer())
|
||||
}
|
||||
|
||||
@@ -19,13 +19,13 @@ limitations under the License.
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"context"
|
||||
context "context"
|
||||
time "time"
|
||||
|
||||
gatewayapiv1beta1 "github.com/fluxcd/flagger/pkg/apis/gatewayapi/v1beta1"
|
||||
apisgatewayapiv1beta1 "github.com/fluxcd/flagger/pkg/apis/gatewayapi/v1beta1"
|
||||
versioned "github.com/fluxcd/flagger/pkg/client/clientset/versioned"
|
||||
internalinterfaces "github.com/fluxcd/flagger/pkg/client/informers/externalversions/internalinterfaces"
|
||||
v1beta1 "github.com/fluxcd/flagger/pkg/client/listers/gatewayapi/v1beta1"
|
||||
gatewayapiv1beta1 "github.com/fluxcd/flagger/pkg/client/listers/gatewayapi/v1beta1"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
watch "k8s.io/apimachinery/pkg/watch"
|
||||
@@ -36,7 +36,7 @@ import (
|
||||
// HTTPRoutes.
|
||||
type HTTPRouteInformer interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() v1beta1.HTTPRouteLister
|
||||
Lister() gatewayapiv1beta1.HTTPRouteLister
|
||||
}
|
||||
|
||||
type hTTPRouteInformer struct {
|
||||
@@ -62,16 +62,28 @@ func NewFilteredHTTPRouteInformer(client versioned.Interface, namespace string,
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.GatewayapiV1beta1().HTTPRoutes(namespace).List(context.TODO(), options)
|
||||
return client.GatewayapiV1beta1().HTTPRoutes(namespace).List(context.Background(), options)
|
||||
},
|
||||
WatchFunc: func(options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.GatewayapiV1beta1().HTTPRoutes(namespace).Watch(context.TODO(), options)
|
||||
return client.GatewayapiV1beta1().HTTPRoutes(namespace).Watch(context.Background(), options)
|
||||
},
|
||||
ListWithContextFunc: func(ctx context.Context, options v1.ListOptions) (runtime.Object, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.GatewayapiV1beta1().HTTPRoutes(namespace).List(ctx, options)
|
||||
},
|
||||
WatchFuncWithContext: func(ctx context.Context, options v1.ListOptions) (watch.Interface, error) {
|
||||
if tweakListOptions != nil {
|
||||
tweakListOptions(&options)
|
||||
}
|
||||
return client.GatewayapiV1beta1().HTTPRoutes(namespace).Watch(ctx, options)
|
||||
},
|
||||
},
|
||||
&gatewayapiv1beta1.HTTPRoute{},
|
||||
&apisgatewayapiv1beta1.HTTPRoute{},
|
||||
resyncPeriod,
|
||||
indexers,
|
||||
)
|
||||
@@ -82,9 +94,9 @@ func (f *hTTPRouteInformer) defaultInformer(client versioned.Interface, resyncPe
|
||||
}
|
||||
|
||||
func (f *hTTPRouteInformer) Informer() cache.SharedIndexInformer {
|
||||
return f.factory.InformerFor(&gatewayapiv1beta1.HTTPRoute{}, f.defaultInformer)
|
||||
return f.factory.InformerFor(&apisgatewayapiv1beta1.HTTPRoute{}, f.defaultInformer)
|
||||
}
|
||||
|
||||
func (f *hTTPRouteInformer) Lister() v1beta1.HTTPRouteLister {
|
||||
return v1beta1.NewHTTPRouteLister(f.Informer().GetIndexer())
|
||||
func (f *hTTPRouteInformer) Lister() gatewayapiv1beta1.HTTPRouteLister {
|
||||
return gatewayapiv1beta1.NewHTTPRouteLister(f.Informer().GetIndexer())
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user