Skip to content

Commit adcc255

Browse files
committed
Merge branch 'main' into fix-6752
2 parents a59d4c9 + 58eab94 commit adcc255

File tree

203 files changed

+3706
-1433
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

203 files changed

+3706
-1433
lines changed

.github/workflows/build_and_test.yaml

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,28 @@ jobs:
8686
verbose: true
8787
use_oidc: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork) }}
8888

89+
go-benchmark-test:
90+
runs-on: ubuntu-latest
91+
needs:
92+
- changes
93+
if: ${{ github.event_name != 'pull_request' || needs.changes.outputs.run_test_workflow == 'true' }}
94+
steps:
95+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
96+
with:
97+
fetch-depth: 0 # Need main branch access for benchmark comparison
98+
- uses: ./tools/github-actions/setup-deps
99+
100+
- name: Install benchstat
101+
run: go install golang.org/x/perf/cmd/benchstat@latest
102+
- name: Run Benchmark Comparison
103+
continue-on-error: true
104+
run: |
105+
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
106+
./tools/hack/go-benchmark-compare.sh
107+
else
108+
make go-benchmark
109+
fi
110+
89111
build:
90112
runs-on: ubuntu-latest
91113
needs: [changes, lint, gen-check, license-check, coverage-test]
@@ -335,7 +357,4 @@ jobs:
335357
steps:
336358
- run: |
337359
echo "CI checks completed"
338-
[ "${{
339-
contains(needs.*.result, 'failure') ||
340-
contains(needs.*.result, 'cancelled')
341-
}}" == "false" ] || exit 1
360+
[ "${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}" == "false" ] || exit 1

