Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
d8e8d3e
OCPBUGS-77056: Asynchronous external certificate validation and Hybri…
bentito May 31, 2026
ed0e5f6
OCPBUGS-77056: Retry on write conflicts without dropping writerlease
bentito Jun 2, 2026
73ef8d9
Remove library-go replace directive and update vendor
bentito Jun 23, 2026
203d09a
address review comment: use types.NamespacedName for informer key
bentito Jun 23, 2026
4abff8f
address review comment: remove unnecessary lock from StatusAdmitter
bentito Jun 23, 2026
11bc0d0
Addressed several refactor needs from PR comments
bentito Jun 23, 2026
7702535
Addressing coderabbit PR comments
bentito Jul 7, 2026
c5900c9
OCPBUGS-77056: Fail-closed to ValidationFailed on secret deletion
bentito Jul 21, 2026
b0c1182
OCPBUGS-77056: Include standard SA groups in SubjectAccessReview specs
bentito Jul 21, 2026
2046440
OCPBUGS-77056: Use t.Setenv for WatchListClient override in factory t…
bentito Jul 21, 2026
ccac96c
OCPBUGS-77056: Refine secret deletion message for semantic consistency
bentito Jul 21, 2026
d29dc72
OCPBUGS-77056: Update vendor to remove unused authorizationutil refer…
bentito Jul 22, 2026
fad4035
OCPBUGS-77056: Use a short, unique prefix for fake-haproxy test sockets
bentito Jul 23, 2026
ee99b91
OCPBUGS-77056: Add tests exposing race conditions in async external c…
bentito Jul 27, 2026
635041f
OCPBUGS-77056: Fix race conditions causing x509 ECDSA verification fa…
bentito Jul 27, 2026
91552d3
OCPBUGS-77056: Reduce writerlease workers and fix gofmt
bentito Jul 27, 2026
5c4b560
OCPBUGS-77056: Update test comments to describe post-fix behavior
bentito Jul 27, 2026
369cbd6
OCPBUGS-77056: Check error returns in race condition tests
bentito Jul 28, 2026
8bb1e1e
OCPBUGS-77056: Prevent SARCompleted from re-admitting a deleted-secre…
bentito Jul 29, 2026
6566c83
OCPBUGS-77056: Fix stale comment and tighten assertion in re-admissio…
bentito Jul 30, 2026
33a9f90
OCPBUGS-77056: Comply with OTE Binary Stdout Contract in router_test.go
bentito Jul 30, 2026
ad278bb
OCPBUGS-77056: Only emit SARCompleted on registration, not re-validation
bentito Jul 30, 2026
64690b1
OCPBUGS-77056: Reject route on secret update to force full re-validation
bentito Jul 31, 2026
9465a49
OCPBUGS-77056: Keep route admitted on secret update, add delayed RBAC…
bentito Jul 31, 2026
6230e29
OCPBUGS-77056: Make delayed RBAC re-check a no-op when nothing changed
bentito Aug 1, 2026
b0361b8
OCPBUGS-77056: Refresh certificate synchronously on secret update
bentito Aug 2, 2026
f856ca4
OCPBUGS-77056: Restore deletedSecrets guard on SARCompleted write
bentito Aug 5, 2026
a15ee84
OCPBUGS-77056: Serialize per-route cert refresh to close update race
bentito Aug 5, 2026
9f6bcd5
OCPBUGS-77056: Remove synchronous SAR from secret UpdateFunc, add sta…
bentito Aug 6, 2026
b4aafbf
OCPBUGS-77056: Fix data race in ClearAsyncSARCacheForTest
bentito Aug 6, 2026
25df784
OCPBUGS-77056: Raise secret handler log level to V(2) for CI diagnostics
bentito Aug 8, 2026
647b13d
OCPBUGS-77056: Register route before SAR validation, add informer resync
bentito Aug 8, 2026
91025fd
Revert "OCPBUGS-77056: Raise secret handler log level to V(2) for CI …
bentito Aug 9, 2026
f096969
OCPBUGS-77056: Remove dead code, use const and types.NamespacedName f…
bentito Aug 13, 2026
54def8f
OCPBUGS-77056: Defer per-route unlock in UpdateFunc for panic safety
bentito Aug 13, 2026
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
5 changes: 3 additions & 2 deletions hack/Makefile.debug
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# -*- mode: makefile -*-

export GOOS=linux
export GOARCH ?= amd64

REGISTRY ?= quay.io
IMAGE ?= openshift/openshift-router
Expand All @@ -11,8 +12,8 @@ REMOTE_IMAGE ?= $(REGISTRY)/$(IMAGE):$(TAG)
OPENSHIFT_ENDPOINT ?= $(shell oc config view --minify --template '{{(index .clusters 0).cluster.server}}' | grep -o '//[^ :]*' | sed 's/^..//')

new-openshift-router-image:
GO111MODULE=on CGO_ENABLED=0 GOFLAGS=-mod=vendor go build -o openshift-router -gcflags=all="-N -l" ./cmd/openshift-router
$(IMAGEBUILDER) build -t $(LOCAL_IMAGE) -f hack/Dockerfile.debug .
GO111MODULE=on CGO_ENABLED=0 GOOS=$(GOOS) GOARCH=$(GOARCH) GOFLAGS=-mod=vendor go build -o openshift-router -gcflags=all="-N -l" ./cmd/openshift-router
$(IMAGEBUILDER) build --arch $(GOARCH) -t $(LOCAL_IMAGE) -f hack/Dockerfile.debug .
Comment thread
coderabbitai[bot] marked this conversation as resolved.

