From c4ef1690706579bc1802e86977d7fad181a4156d Mon Sep 17 00:00:00 2001 From: zufardhiyaulhaq Date: Sun, 19 Nov 2023 20:58:39 +0700 Subject: [PATCH] update operator to support Istio 1.20 Signed-off-by: zufardhiyaulhaq --- .github/workflows/master.yml | 40 +++++++++---------- .github/workflows/pullrequest.yml | 40 +++++++++---------- Dockerfile | 6 +-- Makefile | 11 ++--- README.md | 9 +++-- charts/istio-ratelimit-operator/README.md | 9 +++-- .../istio-ratelimit-operator/README.md.gotmpl | 3 +- charts/istio-ratelimit-operator/values.yaml | 6 +-- main.go => cmd/main.go | 12 +++--- .../ratelimit/globalratelimitconfig.yaml | 6 +-- .../ratelimit/globalratelimitconfig.yaml | 6 +-- .../ratelimit/globalratelimitconfig.yaml | 6 +-- .../ratelimit/globalratelimitconfig.yaml | 6 +-- .../ratelimit/globalratelimitconfig.yaml | 6 +-- .../ratelimit/globalratelimitconfig.yaml | 6 +-- .../ratelimit/globalratelimitconfig.yaml | 6 +-- .../ratelimit/globalratelimitconfig.yaml | 6 +-- .../ratelimit/localratelimitconfig.yaml | 6 +-- .../ratelimit/localratelimitconfig.yaml | 6 +-- examples/local/README.md | 12 +++--- .../local/gateway/localratelimitconfig.yaml | 6 +-- .../local/sidecar/localratelimitconfig.yaml | 6 +-- go.mod | 16 ++++---- go.sum | 32 +++++++-------- .../controller}/globalratelimit_controller.go | 2 +- .../globalratelimitconfig_controller.go | 2 +- .../controller}/localratelimit_controller.go | 2 +- .../localratelimitconfig_controller.go | 2 +- .../ratelimitservice_controller.go | 2 +- pkg/settings/settings.go | 2 +- pkg/utils/version.go | 3 ++ 31 files changed, 143 insertions(+), 140 deletions(-) rename main.go => cmd/main.go (92%) rename {controllers => internal/controller}/globalratelimit_controller.go (99%) rename {controllers => internal/controller}/globalratelimitconfig_controller.go (99%) rename {controllers => internal/controller}/localratelimit_controller.go (99%) rename {controllers => internal/controller}/localratelimitconfig_controller.go (99%) rename {controllers => internal/controller}/ratelimitservice_controller.go (99%) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 3a0c252..bc78f92 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -77,8 +77,8 @@ jobs: strategy: fail-fast: false matrix: - kubernetes: ["v1.25"] - istio: ["1.14.6","1.15.6", "1.16.3", "1.17.1"] + kubernetes: ["v1.26"] + istio: ["1.17.8","1.18.5", "1.19.4", "1.20.0"] steps: - name: Checkout uses: actions/checkout@v2 @@ -132,8 +132,8 @@ jobs: strategy: fail-fast: false matrix: - kubernetes: ["v1.25"] - istio: ["1.14.6","1.15.6", "1.16.3", "1.17.1"] + kubernetes: ["v1.26"] + istio: ["1.17.8","1.18.5", "1.19.4", "1.20.0"] steps: - name: Checkout uses: actions/checkout@v2 @@ -187,8 +187,8 @@ jobs: strategy: fail-fast: false matrix: - kubernetes: ["v1.25"] - istio: ["1.14.6","1.15.6", "1.16.3", "1.17.1"] + kubernetes: ["v1.26"] + istio: ["1.17.8","1.18.5", "1.19.4", "1.20.0"] steps: - name: Checkout uses: actions/checkout@v2 @@ -242,8 +242,8 @@ jobs: strategy: fail-fast: false matrix: - kubernetes: ["v1.25"] - istio: ["1.14.6","1.15.6", "1.16.3", "1.17.1"] + kubernetes: ["v1.26"] + istio: ["1.17.8","1.18.5", "1.19.4", "1.20.0"] steps: - name: Checkout uses: actions/checkout@v2 @@ -297,8 +297,8 @@ jobs: strategy: fail-fast: false matrix: - kubernetes: ["v1.25"] - istio: ["1.14.6","1.15.6", "1.16.3", "1.17.1"] + kubernetes: ["v1.26"] + istio: ["1.17.8","1.18.5", "1.19.4", "1.20.0"] steps: - name: Checkout uses: actions/checkout@v2 @@ -352,8 +352,8 @@ jobs: strategy: fail-fast: false matrix: - kubernetes: ["v1.25"] - istio: ["1.14.6","1.15.6", "1.16.3", "1.17.1"] + kubernetes: ["v1.26"] + istio: ["1.17.8","1.18.5", "1.19.4", "1.20.0"] steps: - name: Checkout uses: actions/checkout@v2 @@ -407,8 +407,8 @@ jobs: strategy: fail-fast: false matrix: - kubernetes: ["v1.25"] - istio: ["1.14.6","1.15.6", "1.16.3", "1.17.1"] + kubernetes: ["v1.26"] + istio: ["1.17.8","1.18.5", "1.19.4", "1.20.0"] steps: - name: Checkout uses: actions/checkout@v2 @@ -462,8 +462,8 @@ jobs: strategy: fail-fast: false matrix: - kubernetes: ["v1.25"] - istio: ["1.14.6","1.15.6", "1.16.3", "1.17.1"] + kubernetes: ["v1.26"] + istio: ["1.17.8","1.18.5", "1.19.4", "1.20.0"] steps: - name: Checkout uses: actions/checkout@v2 @@ -517,8 +517,8 @@ jobs: strategy: fail-fast: false matrix: - kubernetes: ["v1.25"] - istio: ["1.14.6","1.15.6", "1.16.3", "1.17.1"] + kubernetes: ["v1.26"] + istio: ["1.17.8","1.18.5", "1.19.4", "1.20.0"] steps: - name: Checkout uses: actions/checkout@v2 @@ -572,8 +572,8 @@ jobs: strategy: fail-fast: false matrix: - kubernetes: ["v1.25"] - istio: ["1.14.6","1.15.6", "1.16.3", "1.17.1"] + kubernetes: ["v1.26"] + istio: ["1.17.8","1.18.5", "1.19.4", "1.20.0"] steps: - name: Checkout uses: actions/checkout@v2 diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index 76968ad..e3f29cc 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -63,8 +63,8 @@ jobs: strategy: fail-fast: false matrix: - kubernetes: ["v1.25"] - istio: ["1.14.6","1.15.6", "1.16.3", "1.17.1"] + kubernetes: ["v1.26"] + istio: ["1.17.8","1.18.5", "1.19.4", "1.20.0"] steps: - name: Checkout uses: actions/checkout@v2 @@ -118,8 +118,8 @@ jobs: strategy: fail-fast: false matrix: - kubernetes: ["v1.25"] - istio: ["1.14.6","1.15.6", "1.16.3", "1.17.1"] + kubernetes: ["v1.26"] + istio: ["1.17.8","1.18.5", "1.19.4", "1.20.0"] steps: - name: Checkout uses: actions/checkout@v2 @@ -173,8 +173,8 @@ jobs: strategy: fail-fast: false matrix: - kubernetes: ["v1.25"] - istio: ["1.14.6","1.15.6", "1.16.3", "1.17.1"] + kubernetes: ["v1.26"] + istio: ["1.17.8","1.18.5", "1.19.4", "1.20.0"] steps: - name: Checkout uses: actions/checkout@v2 @@ -228,8 +228,8 @@ jobs: strategy: fail-fast: false matrix: - kubernetes: ["v1.25"] - istio: ["1.14.6","1.15.6", "1.16.3", "1.17.1"] + kubernetes: ["v1.26"] + istio: ["1.17.8","1.18.5", "1.19.4", "1.20.0"] steps: - name: Checkout uses: actions/checkout@v2 @@ -283,8 +283,8 @@ jobs: strategy: fail-fast: false matrix: - kubernetes: ["v1.25"] - istio: ["1.14.6","1.15.6", "1.16.3", "1.17.1"] + kubernetes: ["v1.26"] + istio: ["1.17.8","1.18.5", "1.19.4", "1.20.0"] steps: - name: Checkout uses: actions/checkout@v2 @@ -338,8 +338,8 @@ jobs: strategy: fail-fast: false matrix: - kubernetes: ["v1.25"] - istio: ["1.14.6","1.15.6", "1.16.3", "1.17.1"] + kubernetes: ["v1.26"] + istio: ["1.17.8","1.18.5", "1.19.4", "1.20.0"] steps: - name: Checkout uses: actions/checkout@v2 @@ -393,8 +393,8 @@ jobs: strategy: fail-fast: false matrix: - kubernetes: ["v1.25"] - istio: ["1.14.6","1.15.6", "1.16.3", "1.17.1"] + kubernetes: ["v1.26"] + istio: ["1.17.8","1.18.5", "1.19.4", "1.20.0"] steps: - name: Checkout uses: actions/checkout@v2 @@ -448,8 +448,8 @@ jobs: strategy: fail-fast: false matrix: - kubernetes: ["v1.25"] - istio: ["1.14.6","1.15.6", "1.16.3", "1.17.1"] + kubernetes: ["v1.26"] + istio: ["1.17.8","1.18.5", "1.19.4", "1.20.0"] steps: - name: Checkout uses: actions/checkout@v2 @@ -503,8 +503,8 @@ jobs: strategy: fail-fast: false matrix: - kubernetes: ["v1.25"] - istio: ["1.14.6","1.15.6", "1.16.3", "1.17.1"] + kubernetes: ["v1.26"] + istio: ["1.17.8","1.18.5", "1.19.4", "1.20.0"] steps: - name: Checkout uses: actions/checkout@v2 @@ -558,8 +558,8 @@ jobs: strategy: fail-fast: false matrix: - kubernetes: ["v1.25"] - istio: ["1.14.6","1.15.6", "1.16.3", "1.17.1"] + kubernetes: ["v1.26"] + istio: ["1.17.8","1.18.5", "1.19.4", "1.20.0"] steps: - name: Checkout uses: actions/checkout@v2 diff --git a/Dockerfile b/Dockerfile index c3342a1..16d4540 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,13 +10,13 @@ COPY go.sum go.sum RUN go mod download # Copy the go source -COPY main.go main.go +COPY cmd/ cmd/ COPY api/ api/ -COPY controllers/ controllers/ +COPY internal/controller/ internal/controller/ COPY pkg/ pkg/ # Build -RUN CGO_ENABLED=0 GOOS=linux go build -a -o manager main.go +RUN CGO_ENABLED=0 GOOS=linux go build -a -o manager ./cmd/main.go # Use distroless as minimal base image to package the manager binary # Refer to https://github.com/GoogleContainerTools/distroless for more details diff --git a/Makefile b/Makefile index 6ed13f4..7393a45 100644 --- a/Makefile +++ b/Makefile @@ -49,7 +49,7 @@ endif # Image URL to use all building/pushing image targets IMG ?= controller:latest # ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary. -ENVTEST_K8S_VERSION = 1.24 +ENVTEST_K8S_VERSION = 1.26 # Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) ifeq (,$(shell go env GOBIN)) @@ -109,12 +109,12 @@ test: manifests generate fmt vet envtest ## Run tests. ##@ Build .PHONY: build -build: generate fmt vet ## Build manager binary. - go build -o bin/manager main.go +build: manifests generate fmt vet ## Build manager binary. + go build -o bin/manager ./cmd/main.go .PHONY: run run: manifests generate fmt vet ## Run a controller from your host. - go run ./main.go + go run ./cmd/main.go .PHONY: docker-build docker-build: test ## Build docker image with the manager. @@ -189,7 +189,8 @@ $(KUSTOMIZE): $(LOCALBIN) .PHONY: controller-gen controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary. $(CONTROLLER_GEN): $(LOCALBIN) - test -s $(LOCALBIN)/controller-gen || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION) + test -s $(LOCALBIN)/controller-gen && $(LOCALBIN)/controller-gen --version | grep -q $(CONTROLLER_TOOLS_VERSION) || \ + GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION) .PHONY: envtest envtest: $(ENVTEST) ## Download envtest-setup locally if necessary. diff --git a/README.md b/README.md index a557f45..b8f4f68 100644 --- a/README.md +++ b/README.md @@ -101,20 +101,21 @@ public-gateway.method.grault-route_grault-route: unit=HOUR requests_per_unit=60 | extraLabels | object | `{}` | | | operator.image | string | `"zufardhiyaulhaq/istio-ratelimit-operator"` | | | operator.replica | int | `1` | | -| operator.tag | string | `"v2.11.1"` | | +| operator.tag | string | `"v2.12.0"` | | | resources.limits.cpu | string | `"512m"` | | | resources.limits.memory | string | `"512Mi"` | | | resources.requests.cpu | string | `"256m"` | | | resources.requests.memory | string | `"256Mi"` | | | serviceAccount.imagePullSecrets | list | `[]` | | -| settings.ratelimitservice.image | string | `"envoyproxy/ratelimit:4c088856"` | | -| settings.statsdExporter.image | string | `"prom/statsd-exporter:v0.23.1"` | | +| settings.ratelimitservice.image | string | `"envoyproxy/ratelimit:5e1be594"` | | +| settings.statsdExporter.image | string | `"prom/statsd-exporter:v0.25.0"` | | ## Supported Releases | Operator Version | Istio Version | |-----|------| -| 2.10.0 | <= 1.17.x | +| 2.12.0 | <= 1.20.x | +| 2.11.2 | <= 1.17.x | | 2.9.0 | <= 1.16.x | | 2.8.0 | <= 1.15.x | | 2.5.1 | <= 1.13.x | diff --git a/charts/istio-ratelimit-operator/README.md b/charts/istio-ratelimit-operator/README.md index a557f45..b8f4f68 100644 --- a/charts/istio-ratelimit-operator/README.md +++ b/charts/istio-ratelimit-operator/README.md @@ -101,20 +101,21 @@ public-gateway.method.grault-route_grault-route: unit=HOUR requests_per_unit=60 | extraLabels | object | `{}` | | | operator.image | string | `"zufardhiyaulhaq/istio-ratelimit-operator"` | | | operator.replica | int | `1` | | -| operator.tag | string | `"v2.11.1"` | | +| operator.tag | string | `"v2.12.0"` | | | resources.limits.cpu | string | `"512m"` | | | resources.limits.memory | string | `"512Mi"` | | | resources.requests.cpu | string | `"256m"` | | | resources.requests.memory | string | `"256Mi"` | | | serviceAccount.imagePullSecrets | list | `[]` | | -| settings.ratelimitservice.image | string | `"envoyproxy/ratelimit:4c088856"` | | -| settings.statsdExporter.image | string | `"prom/statsd-exporter:v0.23.1"` | | +| settings.ratelimitservice.image | string | `"envoyproxy/ratelimit:5e1be594"` | | +| settings.statsdExporter.image | string | `"prom/statsd-exporter:v0.25.0"` | | ## Supported Releases | Operator Version | Istio Version | |-----|------| -| 2.10.0 | <= 1.17.x | +| 2.12.0 | <= 1.20.x | +| 2.11.2 | <= 1.17.x | | 2.9.0 | <= 1.16.x | | 2.8.0 | <= 1.15.x | | 2.5.1 | <= 1.13.x | diff --git a/charts/istio-ratelimit-operator/README.md.gotmpl b/charts/istio-ratelimit-operator/README.md.gotmpl index 1a21562..398bde0 100644 --- a/charts/istio-ratelimit-operator/README.md.gotmpl +++ b/charts/istio-ratelimit-operator/README.md.gotmpl @@ -103,7 +103,8 @@ public-gateway.method.grault-route_grault-route: unit=HOUR requests_per_unit=60 | Operator Version | Istio Version | |-----|------| -| 2.10.0 | <= 1.17.x | +| 2.12.0 | <= 1.20.x | +| 2.11.2 | <= 1.17.x | | 2.9.0 | <= 1.16.x | | 2.8.0 | <= 1.15.x | | 2.5.1 | <= 1.13.x | diff --git a/charts/istio-ratelimit-operator/values.yaml b/charts/istio-ratelimit-operator/values.yaml index 482a312..95c2894 100644 --- a/charts/istio-ratelimit-operator/values.yaml +++ b/charts/istio-ratelimit-operator/values.yaml @@ -2,7 +2,7 @@ operator: # image of istio-ratelimit-operator image: "zufardhiyaulhaq/istio-ratelimit-operator" # tag of istio-ratelimit-operator image - tag: "v2.11.1" + tag: "v2.12.0" # number of replica for deployment replica: 1 @@ -16,9 +16,9 @@ resources: settings: ratelimitservice: - image: envoyproxy/ratelimit:4c088856 + image: envoyproxy/ratelimit:5e1be594 statsdExporter: - image: prom/statsd-exporter:v0.23.1 + image: prom/statsd-exporter:v0.25.0 serviceAccount: imagePullSecrets: [] diff --git a/main.go b/cmd/main.go similarity index 92% rename from main.go rename to cmd/main.go index f97e60a..3cd6b59 100644 --- a/main.go +++ b/cmd/main.go @@ -28,7 +28,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/healthz" "sigs.k8s.io/controller-runtime/pkg/log/zap" - "github.com/zufardhiyaulhaq/istio-ratelimit-operator/controllers" + "github.com/zufardhiyaulhaq/istio-ratelimit-operator/internal/controller" "github.com/zufardhiyaulhaq/istio-ratelimit-operator/pkg/settings" clientnetworking "istio.io/client-go/pkg/apis/networking/v1alpha3" @@ -88,21 +88,21 @@ func main() { os.Exit(1) } - if err = (&controllers.GlobalRateLimitConfigReconciler{ + if err = (&controller.GlobalRateLimitConfigReconciler{ Client: mgr.GetClient(), Scheme: mgr.GetScheme(), }).SetupWithManager(mgr); err != nil { setupLog.Error(err, "unable to create controller", "controller", "GlobalRateLimitConfig") os.Exit(1) } - if err = (&controllers.GlobalRateLimitReconciler{ + if err = (&controller.GlobalRateLimitReconciler{ Client: mgr.GetClient(), Scheme: mgr.GetScheme(), }).SetupWithManager(mgr); err != nil { setupLog.Error(err, "unable to create controller", "controller", "GlobalRateLimit") os.Exit(1) } - if err = (&controllers.RateLimitServiceReconciler{ + if err = (&controller.RateLimitServiceReconciler{ Client: mgr.GetClient(), Scheme: mgr.GetScheme(), Settings: settings, @@ -110,14 +110,14 @@ func main() { setupLog.Error(err, "unable to create controller", "controller", "RateLimitService") os.Exit(1) } - if err = (&controllers.LocalRateLimitConfigReconciler{ + if err = (&controller.LocalRateLimitConfigReconciler{ Client: mgr.GetClient(), Scheme: mgr.GetScheme(), }).SetupWithManager(mgr); err != nil { setupLog.Error(err, "unable to create controller", "controller", "LocalRateLimitConfig") os.Exit(1) } - if err = (&controllers.LocalRateLimitReconciler{ + if err = (&controller.LocalRateLimitReconciler{ Client: mgr.GetClient(), Scheme: mgr.GetScheme(), }).SetupWithManager(mgr); err != nil { diff --git a/e2e/usecases/global.gateway.headervaluematch.shadow_mode/manifests/namespaces/istio-system/ratelimit/globalratelimitconfig.yaml b/e2e/usecases/global.gateway.headervaluematch.shadow_mode/manifests/namespaces/istio-system/ratelimit/globalratelimitconfig.yaml index fdc51ae..1a6a610 100644 --- a/e2e/usecases/global.gateway.headervaluematch.shadow_mode/manifests/namespaces/istio-system/ratelimit/globalratelimitconfig.yaml +++ b/e2e/usecases/global.gateway.headervaluematch.shadow_mode/manifests/namespaces/istio-system/ratelimit/globalratelimitconfig.yaml @@ -10,10 +10,10 @@ spec: app: istio-ingressgateway istio: ingressgateway istio_version: - - "1.14" - - "1.15" - - "1.16" - "1.17" + - "1.18" + - "1.19" + - "1.20" ratelimit: spec: domain: "ingressgateway" diff --git a/e2e/usecases/global.gateway.headervaluematch/manifests/namespaces/istio-system/ratelimit/globalratelimitconfig.yaml b/e2e/usecases/global.gateway.headervaluematch/manifests/namespaces/istio-system/ratelimit/globalratelimitconfig.yaml index fdc51ae..1a6a610 100644 --- a/e2e/usecases/global.gateway.headervaluematch/manifests/namespaces/istio-system/ratelimit/globalratelimitconfig.yaml +++ b/e2e/usecases/global.gateway.headervaluematch/manifests/namespaces/istio-system/ratelimit/globalratelimitconfig.yaml @@ -10,10 +10,10 @@ spec: app: istio-ingressgateway istio: ingressgateway istio_version: - - "1.14" - - "1.15" - - "1.16" - "1.17" + - "1.18" + - "1.19" + - "1.20" ratelimit: spec: domain: "ingressgateway" diff --git a/e2e/usecases/global.gateway.shadow_mode/manifests/namespaces/istio-system/ratelimit/globalratelimitconfig.yaml b/e2e/usecases/global.gateway.shadow_mode/manifests/namespaces/istio-system/ratelimit/globalratelimitconfig.yaml index fdc51ae..1a6a610 100644 --- a/e2e/usecases/global.gateway.shadow_mode/manifests/namespaces/istio-system/ratelimit/globalratelimitconfig.yaml +++ b/e2e/usecases/global.gateway.shadow_mode/manifests/namespaces/istio-system/ratelimit/globalratelimitconfig.yaml @@ -10,10 +10,10 @@ spec: app: istio-ingressgateway istio: ingressgateway istio_version: - - "1.14" - - "1.15" - - "1.16" - "1.17" + - "1.18" + - "1.19" + - "1.20" ratelimit: spec: domain: "ingressgateway" diff --git a/e2e/usecases/global.gateway/manifests/namespaces/istio-system/ratelimit/globalratelimitconfig.yaml b/e2e/usecases/global.gateway/manifests/namespaces/istio-system/ratelimit/globalratelimitconfig.yaml index fdc51ae..1a6a610 100644 --- a/e2e/usecases/global.gateway/manifests/namespaces/istio-system/ratelimit/globalratelimitconfig.yaml +++ b/e2e/usecases/global.gateway/manifests/namespaces/istio-system/ratelimit/globalratelimitconfig.yaml @@ -10,10 +10,10 @@ spec: app: istio-ingressgateway istio: ingressgateway istio_version: - - "1.14" - - "1.15" - - "1.16" - "1.17" + - "1.18" + - "1.19" + - "1.20" ratelimit: spec: domain: "ingressgateway" diff --git a/e2e/usecases/global.sidecar.headervaluematch.shadow_mode/manifests/namespaces/development/ratelimit/globalratelimitconfig.yaml b/e2e/usecases/global.sidecar.headervaluematch.shadow_mode/manifests/namespaces/development/ratelimit/globalratelimitconfig.yaml index 7ef20c2..e4e45cb 100644 --- a/e2e/usecases/global.sidecar.headervaluematch.shadow_mode/manifests/namespaces/development/ratelimit/globalratelimitconfig.yaml +++ b/e2e/usecases/global.sidecar.headervaluematch.shadow_mode/manifests/namespaces/development/ratelimit/globalratelimitconfig.yaml @@ -9,10 +9,10 @@ spec: labels: app: podinfo istio_version: - - "1.14" - - "1.15" - - "1.16" - "1.17" + - "1.18" + - "1.19" + - "1.20" ratelimit: spec: domain: "podinfo" diff --git a/e2e/usecases/global.sidecar.headervaluematch/manifests/namespaces/development/ratelimit/globalratelimitconfig.yaml b/e2e/usecases/global.sidecar.headervaluematch/manifests/namespaces/development/ratelimit/globalratelimitconfig.yaml index 7ef20c2..e4e45cb 100644 --- a/e2e/usecases/global.sidecar.headervaluematch/manifests/namespaces/development/ratelimit/globalratelimitconfig.yaml +++ b/e2e/usecases/global.sidecar.headervaluematch/manifests/namespaces/development/ratelimit/globalratelimitconfig.yaml @@ -9,10 +9,10 @@ spec: labels: app: podinfo istio_version: - - "1.14" - - "1.15" - - "1.16" - "1.17" + - "1.18" + - "1.19" + - "1.20" ratelimit: spec: domain: "podinfo" diff --git a/e2e/usecases/global.sidecar.shadow_mode/manifests/namespaces/development/ratelimit/globalratelimitconfig.yaml b/e2e/usecases/global.sidecar.shadow_mode/manifests/namespaces/development/ratelimit/globalratelimitconfig.yaml index 7ef20c2..e4e45cb 100644 --- a/e2e/usecases/global.sidecar.shadow_mode/manifests/namespaces/development/ratelimit/globalratelimitconfig.yaml +++ b/e2e/usecases/global.sidecar.shadow_mode/manifests/namespaces/development/ratelimit/globalratelimitconfig.yaml @@ -9,10 +9,10 @@ spec: labels: app: podinfo istio_version: - - "1.14" - - "1.15" - - "1.16" - "1.17" + - "1.18" + - "1.19" + - "1.20" ratelimit: spec: domain: "podinfo" diff --git a/e2e/usecases/global.sidecar/manifests/namespaces/development/ratelimit/globalratelimitconfig.yaml b/e2e/usecases/global.sidecar/manifests/namespaces/development/ratelimit/globalratelimitconfig.yaml index 7ef20c2..e4e45cb 100644 --- a/e2e/usecases/global.sidecar/manifests/namespaces/development/ratelimit/globalratelimitconfig.yaml +++ b/e2e/usecases/global.sidecar/manifests/namespaces/development/ratelimit/globalratelimitconfig.yaml @@ -9,10 +9,10 @@ spec: labels: app: podinfo istio_version: - - "1.14" - - "1.15" - - "1.16" - "1.17" + - "1.18" + - "1.19" + - "1.20" ratelimit: spec: domain: "podinfo" diff --git a/e2e/usecases/local.gateway/manifests/namespaces/istio-system/ratelimit/localratelimitconfig.yaml b/e2e/usecases/local.gateway/manifests/namespaces/istio-system/ratelimit/localratelimitconfig.yaml index 713a3ea..7774c6c 100644 --- a/e2e/usecases/local.gateway/manifests/namespaces/istio-system/ratelimit/localratelimitconfig.yaml +++ b/e2e/usecases/local.gateway/manifests/namespaces/istio-system/ratelimit/localratelimitconfig.yaml @@ -10,7 +10,7 @@ spec: app: istio-ingressgateway istio: ingressgateway istio_version: - - "1.14" - - "1.15" - - "1.16" - "1.17" + - "1.18" + - "1.19" + - "1.20" diff --git a/e2e/usecases/local.sidecar/manifests/namespaces/development/ratelimit/localratelimitconfig.yaml b/e2e/usecases/local.sidecar/manifests/namespaces/development/ratelimit/localratelimitconfig.yaml index caa7615..d2b1c73 100644 --- a/e2e/usecases/local.sidecar/manifests/namespaces/development/ratelimit/localratelimitconfig.yaml +++ b/e2e/usecases/local.sidecar/manifests/namespaces/development/ratelimit/localratelimitconfig.yaml @@ -9,7 +9,7 @@ spec: labels: app: podinfo istio_version: - - "1.14" - - "1.15" - - "1.16" - "1.17" + - "1.18" + - "1.19" + - "1.20" diff --git a/examples/local/README.md b/examples/local/README.md index aee7852..f2ef75c 100644 --- a/examples/local/README.md +++ b/examples/local/README.md @@ -15,10 +15,10 @@ spec: labels: app: podinfo istio_version: - - "1.14" - - "1.15" - - "1.16" - "1.17" + - "1.18" + - "1.19" + - "1.20" ``` You must add your pod label in the `.spec.selector`. The next step is to define the rate limit configuration using `LocalRateLimit` object, for example: @@ -56,10 +56,10 @@ spec: app: istio-ingressgateway istio: ingressgateway istio_version: - - "1.14" - - "1.15" - - "1.16" - "1.17" + - "1.18" + - "1.19" + - "1.20" ``` You can also add SNI matching in this `LocalRateLimitConfig` by configuring `.spec.selector.sni`. The next step is to define the rate limit configuration using `LocalRateLimit` object, for example: diff --git a/examples/local/gateway/localratelimitconfig.yaml b/examples/local/gateway/localratelimitconfig.yaml index 9240fd3..57360cc 100644 --- a/examples/local/gateway/localratelimitconfig.yaml +++ b/examples/local/gateway/localratelimitconfig.yaml @@ -10,7 +10,7 @@ spec: app: istio-ingressgateway istio: ingressgateway istio_version: - - "1.14" - - "1.15" - - "1.16" - "1.17" + - "1.18" + - "1.19" + - "1.20" diff --git a/examples/local/sidecar/localratelimitconfig.yaml b/examples/local/sidecar/localratelimitconfig.yaml index caa7615..d2b1c73 100644 --- a/examples/local/sidecar/localratelimitconfig.yaml +++ b/examples/local/sidecar/localratelimitconfig.yaml @@ -9,7 +9,7 @@ spec: labels: app: podinfo istio_version: - - "1.14" - - "1.15" - - "1.16" - "1.17" + - "1.18" + - "1.19" + - "1.20" diff --git a/go.mod b/go.mod index ddfcb0d..8e4c9a2 100644 --- a/go.mod +++ b/go.mod @@ -5,11 +5,13 @@ go 1.19 require ( github.com/Masterminds/semver v1.5.0 github.com/champly/lib4go v0.0.0-20210810011059-eb374f933ec2 + github.com/go-openapi/swag v0.22.3 github.com/gogo/protobuf v1.3.2 github.com/kelseyhightower/envconfig v1.4.0 github.com/prometheus/client_golang v1.14.0 github.com/stretchr/testify v1.8.0 github.com/thoas/go-funk v0.9.1 + google.golang.org/protobuf v1.28.1 gopkg.in/yaml.v2 v2.4.0 istio.io/api v0.0.0-20220817194812-9ed7a41198c8 istio.io/client-go v1.13.9 @@ -31,7 +33,6 @@ require ( github.com/go-logr/zapr v1.2.3 // indirect github.com/go-openapi/jsonpointer v0.19.5 // indirect github.com/go-openapi/jsonreference v0.20.0 // indirect - github.com/go-openapi/swag v0.22.3 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/google/gnostic v0.5.7-v3refs // indirect @@ -55,20 +56,19 @@ require ( go.uber.org/atomic v1.7.0 // indirect go.uber.org/multierr v1.6.0 // indirect go.uber.org/zap v1.24.0 // indirect - golang.org/x/net v0.7.0 // indirect + golang.org/x/net v0.17.0 // indirect golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect - golang.org/x/sys v0.5.0 // indirect - golang.org/x/term v0.5.0 // indirect - golang.org/x/text v0.7.0 // indirect + golang.org/x/sys v0.13.0 // indirect + golang.org/x/term v0.13.0 // indirect + golang.org/x/text v0.13.0 // indirect golang.org/x/time v0.3.0 // indirect gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/protobuf v1.28.1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect istio.io/gogo-genproto v0.0.0-20211208193508-5ab4acc9eb1e // indirect - k8s.io/apiextensions-apiserver v0.26.1 // indirect - k8s.io/component-base v0.26.1 // indirect + k8s.io/apiextensions-apiserver v0.26.2 // indirect + k8s.io/component-base v0.26.2 // indirect k8s.io/klog/v2 v2.80.1 // indirect k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280 // indirect k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 // indirect diff --git a/go.sum b/go.sum index a9a3dce..9cfb5dd 100644 --- a/go.sum +++ b/go.sum @@ -327,8 +327,6 @@ github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/ github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.14 h1:gm3vOOXfiuw5i9p5N9xJvfjvuofpyvLA9Wr6QfK5Fng= -github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= @@ -534,6 +532,7 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxv github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= @@ -558,8 +557,6 @@ github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/mailru/easyjson v0.7.2/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= -github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/markbates/pkger v0.17.1/go.mod h1:0JoVlrol20BSywW79rN3kdFFsE5xYM+rSCQDXbLhiuI= @@ -619,7 +616,6 @@ github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxzi github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= @@ -976,8 +972,8 @@ golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1081,15 +1077,15 @@ golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1100,8 +1096,8 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1307,8 +1303,8 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20141024133853-64131543e789/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= @@ -1368,8 +1364,8 @@ k8s.io/api v0.26.2 h1:dM3cinp3PGB6asOySalOZxEG4CZ0IAdJsrYZXE/ovGQ= k8s.io/api v0.26.2/go.mod h1:1kjMQsFE+QHPfskEcVNgL3+Hp88B80uj0QtSOlj8itU= k8s.io/apiextensions-apiserver v0.19.2/go.mod h1:EYNjpqIAvNZe+svXVx9j4uBaVhTB4C94HkY3w058qcg= k8s.io/apiextensions-apiserver v0.21.0/go.mod h1:gsQGNtGkc/YoDG9loKI0V+oLZM4ljRPjc/sql5tmvzc= -k8s.io/apiextensions-apiserver v0.26.1 h1:cB8h1SRk6e/+i3NOrQgSFij1B2S0Y0wDoNl66bn8RMI= -k8s.io/apiextensions-apiserver v0.26.1/go.mod h1:AptjOSXDGuE0JICx/Em15PaoO7buLwTs0dGleIHixSM= +k8s.io/apiextensions-apiserver v0.26.2 h1:/yTG2B9jGY2Q70iGskMf41qTLhL9XeNN2KhI0uDgwko= +k8s.io/apiextensions-apiserver v0.26.2/go.mod h1:Y7UPgch8nph8mGCuVk0SK83LnS8Esf3n6fUBgew8SH8= k8s.io/apimachinery v0.18.1/go.mod h1:9SnR/e11v5IbyPCGbvJViimtJ0SwHG4nfZFjU77ftcA= k8s.io/apimachinery v0.19.2/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= k8s.io/apimachinery v0.21.0/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= @@ -1390,8 +1386,8 @@ k8s.io/code-generator v0.19.2/go.mod h1:moqLn7w0t9cMs4+5CQyxnfA/HV8MF6aAVENF+WZZ k8s.io/code-generator v0.21.0/go.mod h1:hUlps5+9QaTrKx+jiM4rmq7YmH8wPOIko64uZCHDh6Q= k8s.io/component-base v0.19.2/go.mod h1:g5LrsiTiabMLZ40AR6Hl45f088DevyGY+cCE2agEIVo= k8s.io/component-base v0.21.0/go.mod h1:qvtjz6X0USWXbgmbfXR+Agik4RZ3jv2Bgr5QnZzdPYw= -k8s.io/component-base v0.26.1 h1:4ahudpeQXHZL5kko+iDHqLj/FSGAEUnSVO0EBbgDd+4= -k8s.io/component-base v0.26.1/go.mod h1:VHrLR0b58oC035w6YQiBSbtsf0ThuSwXP+p5dD/kAWU= +k8s.io/component-base v0.26.2 h1:IfWgCGUDzrD6wLLgXEstJKYZKAFS2kO+rBRi0p3LqcI= +k8s.io/component-base v0.26.2/go.mod h1:DxbuIe9M3IZPRxPIzhch2m1eT7uFrSBJUBuVCQEBivs= k8s.io/component-helpers v0.21.0/go.mod h1:tezqefP7lxfvJyR+0a+6QtVrkZ/wIkyMLK4WcQ3Cj8U= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= diff --git a/controllers/globalratelimit_controller.go b/internal/controller/globalratelimit_controller.go similarity index 99% rename from controllers/globalratelimit_controller.go rename to internal/controller/globalratelimit_controller.go index 1f9b2a9..e7e8d87 100644 --- a/controllers/globalratelimit_controller.go +++ b/internal/controller/globalratelimit_controller.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package controllers +package controller import ( "context" diff --git a/controllers/globalratelimitconfig_controller.go b/internal/controller/globalratelimitconfig_controller.go similarity index 99% rename from controllers/globalratelimitconfig_controller.go rename to internal/controller/globalratelimitconfig_controller.go index f5c490c..f0577b8 100644 --- a/controllers/globalratelimitconfig_controller.go +++ b/internal/controller/globalratelimitconfig_controller.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package controllers +package controller import ( "context" diff --git a/controllers/localratelimit_controller.go b/internal/controller/localratelimit_controller.go similarity index 99% rename from controllers/localratelimit_controller.go rename to internal/controller/localratelimit_controller.go index d125270..02abf8e 100644 --- a/controllers/localratelimit_controller.go +++ b/internal/controller/localratelimit_controller.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package controllers +package controller import ( "context" diff --git a/controllers/localratelimitconfig_controller.go b/internal/controller/localratelimitconfig_controller.go similarity index 99% rename from controllers/localratelimitconfig_controller.go rename to internal/controller/localratelimitconfig_controller.go index 9cab306..4f51aa5 100644 --- a/controllers/localratelimitconfig_controller.go +++ b/internal/controller/localratelimitconfig_controller.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package controllers +package controller import ( "context" diff --git a/controllers/ratelimitservice_controller.go b/internal/controller/ratelimitservice_controller.go similarity index 99% rename from controllers/ratelimitservice_controller.go rename to internal/controller/ratelimitservice_controller.go index ee4759c..89a67c0 100644 --- a/controllers/ratelimitservice_controller.go +++ b/internal/controller/ratelimitservice_controller.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package controllers +package controller import ( "context" diff --git a/pkg/settings/settings.go b/pkg/settings/settings.go index 10fd4ce..ed45277 100644 --- a/pkg/settings/settings.go +++ b/pkg/settings/settings.go @@ -5,7 +5,7 @@ import ( ) type Settings struct { - RateLimitServiceImage string `required:"true" envconfig:"RATE_LIMIT_SERVICE_IMAGE" default:"envoyproxy/ratelimit:4c088856"` + RateLimitServiceImage string `required:"true" envconfig:"RATE_LIMIT_SERVICE_IMAGE" default:"envoyproxy/ratelimit:5e1be594"` StatsdExporterImage string `required:"true" envconfig:"STATSD_EXPORTER_IMAGE" default:"prom/statsd-exporter:v0.23.1"` } diff --git a/pkg/utils/version.go b/pkg/utils/version.go index 113d9b3..f81c7ab 100644 --- a/pkg/utils/version.go +++ b/pkg/utils/version.go @@ -15,6 +15,9 @@ var WellKnownVersions = map[string]string{ "1.15": `^1\.15.*`, "1.16": `^1\.16.*`, "1.17": `^1\.17.*`, + "1.18": `^1\.18.*`, + "1.19": `^1\.19.*`, + "1.20": `^1\.20.*`, } func BuildEnvoyFilterNamesAllVersion(base string) []string {