diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 324fc231..6c3d7fe3 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -10,7 +10,7 @@ on: env: # Common versions - GO_VERSION: '1.20' + GO_VERSION: '1.23' GOLANGCI_VERSION: 'v2.1' jobs: diff --git a/.github/workflows/e2e-advanced-deployment-1.24.yaml b/.github/workflows/e2e-advanced-deployment-1.24.yaml index ad6f9769..c895cce4 100644 --- a/.github/workflows/e2e-advanced-deployment-1.24.yaml +++ b/.github/workflows/e2e-advanced-deployment-1.24.yaml @@ -13,7 +13,7 @@ permissions: read-all env: # Common versions - GO_VERSION: '1.20' + GO_VERSION: '1.23' KIND_CLUSTER_NAME: 'ci-testing' KIND_VERSION: 'v0.14.0' KIND_IMAGE: 'kindest/node:v1.24.6' diff --git a/.github/workflows/e2e-advanced-deployment-1.26.yaml b/.github/workflows/e2e-advanced-deployment-1.26.yaml index 60683bc5..4a4f181c 100644 --- a/.github/workflows/e2e-advanced-deployment-1.26.yaml +++ b/.github/workflows/e2e-advanced-deployment-1.26.yaml @@ -13,7 +13,7 @@ permissions: read-all env: # Common versions - GO_VERSION: '1.20' + GO_VERSION: '1.23' KIND_VERSION: 'v0.18.0' KIND_IMAGE: 'kindest/node:v1.26.3' KIND_CLUSTER_NAME: 'ci-testing' diff --git a/.github/workflows/e2e-advanced-deployment-1.28.yaml b/.github/workflows/e2e-advanced-deployment-1.28.yaml index 8fa71c48..e2759dde 100644 --- a/.github/workflows/e2e-advanced-deployment-1.28.yaml +++ b/.github/workflows/e2e-advanced-deployment-1.28.yaml @@ -13,7 +13,7 @@ permissions: read-all env: # Common versions - GO_VERSION: '1.20' + GO_VERSION: '1.23' KIND_VERSION: 'v0.22.0' KIND_IMAGE: 'kindest/node:v1.28.7' KIND_CLUSTER_NAME: 'ci-testing' diff --git a/.github/workflows/e2e-cloneset-1.24.yaml b/.github/workflows/e2e-cloneset-1.24.yaml index eb6a222a..1b62aa02 100644 --- a/.github/workflows/e2e-cloneset-1.24.yaml +++ b/.github/workflows/e2e-cloneset-1.24.yaml @@ -13,7 +13,7 @@ permissions: read-all env: # Common versions - GO_VERSION: '1.20' + GO_VERSION: '1.23' KIND_VERSION: 'v0.14.0' KIND_IMAGE: 'kindest/node:v1.24.6' KIND_CLUSTER_NAME: 'ci-testing' diff --git a/.github/workflows/e2e-cloneset-1.26.yaml b/.github/workflows/e2e-cloneset-1.26.yaml index 9d6653b4..3a6951cd 100644 --- a/.github/workflows/e2e-cloneset-1.26.yaml +++ b/.github/workflows/e2e-cloneset-1.26.yaml @@ -13,7 +13,7 @@ permissions: read-all env: # Common versions - GO_VERSION: '1.20' + GO_VERSION: '1.23' KIND_IMAGE: 'kindest/node:v1.26.3' KIND_CLUSTER_NAME: 'ci-testing' diff --git a/.github/workflows/e2e-cloneset-1.28.yaml b/.github/workflows/e2e-cloneset-1.28.yaml index bb0b900e..6c896e31 100644 --- a/.github/workflows/e2e-cloneset-1.28.yaml +++ b/.github/workflows/e2e-cloneset-1.28.yaml @@ -13,7 +13,7 @@ permissions: read-all env: # Common versions - GO_VERSION: '1.20' + GO_VERSION: '1.23' KIND_VERSION: 'v0.22.0' KIND_IMAGE: 'kindest/node:v1.28.7' KIND_CLUSTER_NAME: 'ci-testing' diff --git a/.github/workflows/e2e-custom.yaml b/.github/workflows/e2e-custom.yaml index 87abbd79..7a3b02a9 100644 --- a/.github/workflows/e2e-custom.yaml +++ b/.github/workflows/e2e-custom.yaml @@ -13,7 +13,7 @@ permissions: read-all env: # Common versions - GO_VERSION: '1.20' + GO_VERSION: '1.23' KIND_VERSION: 'v0.18.0' KIND_IMAGE: 'kindest/node:v1.26.3' KIND_CLUSTER_NAME: 'ci-testing' diff --git a/.github/workflows/e2e-daemonset-1.24.yaml b/.github/workflows/e2e-daemonset-1.24.yaml index 2696055a..c0d1eefd 100644 --- a/.github/workflows/e2e-daemonset-1.24.yaml +++ b/.github/workflows/e2e-daemonset-1.24.yaml @@ -13,7 +13,7 @@ permissions: read-all env: # Common versions - GO_VERSION: '1.20' + GO_VERSION: '1.23' KIND_VERSION: 'v0.14.0' KIND_IMAGE: 'kindest/node:v1.24.6' KIND_CLUSTER_NAME: 'ci-testing' diff --git a/.github/workflows/e2e-daemonset-1.26.yaml b/.github/workflows/e2e-daemonset-1.26.yaml index 0edf4520..96de99e1 100644 --- a/.github/workflows/e2e-daemonset-1.26.yaml +++ b/.github/workflows/e2e-daemonset-1.26.yaml @@ -13,7 +13,7 @@ permissions: read-all env: # Common versions - GO_VERSION: '1.20' + GO_VERSION: '1.23' KIND_IMAGE: 'kindest/node:v1.26.3' KIND_CLUSTER_NAME: 'ci-testing' diff --git a/.github/workflows/e2e-daemonset-1.28.yaml b/.github/workflows/e2e-daemonset-1.28.yaml index 38b1daf3..f8eaa592 100644 --- a/.github/workflows/e2e-daemonset-1.28.yaml +++ b/.github/workflows/e2e-daemonset-1.28.yaml @@ -13,7 +13,7 @@ permissions: read-all env: # Common versions - GO_VERSION: '1.20' + GO_VERSION: '1.23' KIND_VERSION: 'v0.22.0' KIND_IMAGE: 'kindest/node:v1.28.7' KIND_CLUSTER_NAME: 'ci-testing' diff --git a/.github/workflows/e2e-deployment-1.24.yaml b/.github/workflows/e2e-deployment-1.24.yaml index aeca73a3..f076bf3c 100644 --- a/.github/workflows/e2e-deployment-1.24.yaml +++ b/.github/workflows/e2e-deployment-1.24.yaml @@ -13,7 +13,7 @@ permissions: read-all env: # Common versions - GO_VERSION: '1.20' + GO_VERSION: '1.23' KIND_VERSION: 'v0.14.0' KIND_IMAGE: 'kindest/node:v1.24.6' KIND_CLUSTER_NAME: 'ci-testing' diff --git a/.github/workflows/e2e-deployment-1.26.yaml b/.github/workflows/e2e-deployment-1.26.yaml index 7e057865..d15817a3 100644 --- a/.github/workflows/e2e-deployment-1.26.yaml +++ b/.github/workflows/e2e-deployment-1.26.yaml @@ -13,7 +13,7 @@ permissions: read-all env: # Common versions - GO_VERSION: '1.20' + GO_VERSION: '1.23' KIND_IMAGE: 'kindest/node:v1.26.3' KIND_CLUSTER_NAME: 'ci-testing' diff --git a/.github/workflows/e2e-deployment-1.28.yaml b/.github/workflows/e2e-deployment-1.28.yaml index cabbc5fb..23299bf6 100644 --- a/.github/workflows/e2e-deployment-1.28.yaml +++ b/.github/workflows/e2e-deployment-1.28.yaml @@ -13,7 +13,7 @@ permissions: read-all env: # Common versions - GO_VERSION: '1.20' + GO_VERSION: '1.23' KIND_VERSION: 'v0.22.0' KIND_IMAGE: 'kindest/node:v1.28.7' KIND_CLUSTER_NAME: 'ci-testing' diff --git a/.github/workflows/e2e-gateway.yaml b/.github/workflows/e2e-gateway.yaml index 5ae93d1e..89019f6e 100644 --- a/.github/workflows/e2e-gateway.yaml +++ b/.github/workflows/e2e-gateway.yaml @@ -13,7 +13,7 @@ permissions: read-all env: # Common versions - GO_VERSION: '1.20' + GO_VERSION: '1.23' KIND_VERSION: 'v0.14.0' KIND_IMAGE: 'kindest/node:v1.24.6' KIND_CLUSTER_NAME: 'ci-testing' diff --git a/.github/workflows/e2e-multi-network-provider.yaml b/.github/workflows/e2e-multi-network-provider.yaml index 056550c4..52cc4347 100644 --- a/.github/workflows/e2e-multi-network-provider.yaml +++ b/.github/workflows/e2e-multi-network-provider.yaml @@ -13,7 +13,7 @@ permissions: read-all env: # Common versions - GO_VERSION: '1.20' + GO_VERSION: '1.23' KIND_VERSION: 'v0.18.0' KIND_IMAGE: 'kindest/node:v1.26.3' KIND_CLUSTER_NAME: 'ci-testing' diff --git a/.github/workflows/e2e-native-daemonset-1.24.yaml b/.github/workflows/e2e-native-daemonset-1.24.yaml index a3702d68..c6c444c9 100644 --- a/.github/workflows/e2e-native-daemonset-1.24.yaml +++ b/.github/workflows/e2e-native-daemonset-1.24.yaml @@ -13,7 +13,7 @@ permissions: read-all env: # Common versions - GO_VERSION: '1.20' + GO_VERSION: '1.23' KIND_VERSION: 'v0.14.0' KIND_IMAGE: 'kindest/node:v1.24.6' KIND_CLUSTER_NAME: 'ci-testing' diff --git a/.github/workflows/e2e-native-daemonset-1.26.yaml b/.github/workflows/e2e-native-daemonset-1.26.yaml index 3fa3ae91..23bd8cbb 100644 --- a/.github/workflows/e2e-native-daemonset-1.26.yaml +++ b/.github/workflows/e2e-native-daemonset-1.26.yaml @@ -13,7 +13,7 @@ permissions: read-all env: # Common versions - GO_VERSION: '1.20' + GO_VERSION: '1.23' KIND_IMAGE: 'kindest/node:v1.26.3' KIND_CLUSTER_NAME: 'ci-testing' diff --git a/.github/workflows/e2e-native-daemonset-1.28.yaml b/.github/workflows/e2e-native-daemonset-1.28.yaml index f9da724f..d838a2f4 100644 --- a/.github/workflows/e2e-native-daemonset-1.28.yaml +++ b/.github/workflows/e2e-native-daemonset-1.28.yaml @@ -13,7 +13,7 @@ permissions: read-all env: # Common versions - GO_VERSION: '1.20' + GO_VERSION: '1.23' KIND_VERSION: 'v0.22.0' KIND_IMAGE: 'kindest/node:v1.28.7' KIND_CLUSTER_NAME: 'ci-testing' diff --git a/.github/workflows/e2e-others-1.24.yaml b/.github/workflows/e2e-others-1.24.yaml index 35463283..c5443d9a 100644 --- a/.github/workflows/e2e-others-1.24.yaml +++ b/.github/workflows/e2e-others-1.24.yaml @@ -13,7 +13,7 @@ permissions: read-all env: # Common versions - GO_VERSION: '1.20' + GO_VERSION: '1.23' KIND_VERSION: 'v0.14.0' KIND_IMAGE: 'kindest/node:v1.24.6' KIND_CLUSTER_NAME: 'ci-testing' diff --git a/.github/workflows/e2e-others-1.26.yaml b/.github/workflows/e2e-others-1.26.yaml index 9a318bef..a775591b 100644 --- a/.github/workflows/e2e-others-1.26.yaml +++ b/.github/workflows/e2e-others-1.26.yaml @@ -13,7 +13,7 @@ permissions: read-all env: # Common versions - GO_VERSION: '1.20' + GO_VERSION: '1.23' KIND_IMAGE: 'kindest/node:v1.26.3' KIND_CLUSTER_NAME: 'ci-testing' diff --git a/.github/workflows/e2e-others-1.28.yaml b/.github/workflows/e2e-others-1.28.yaml index 5a322468..0c4ea475 100644 --- a/.github/workflows/e2e-others-1.28.yaml +++ b/.github/workflows/e2e-others-1.28.yaml @@ -13,7 +13,7 @@ permissions: read-all env: # Common versions - GO_VERSION: '1.20' + GO_VERSION: '1.23' KIND_VERSION: 'v0.22.0' KIND_IMAGE: 'kindest/node:v1.28.7' KIND_CLUSTER_NAME: 'ci-testing' diff --git a/.github/workflows/e2e-statefulset-1.24.yaml b/.github/workflows/e2e-statefulset-1.24.yaml index d6922fdd..3de64d10 100644 --- a/.github/workflows/e2e-statefulset-1.24.yaml +++ b/.github/workflows/e2e-statefulset-1.24.yaml @@ -13,7 +13,7 @@ permissions: read-all env: # Common versions - GO_VERSION: '1.20' + GO_VERSION: '1.23' KIND_VERSION: 'v0.14.0' KIND_IMAGE: 'kindest/node:v1.24.6' KIND_CLUSTER_NAME: 'ci-testing' diff --git a/.github/workflows/e2e-statefulset-1.26.yaml b/.github/workflows/e2e-statefulset-1.26.yaml index 8294e415..aeeb0b26 100644 --- a/.github/workflows/e2e-statefulset-1.26.yaml +++ b/.github/workflows/e2e-statefulset-1.26.yaml @@ -13,7 +13,7 @@ permissions: read-all env: # Common versions - GO_VERSION: '1.20' + GO_VERSION: '1.23' KIND_IMAGE: 'kindest/node:v1.26.3' KIND_CLUSTER_NAME: 'ci-testing' diff --git a/.github/workflows/e2e-statefulset-1.28.yaml b/.github/workflows/e2e-statefulset-1.28.yaml index b14cd279..4a3b9957 100644 --- a/.github/workflows/e2e-statefulset-1.28.yaml +++ b/.github/workflows/e2e-statefulset-1.28.yaml @@ -13,7 +13,7 @@ permissions: read-all env: # Common versions - GO_VERSION: '1.20' + GO_VERSION: '1.23' KIND_VERSION: 'v0.22.0' KIND_IMAGE: 'kindest/node:v1.28.7' KIND_CLUSTER_NAME: 'ci-testing' diff --git a/.github/workflows/e2e-v1beta1-bluegreen-1.24.yaml b/.github/workflows/e2e-v1beta1-bluegreen-1.24.yaml index 6ede4dd9..33f3b898 100644 --- a/.github/workflows/e2e-v1beta1-bluegreen-1.24.yaml +++ b/.github/workflows/e2e-v1beta1-bluegreen-1.24.yaml @@ -13,7 +13,7 @@ permissions: read-all env: # Common versions - GO_VERSION: '1.20' + GO_VERSION: '1.23' KIND_VERSION: 'v0.14.0' KIND_IMAGE: 'kindest/node:v1.24.6' KIND_CLUSTER_NAME: 'ci-testing' diff --git a/.github/workflows/e2e-v1beta1-bluegreen-1.26.yaml b/.github/workflows/e2e-v1beta1-bluegreen-1.26.yaml index f101034c..62062955 100644 --- a/.github/workflows/e2e-v1beta1-bluegreen-1.26.yaml +++ b/.github/workflows/e2e-v1beta1-bluegreen-1.26.yaml @@ -13,7 +13,7 @@ permissions: read-all env: # Common versions - GO_VERSION: '1.20' + GO_VERSION: '1.23' KIND_IMAGE: 'kindest/node:v1.26.3' KIND_CLUSTER_NAME: 'ci-testing' diff --git a/.github/workflows/e2e-v1beta1-bluegreen-1.28.yaml b/.github/workflows/e2e-v1beta1-bluegreen-1.28.yaml index 671eb85c..7a467392 100644 --- a/.github/workflows/e2e-v1beta1-bluegreen-1.28.yaml +++ b/.github/workflows/e2e-v1beta1-bluegreen-1.28.yaml @@ -13,7 +13,7 @@ permissions: read-all env: # Common versions - GO_VERSION: '1.20' + GO_VERSION: '1.23' KIND_VERSION: 'v0.22.0' KIND_IMAGE: 'kindest/node:v1.28.7' KIND_CLUSTER_NAME: 'ci-testing' diff --git a/.github/workflows/e2e-v1beta1-jump-1.24.yaml b/.github/workflows/e2e-v1beta1-jump-1.24.yaml index f9cd8952..2aa989e0 100644 --- a/.github/workflows/e2e-v1beta1-jump-1.24.yaml +++ b/.github/workflows/e2e-v1beta1-jump-1.24.yaml @@ -13,7 +13,7 @@ permissions: read-all env: # Common versions - GO_VERSION: '1.20' + GO_VERSION: '1.23' KIND_VERSION: 'v0.14.0' KIND_IMAGE: 'kindest/node:v1.24.6' KIND_CLUSTER_NAME: 'ci-testing' diff --git a/.github/workflows/e2e-v1beta1-jump-1.26.yaml b/.github/workflows/e2e-v1beta1-jump-1.26.yaml index 007ae9d1..3d17b45a 100644 --- a/.github/workflows/e2e-v1beta1-jump-1.26.yaml +++ b/.github/workflows/e2e-v1beta1-jump-1.26.yaml @@ -13,7 +13,7 @@ permissions: read-all env: # Common versions - GO_VERSION: '1.20' + GO_VERSION: '1.23' KIND_IMAGE: 'kindest/node:v1.26.3' KIND_CLUSTER_NAME: 'ci-testing' diff --git a/.github/workflows/e2e-v1beta1-jump-1.28.yaml b/.github/workflows/e2e-v1beta1-jump-1.28.yaml index 92de86f9..d7579a10 100644 --- a/.github/workflows/e2e-v1beta1-jump-1.28.yaml +++ b/.github/workflows/e2e-v1beta1-jump-1.28.yaml @@ -10,7 +10,7 @@ on: env: # Common versions - GO_VERSION: '1.20' + GO_VERSION: '1.23' KIND_VERSION: 'v0.22.0' KIND_IMAGE: 'kindest/node:v1.28.7' KIND_CLUSTER_NAME: 'ci-testing' diff --git a/Dockerfile b/Dockerfile index 4de14887..e663c07c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.20.14-alpine3.19 AS builder +FROM golang:1.23-alpine AS builder WORKDIR /workspace diff --git a/Dockerfile_multiarch b/Dockerfile_multiarch index f60efafb..fecb0bc9 100644 --- a/Dockerfile_multiarch +++ b/Dockerfile_multiarch @@ -1,7 +1,7 @@ # Build the manager binary ARG BASE_IMAGE=alpine ARG BASE_IMAGE_VERION=3.17 -FROM --platform=$BUILDPLATFORM golang:1.19-alpine3.17 AS builder +FROM --platform=$BUILDPLATFORM golang:1.23-alpine AS builder WORKDIR /workspace diff --git a/Makefile b/Makefile index 0b08f5a2..70e8e8e0 100644 --- a/Makefile +++ b/Makefile @@ -26,7 +26,7 @@ $(TESTBIN): # ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary. # Run `setup-envtest list` to list available versions. -ENVTEST_K8S_VERSION ?= 1.28.0 +ENVTEST_K8S_VERSION ?= 1.32.0 ENVTEST ?= $(TESTBIN)/setup-envtest @@ -109,7 +109,7 @@ undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/confi CONTROLLER_GEN = $(shell pwd)/bin/controller-gen -CONTROLLER_GEN_VERSION = v0.14.0 +CONTROLLER_GEN_VERSION = v0.17.2 controller-gen: ## Download controller-gen locally if necessary. ifeq ("$(shell $(CONTROLLER_GEN) --version)", "Version: ${CONTROLLER_GEN_VERSION}") else diff --git a/config/crd/bases/rollouts.kruise.io_batchreleases.yaml b/config/crd/bases/rollouts.kruise.io_batchreleases.yaml index fef0369e..1a77adad 100644 --- a/config/crd/bases/rollouts.kruise.io_batchreleases.yaml +++ b/config/crd/bases/rollouts.kruise.io_batchreleases.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.17.2 name: batchreleases.rollouts.kruise.io spec: group: rollouts.kruise.io diff --git a/config/crd/bases/rollouts.kruise.io_rollouthistories.yaml b/config/crd/bases/rollouts.kruise.io_rollouthistories.yaml index 7ca5ac4e..299af8d3 100644 --- a/config/crd/bases/rollouts.kruise.io_rollouthistories.yaml +++ b/config/crd/bases/rollouts.kruise.io_rollouthistories.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.17.2 name: rollouthistories.rollouts.kruise.io spec: group: rollouts.kruise.io diff --git a/config/crd/bases/rollouts.kruise.io_rollouts.yaml b/config/crd/bases/rollouts.kruise.io_rollouts.yaml index d0dd7d03..531de4ee 100644 --- a/config/crd/bases/rollouts.kruise.io_rollouts.yaml +++ b/config/crd/bases/rollouts.kruise.io_rollouts.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.17.2 name: rollouts.rollouts.kruise.io spec: group: rollouts.kruise.io @@ -164,14 +164,12 @@ spec: Name is the name of the HTTP Header to be matched. Name matching MUST be case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2). - If multiple entries specify equivalent header names, only the first entry with an equivalent name MUST be considered for a match. Subsequent entries with an equivalent header name MUST be ignored. Due to the case-insensitivity of header names, "foo" and "Foo" are considered equivalent. - When a header is repeated in an HTTP request, it is implementation-specific behavior as to how this is represented. Generally, proxies should follow the guidance from the RFC: @@ -186,13 +184,10 @@ spec: description: |- Type specifies how to match against the value of the header. - Support: Core (Exact) - Support: Implementation-specific (RegularExpression) - Since RegularExpression HeaderMatchType has implementation-specific conformance, implementations can support POSIX, PCRE or any other dialects of regular expressions. Please read the implementation's documentation to @@ -238,18 +233,15 @@ spec: Set overwrites the request with the given header (name, value) before the action. - Input: GET /foo HTTP/1.1 my-header: foo - requestHeaderModifier: set: - name: "my-header" value: "bar" - Output: GET /foo HTTP/1.1 my-header: bar @@ -260,18 +252,15 @@ spec: before the action. It appends to any existing values associated with the header name. - Input: GET /foo HTTP/1.1 my-header: foo - Config: add: - name: "my-header" value: "bar,baz" - Output: GET /foo HTTP/1.1 my-header: foo,bar,baz @@ -284,7 +273,6 @@ spec: Name is the name of the HTTP Header to be matched. Name matching MUST be case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2). - If multiple entries specify equivalent header names, the first entry with an equivalent name MUST be considered for a match. Subsequent entries with an equivalent header name MUST be ignored. Due to the @@ -316,18 +304,15 @@ spec: names are case-insensitive (see https://datatracker.ietf.org/doc/html/rfc2616#section-4.2). - Input: GET /foo HTTP/1.1 my-header1: foo my-header2: bar my-header3: baz - Config: remove: ["my-header1", "my-header3"] - Output: GET /foo HTTP/1.1 my-header2: bar @@ -341,18 +326,15 @@ spec: Set overwrites the request with the given header (name, value) before the action. - Input: GET /foo HTTP/1.1 my-header: foo - Config: set: - name: "my-header" value: "bar" - Output: GET /foo HTTP/1.1 my-header: bar @@ -365,7 +347,6 @@ spec: Name is the name of the HTTP Header to be matched. Name matching MUST be case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2). - If multiple entries specify equivalent header names, the first entry with an equivalent name MUST be considered for a match. Subsequent entries with an equivalent header name MUST be ignored. Due to the @@ -688,7 +669,6 @@ spec: Matches define conditions used for matching incoming HTTP requests to the canary service. Each match is independent, i.e. this rule will be matched as long as **any** one of the matches is satisfied. - It cannot support Traffic (weight-based routing) and Matches simultaneously, if both are configured. In such cases, Matches takes precedence. items: @@ -708,14 +688,12 @@ spec: Name is the name of the HTTP Header to be matched. Name matching MUST be case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2). - If multiple entries specify equivalent header names, only the first entry with an equivalent name MUST be considered for a match. Subsequent entries with an equivalent header name MUST be ignored. Due to the case-insensitivity of header names, "foo" and "Foo" are considered equivalent. - When a header is repeated in an HTTP request, it is implementation-specific behavior as to how this is represented. Generally, proxies should follow the guidance from the RFC: @@ -730,13 +708,10 @@ spec: description: |- Type specifies how to match against the value of the header. - Support: Core (Exact) - Support: Implementation-specific (RegularExpression) - Since RegularExpression HeaderMatchType has implementation-specific conformance, implementations can support POSIX, PCRE or any other dialects of regular expressions. Please read the implementation's documentation to @@ -772,10 +747,8 @@ spec: description: |- Type specifies how to match against the path Value. - Support: Core (Exact, PathPrefix) - Support: Implementation-specific (RegularExpression) enum: - Exact @@ -858,12 +831,10 @@ spec: exact string match. (See https://tools.ietf.org/html/rfc7230#section-2.7.3). - If multiple entries specify equivalent query param names, only the first entry with an equivalent name MUST be considered for a match. Subsequent entries with an equivalent query param name MUST be ignored. - If a query param is repeated in an HTTP request, the behavior is purposely left undefined, since different data planes have different capabilities. However, it is *recommended* that implementations should @@ -871,7 +842,6 @@ spec: as this behavior is expected in other load balancing contexts outside of the Gateway API. - Users SHOULD NOT route traffic based on repeated query params to guard themselves against potential differences in the implementations. maxLength: 256 @@ -883,13 +853,10 @@ spec: description: |- Type specifies how to match against the value of the query parameter. - Support: Extended (Exact) - Support: Implementation-specific (RegularExpression) - Since RegularExpression QueryParamMatchType has Implementation-specific conformance, implementations can support POSIX, PCRE or any other dialects of regular expressions. Please read the implementation's @@ -939,18 +906,15 @@ spec: Set overwrites the request with the given header (name, value) before the action. - Input: GET /foo HTTP/1.1 my-header: foo - requestHeaderModifier: set: - name: "my-header" value: "bar" - Output: GET /foo HTTP/1.1 my-header: bar @@ -961,18 +925,15 @@ spec: before the action. It appends to any existing values associated with the header name. - Input: GET /foo HTTP/1.1 my-header: foo - Config: add: - name: "my-header" value: "bar,baz" - Output: GET /foo HTTP/1.1 my-header: foo,bar,baz @@ -985,7 +946,6 @@ spec: Name is the name of the HTTP Header to be matched. Name matching MUST be case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2). - If multiple entries specify equivalent header names, the first entry with an equivalent name MUST be considered for a match. Subsequent entries with an equivalent header name MUST be ignored. Due to the @@ -1017,18 +977,15 @@ spec: names are case-insensitive (see https://datatracker.ietf.org/doc/html/rfc2616#section-4.2). - Input: GET /foo HTTP/1.1 my-header1: foo my-header2: bar my-header3: baz - Config: remove: ["my-header1", "my-header3"] - Output: GET /foo HTTP/1.1 my-header2: bar @@ -1042,18 +999,15 @@ spec: Set overwrites the request with the given header (name, value) before the action. - Input: GET /foo HTTP/1.1 my-header: foo - Config: set: - name: "my-header" value: "bar" - Output: GET /foo HTTP/1.1 my-header: bar @@ -1066,7 +1020,6 @@ spec: Name is the name of the HTTP Header to be matched. Name matching MUST be case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2). - If multiple entries specify equivalent header names, the first entry with an equivalent name MUST be considered for a match. Subsequent entries with an equivalent header name MUST be ignored. Due to the @@ -1230,7 +1183,6 @@ spec: Matches define conditions used for matching incoming HTTP requests to the canary service. Each match is independent, i.e. this rule will be matched as long as **any** one of the matches is satisfied. - It cannot support Traffic (weight-based routing) and Matches simultaneously, if both are configured. In such cases, Matches takes precedence. items: @@ -1250,14 +1202,12 @@ spec: Name is the name of the HTTP Header to be matched. Name matching MUST be case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2). - If multiple entries specify equivalent header names, only the first entry with an equivalent name MUST be considered for a match. Subsequent entries with an equivalent header name MUST be ignored. Due to the case-insensitivity of header names, "foo" and "Foo" are considered equivalent. - When a header is repeated in an HTTP request, it is implementation-specific behavior as to how this is represented. Generally, proxies should follow the guidance from the RFC: @@ -1272,13 +1222,10 @@ spec: description: |- Type specifies how to match against the value of the header. - Support: Core (Exact) - Support: Implementation-specific (RegularExpression) - Since RegularExpression HeaderMatchType has implementation-specific conformance, implementations can support POSIX, PCRE or any other dialects of regular expressions. Please read the implementation's documentation to @@ -1314,10 +1261,8 @@ spec: description: |- Type specifies how to match against the path Value. - Support: Core (Exact, PathPrefix) - Support: Implementation-specific (RegularExpression) enum: - Exact @@ -1400,12 +1345,10 @@ spec: exact string match. (See https://tools.ietf.org/html/rfc7230#section-2.7.3). - If multiple entries specify equivalent query param names, only the first entry with an equivalent name MUST be considered for a match. Subsequent entries with an equivalent query param name MUST be ignored. - If a query param is repeated in an HTTP request, the behavior is purposely left undefined, since different data planes have different capabilities. However, it is *recommended* that implementations should @@ -1413,7 +1356,6 @@ spec: as this behavior is expected in other load balancing contexts outside of the Gateway API. - Users SHOULD NOT route traffic based on repeated query params to guard themselves against potential differences in the implementations. maxLength: 256 @@ -1425,13 +1367,10 @@ spec: description: |- Type specifies how to match against the value of the query parameter. - Support: Extended (Exact) - Support: Implementation-specific (RegularExpression) - Since RegularExpression QueryParamMatchType has Implementation-specific conformance, implementations can support POSIX, PCRE or any other dialects of regular expressions. Please read the implementation's @@ -1481,18 +1420,15 @@ spec: Set overwrites the request with the given header (name, value) before the action. - Input: GET /foo HTTP/1.1 my-header: foo - requestHeaderModifier: set: - name: "my-header" value: "bar" - Output: GET /foo HTTP/1.1 my-header: bar @@ -1503,18 +1439,15 @@ spec: before the action. It appends to any existing values associated with the header name. - Input: GET /foo HTTP/1.1 my-header: foo - Config: add: - name: "my-header" value: "bar,baz" - Output: GET /foo HTTP/1.1 my-header: foo,bar,baz @@ -1527,7 +1460,6 @@ spec: Name is the name of the HTTP Header to be matched. Name matching MUST be case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2). - If multiple entries specify equivalent header names, the first entry with an equivalent name MUST be considered for a match. Subsequent entries with an equivalent header name MUST be ignored. Due to the @@ -1559,18 +1491,15 @@ spec: names are case-insensitive (see https://datatracker.ietf.org/doc/html/rfc2616#section-4.2). - Input: GET /foo HTTP/1.1 my-header1: foo my-header2: bar my-header3: baz - Config: remove: ["my-header1", "my-header3"] - Output: GET /foo HTTP/1.1 my-header2: bar @@ -1584,18 +1513,15 @@ spec: Set overwrites the request with the given header (name, value) before the action. - Input: GET /foo HTTP/1.1 my-header: foo - Config: set: - name: "my-header" value: "bar" - Output: GET /foo HTTP/1.1 my-header: bar @@ -1608,7 +1534,6 @@ spec: Name is the name of the HTTP Header to be matched. Name matching MUST be case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2). - If multiple entries specify equivalent header names, the first entry with an equivalent name MUST be considered for a match. Subsequent entries with an equivalent header name MUST be ignored. Due to the diff --git a/config/crd/bases/rollouts.kruise.io_trafficroutings.yaml b/config/crd/bases/rollouts.kruise.io_trafficroutings.yaml index 2ea47300..85f37f7e 100644 --- a/config/crd/bases/rollouts.kruise.io_trafficroutings.yaml +++ b/config/crd/bases/rollouts.kruise.io_trafficroutings.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.14.0 + controller-gen.kubebuilder.io/version: v0.17.2 name: trafficroutings.rollouts.kruise.io spec: group: rollouts.kruise.io @@ -142,14 +142,12 @@ spec: Name is the name of the HTTP Header to be matched. Name matching MUST be case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2). - If multiple entries specify equivalent header names, only the first entry with an equivalent name MUST be considered for a match. Subsequent entries with an equivalent header name MUST be ignored. Due to the case-insensitivity of header names, "foo" and "Foo" are considered equivalent. - When a header is repeated in an HTTP request, it is implementation-specific behavior as to how this is represented. Generally, proxies should follow the guidance from the RFC: @@ -164,13 +162,10 @@ spec: description: |- Type specifies how to match against the value of the header. - Support: Core (Exact) - Support: Implementation-specific (RegularExpression) - Since RegularExpression HeaderMatchType has implementation-specific conformance, implementations can support POSIX, PCRE or any other dialects of regular expressions. Please read the implementation's documentation to @@ -198,18 +193,15 @@ spec: Set overwrites the request with the given header (name, value) before the action. - Input: GET /foo HTTP/1.1 my-header: foo - requestHeaderModifier: set: - name: "my-header" value: "bar" - Output: GET /foo HTTP/1.1 my-header: bar @@ -220,18 +212,15 @@ spec: before the action. It appends to any existing values associated with the header name. - Input: GET /foo HTTP/1.1 my-header: foo - Config: add: - name: "my-header" value: "bar,baz" - Output: GET /foo HTTP/1.1 my-header: foo,bar,baz @@ -244,7 +233,6 @@ spec: Name is the name of the HTTP Header to be matched. Name matching MUST be case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2). - If multiple entries specify equivalent header names, the first entry with an equivalent name MUST be considered for a match. Subsequent entries with an equivalent header name MUST be ignored. Due to the @@ -276,18 +264,15 @@ spec: names are case-insensitive (see https://datatracker.ietf.org/doc/html/rfc2616#section-4.2). - Input: GET /foo HTTP/1.1 my-header1: foo my-header2: bar my-header3: baz - Config: remove: ["my-header1", "my-header3"] - Output: GET /foo HTTP/1.1 my-header2: bar @@ -301,18 +286,15 @@ spec: Set overwrites the request with the given header (name, value) before the action. - Input: GET /foo HTTP/1.1 my-header: foo - Config: set: - name: "my-header" value: "bar" - Output: GET /foo HTTP/1.1 my-header: bar @@ -325,7 +307,6 @@ spec: Name is the name of the HTTP Header to be matched. Name matching MUST be case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2). - If multiple entries specify equivalent header names, the first entry with an equivalent name MUST be considered for a match. Subsequent entries with an equivalent header name MUST be ignored. Due to the diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index 4e01412d..4bb93c61 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -5,105 +5,85 @@ metadata: name: manager-role rules: - apiGroups: - - '*' - resources: - - events - verbs: - - create - - patch - - update -- apiGroups: - - admissionregistration.k8s.io + - "" resources: - - mutatingwebhookconfigurations + - configmaps verbs: - get - list - - patch - - update - watch - apiGroups: - - admissionregistration.k8s.io + - "" resources: - - validatingwebhookconfigurations + - pods + - services verbs: + - create + - delete - get - list - patch - update - watch - apiGroups: - - apiextensions.k8s.io + - "" resources: - - customresourcedefinitions + - pods/finalizers verbs: - - get - - list - - patch - update - - watch - apiGroups: - - apps - resources: - - controllerrevisions - verbs: - - get - - list - - watch -- apiGroups: - - apps + - "" resources: - - daemonsets + - pods/status + - services/status verbs: - get - - list - patch - update - - watch - apiGroups: - - apps + - '*' resources: - - daemonsets/status + - events verbs: - - get + - create - patch - update - apiGroups: - - apps + - admissionregistration.k8s.io resources: - - deployments + - mutatingwebhookconfigurations + - validatingwebhookconfigurations verbs: - - create - - delete - get - list - patch - update - watch - apiGroups: - - apps + - apiextensions.k8s.io resources: - - deployments/status + - customresourcedefinitions verbs: - get + - list - patch - update + - watch - apiGroups: - apps resources: - - replicasets + - controllerrevisions verbs: - - create - - delete - get - list - - patch - - update - watch - apiGroups: - apps resources: + - daemonsets/status + - deployments/status - replicasets/status + - statefulsets/status verbs: - get - patch @@ -111,6 +91,8 @@ rules: - apiGroups: - apps resources: + - deployments + - replicasets - statefulsets verbs: - create @@ -122,33 +104,6 @@ rules: - watch - apiGroups: - apps - resources: - - statefulsets/status - verbs: - - get - - patch - - update -- apiGroups: - - apps.kruise.io - resources: - - clonesets - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - apps.kruise.io - resources: - - clonesets/status - verbs: - - get - - patch - - update -- apiGroups: - apps.kruise.io resources: - daemonsets @@ -161,14 +116,7 @@ rules: - apiGroups: - apps.kruise.io resources: - - daemonsets/status - verbs: - - get - - patch - - update -- apiGroups: - - apps.kruise.io - resources: + - clonesets - statefulsets verbs: - create @@ -181,6 +129,8 @@ rules: - apiGroups: - apps.kruise.io resources: + - clonesets/status + - daemonsets/status - statefulsets/status verbs: - get @@ -196,60 +146,6 @@ rules: - patch - update - watch -- apiGroups: - - "" - resources: - - configmaps - verbs: - - get - - list - - watch -- apiGroups: - - "" - resources: - - pods - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - "" - resources: - - pods/finalizers - verbs: - - update -- apiGroups: - - "" - resources: - - pods/status - verbs: - - get - - patch - - update -- apiGroups: - - "" - resources: - - services - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - "" - resources: - - services/status - verbs: - - get - - patch - - update - apiGroups: - gateway.networking.k8s.io resources: @@ -305,26 +201,8 @@ rules: - rollouts.kruise.io resources: - batchreleases - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - rollouts.kruise.io - resources: - - batchreleases/status - verbs: - - get - - patch - - update -- apiGroups: - - rollouts.kruise.io - resources: - rollouthistories + - rollouts verbs: - create - delete @@ -336,13 +214,10 @@ rules: - apiGroups: - rollouts.kruise.io resources: - - rollouthistories/finalizers - verbs: - - update -- apiGroups: - - rollouts.kruise.io - resources: + - batchreleases/status - rollouthistories/status + - rollouts/status + - trafficroutings/status verbs: - get - patch @@ -350,29 +225,11 @@ rules: - apiGroups: - rollouts.kruise.io resources: - - rollouts - verbs: - - create - - delete - - get - - list - - patch - - update - - watch -- apiGroups: - - rollouts.kruise.io - resources: + - rollouthistories/finalizers - rollouts/finalizers + - trafficroutings/finalizers verbs: - update -- apiGroups: - - rollouts.kruise.io - resources: - - rollouts/status - verbs: - - get - - patch - - update - apiGroups: - rollouts.kruise.io resources: @@ -384,20 +241,6 @@ rules: - patch - update - watch -- apiGroups: - - rollouts.kruise.io - resources: - - trafficroutings/finalizers - verbs: - - update -- apiGroups: - - rollouts.kruise.io - resources: - - trafficroutings/status - verbs: - - get - - patch - - update --- apiVersion: rbac.authorization.k8s.io/v1 kind: Role diff --git a/go.mod b/go.mod index df5f3401..4aab3e7f 100644 --- a/go.mod +++ b/go.mod @@ -1,81 +1,85 @@ module github.com/openkruise/rollouts -go 1.20 +go 1.23.0 require ( - github.com/davecgh/go-spew v1.1.1 - github.com/evanphx/json-patch v5.6.0+incompatible - github.com/go-logr/logr v1.4.1 + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc + github.com/evanphx/json-patch v5.7.0+incompatible + github.com/go-logr/logr v1.4.2 github.com/onsi/ginkgo v1.16.5 - github.com/onsi/gomega v1.27.10 + github.com/onsi/gomega v1.36.1 github.com/openkruise/kruise-api v1.7.0 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.9.0 github.com/yuin/gopher-lua v0.0.0-20220504180219-658193537a64 - golang.org/x/time v0.3.0 + golang.org/x/time v0.7.0 gopkg.in/yaml.v2 v2.4.0 - k8s.io/api v0.28.9 - k8s.io/apiextensions-apiserver v0.28.9 - k8s.io/apimachinery v0.28.9 - k8s.io/apiserver v0.28.9 - k8s.io/client-go v0.28.9 - k8s.io/component-base v0.28.9 - k8s.io/klog/v2 v2.120.1 - k8s.io/utils v0.0.0-20230726121419-3b25d923346b + k8s.io/api v0.32.3 + k8s.io/apiextensions-apiserver v0.32.3 + k8s.io/apimachinery v0.32.3 + k8s.io/apiserver v0.32.3 + k8s.io/client-go v0.32.3 + k8s.io/component-base v0.32.3 + k8s.io/klog/v2 v2.130.1 + k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 layeh.com/gopher-json v0.0.0-20201124131017-552bb3c4c3bf - sigs.k8s.io/controller-runtime v0.16.6 - sigs.k8s.io/gateway-api v0.8.1 + sigs.k8s.io/controller-runtime v0.20.4 + sigs.k8s.io/gateway-api v1.2.1 sigs.k8s.io/yaml v1.4.0 ) require ( github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/emicklei/go-restful/v3 v3.11.0 // indirect - github.com/evanphx/json-patch/v5 v5.6.0 // indirect - github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/go-logr/zapr v1.2.4 // indirect - github.com/go-openapi/jsonpointer v0.19.6 // indirect - github.com/go-openapi/jsonreference v0.20.2 // indirect - github.com/go-openapi/swag v0.22.3 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/emicklei/go-restful/v3 v3.12.0 // indirect + github.com/evanphx/json-patch/v5 v5.9.11 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/fxamacker/cbor/v2 v2.7.0 // indirect + github.com/go-logr/zapr v1.3.0 // 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/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.4 // indirect + github.com/google/btree v1.1.3 // indirect github.com/google/gnostic-models v0.6.8 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/imdario/mergo v0.3.12 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/mailru/easyjson v0.7.7 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/nxadm/tail v1.4.8 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.16.0 // indirect - github.com/prometheus/client_model v0.4.0 // indirect - github.com/prometheus/common v0.44.0 // indirect - github.com/prometheus/procfs v0.10.1 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.19.1 // indirect + github.com/prometheus/client_model v0.6.1 // indirect + github.com/prometheus/common v0.55.0 // indirect + github.com/prometheus/procfs v0.15.1 // indirect + github.com/spf13/cobra v1.8.1 // indirect + github.com/x448/float16 v0.8.4 // indirect + go.opentelemetry.io/otel v1.28.0 // indirect + go.opentelemetry.io/otel/trace v1.28.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.25.0 // indirect - golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect - golang.org/x/net v0.26.0 // indirect - golang.org/x/oauth2 v0.17.0 // indirect - golang.org/x/sys v0.21.0 // indirect - golang.org/x/term v0.21.0 // indirect - golang.org/x/text v0.16.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/net v0.30.0 // indirect + golang.org/x/oauth2 v0.23.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/sys v0.26.0 // indirect + golang.org/x/term v0.25.0 // indirect + golang.org/x/text v0.19.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect - google.golang.org/appengine v1.6.8 // indirect - google.golang.org/protobuf v1.33.0 // indirect + google.golang.org/protobuf v1.35.1 // indirect + gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect - sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect + k8s.io/kube-openapi v0.0.0-20241105132330-32ad38e42d3f // indirect + sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.2 // indirect ) diff --git a/go.sum b/go.sum index 370dc15c..0b996da4 100644 --- a/go.sum +++ b/go.sum @@ -1,42 +1,42 @@ -github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= 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/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +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/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= -github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= -github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= -github.com/evanphx/json-patch v5.6.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= -github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= +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.0 h1:y2DdzBAURM29NFF94q6RaY4vjIH1rtwDapwQtU84iWk= +github.com/emicklei/go-restful/v3 v3.12.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/evanphx/json-patch v5.7.0+incompatible h1:vgGkfT/9f8zE6tvSCe74nfpAVDQ2tG6yudJd8LBksgI= +github.com/evanphx/json-patch v5.7.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +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/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= -github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= -github.com/go-logr/zapr v1.2.4/go.mod h1:FyHWQIzQORZ0QVE1BtVHv3cKtNLuXsbNLtpuhNapBOA= -github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= -github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= -github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= -github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= -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/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +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-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/zapr v1.3.0 h1:XGdV8XW8zdwFiwOA2Dryh1gj2KRQyOOoNmBy4EplIcQ= +github.com/go-logr/zapr v1.3.0/go.mod h1:YKepepNBd1u/oyhd/yQmtjVXmm9uML4IXUgMOwR8/Gg= +github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= +github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= +github.com/go-openapi/jsonreference v0.21.0 h1:Rs+Y7hSXT83Jacb7kFyjn4ijOuVGSvOdF2+tg1TRrwQ= +github.com/go-openapi/jsonreference v0.21.0/go.mod h1:LmZmgsrTkVg9LG4EaHeY8cBDslNPMo06cago5JNLkm4= +github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= +github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= +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.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= @@ -44,46 +44,40 @@ github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrU github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= +github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= 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.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= 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-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= +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/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= -github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= 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/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +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/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= 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= @@ -98,87 +92,76 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= +github.com/onsi/ginkgo/v2 v2.22.0 h1:Yed107/8DjTr0lKCNt7Dn8yQ6ybuDRQoMGrNFKzMfHg= +github.com/onsi/ginkgo/v2 v2.22.0/go.mod h1:7Du3c42kxCUegi0IImZ1wUQzMBVecgIHjR1C+NkhLQo= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= -github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= +github.com/onsi/gomega v1.36.1 h1:bJDPBO7ibjxcbHMgSCoo4Yj18UWbKDlLwX1x9sybDcw= +github.com/onsi/gomega v1.36.1/go.mod h1:PvZbdDc8J6XJEpDK4HCuRBm8a6Fzp9/DmhC9C7yFlog= github.com/openkruise/kruise-api v1.7.0 h1:Mg13oePPZZ1XfOEXqXTFgg4wNC07CnPK6fcPePLkv/U= github.com/openkruise/kruise-api v1.7.0/go.mod h1:BXZAyzIPmaF0JEI0YT1fWEYTAcOCJRCzOdCg4BpXbXQ= -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/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= -github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +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.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= +github.com/prometheus/client_golang v1.19.1/go.mod h1:mP78NwGzrVks5S2H6ab8+ZZGJLZUq1hoULYBAYBw1Ho= +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.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc= +github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8= +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/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= +github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= 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/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +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= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yuin/gopher-lua v0.0.0-20220504180219-658193537a64 h1:5mLPGnFdSsevFRFc9q3yYbBkB6tsm4aCwwQV/j1JQAQ= github.com/yuin/gopher-lua v0.0.0-20220504180219-658193537a64/go.mod h1:GBR0iDaNXjAgGg9zfCvksxSRnQx76gclCIb7kdAd1Pw= -go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= -go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.opentelemetry.io/otel v1.28.0 h1:/SqNcYk+idO0CxKEUOtKQClMK/MimZihKYMruSMViUo= +go.opentelemetry.io/otel v1.28.0/go.mod h1:q68ijF8Fc8CnMHKyzqL6akLO46ePnjkgfIMIjUIX9z4= +go.opentelemetry.io/otel/trace v1.28.0 h1:GhQ9cUuQGmNDd5BTCP2dAvv75RdMxEfTmYejp+lkx9g= +go.opentelemetry.io/otel/trace v1.28.0/go.mod h1:jPyXzNPg6da9+38HEwElrQiHlVMTnVfM3/yv2OlIHaI= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= -go.uber.org/zap v1.25.0 h1:4Hvk6GtkucQ790dqmj7l1eEnRdKm3k3ZUrUMS2d5+5c= -go.uber.org/zap v1.25.0/go.mod h1:JIAUzQIH94IC4fOJQm7gMmBJP5k7wQfdcnYdPoEXJYk= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= 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.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e h1:+WEEuIdZHnUeJJmEUjyYC2gfUMj69yZXw17EnHg/otA= -golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e/go.mod h1:Kr81I6Kryrl9sr8s2FK3vxD90NdsKWRuOIl2O4CvYbA= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 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.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 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-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= -golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= -golang.org/x/oauth2 v0.17.0 h1:6m3ZPmLEFdVxKKWnKq4VqZ60gutO35zm+zrAHVmHyDQ= -golang.org/x/oauth2 v0.17.0/go.mod h1:OzPDGQiuQMguemayvdylqddI7qcD9lnSDb+1FiwQ5HA= +golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4= +golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= +golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= +golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 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.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 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= @@ -187,59 +170,43 @@ golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= -golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= +golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= +golang.org/x/sys v0.26.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/term v0.25.0 h1:WtHI/ltw4NvSUig5KARz9h521QvRC8RmF/cuYqifU24= +golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M= 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.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= -golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= -golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= +golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/time v0.7.0 h1:ntUhktv3OPE6TgYxXWv9vKvUSJyIFJlyohwbkEwPrKQ= +golang.org/x/time v0.7.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 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-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg= +golang.org/x/tools v0.26.0 h1:v/60pFQmzmT9ExmjDv2gGIfi3OqfKoEP6I5+umXlbnQ= +golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0= 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/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= -google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= +google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/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-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSPG+6V4= +gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= @@ -247,40 +214,38 @@ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkep gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 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.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 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.28.9 h1:E7VEXXCAlSrp+08zq4zgd+ko6Ttu0Mw+XoXlIkDTVW0= -k8s.io/api v0.28.9/go.mod h1:AnCsDYf3SHjfa8mPG5LGYf+iF4mie+3peLQR51MMCgw= -k8s.io/apiextensions-apiserver v0.28.9 h1:yzPHp+4IASHeu7XIPkAKJrY4UjWdjiAjOcQMd6oNKj0= -k8s.io/apiextensions-apiserver v0.28.9/go.mod h1:Rjhvq5y3JESdZgV2UOByldyefCfRrUguVpBLYOAIbVs= -k8s.io/apimachinery v0.28.9 h1:aXz4Zxsw+Pk4KhBerAtKRxNN1uSMWKfciL/iOdBfXvA= -k8s.io/apimachinery v0.28.9/go.mod h1:zUG757HaKs6Dc3iGtKjzIpBfqTM4yiRsEe3/E7NX15o= -k8s.io/apiserver v0.28.9 h1:koPXvgSXRBDxKJQjJGdZNgPsT9lQv6scJJFipd1m86E= -k8s.io/apiserver v0.28.9/go.mod h1:D51I37WBZojJhmLcjNVE4GSVrjiUHP+yq+N5KvKn2wY= -k8s.io/client-go v0.28.9 h1:mmMvejwc/KDjMLmDpyaxkWNzlWRCJ6ht7Qsbsnwn39Y= -k8s.io/client-go v0.28.9/go.mod h1:GFDy3rUNId++WGrr0hRaBrs+y1eZz5JtVZODEalhRMo= -k8s.io/component-base v0.28.9 h1:ySM2PR8Z/xaUSG1Akd3yM6dqUezTltI7S5aV41MMuuc= -k8s.io/component-base v0.28.9/go.mod h1:QtWzscEhCKRfHV24/S+11BwWjVxhC6fd3RYoEgZcWFU= -k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw= -k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= -k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= -k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= -k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +k8s.io/api v0.32.3 h1:Hw7KqxRusq+6QSplE3NYG4MBxZw1BZnq4aP4cJVINls= +k8s.io/api v0.32.3/go.mod h1:2wEDTXADtm/HA7CCMD8D8bK4yuBUptzaRhYcYEEYA3k= +k8s.io/apiextensions-apiserver v0.32.3 h1:4D8vy+9GWerlErCwVIbcQjsWunF9SUGNu7O7hiQTyPY= +k8s.io/apiextensions-apiserver v0.32.3/go.mod h1:8YwcvVRMVzw0r1Stc7XfGAzB/SIVLunqApySV5V7Dss= +k8s.io/apimachinery v0.32.3 h1:JmDuDarhDmA/Li7j3aPrwhpNBA94Nvk5zLeOge9HH1U= +k8s.io/apimachinery v0.32.3/go.mod h1:GpHVgxoKlTxClKcteaeuF1Ul/lDVb74KpZcxcmLDElE= +k8s.io/apiserver v0.32.3 h1:kOw2KBuHOA+wetX1MkmrxgBr648ksz653j26ESuWNY8= +k8s.io/apiserver v0.32.3/go.mod h1:q1x9B8E/WzShF49wh3ADOh6muSfpmFL0I2t+TG0Zdgc= +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/component-base v0.32.3 h1:98WJvvMs3QZ2LYHBzvltFSeJjEx7t5+8s71P7M74u8k= +k8s.io/component-base v0.32.3/go.mod h1:LWi9cR+yPAv7cu2X9rZanTiFKB2kHA+JjmhkKjCZRpI= +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= layeh.com/gopher-json v0.0.0-20201124131017-552bb3c4c3bf h1:rRz0YsF7VXj9fXRF6yQgFI7DzST+hsI3TeFSGupntu0= layeh.com/gopher-json v0.0.0-20201124131017-552bb3c4c3bf/go.mod h1:ivKkcY8Zxw5ba0jldhZCYYQfGdb2K6u9tbYK1AwMIBc= -sigs.k8s.io/controller-runtime v0.16.6 h1:FiXwTuFF5ZJKmozfP2Z0j7dh6kmxP4Ou1KLfxgKKC3I= -sigs.k8s.io/controller-runtime v0.16.6/go.mod h1:+dQzkZxnylD0u49e0a+7AR+vlibEBaThmPca7lTyUsI= -sigs.k8s.io/gateway-api v0.8.1 h1:Bo4NMAQFYkQZnHXOfufbYwbPW7b3Ic5NjpbeW6EJxuU= -sigs.k8s.io/gateway-api v0.8.1/go.mod h1:0PteDrsrgkRmr13nDqFWnev8tOysAVrwnvfFM55tSVg= -sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= -sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= -sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= +sigs.k8s.io/controller-runtime v0.20.4 h1:X3c+Odnxz+iPTRobG4tp092+CvBU9UK0t/bRf+n0DGU= +sigs.k8s.io/controller-runtime v0.20.4/go.mod h1:xg2XB0K5ShQzAgsoujxuKN4LNXR2LfwwHsPj7Iaw+XY= +sigs.k8s.io/gateway-api v1.2.1 h1:fZZ/+RyRb+Y5tGkwxFKuYuSRQHu9dZtbjenblleOLHM= +sigs.k8s.io/gateway-api v1.2.1/go.mod h1:EpNfEXNjiYfUJypf0eZ0P5iXA9ekSGWaS1WgPaM42X0= +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= diff --git a/pkg/controller/batchrelease/batchrelease_controller.go b/pkg/controller/batchrelease/batchrelease_controller.go index 3b93f459..2c884f39 100644 --- a/pkg/controller/batchrelease/batchrelease_controller.go +++ b/pkg/controller/batchrelease/batchrelease_controller.go @@ -99,7 +99,7 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error { } // Watch for changes to BatchRelease - err = c.Watch(source.Kind(mgr.GetCache(), &v1beta1.BatchRelease{}), &handler.EnqueueRequestForObject{}, predicate.Funcs{ + err = c.Watch(source.Kind[client.Object](mgr.GetCache(), &v1beta1.BatchRelease{}, &handler.EnqueueRequestForObject{}, predicate.Funcs{ UpdateFunc: func(e event.UpdateEvent) bool { oldObject := e.ObjectOld.(*v1beta1.BatchRelease) newObject := e.ObjectNew.(*v1beta1.BatchRelease) @@ -113,12 +113,12 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error { } return false }, - }) + })) if err != nil { return err } - err = c.Watch(source.Kind(mgr.GetCache(), &corev1.Pod{}), &podEventHandler{Reader: mgr.GetCache()}) + err = c.Watch(source.Kind[client.Object](mgr.GetCache(), &corev1.Pod{}, &podEventHandler{Reader: mgr.GetCache()})) if err != nil { return err } diff --git a/pkg/controller/batchrelease/batchrelease_event_handler.go b/pkg/controller/batchrelease/batchrelease_event_handler.go index e30c2796..5ab4de19 100644 --- a/pkg/controller/batchrelease/batchrelease_event_handler.go +++ b/pkg/controller/batchrelease/batchrelease_event_handler.go @@ -56,7 +56,7 @@ type podEventHandler struct { client.Reader } -func (p podEventHandler) Create(ctx context.Context, evt event.CreateEvent, q workqueue.RateLimitingInterface) { +func (p podEventHandler) Create(ctx context.Context, evt event.TypedCreateEvent[client.Object], q workqueue.TypedRateLimitingInterface[reconcile.Request]) { pod, ok := evt.Object.(*corev1.Pod) if !ok { return @@ -64,13 +64,13 @@ func (p podEventHandler) Create(ctx context.Context, evt event.CreateEvent, q wo p.enqueue(pod, q) } -func (p podEventHandler) Generic(ctx context.Context, evt event.GenericEvent, q workqueue.RateLimitingInterface) { +func (p podEventHandler) Generic(ctx context.Context, evt event.TypedGenericEvent[client.Object], q workqueue.TypedRateLimitingInterface[reconcile.Request]) { } -func (p podEventHandler) Delete(ctx context.Context, evt event.DeleteEvent, q workqueue.RateLimitingInterface) { +func (p podEventHandler) Delete(ctx context.Context, evt event.TypedDeleteEvent[client.Object], q workqueue.TypedRateLimitingInterface[reconcile.Request]) { } -func (p podEventHandler) Update(ctx context.Context, evt event.UpdateEvent, q workqueue.RateLimitingInterface) { +func (p podEventHandler) Update(ctx context.Context, evt event.TypedUpdateEvent[client.Object], q workqueue.TypedRateLimitingInterface[reconcile.Request]) { oldPod, oldOK := evt.ObjectOld.(*corev1.Pod) newPod, newOK := evt.ObjectNew.(*corev1.Pod) if !oldOK || !newOK { @@ -84,7 +84,7 @@ func (p podEventHandler) Update(ctx context.Context, evt event.UpdateEvent, q wo p.enqueue(newPod, q) } -func (p podEventHandler) enqueue(pod *corev1.Pod, q workqueue.RateLimitingInterface) { +func (p podEventHandler) enqueue(pod *corev1.Pod, q workqueue.TypedRateLimitingInterface[reconcile.Request]) { owner := metav1.GetControllerOfNoCopy(pod) if owner == nil { return @@ -122,12 +122,12 @@ type workloadEventHandler struct { client.Reader } -func (w workloadEventHandler) Create(ctx context.Context, evt event.CreateEvent, q workqueue.RateLimitingInterface) { +func (w workloadEventHandler) Create(ctx context.Context, evt event.TypedCreateEvent[client.Object], q workqueue.TypedRateLimitingInterface[reconcile.Request]) { expectationObserved(evt.Object) w.handleWorkload(q, evt.Object, CreateEventAction) } -func (w workloadEventHandler) Update(ctx context.Context, evt event.UpdateEvent, q workqueue.RateLimitingInterface) { +func (w workloadEventHandler) Update(ctx context.Context, evt event.TypedUpdateEvent[client.Object], q workqueue.TypedRateLimitingInterface[reconcile.Request]) { var gvk schema.GroupVersionKind switch obj := evt.ObjectNew.(type) { case *kruiseappsv1alpha1.CloneSet: @@ -175,14 +175,14 @@ func (w workloadEventHandler) Update(ctx context.Context, evt event.UpdateEvent, } } -func (w workloadEventHandler) Delete(ctx context.Context, evt event.DeleteEvent, q workqueue.RateLimitingInterface) { +func (w workloadEventHandler) Delete(ctx context.Context, evt event.TypedDeleteEvent[client.Object], q workqueue.TypedRateLimitingInterface[reconcile.Request]) { w.handleWorkload(q, evt.Object, DeleteEventAction) } -func (w workloadEventHandler) Generic(ctx context.Context, evt event.GenericEvent, q workqueue.RateLimitingInterface) { +func (w workloadEventHandler) Generic(ctx context.Context, evt event.TypedGenericEvent[client.Object], q workqueue.TypedRateLimitingInterface[reconcile.Request]) { } -func (w *workloadEventHandler) handleWorkload(q workqueue.RateLimitingInterface, obj client.Object, action EventAction) { +func (w *workloadEventHandler) handleWorkload(q workqueue.TypedRateLimitingInterface[reconcile.Request], obj client.Object, action EventAction) { var gvk schema.GroupVersionKind switch o := obj.(type) { case *kruiseappsv1alpha1.CloneSet: diff --git a/pkg/controller/batchrelease/batchrelease_event_handler_test.go b/pkg/controller/batchrelease/batchrelease_event_handler_test.go index d0bfee3d..dc4c94b5 100644 --- a/pkg/controller/batchrelease/batchrelease_event_handler_test.go +++ b/pkg/controller/batchrelease/batchrelease_event_handler_test.go @@ -33,6 +33,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" "sigs.k8s.io/controller-runtime/pkg/event" + "sigs.k8s.io/controller-runtime/pkg/reconcile" "github.com/openkruise/rollouts/api/v1beta1" "github.com/openkruise/rollouts/pkg/util" @@ -134,7 +135,7 @@ func TestWorkloadEventHandler_Update(t *testing.T) { fmt.Println(newSJk) cli := fake.NewClientBuilder().WithScheme(scheme).WithObjects(releaseDeploy.DeepCopy()).Build() handler := workloadEventHandler{Reader: cli} - updateQ := workqueue.NewRateLimitingQueue(workqueue.DefaultControllerRateLimiter()) + updateQ := workqueue.NewTypedRateLimitingQueue[reconcile.Request](workqueue.DefaultTypedControllerRateLimiter[reconcile.Request]()) updateEvt := event.UpdateEvent{ ObjectOld: oldObject, ObjectNew: newObject, @@ -191,7 +192,7 @@ func TestWorkloadEventHandler_Create(t *testing.T) { newObject := cs.GetNewWorkload() cli := fake.NewClientBuilder().WithScheme(scheme).WithObjects(releaseDeploy.DeepCopy()).Build() handler := workloadEventHandler{Reader: cli} - createQ := workqueue.NewRateLimitingQueue(workqueue.DefaultControllerRateLimiter()) + createQ := workqueue.NewTypedRateLimitingQueue[reconcile.Request](workqueue.DefaultTypedControllerRateLimiter[reconcile.Request]()) createEvt := event.CreateEvent{ Object: newObject, } @@ -247,7 +248,7 @@ func TestWorkloadEventHandler_Delete(t *testing.T) { newObject := cs.GetNewWorkload() cli := fake.NewClientBuilder().WithScheme(scheme).WithObjects(releaseDeploy.DeepCopy()).Build() handler := workloadEventHandler{Reader: cli} - deleteQ := workqueue.NewRateLimitingQueue(workqueue.DefaultControllerRateLimiter()) + deleteQ := workqueue.NewTypedRateLimitingQueue[reconcile.Request](workqueue.DefaultTypedControllerRateLimiter[reconcile.Request]()) deleteEvt := event.DeleteEvent{ Object: newObject, } @@ -396,7 +397,7 @@ func TestPodEventHandler_Update(t *testing.T) { fmt.Println(newSJk) cli := fake.NewClientBuilder().WithScheme(scheme).WithObjects(releaseDeploy.DeepCopy(), workload).Build() handler := podEventHandler{Reader: cli} - updateQ := workqueue.NewRateLimitingQueue(workqueue.DefaultControllerRateLimiter()) + updateQ := workqueue.NewTypedRateLimitingQueue[reconcile.Request](workqueue.DefaultTypedControllerRateLimiter[reconcile.Request]()) updateEvt := event.UpdateEvent{ ObjectOld: oldObject, ObjectNew: newObject, @@ -464,7 +465,7 @@ func TestPodEventHandler_Create(t *testing.T) { workload := cs.GetWorkload() cli := fake.NewClientBuilder().WithScheme(scheme).WithObjects(releaseDeploy.DeepCopy(), workload).Build() handler := podEventHandler{Reader: cli} - createQ := workqueue.NewRateLimitingQueue(workqueue.DefaultControllerRateLimiter()) + createQ := workqueue.NewTypedRateLimitingQueue[reconcile.Request](workqueue.DefaultTypedControllerRateLimiter[reconcile.Request]()) createEvt := event.CreateEvent{ Object: newObject, } diff --git a/pkg/controller/deployment/controller.go b/pkg/controller/deployment/controller.go index a15d7c3c..4d58852c 100644 --- a/pkg/controller/deployment/controller.go +++ b/pkg/controller/deployment/controller.go @@ -114,13 +114,13 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error { } // Watch for changes to ReplicaSet - if err = c.Watch(source.Kind(mgr.GetCache(), &appsv1.ReplicaSet{}), handler.EnqueueRequestForOwner( - mgr.GetScheme(), mgr.GetRESTMapper(), &appsv1.Deployment{}, handler.OnlyControllerOwner())); err != nil { + if err = c.Watch(source.Kind[client.Object](mgr.GetCache(), &appsv1.ReplicaSet{}, handler.EnqueueRequestForOwner( + mgr.GetScheme(), mgr.GetRESTMapper(), &appsv1.Deployment{}, handler.OnlyControllerOwner()))); err != nil { return err } // Watch for changes to MutatingWebhookConfigurations of kruise-rollout operator - if err = c.Watch(source.Kind(mgr.GetCache(), &admissionregistrationv1.MutatingWebhookConfiguration{}), &MutatingWebhookEventHandler{mgr.GetCache()}); err != nil { + if err = c.Watch(source.Kind[client.Object](mgr.GetCache(), &admissionregistrationv1.MutatingWebhookConfiguration{}, &MutatingWebhookEventHandler{mgr.GetCache()})); err != nil { return err } @@ -143,7 +143,7 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error { } // Watch for changes to Deployment - return c.Watch(source.Kind(mgr.GetCache(), &appsv1.Deployment{}), &handler.EnqueueRequestForObject{}, predicate.Funcs{UpdateFunc: updateHandler}) + return c.Watch(source.Kind[client.Object](mgr.GetCache(), &appsv1.Deployment{}, &handler.EnqueueRequestForObject{}, predicate.Funcs{UpdateFunc: updateHandler})) } // Reconcile reads that state of the cluster for a Deployment object and makes changes based on the state read diff --git a/pkg/controller/deployment/deployment_event_handler.go b/pkg/controller/deployment/deployment_event_handler.go index 404c8352..a78a2b33 100644 --- a/pkg/controller/deployment/deployment_event_handler.go +++ b/pkg/controller/deployment/deployment_event_handler.go @@ -15,11 +15,13 @@ import ( "github.com/openkruise/rollouts/pkg/webhook/util/configuration" ) +type typedQueue = workqueue.TypedRateLimitingInterface[reconcile.Request] + type MutatingWebhookEventHandler struct { client.Reader } -func (m MutatingWebhookEventHandler) Create(ctx context.Context, evt event.CreateEvent, q workqueue.RateLimitingInterface) { +func (m MutatingWebhookEventHandler) Create(ctx context.Context, evt event.TypedCreateEvent[client.Object], q typedQueue) { config, ok := evt.Object.(*admissionregistrationv1.MutatingWebhookConfiguration) if !ok || config == nil || !isKruiseRolloutMutatingConfiguration(config) || config.DeletionTimestamp.IsZero() { return @@ -27,7 +29,7 @@ func (m MutatingWebhookEventHandler) Create(ctx context.Context, evt event.Creat m.enqueue(q) } -func (m MutatingWebhookEventHandler) Generic(ctx context.Context, evt event.GenericEvent, q workqueue.RateLimitingInterface) { +func (m MutatingWebhookEventHandler) Generic(ctx context.Context, evt event.TypedGenericEvent[client.Object], q typedQueue) { config, ok := evt.Object.(*admissionregistrationv1.MutatingWebhookConfiguration) if !ok || config == nil || !isKruiseRolloutMutatingConfiguration(config) || config.DeletionTimestamp.IsZero() { return @@ -35,7 +37,7 @@ func (m MutatingWebhookEventHandler) Generic(ctx context.Context, evt event.Gene m.enqueue(q) } -func (m MutatingWebhookEventHandler) Update(ctx context.Context, evt event.UpdateEvent, q workqueue.RateLimitingInterface) { +func (m MutatingWebhookEventHandler) Update(ctx context.Context, evt event.TypedUpdateEvent[client.Object], q typedQueue) { config, ok := evt.ObjectNew.(*admissionregistrationv1.MutatingWebhookConfiguration) if !ok || config == nil || !isKruiseRolloutMutatingConfiguration(config) || config.DeletionTimestamp.IsZero() { return @@ -43,7 +45,7 @@ func (m MutatingWebhookEventHandler) Update(ctx context.Context, evt event.Updat m.enqueue(q) } -func (m MutatingWebhookEventHandler) Delete(ctx context.Context, evt event.DeleteEvent, q workqueue.RateLimitingInterface) { +func (m MutatingWebhookEventHandler) Delete(ctx context.Context, evt event.TypedDeleteEvent[client.Object], q typedQueue) { config, ok := evt.Object.(*admissionregistrationv1.MutatingWebhookConfiguration) if !ok || config == nil || !isKruiseRolloutMutatingConfiguration(config) { return @@ -51,7 +53,7 @@ func (m MutatingWebhookEventHandler) Delete(ctx context.Context, evt event.Delet m.enqueue(q) } -func (m MutatingWebhookEventHandler) enqueue(q workqueue.RateLimitingInterface) { +func (m MutatingWebhookEventHandler) enqueue(q typedQueue) { deploymentLister := appsv1.DeploymentList{} err := m.List(context.TODO(), &deploymentLister, client.MatchingLabels(map[string]string{v1alpha1.AdvancedDeploymentControlLabel: "true"})) if err != nil { diff --git a/pkg/controller/nativedaemonset/nativedaemonset_controller.go b/pkg/controller/nativedaemonset/nativedaemonset_controller.go index 43f97cea..9e0bc2cb 100644 --- a/pkg/controller/nativedaemonset/nativedaemonset_controller.go +++ b/pkg/controller/nativedaemonset/nativedaemonset_controller.go @@ -140,12 +140,12 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error { } // Watch for changes to DaemonSet - if err = c.Watch(source.Kind(mgr.GetCache(), &appsv1.DaemonSet{}), + if err = c.Watch(source.Kind[client.Object](mgr.GetCache(), &appsv1.DaemonSet{}, &handler.EnqueueRequestForObject{}, predicate.Funcs{ UpdateFunc: updateHandler, CreateFunc: createHandler, - }); err != nil { + })); err != nil { return err } @@ -203,9 +203,9 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error { } // Watch pods with a handler that never enqueues - return c.Watch(source.Kind(mgr.GetCache(), &corev1.Pod{}), + return c.Watch(source.Kind[client.Object](mgr.GetCache(), &corev1.Pod{}, &handler.EnqueueRequestForObject{}, - podPredicate) + podPredicate)) } // Reconcile reads that state of the cluster for a DaemonSet object and makes changes based on the annotations diff --git a/pkg/controller/rollout/rollout_controller.go b/pkg/controller/rollout/rollout_controller.go index 926ec142..07e296a5 100755 --- a/pkg/controller/rollout/rollout_controller.go +++ b/pkg/controller/rollout/rollout_controller.go @@ -179,11 +179,11 @@ func (r *RolloutReconciler) SetupWithManager(mgr ctrl.Manager) error { return err } // Watch for changes to rollout - if err = c.Watch(source.Kind(mgr.GetCache(), &v1beta1.Rollout{}), &handler.EnqueueRequestForObject{}); err != nil { + if err = c.Watch(source.Kind[client.Object](mgr.GetCache(), &v1beta1.Rollout{}, &handler.EnqueueRequestForObject{})); err != nil { return err } // Watch for changes to batchRelease - if err = c.Watch(source.Kind(mgr.GetCache(), &v1beta1.BatchRelease{}), &enqueueRequestForBatchRelease{reader: mgr.GetCache()}); err != nil { + if err = c.Watch(source.Kind[client.Object](mgr.GetCache(), &v1beta1.BatchRelease{}, &enqueueRequestForBatchRelease{reader: mgr.GetCache()})); err != nil { return err } runtimeController = c diff --git a/pkg/controller/rollout/rollout_event_handler.go b/pkg/controller/rollout/rollout_event_handler.go index 11a1befa..6511bc18 100644 --- a/pkg/controller/rollout/rollout_event_handler.go +++ b/pkg/controller/rollout/rollout_event_handler.go @@ -33,6 +33,8 @@ import ( utilclient "github.com/openkruise/rollouts/pkg/util/client" ) +type typedQueue = workqueue.TypedRateLimitingInterface[reconcile.Request] + var _ handler.EventHandler = &enqueueRequestForWorkload{} type enqueueRequestForWorkload struct { @@ -40,22 +42,22 @@ type enqueueRequestForWorkload struct { scheme *runtime.Scheme } -func (w *enqueueRequestForWorkload) Create(ctx context.Context, evt event.CreateEvent, q workqueue.RateLimitingInterface) { +func (w *enqueueRequestForWorkload) Create(ctx context.Context, evt event.TypedCreateEvent[client.Object], q typedQueue) { w.handleEvent(q, evt.Object) } -func (w *enqueueRequestForWorkload) Delete(ctx context.Context, evt event.DeleteEvent, q workqueue.RateLimitingInterface) { +func (w *enqueueRequestForWorkload) Delete(ctx context.Context, evt event.TypedDeleteEvent[client.Object], q typedQueue) { w.handleEvent(q, evt.Object) } -func (w *enqueueRequestForWorkload) Generic(ctx context.Context, evt event.GenericEvent, q workqueue.RateLimitingInterface) { +func (w *enqueueRequestForWorkload) Generic(ctx context.Context, evt event.TypedGenericEvent[client.Object], q typedQueue) { } -func (w *enqueueRequestForWorkload) Update(ctx context.Context, evt event.UpdateEvent, q workqueue.RateLimitingInterface) { +func (w *enqueueRequestForWorkload) Update(ctx context.Context, evt event.TypedUpdateEvent[client.Object], q typedQueue) { w.handleEvent(q, evt.ObjectNew) } -func (w *enqueueRequestForWorkload) handleEvent(q workqueue.RateLimitingInterface, obj client.Object) { +func (w *enqueueRequestForWorkload) handleEvent(q typedQueue, obj client.Object) { key := types.NamespacedName{ Namespace: obj.GetNamespace(), Name: obj.GetName(), @@ -107,20 +109,20 @@ type enqueueRequestForBatchRelease struct { reader client.Reader } -func (w *enqueueRequestForBatchRelease) Create(ctx context.Context, evt event.CreateEvent, q workqueue.RateLimitingInterface) { +func (w *enqueueRequestForBatchRelease) Create(ctx context.Context, evt event.TypedCreateEvent[client.Object], q typedQueue) { } -func (w *enqueueRequestForBatchRelease) Delete(ctx context.Context, evt event.DeleteEvent, q workqueue.RateLimitingInterface) { +func (w *enqueueRequestForBatchRelease) Delete(ctx context.Context, evt event.TypedDeleteEvent[client.Object], q typedQueue) { } -func (w *enqueueRequestForBatchRelease) Generic(ctx context.Context, evt event.GenericEvent, q workqueue.RateLimitingInterface) { +func (w *enqueueRequestForBatchRelease) Generic(ctx context.Context, evt event.TypedGenericEvent[client.Object], q typedQueue) { } -func (w *enqueueRequestForBatchRelease) Update(ctx context.Context, evt event.UpdateEvent, q workqueue.RateLimitingInterface) { +func (w *enqueueRequestForBatchRelease) Update(ctx context.Context, evt event.TypedUpdateEvent[client.Object], q typedQueue) { w.handleEvent(q, evt.ObjectNew) } -func (w *enqueueRequestForBatchRelease) handleEvent(q workqueue.RateLimitingInterface, obj client.Object) { +func (w *enqueueRequestForBatchRelease) handleEvent(q typedQueue, obj client.Object) { klog.Infof("BatchRelease(%s/%s) and reconcile Rollout (%s)", obj.GetNamespace(), obj.GetName(), obj.GetName()) nsn := types.NamespacedName{Namespace: obj.GetNamespace(), Name: obj.GetName()} q.Add(reconcile.Request{NamespacedName: nsn}) diff --git a/pkg/controller/rollout/rollout_event_handler_test.go b/pkg/controller/rollout/rollout_event_handler_test.go index 49a8e5a9..3fe097fb 100644 --- a/pkg/controller/rollout/rollout_event_handler_test.go +++ b/pkg/controller/rollout/rollout_event_handler_test.go @@ -23,6 +23,7 @@ import ( "k8s.io/client-go/util/workqueue" "sigs.k8s.io/controller-runtime/pkg/client/fake" "sigs.k8s.io/controller-runtime/pkg/event" + "sigs.k8s.io/controller-runtime/pkg/reconcile" ) func TestPodEventHandler(t *testing.T) { @@ -35,7 +36,7 @@ func TestPodEventHandler(t *testing.T) { } // create - createQ := workqueue.NewRateLimitingQueue(workqueue.DefaultControllerRateLimiter()) + createQ := workqueue.NewTypedRateLimitingQueue[reconcile.Request](workqueue.DefaultTypedControllerRateLimiter[reconcile.Request]()) createEvt := event.CreateEvent{ Object: deploymentDemo, } diff --git a/pkg/controller/rollout/rollout_progressing_test.go b/pkg/controller/rollout/rollout_progressing_test.go index 9dfe8f42..28827d0b 100644 --- a/pkg/controller/rollout/rollout_progressing_test.go +++ b/pkg/controller/rollout/rollout_progressing_test.go @@ -153,7 +153,7 @@ func TestReconcileRolloutProgressing(t *testing.T) { obj.Status.CanaryStatus.ObservedWorkloadGeneration = 2 obj.Status.CanaryStatus.RolloutHash = "f55bvd874d5f2fzvw46bv966x4bwbdv4wx6bd9f7b46ww788954b8z8w29b7wxfd" obj.Status.CanaryStatus.StableRevision = "pod-template-hash-v1" - obj.Status.CanaryStatus.CanaryRevision = "b4bdb86db" + obj.Status.CanaryStatus.CanaryRevision = "b867f94b8" obj.Status.CanaryStatus.CurrentStepIndex = 1 obj.Status.CanaryStatus.NextStepIndex = 2 obj.Status.CanaryStatus.CurrentStepState = v1beta1.CanaryStepStateUpgrade @@ -167,7 +167,7 @@ func TestReconcileRolloutProgressing(t *testing.T) { s.CanaryStatus.ObservedWorkloadGeneration = 2 s.CanaryStatus.RolloutHash = "f55bvd874d5f2fzvw46bv966x4bwbdv4wx6bd9f7b46ww788954b8z8w29b7wxfd" s.CanaryStatus.StableRevision = "pod-template-hash-v1" - s.CanaryStatus.CanaryRevision = "b4bdb86db" + s.CanaryStatus.CanaryRevision = "b867f94b8" s.CanaryStatus.PodTemplateHash = "pod-template-hash-v2" s.CanaryStatus.CurrentStepIndex = 1 s.CanaryStatus.NextStepIndex = 2 @@ -212,7 +212,7 @@ func TestReconcileRolloutProgressing(t *testing.T) { obj.Status.CanaryStatus.ObservedWorkloadGeneration = 2 obj.Status.CanaryStatus.RolloutHash = "f55bvd874d5f2fzvw46bv966x4bwbdv4wx6bd9f7b46ww788954b8z8w29b7wxfd" obj.Status.CanaryStatus.StableRevision = "pod-template-hash-v1" - obj.Status.CanaryStatus.CanaryRevision = "b4bdb86db" + obj.Status.CanaryStatus.CanaryRevision = "b867f94b8" obj.Status.CanaryStatus.PodTemplateHash = "pod-template-hash-v2" obj.Status.CanaryStatus.CurrentStepIndex = 4 obj.Status.CanaryStatus.CurrentStepState = v1beta1.CanaryStepStateCompleted @@ -226,7 +226,7 @@ func TestReconcileRolloutProgressing(t *testing.T) { s.CanaryStatus.ObservedWorkloadGeneration = 2 s.CanaryStatus.RolloutHash = "f55bvd874d5f2fzvw46bv966x4bwbdv4wx6bd9f7b46ww788954b8z8w29b7wxfd" s.CanaryStatus.StableRevision = "pod-template-hash-v1" - s.CanaryStatus.CanaryRevision = "b4bdb86db" + s.CanaryStatus.CanaryRevision = "b867f94b8" s.CanaryStatus.PodTemplateHash = "pod-template-hash-v2" s.CanaryStatus.CurrentStepIndex = 4 s.CanaryStatus.NextStepIndex = 0 diff --git a/pkg/controller/rollouthistory/rollouthistory_controller.go b/pkg/controller/rollouthistory/rollouthistory_controller.go index 2086cae1..6e307143 100644 --- a/pkg/controller/rollouthistory/rollouthistory_controller.go +++ b/pkg/controller/rollouthistory/rollouthistory_controller.go @@ -41,7 +41,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/manager" "sigs.k8s.io/controller-runtime/pkg/reconcile" "sigs.k8s.io/controller-runtime/pkg/source" - "sigs.k8s.io/gateway-api/apis/v1alpha2" + gatewayv1 "sigs.k8s.io/gateway-api/apis/v1" ) var ( @@ -79,11 +79,11 @@ func add(mgr manager.Manager, r reconcile.Reconciler) error { return err } // Watch for changes to rollout - if err = c.Watch(source.Kind(mgr.GetCache(), &rolloutv1alpha1.Rollout{}), &enqueueRequestForRollout{}); err != nil { + if err = c.Watch(source.Kind[client.Object](mgr.GetCache(), &rolloutv1alpha1.Rollout{}, &enqueueRequestForRollout{})); err != nil { return err } // watch for changes to rolloutHistory - if err = c.Watch(source.Kind(mgr.GetCache(), &rolloutv1alpha1.RolloutHistory{}), &enqueueRequestForRolloutHistory{}); err != nil { + if err = c.Watch(source.Kind[client.Object](mgr.GetCache(), &rolloutv1alpha1.RolloutHistory{}, &enqueueRequestForRolloutHistory{})); err != nil { return err } return nil @@ -280,7 +280,7 @@ func (r *RolloutHistoryReconciler) getTrafficRoutingInfo(rollout *rolloutv1alpha func (r *RolloutHistoryReconciler) getGateWayInfo(rollout *rolloutv1alpha1.Rollout) (*rolloutv1alpha1.HTTPRouteInfo, error) { // get HTTPRoute gatewayName := *rollout.Spec.Strategy.Canary.TrafficRoutings[0].Gateway.HTTPRouteName - HTTPRoute := &v1alpha2.HTTPRoute{} + HTTPRoute := &gatewayv1.HTTPRoute{} err := r.Get(context.TODO(), types.NamespacedName{Namespace: rollout.Namespace, Name: gatewayName}, HTTPRoute) if err != nil { return nil, errors.New("initGateway error: HTTPRoute " + gatewayName + " not find") diff --git a/pkg/controller/rollouthistory/rollouthistory_controller_test.go b/pkg/controller/rollouthistory/rollouthistory_controller_test.go index bf343a0f..8b8643ae 100644 --- a/pkg/controller/rollouthistory/rollouthistory_controller_test.go +++ b/pkg/controller/rollouthistory/rollouthistory_controller_test.go @@ -34,7 +34,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" - "sigs.k8s.io/gateway-api/apis/v1alpha2" + gatewayv1 "sigs.k8s.io/gateway-api/apis/v1" rolloutapi "github.com/openkruise/rollouts/api" rolloutv1alpha1 "github.com/openkruise/rollouts/api/v1alpha1" @@ -45,7 +45,7 @@ func init() { _ = clientgoscheme.AddToScheme(scheme) _ = kruisev1alpha1.AddToScheme(scheme) _ = rolloutapi.AddToScheme(scheme) - _ = v1alpha2.AddToScheme(scheme) + _ = gatewayv1.AddToScheme(scheme) } var ( @@ -298,7 +298,7 @@ var ( }, } - httpRouteDemo = v1alpha2.HTTPRoute{ + httpRouteDemo = gatewayv1.HTTPRoute{ TypeMeta: metav1.TypeMeta{ APIVersion: "gateway.networking.k8s.io/v1alpha2", Kind: "HTTPRoute", @@ -307,9 +307,9 @@ var ( Name: "HTTPRoute-demo", Namespace: "default", }, - Spec: v1alpha2.HTTPRouteSpec{ - CommonRouteSpec: v1alpha2.CommonRouteSpec{ - ParentRefs: []v1alpha2.ParentReference{ + Spec: gatewayv1.HTTPRouteSpec{ + CommonRouteSpec: gatewayv1.CommonRouteSpec{ + ParentRefs: []gatewayv1.ParentReference{ { Name: "demo-lb", }, @@ -345,7 +345,7 @@ func TestReconcile(t *testing.T) { getService func() []*corev1.Service getWorkload func() []*kruisev1alpha1.CloneSet getIngress func() []*networkingv1.Ingress - getHTTPRoute func() []*v1alpha2.HTTPRoute + getHTTPRoute func() []*gatewayv1.HTTPRoute getRollout func() []*rolloutv1alpha1.Rollout getRolloutHistory func() []*rolloutv1alpha1.RolloutHistory expectRolloutHistory func() []*rolloutv1alpha1.RolloutHistory @@ -374,8 +374,8 @@ func TestReconcile(t *testing.T) { ingresses := []*networkingv1.Ingress{} return ingresses }, - getHTTPRoute: func() []*v1alpha2.HTTPRoute { - httpRoutes := []*v1alpha2.HTTPRoute{} + getHTTPRoute: func() []*gatewayv1.HTTPRoute { + httpRoutes := []*gatewayv1.HTTPRoute{} return httpRoutes }, getRollout: func() []*rolloutv1alpha1.Rollout { @@ -482,8 +482,8 @@ func TestReconcile(t *testing.T) { ingresses := []*networkingv1.Ingress{ingressDemo.DeepCopy()} return ingresses }, - getHTTPRoute: func() []*v1alpha2.HTTPRoute { - httpRoutes := []*v1alpha2.HTTPRoute{httpRouteDemo.DeepCopy()} + getHTTPRoute: func() []*gatewayv1.HTTPRoute { + httpRoutes := []*gatewayv1.HTTPRoute{httpRouteDemo.DeepCopy()} return httpRoutes }, getRollout: func() []*rolloutv1alpha1.Rollout { @@ -615,8 +615,8 @@ func TestReconcile(t *testing.T) { ingresses := []*networkingv1.Ingress{} return ingresses }, - getHTTPRoute: func() []*v1alpha2.HTTPRoute { - httpRoutes := []*v1alpha2.HTTPRoute{} + getHTTPRoute: func() []*gatewayv1.HTTPRoute { + httpRoutes := []*gatewayv1.HTTPRoute{} return httpRoutes }, getRollout: func() []*rolloutv1alpha1.Rollout { @@ -663,8 +663,8 @@ func TestReconcile(t *testing.T) { ingresses := []*networkingv1.Ingress{} return ingresses }, - getHTTPRoute: func() []*v1alpha2.HTTPRoute { - httpRoutes := []*v1alpha2.HTTPRoute{} + getHTTPRoute: func() []*gatewayv1.HTTPRoute { + httpRoutes := []*gatewayv1.HTTPRoute{} return httpRoutes }, getRollout: func() []*rolloutv1alpha1.Rollout { @@ -869,8 +869,8 @@ func TestReconcile(t *testing.T) { ingresses := []*networkingv1.Ingress{} return ingresses }, - getHTTPRoute: func() []*v1alpha2.HTTPRoute { - httpRoutes := []*v1alpha2.HTTPRoute{} + getHTTPRoute: func() []*gatewayv1.HTTPRoute { + httpRoutes := []*gatewayv1.HTTPRoute{} return httpRoutes }, getRollout: func() []*rolloutv1alpha1.Rollout { diff --git a/pkg/controller/rollouthistory/rollouthistory_event_handler.go b/pkg/controller/rollouthistory/rollouthistory_event_handler.go index 798ff7c3..6f50cb2f 100644 --- a/pkg/controller/rollouthistory/rollouthistory_event_handler.go +++ b/pkg/controller/rollouthistory/rollouthistory_event_handler.go @@ -29,26 +29,28 @@ import ( rolloutv1alpha1 "github.com/openkruise/rollouts/api/v1alpha1" ) +type typedQueue = workqueue.TypedRateLimitingInterface[reconcile.Request] + var _ handler.EventHandler = &enqueueRequestForRolloutHistory{} type enqueueRequestForRolloutHistory struct { } -func (w *enqueueRequestForRolloutHistory) Create(ctx context.Context, evt event.CreateEvent, q workqueue.RateLimitingInterface) { +func (w *enqueueRequestForRolloutHistory) Create(ctx context.Context, evt event.TypedCreateEvent[client.Object], q typedQueue) { w.handleEvent(q, evt.Object) } -func (w *enqueueRequestForRolloutHistory) Delete(ctx context.Context, evt event.DeleteEvent, q workqueue.RateLimitingInterface) { +func (w *enqueueRequestForRolloutHistory) Delete(ctx context.Context, evt event.TypedDeleteEvent[client.Object], q typedQueue) { } -func (w *enqueueRequestForRolloutHistory) Generic(ctx context.Context, evt event.GenericEvent, q workqueue.RateLimitingInterface) { +func (w *enqueueRequestForRolloutHistory) Generic(ctx context.Context, evt event.TypedGenericEvent[client.Object], q typedQueue) { } -func (w *enqueueRequestForRolloutHistory) Update(ctx context.Context, evt event.UpdateEvent, q workqueue.RateLimitingInterface) { +func (w *enqueueRequestForRolloutHistory) Update(ctx context.Context, evt event.TypedUpdateEvent[client.Object], q typedQueue) { w.handleEvent(q, evt.ObjectNew) } -func (w *enqueueRequestForRolloutHistory) handleEvent(q workqueue.RateLimitingInterface, obj client.Object) { +func (w *enqueueRequestForRolloutHistory) handleEvent(q typedQueue, obj client.Object) { // In fact, rolloutHistory which is created by controller must have rolloutNameLabel and rolloutIDLabe rolloutName, ok1 := obj.(*rolloutv1alpha1.RolloutHistory).Labels[rolloutNameLabel] _, ok2 := obj.(*rolloutv1alpha1.RolloutHistory).Labels[rolloutIDLabel] @@ -65,21 +67,21 @@ var _ handler.EventHandler = &enqueueRequestForRollout{} type enqueueRequestForRollout struct { } -func (w *enqueueRequestForRollout) Create(ctx context.Context, evt event.CreateEvent, q workqueue.RateLimitingInterface) { +func (w *enqueueRequestForRollout) Create(ctx context.Context, evt event.TypedCreateEvent[client.Object], q typedQueue) { w.handleEvent(q, evt.Object) } -func (w *enqueueRequestForRollout) Delete(ctx context.Context, evt event.DeleteEvent, q workqueue.RateLimitingInterface) { +func (w *enqueueRequestForRollout) Delete(ctx context.Context, evt event.TypedDeleteEvent[client.Object], q typedQueue) { } -func (w *enqueueRequestForRollout) Generic(ctx context.Context, evt event.GenericEvent, q workqueue.RateLimitingInterface) { +func (w *enqueueRequestForRollout) Generic(ctx context.Context, evt event.TypedGenericEvent[client.Object], q typedQueue) { } -func (w *enqueueRequestForRollout) Update(ctx context.Context, evt event.UpdateEvent, q workqueue.RateLimitingInterface) { +func (w *enqueueRequestForRollout) Update(ctx context.Context, evt event.TypedUpdateEvent[client.Object], q typedQueue) { w.handleEvent(q, evt.ObjectNew) } -func (w *enqueueRequestForRollout) handleEvent(q workqueue.RateLimitingInterface, obj client.Object) { +func (w *enqueueRequestForRollout) handleEvent(q typedQueue, obj client.Object) { // RolloutID shouldn't be empty rollout := obj.(*rolloutv1alpha1.Rollout) if rollout.Status.CanaryStatus == nil || rollout.Status.CanaryStatus.ObservedRolloutID == "" { diff --git a/pkg/controller/trafficrouting/trafficrouting_controller.go b/pkg/controller/trafficrouting/trafficrouting_controller.go index af764b31..58a79d03 100644 --- a/pkg/controller/trafficrouting/trafficrouting_controller.go +++ b/pkg/controller/trafficrouting/trafficrouting_controller.go @@ -208,7 +208,7 @@ func (r *TrafficRoutingReconciler) SetupWithManager(mgr ctrl.Manager) error { return err } // Watch for changes to trafficrouting - if err = c.Watch(source.Kind(mgr.GetCache(), &v1alpha1.TrafficRouting{}), &handler.EnqueueRequestForObject{}); err != nil { + if err = c.Watch(source.Kind[client.Object](mgr.GetCache(), &v1alpha1.TrafficRouting{}, &handler.EnqueueRequestForObject{})); err != nil { return err } r.trafficRoutingManager = trafficrouting.NewTrafficRoutingManager(mgr.GetClient()) diff --git a/pkg/trafficrouting/network/customNetworkProvider/custom_network_provider_test.go b/pkg/trafficrouting/network/customNetworkProvider/custom_network_provider_test.go index dacc036f..7e2b1ed9 100644 --- a/pkg/trafficrouting/network/customNetworkProvider/custom_network_provider_test.go +++ b/pkg/trafficrouting/network/customNetworkProvider/custom_network_provider_test.go @@ -40,6 +40,7 @@ import ( luajson "layeh.com/gopher-json" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" + gatewayv1 "sigs.k8s.io/gateway-api/apis/v1" gatewayv1beta1 "sigs.k8s.io/gateway-api/apis/v1beta1" "sigs.k8s.io/yaml" @@ -320,9 +321,9 @@ func TestEnsureRoutes(t *testing.T) { { name: "Do header/queryParam-based traffic routing for VirtualService and DestinationRule", getRoutes: func() *v1beta1.TrafficRoutingStrategy { - pathTypePrefix := gatewayv1beta1.PathMatchPathPrefix - headerTypeExact := gatewayv1beta1.HeaderMatchExact - queryParamRegex := gatewayv1beta1.QueryParamMatchRegularExpression + pathTypePrefix := gatewayv1.PathMatchPathPrefix + headerTypeExact := gatewayv1.HeaderMatchExact + queryParamRegex := gatewayv1.QueryParamMatchRegularExpression return &v1beta1.TrafficRoutingStrategy{ Matches: []v1beta1.HttpRouteMatch{ { @@ -414,7 +415,7 @@ func TestEnsureRoutes(t *testing.T) { { name: "Do header-based traffic routing and set header for VirtualService", getRoutes: func() *v1beta1.TrafficRoutingStrategy { - headerTypeExact := gatewayv1beta1.HeaderMatchExact + headerTypeExact := gatewayv1.HeaderMatchExact return &v1beta1.TrafficRoutingStrategy{ Matches: []v1beta1.HttpRouteMatch{ { diff --git a/pkg/trafficrouting/network/gateway/gateway_test.go b/pkg/trafficrouting/network/gateway/gateway_test.go index df784f7a..3b01af0c 100644 --- a/pkg/trafficrouting/network/gateway/gateway_test.go +++ b/pkg/trafficrouting/network/gateway/gateway_test.go @@ -18,6 +18,7 @@ import ( "testing" utilpointer "k8s.io/utils/pointer" + gatewayv1 "sigs.k8s.io/gateway-api/apis/v1" gatewayv1beta1 "sigs.k8s.io/gateway-api/apis/v1beta1" "github.com/openkruise/rollouts/api/v1beta1" @@ -141,7 +142,7 @@ func TestBuildDesiredHTTPRoute(t *testing.T) { return rules }, getRoutes: func() (*int32, []v1beta1.HttpRouteMatch) { - iType := gatewayv1beta1.HeaderMatchRegularExpression + iType := gatewayv1.HeaderMatchRegularExpression return nil, []v1beta1.HttpRouteMatch{ // header { @@ -173,7 +174,7 @@ func TestBuildDesiredHTTPRoute(t *testing.T) { }, desiredRules: func() []gatewayv1beta1.HTTPRouteRule { rules := routeDemo.DeepCopy().Spec.Rules - iType := gatewayv1beta1.HeaderMatchRegularExpression + iType := gatewayv1.HeaderMatchRegularExpression rules = append(rules, gatewayv1beta1.HTTPRouteRule{ Matches: []gatewayv1beta1.HTTPRouteMatch{ { @@ -318,7 +319,7 @@ func TestBuildDesiredHTTPRoute(t *testing.T) { return rules }, getRoutes: func() (*int32, []v1beta1.HttpRouteMatch) { - iType := gatewayv1beta1.QueryParamMatchRegularExpression + iType := gatewayv1.QueryParamMatchRegularExpression return nil, []v1beta1.HttpRouteMatch{ // queryparams { @@ -350,7 +351,7 @@ func TestBuildDesiredHTTPRoute(t *testing.T) { }, desiredRules: func() []gatewayv1beta1.HTTPRouteRule { rules := routeDemo.DeepCopy().Spec.Rules - iType := gatewayv1beta1.QueryParamMatchRegularExpression + iType := gatewayv1.QueryParamMatchRegularExpression rules = append(rules, gatewayv1beta1.HTTPRouteRule{ Matches: []gatewayv1beta1.HTTPRouteMatch{ { @@ -499,8 +500,8 @@ func TestBuildDesiredHTTPRoute(t *testing.T) { return rules }, getRoutes: func() (*int32, []v1beta1.HttpRouteMatch) { - iQueryParamType := gatewayv1beta1.QueryParamMatchRegularExpression - iHeaderType := gatewayv1beta1.HeaderMatchRegularExpression + iQueryParamType := gatewayv1.QueryParamMatchRegularExpression + iHeaderType := gatewayv1.HeaderMatchRegularExpression return nil, []v1beta1.HttpRouteMatch{ // queryParams + headers { @@ -531,8 +532,8 @@ func TestBuildDesiredHTTPRoute(t *testing.T) { }, desiredRules: func() []gatewayv1beta1.HTTPRouteRule { rules := routeDemo.DeepCopy().Spec.Rules - iQueryParamType := gatewayv1beta1.QueryParamMatchRegularExpression - iHeaderType := gatewayv1beta1.HeaderMatchRegularExpression + iQueryParamType := gatewayv1.QueryParamMatchRegularExpression + iHeaderType := gatewayv1.HeaderMatchRegularExpression rules = append(rules, gatewayv1beta1.HTTPRouteRule{ Matches: []gatewayv1beta1.HTTPRouteMatch{ { @@ -658,8 +659,8 @@ func TestBuildDesiredHTTPRoute(t *testing.T) { return rules }, getRoutes: func() (*int32, []v1beta1.HttpRouteMatch) { - iQueryParamType := gatewayv1beta1.QueryParamMatchRegularExpression - iHeaderType := gatewayv1beta1.HeaderMatchRegularExpression + iQueryParamType := gatewayv1.QueryParamMatchRegularExpression + iHeaderType := gatewayv1.HeaderMatchRegularExpression return nil, []v1beta1.HttpRouteMatch{ // queryParams + headers + path { @@ -693,8 +694,8 @@ func TestBuildDesiredHTTPRoute(t *testing.T) { }, desiredRules: func() []gatewayv1beta1.HTTPRouteRule { rules := routeDemo.DeepCopy().Spec.Rules - iQueryParamType := gatewayv1beta1.QueryParamMatchRegularExpression - iHeaderType := gatewayv1beta1.HeaderMatchRegularExpression + iQueryParamType := gatewayv1.QueryParamMatchRegularExpression + iHeaderType := gatewayv1.HeaderMatchRegularExpression rules = append(rules, gatewayv1beta1.HTTPRouteRule{ Matches: []gatewayv1beta1.HTTPRouteMatch{ { @@ -890,7 +891,7 @@ func TestBuildDesiredHTTPRoute(t *testing.T) { }, }, } - iType := gatewayv1beta1.HeaderMatchRegularExpression + iType := gatewayv1.HeaderMatchRegularExpression rules = append(rules, gatewayv1beta1.HTTPRouteRule{ Matches: []gatewayv1beta1.HTTPRouteMatch{ { diff --git a/pkg/trafficrouting/network/ingress/ingress_test.go b/pkg/trafficrouting/network/ingress/ingress_test.go index 64ffb3e8..21cb57cd 100644 --- a/pkg/trafficrouting/network/ingress/ingress_test.go +++ b/pkg/trafficrouting/network/ingress/ingress_test.go @@ -28,6 +28,7 @@ import ( utilpointer "k8s.io/utils/pointer" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/fake" + gatewayv1 "sigs.k8s.io/gateway-api/apis/v1" gatewayv1beta1 "sigs.k8s.io/gateway-api/apis/v1beta1" rolloutsapi "github.com/openkruise/rollouts/api" @@ -452,7 +453,7 @@ func TestEnsureRoutes(t *testing.T) { return []*netv1.Ingress{demoIngress.DeepCopy(), canary} }, getRoutes: func() *v1beta1.CanaryStep { - iType := gatewayv1beta1.HeaderMatchRegularExpression + iType := gatewayv1.HeaderMatchRegularExpression return &v1beta1.CanaryStep{ TrafficRoutingStrategy: v1beta1.TrafficRoutingStrategy{ Matches: []v1beta1.HttpRouteMatch{ @@ -613,7 +614,7 @@ func TestEnsureRoutes(t *testing.T) { return []*netv1.Ingress{demoIngress.DeepCopy(), canary} }, getRoutes: func() *v1beta1.CanaryStep { - iType := gatewayv1beta1.QueryParamMatchRegularExpression + iType := gatewayv1.QueryParamMatchRegularExpression return &v1beta1.CanaryStep{ TrafficRoutingStrategy: v1beta1.TrafficRoutingStrategy{ Traffic: nil, diff --git a/pkg/util/controller_finder_test.go b/pkg/util/controller_finder_test.go index c1074013..d5ce99db 100644 --- a/pkg/util/controller_finder_test.go +++ b/pkg/util/controller_finder_test.go @@ -248,7 +248,7 @@ func TestGetWorkloadForRef(t *testing.T) { rs := generateRS(*dep) rs.Namespace = namespace rs.Spec.Replicas = dep.Spec.Replicas - rs.Labels[apps.DefaultDeploymentUniqueLabelKey] = "cd68dc9" + rs.Labels[apps.DefaultDeploymentUniqueLabelKey] = "5697c64697" return dep, &rs, nil, nil, nil }, expectWorkload: func() *Workload { @@ -270,7 +270,7 @@ func TestGetWorkloadForRef(t *testing.T) { }, Replicas: 10, StableRevision: "stable", - CanaryRevision: "cd68dc9", + CanaryRevision: "5697c64697", PodTemplateHash: "", RevisionLabelKey: "pod-template-hash", IsStatusConsistent: true, @@ -295,7 +295,7 @@ func TestGetWorkloadForRef(t *testing.T) { rs := generateRS(*dep) rs.Namespace = namespace rs.Spec.Replicas = dep.Spec.Replicas - rs.Labels[apps.DefaultDeploymentUniqueLabelKey] = "cd68dc9" + rs.Labels[apps.DefaultDeploymentUniqueLabelKey] = "5697c64697" return dep, &rs, nil, nil, nil }, expectWorkload: func() *Workload { @@ -310,8 +310,8 @@ func TestGetWorkloadForRef(t *testing.T) { }, Replicas: 10, StableRevision: "stable", - CanaryRevision: "cd68dc9", - PodTemplateHash: "cd68dc9", + CanaryRevision: "5697c64697", + PodTemplateHash: "5697c64697", RevisionLabelKey: "pod-template-hash", IsStatusConsistent: true, InRolloutProgressing: true, @@ -352,7 +352,7 @@ func TestGetWorkloadForRef(t *testing.T) { }, Replicas: 10, StableRevision: "stable", - CanaryRevision: "cd68dc9", + CanaryRevision: "5697c64697", PodTemplateHash: "stable", RevisionLabelKey: "pod-template-hash", IsStatusConsistent: true, diff --git a/pkg/util/rollout_utils.go b/pkg/util/rollout_utils.go index 41c7637d..93689416 100644 --- a/pkg/util/rollout_utils.go +++ b/pkg/util/rollout_utils.go @@ -34,13 +34,14 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/client-go/util/retry" "k8s.io/klog/v2" + ctrlclient "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller" "sigs.k8s.io/controller-runtime/pkg/handler" "sigs.k8s.io/controller-runtime/pkg/source" rolloutv1alpha1 "github.com/openkruise/rollouts/api/v1alpha1" rolloutv1beta1 "github.com/openkruise/rollouts/api/v1beta1" - "github.com/openkruise/rollouts/pkg/util/client" + utilclient "github.com/openkruise/rollouts/pkg/util/client" ) // RolloutState is annotation[rollouts.kruise.io/in-progressing] value @@ -65,39 +66,39 @@ func IsRollbackInBatchPolicy(rollout *rolloutv1beta1.Rollout, labels map[string] return false } -func AddWorkloadWatcher(cs cache.Cache, c controller.Controller, handler handler.EventHandler) error { +func AddWorkloadWatcher(cs cache.Cache, c controller.Controller, h handler.EventHandler) error { // Watch changes to Deployment - err := c.Watch(source.Kind(cs, &apps.Deployment{}), handler) + err := c.Watch(source.Kind[ctrlclient.Object](cs, &apps.Deployment{}, h)) if err != nil { return err } - // Watch changes to Native StatefulSet, use unstructured informer - err = c.Watch(source.Kind(cs, &apps.StatefulSet{}), handler) + // Watch changes to Native StatefulSet + err = c.Watch(source.Kind[ctrlclient.Object](cs, &apps.StatefulSet{}, h)) if err != nil { return err } - // Watch changes to Native DaemonSet, use unstructured informer - err = c.Watch(source.Kind(cs, &apps.DaemonSet{}), handler) + // Watch changes to Native DaemonSet + err = c.Watch(source.Kind[ctrlclient.Object](cs, &apps.DaemonSet{}, h)) if err != nil { return err } // Watch changes to CloneSet if it has the CRD if DiscoverGVK(ControllerKruiseKindCS) { - err := c.Watch(source.Kind(cs, &kruiseappsv1alpha1.CloneSet{}), handler) + err := c.Watch(source.Kind[ctrlclient.Object](cs, &kruiseappsv1alpha1.CloneSet{}, h)) if err != nil { return err } } // Watch changes to DaemonSet if it has the CRD if DiscoverGVK(ControllerKruiseKindDS) { - err := c.Watch(source.Kind(cs, &kruiseappsv1alpha1.DaemonSet{}), handler) + err := c.Watch(source.Kind[ctrlclient.Object](cs, &kruiseappsv1alpha1.DaemonSet{}, h)) if err != nil { return err } } // Watch changes to Advanced StatefulSet if it has the CRD if DiscoverGVK(ControllerKruiseKindSts) { - err := c.Watch(source.Kind(cs, &kruiseappsv1beta1.StatefulSet{}), handler) + err := c.Watch(source.Kind[ctrlclient.Object](cs, &kruiseappsv1beta1.StatefulSet{}, h)) if err != nil { return err } @@ -106,7 +107,7 @@ func AddWorkloadWatcher(cs cache.Cache, c controller.Controller, handler handler } func DiscoverGVK(gvk schema.GroupVersionKind) bool { - genericClient := client.GetGenericClient() + genericClient := utilclient.GetGenericClient() if genericClient == nil { return true } @@ -154,7 +155,7 @@ func AddWatcherDynamically(cs cache.Cache, c controller.Controller, h handler.Ev object := &unstructured.Unstructured{} object.SetGroupVersionKind(gvk) - return true, c.Watch(source.Kind(cs, object), h) + return true, c.Watch(source.Kind[ctrlclient.Object](cs, object, h)) } func HashReleasePlanBatches(releasePlan *rolloutv1beta1.ReleasePlan) string { diff --git a/pkg/webhook/rollout/validating/rollout_create_update_handler.go b/pkg/webhook/rollout/validating/rollout_create_update_handler.go index b58ffc28..a3988a86 100644 --- a/pkg/webhook/rollout/validating/rollout_create_update_handler.go +++ b/pkg/webhook/rollout/validating/rollout_create_update_handler.go @@ -52,7 +52,7 @@ type RolloutCreateUpdateHandler struct { Client client.Client // Decoder decodes objects - Decoder *admission.Decoder + Decoder admission.Decoder } var ( diff --git a/pkg/webhook/workload/mutating/unified_update_handler.go b/pkg/webhook/workload/mutating/unified_update_handler.go index 152cfa2a..c91e47a9 100644 --- a/pkg/webhook/workload/mutating/unified_update_handler.go +++ b/pkg/webhook/workload/mutating/unified_update_handler.go @@ -51,7 +51,7 @@ type UnifiedWorkloadHandler struct { Client client.Client // Decoder decodes objects - Decoder *admission.Decoder + Decoder admission.Decoder Finder *util.ControllerFinder } diff --git a/pkg/webhook/workload/mutating/workload_update_handler.go b/pkg/webhook/workload/mutating/workload_update_handler.go index 5726a384..abd66157 100644 --- a/pkg/webhook/workload/mutating/workload_update_handler.go +++ b/pkg/webhook/workload/mutating/workload_update_handler.go @@ -56,7 +56,7 @@ type WorkloadHandler struct { Client client.Client // Decoder decodes objects - Decoder *admission.Decoder + Decoder admission.Decoder Finder *util.ControllerFinder } diff --git a/test/e2e/rollout_test.go b/test/e2e/rollout_test.go index 05ab5e67..9a0852fa 100644 --- a/test/e2e/rollout_test.go +++ b/test/e2e/rollout_test.go @@ -43,6 +43,7 @@ import ( "k8s.io/klog/v2" utilpointer "k8s.io/utils/pointer" "sigs.k8s.io/controller-runtime/pkg/client" + gatewayv1 "sigs.k8s.io/gateway-api/apis/v1" gatewayv1beta1 "sigs.k8s.io/gateway-api/apis/v1beta1" "github.com/openkruise/rollouts/api/v1alpha1" @@ -1782,7 +1783,7 @@ var _ = SIGDescribe("Rollout", func() { By("Creating Rollout...") rollout := &v1alpha1.Rollout{} Expect(ReadYamlToObject("./test_data/rollout/rollout_canary_base.yaml", rollout)).ToNot(HaveOccurred()) - headerType := gatewayv1beta1.HeaderMatchRegularExpression + headerType := gatewayv1.HeaderMatchRegularExpression replica1 := intstr.FromInt(1) replica2 := intstr.FromInt(2) rollout.Spec.Strategy.Canary.Steps = []v1alpha1.CanaryStep{