Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/apisix-conformance-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
id: go
uses: actions/setup-go@v4
with:
go-version: "1.22"
go-version: "1.23"

- name: Install kind
run: |
Expand All @@ -71,7 +71,7 @@ jobs:
- name: Setup Go Env
uses: actions/setup-go@v4
with:
go-version: "1.22"
go-version: "1.23"

- name: Login to Registry
uses: docker/login-action@v1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/apisix-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
id: go
uses: actions/setup-go@v4
with:
go-version: "1.22"
go-version: "1.23"

- name: Install kind
run: |
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:
- name: Setup Go Env
uses: actions/setup-go@v4
with:
go-version: "1.22"
go-version: "1.23"

- name: Login to Registry
uses: docker/login-action@v1
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/conformance-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
id: go
uses: actions/setup-go@v4
with:
go-version: "1.22"
go-version: "1.23"

- name: Install kind
run: |
Expand All @@ -69,7 +69,7 @@ jobs:
- name: Setup Go Env
uses: actions/setup-go@v4
with:
go-version: "1.22"
go-version: "1.23"
- name: Login to Registry
uses: docker/login-action@v1
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
id: go
uses: actions/setup-go@v4
with:
go-version: "1.22"
go-version: "1.23"

- name: Install kind
run: |
Expand All @@ -58,7 +58,7 @@ jobs:
e2e-test:
needs:
- prepare
runs-on: buildjet-2vcpu-ubuntu-2204
runs-on: buildjet-4vcpu-ubuntu-2204
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -68,7 +68,7 @@ jobs:
- name: Setup Go Env
uses: actions/setup-go@v4
with:
go-version: "1.22"
go-version: "1.23"

- name: Login to Registry
uses: docker/login-action@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Setup Go Env
uses: actions/setup-go@v4
with:
go-version: "1.22"
go-version: "1.23"

- name: check go path for debug
run: go env
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push-docker-v2-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Setup Go Env
uses: actions/setup-go@v4
with:
go-version: "1.22"
go-version: "1.23"

# - name: Set up QEMU
# uses: docker/setup-qemu-action@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Setup Go Env
uses: actions/setup-go@v4
with:
go-version: "1.22"
go-version: "1.23"

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Setup Go Env
uses: actions/setup-go@v4
with:
go-version: "1.22"
go-version: "1.23"
- name: Run unit test
working-directory: ./
run: |
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The APISIX Ingress Controller allows you to run the APISIX Gateway as a Kubernet

### Prerequisites

* go version v1.22.0+
* go version v1.23.0+
* docker version 17.03+.
* kubectl version v1.11.3+.
* Access to a Kubernetes v1.11.3+ cluster.
Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
module github.com/apache/apisix-ingress-controller

go 1.22.0
go 1.23.0

toolchain go1.22.5
toolchain go1.23.7