push:
$(IMAGEBUILDER) tag $(LOCAL_IMAGE) $(REMOTE_IMAGE)
Expand Down
7 changes: 7 additions & 0 deletions pkg/cmd/infra/router/clientcmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ func (cfg *Config) KubeConfig() (*restclient.Config, string, error) {
if err != nil {
return nil, "", err
}

// Increase client-side rate limiting to support higher throughput during
// router startup, especially when many external certificate routes are
// present.
clientConfig.QPS = 50
clientConfig.Burst = 100

return clientConfig, namespace, nil
}

Expand Down
6 changes: 3 additions & 3 deletions pkg/cmd/infra/router/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ import (
routelisters "github.com/openshift/client-go/route/listers/route/v1"
"github.com/openshift/library-go/pkg/crypto"
"github.com/openshift/library-go/pkg/proc"
"github.com/openshift/library-go/pkg/route/secretmanager"

"github.com/openshift/router/pkg/router"
"github.com/openshift/router/pkg/router/client"
"github.com/openshift/router/pkg/router/controller"
"github.com/openshift/router/pkg/router/metrics"
"github.com/openshift/router/pkg/router/metrics/haproxy"

"github.com/openshift/router/pkg/router/shutdown"
templateplugin "github.com/openshift/router/pkg/router/template"
haproxyconfigmanager "github.com/openshift/router/pkg/router/template/configmanager/haproxy"
Expand Down Expand Up @@ -770,7 +770,7 @@ func (o *TemplateRouterOptions) Run(stopCh <-chan struct{}) error {
return err
}

secretManager := secretmanager.NewManager(kc, nil)
secretManager := controller.NewSharedSecretManager(kc, nil)

pluginCfg := templateplugin.TemplatePluginConfig{
AppCtx: ctx,
Expand Down Expand Up @@ -816,7 +816,7 @@ func (o *TemplateRouterOptions) Run(stopCh <-chan struct{}) error {
informer := factory.CreateRoutesSharedInformer()
routeLister := routelisters.NewRouteLister(informer.GetIndexer())
if o.UpdateStatus {
lease := writerlease.New(time.Minute, 3*time.Second)
lease := writerlease.New(time.Minute, 3*time.Second, 1)
go lease.Run(stopCh)
tracker := controller.NewSimpleContentionTracker(informer, o.RouterName, o.ResyncInterval/10)
tracker.SetConflictMessage(fmt.Sprintf("The router detected another process is writing conflicting updates to route status with name %q. Please ensure that the configuration of all routers is consistent. Route status will not be updated as long as conflicts are detected.", o.RouterName))
Expand Down
7 changes: 5 additions & 2 deletions pkg/router/controller/contention.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ var (
ExtCrtStatusReasonSecretRecreated,
ExtCrtStatusReasonSecretUpdated,
ExtCrtStatusReasonSecretDeleted,
ExtCrtStatusReasonSARCompleted,
)
)

Expand Down Expand Up @@ -294,8 +295,10 @@ func ingressConditionsEqual(a, b []routev1.RouteIngressCondition) bool {

// conditionsEqual compares two RouteIngressConditions, ignoring LastTransitionTime and any reason in ignoreIngressConditionReason.
func conditionsEqual(a, b *routev1.RouteIngressCondition) bool {
if ignoreIngressConditionReason.Has(a.Reason) || ignoreIngressConditionReason.Has(b.Reason) {
return true
if a.Type == b.Type && a.Status == b.Status {
if ignoreIngressConditionReason.Has(a.Reason) || ignoreIngressConditionReason.Has(b.Reason) {
return true
}
}
return a.Type == b.Type &&
a.Status == b.Status &&
Expand Down
9 changes: 4 additions & 5 deletions pkg/router/controller/factory/factory_endpointslices_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package factory_test

import (
"context"
"os"
"testing"
"time"

Expand Down Expand Up @@ -77,15 +76,15 @@ func protocolPtr(p kapi.Protocol) *kapi.Protocol {
return &p
}

func newEndpointSliceTestSetup(plugin router.Plugin, initialObjects ...runtime.Object) (*fakekubeclient.Clientset, chan struct{}) {
func newEndpointSliceTestSetup(t *testing.T, plugin router.Plugin, initialObjects ...runtime.Object) (*fakekubeclient.Clientset, chan struct{}) {
stopCh := make(chan struct{})
client := fakekubeclient.NewSimpleClientset(initialObjects...)
fakeProject := &fakeproject.FakeProjectV1{}

// WatchListClient featuregate is enabled by default since v0.35. Fake client does not support
// initializing its cache from Watch, so falling back to use List instead. The envvar below
// configures the featuregate state.
os.Setenv("KUBE_FEATURE_"+string(features.WatchListClient), "False")
t.Setenv("KUBE_FEATURE_"+string(features.WatchListClient), "False")

factory.NewDefaultRouterControllerFactory(
fakerouterclient.NewSimpleClientset(),
Expand All @@ -104,7 +103,7 @@ func TestEndpointSlicesAdd(t *testing.T) {
handleEndpointsCh: make(chan handleEndpointsEvent),
}

client, stopCh := newEndpointSliceTestSetup(plugin)
client, stopCh := newEndpointSliceTestSetup(t, plugin)
defer close(stopCh)

type testCase struct {
Expand Down Expand Up @@ -339,7 +338,7 @@ func TestEndpointSlicesDelete(t *testing.T) {
handleEndpointsCh: make(chan handleEndpointsEvent),
}

client, stopCh := newEndpointSliceTestSetup(plugin)
client, stopCh := newEndpointSliceTestSetup(t, plugin)
defer close(stopCh)

for _, eps := range []discoveryv1.EndpointSlice{eps1, eps2} {
Expand Down
Loading