api/v1alpha1/tls_types.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ type TLSSettings struct {
7575
// 2. Other Routes: ALPN is disabled.
7676
// 3. Backends: proxy uses the appropriate ALPN options for the backend protocol.
7777
// When an empty list is provided, the ALPN TLS extension is disabled.
78+
//
79+
// Defaults to [h2, http/1.1] if not specified.
80+
//
7881
// Typical Supported values are:
7982
// - http/1.0
8083
// - http/1.1

charts/gateway-crds-helm/templates/generated/gateway.envoyproxy.io_clienttrafficpolicies.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -935,6 +935,9 @@ spec:
935935
2. Other Routes: ALPN is disabled.
936936
3. Backends: proxy uses the appropriate ALPN options for the backend protocol.
937937
When an empty list is provided, the ALPN TLS extension is disabled.
938+
939+
Defaults to [h2, http/1.1] if not specified.
940+
938941
Typical Supported values are:
939942
- http/1.0
940943
- http/1.1

charts/gateway-crds-helm/templates/generated/gateway.envoyproxy.io_envoyproxies.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ spec:
5858
2. Other Routes: ALPN is disabled.
5959
3. Backends: proxy uses the appropriate ALPN options for the backend protocol.
6060
When an empty list is provided, the ALPN TLS extension is disabled.
61+
62+
Defaults to [h2, http/1.1] if not specified.
63+
6164
Typical Supported values are:
6265
- http/1.0
6366
- http/1.1

charts/gateway-helm/crds/generated/gateway.envoyproxy.io_clienttrafficpolicies.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -934,6 +934,9 @@ spec:
934934
2. Other Routes: ALPN is disabled.
935935
3. Backends: proxy uses the appropriate ALPN options for the backend protocol.
936936
When an empty list is provided, the ALPN TLS extension is disabled.
937+
938+
Defaults to [h2, http/1.1] if not specified.
939+
937940
Typical Supported values are:
938941
- http/1.0
939942
- http/1.1

charts/gateway-helm/crds/generated/gateway.envoyproxy.io_envoyproxies.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ spec:
5757
2. Other Routes: ALPN is disabled.
5858
3. Backends: proxy uses the appropriate ALPN options for the backend protocol.
5959
When an empty list is provided, the ALPN TLS extension is disabled.
60+
61+
Defaults to [h2, http/1.1] if not specified.
62+
6063
Typical Supported values are:
6164
- http/1.0
6265
- http/1.1

internal/cmd/certgen.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ func patchTopologyInjectorWebhook(ctx context.Context, cli client.Client, cfg *c
137137

138138
var updated bool
139139
desiredBundle := current.Data["ca.crt"]
140-
for i, webhook := range webhookCfg.Webhooks {
141-
if !bytes.Equal(desiredBundle, webhook.ClientConfig.CABundle) {
140+
for i := range webhookCfg.Webhooks {
141+
if !bytes.Equal(desiredBundle, webhookCfg.Webhooks[i].ClientConfig.CABundle) {
142142
webhookCfg.Webhooks[i].ClientConfig.CABundle = desiredBundle
143143
updated = true
144144
}

internal/cmd/egctl/config.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,10 @@ func fetchRunningEnvoyPods(c kube.CLIClient, nn types.NamespacedName, labelSelec
125125
if err != nil {
126126
return nil, err
127127
}
128-
for _, i := range namespaces.Items {
129-
podList, err := c.PodsForSelector(i.Name, proxy.EnvoyAppLabelSelector()...)
128+
for i := range namespaces.Items {
129+
podList, err := c.PodsForSelector(namespaces.Items[i].Name, proxy.EnvoyAppLabelSelector()...)
130130
if err != nil {
131-
return nil, fmt.Errorf("list pods failed in ns %s: %w", i.Name, err)
131+
return nil, fmt.Errorf("list pods failed in ns %s: %w", namespaces.Items[i].Name, err)
132132
}
133133

134134
if len(podList.Items) == 0 {
@@ -170,9 +170,9 @@ func fetchRunningEnvoyPods(c kube.CLIClient, nn types.NamespacedName, labelSelec
170170
}
171171

172172
podsNamespacedNames := make([]types.NamespacedName, 0, len(pods))
173-
for _, pod := range pods {
174-
podNsName := utils.NamespacedName(&pod)
175-
if pod.Status.Phase != "Running" {
173+
for i := range pods {
174+
podNsName := utils.NamespacedName(&pods[i])
175+
if pods[i].Status.Phase != "Running" {
176176
return podsNamespacedNames, fmt.Errorf("pod %s is not running", podNsName)
177177
}
178178

internal/cmd/egctl/config_ratelimit.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,14 @@ func fetchRunningRateLimitPods(cli kubernetes.CLIClient, namespace string, label
106106
}
107107

108108
rlNN := []types.NamespacedName{}
109-
for _, rlPod := range rlPods.Items {
109+
for i := range rlPods.Items {
110110
rlPodNsName := types.NamespacedName{
111-
Namespace: rlPod.Namespace,
112-
Name: rlPod.Name,
111+
Namespace: rlPods.Items[i].Namespace,
112+
Name: rlPods.Items[i].Name,
113113
}
114114

115115
// Check that the rate limit pod is ready properly and can accept external traffic
116-
if !checkRateLimitPodStatusReady(rlPod.Status) {
116+
if !checkRateLimitPodStatusReady(&rlPods.Items[i].Status) {
117117
continue
118118
}
119119

@@ -127,7 +127,7 @@ func fetchRunningRateLimitPods(cli kubernetes.CLIClient, namespace string, label
127127
}
128128

129129
// checkRateLimitPodStatusReady Check that the rate limit pod is ready
130-
func checkRateLimitPodStatusReady(status corev1.PodStatus) bool {
130+
func checkRateLimitPodStatusReady(status *corev1.PodStatus) bool {
131131
if status.Phase != corev1.PodRunning {
132132
return false
133133
}

internal/cmd/egctl/config_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ func TestCheckRateLimitPodStatusReady(t *testing.T) {
520520

521521
for _, tc := range cases {
522522
t.Run(tc.caseName, func(t *testing.T) {
523-
actual := checkRateLimitPodStatusReady(tc.status)
523+
actual := checkRateLimitPodStatusReady(&tc.status)
524524
require.Equal(t, tc.expect, actual)
525525
})
526526
}

0 commit comments

Comments
 (0)