require (
github.com/Masterminds/sprig/v3 v3.2.3
github.com/api7/gopkg v0.2.1-0.20230601092738-0f3730f9b57a
github.com/gavv/httpexpect/v2 v2.16.0
github.com/go-logr/logr v1.4.2
github.com/go-logr/zapr v1.3.0
github.com/google/go-cmp v0.6.0
github.com/google/uuid v1.6.0
github.com/gruntwork-io/terratest v0.47.0
github.com/hashicorp/go-memdb v1.3.4
Expand All @@ -18,6 +19,7 @@ require (
github.com/onsi/ginkgo/v2 v2.20.0
github.com/onsi/gomega v1.34.1
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.19.1
github.com/samber/lo v1.47.0
github.com/spf13/cobra v1.8.1
github.com/stretchr/testify v1.9.0
Expand Down Expand Up @@ -99,7 +101,6 @@ require (
github.com/google/btree v1.1.2 // indirect
github.com/google/cel-go v0.20.1 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8 // indirect
Expand Down Expand Up @@ -152,7 +153,6 @@ require (
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/pquerna/otp v1.2.0 // 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
Expand Down
11 changes: 3 additions & 8 deletions internal/controller/consumer_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ package controller

import (
"context"
"fmt"

"github.com/go-logr/logr"
corev1 "k8s.io/api/core/v1"
Expand Down Expand Up @@ -276,13 +275,9 @@ func (r *ConsumerReconciler) updateStatus(consumer *v1alpha1.Consumer, err error
NamespacedName: utils.NamespacedName(consumer),
Resource: consumer.DeepCopy(),
Mutator: status.MutatorFunc(func(obj client.Object) client.Object {
t, ok := obj.(*v1alpha1.Consumer)
if !ok {
err := fmt.Errorf("unsupported object type %T", obj)
panic(err)
}
t.Status = consumer.Status
return t
cp := obj.(*v1alpha1.Consumer).DeepCopy()
cp.Status = consumer.Status
return cp
}),
})
}
Expand Down
10 changes: 3 additions & 7 deletions internal/controller/gatewayclass_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,9 @@ func (r *GatewayClassReconciler) Reconcile(ctx context.Context, req ctrl.Request
NamespacedName: utils.NamespacedName(gc),
Resource: gc.DeepCopy(),
Mutator: status.MutatorFunc(func(obj client.Object) client.Object {
t, ok := obj.(*gatewayv1.GatewayClass)
if !ok {
err := fmt.Errorf("unsupported object type %T", obj)
panic(err)
}
t.Status = gc.Status
return t
cp := obj.(*gatewayv1.GatewayClass).DeepCopy()
cp.Status = gc.Status
return cp
}),
})
}
Expand Down
31 changes: 9 additions & 22 deletions internal/controller/httproutepolicy.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ package controller
import (
"cmp"
"context"
"fmt"
"slices"

networkingv1 "k8s.io/api/networking/v1"
Expand Down Expand Up @@ -92,13 +91,9 @@ func (r *HTTPRouteReconciler) processHTTPRoutePolicies(tctx *provider.TranslateC
NamespacedName: utils.NamespacedName(&policy),
Resource: policy.DeepCopy(),
Mutator: status.MutatorFunc(func(obj client.Object) client.Object {
t, ok := obj.(*v1alpha1.HTTPRoutePolicy)
if !ok {
err := fmt.Errorf("unsupported object type %T", obj)
panic(err)
}
t.Status = policy.Status
return t
cp := obj.(*v1alpha1.HTTPRoutePolicy).DeepCopy()
cp.Status = policy.Status
return cp
}),
})
}
Expand Down Expand Up @@ -170,13 +165,9 @@ func (r *IngressReconciler) processHTTPRoutePolicies(tctx *provider.TranslateCon
NamespacedName: utils.NamespacedName(&policy),
Resource: policy.DeepCopy(),
Mutator: status.MutatorFunc(func(obj client.Object) client.Object {
t, ok := obj.(*v1alpha1.HTTPRoutePolicy)
if !ok {
err := fmt.Errorf("unsupported object type %T", obj)
panic(err)
}
t.Status = policy.Status
return t
cp := obj.(*v1alpha1.HTTPRoutePolicy).DeepCopy()
cp.Status = policy.Status
return cp
}),
})
}
Expand Down Expand Up @@ -282,13 +273,9 @@ func updateDeleteAncestors(updater status.Updater, policy v1alpha1.HTTPRoutePoli
NamespacedName: utils.NamespacedName(&policy),
Resource: policy.DeepCopy(),
Mutator: status.MutatorFunc(func(obj client.Object) client.Object {
t, ok := obj.(*v1alpha1.HTTPRoutePolicy)
if !ok {
err := fmt.Errorf("unsupported object type %T", obj)
panic(err)
}
t.Status = policy.Status
return t
cp := obj.(*v1alpha1.HTTPRoutePolicy).DeepCopy()
cp.Status = policy.Status
return cp
}),
})
}
Expand Down
10 changes: 3 additions & 7 deletions internal/controller/ingress_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -639,13 +639,9 @@ func (r *IngressReconciler) updateStatus(ctx context.Context, tctx *provider.Tra
NamespacedName: utils.NamespacedName(ingress),
Resource: ingress.DeepCopy(),
Mutator: status.MutatorFunc(func(obj client.Object) client.Object {
t, ok := obj.(*networkingv1.Ingress)
if !ok {
err := fmt.Errorf("unsupported object type %T", obj)
panic(err)
}
t.Status = ingress.Status
return t
cp := obj.(*networkingv1.Ingress).DeepCopy()
cp.Status = ingress.Status
return cp
}),
})
return nil
Expand Down
10 changes: 3 additions & 7 deletions internal/controller/policies.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,9 @@ func ProcessBackendTrafficPolicy(
NamespacedName: utils.NamespacedName(policy),
Resource: policy.DeepCopy(),
Mutator: status.MutatorFunc(func(obj client.Object) client.Object {
t, ok := obj.(*v1alpha1.BackendTrafficPolicy)
if !ok {
err := fmt.Errorf("unsupported object type %T", obj)
panic(err)
}
t.Status = policy.Status
return t
cp := obj.(*v1alpha1.BackendTrafficPolicy).DeepCopy()
cp.Status = policy.Status
return cp
}),
})
}
Expand Down
Loading
Loading