Skip to content

Commit

Permalink
fix: HoldApplicationUntilProxyStarts feature. (#575)
Browse files Browse the repository at this point in the history
fix HoldApplicationUntilProxyStarts feature.

Signed-off-by: Cybwan <[email protected]>
  • Loading branch information
cybwan authored Dec 26, 2024
1 parent 73241bd commit 8514ebe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/messaging/broker.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,12 @@ func (b *Broker) GetProxyUpdatePubSub() *pubsub.PubSub {
}

func (b *Broker) GetProxyCreationChan() chan *corev1.Pod {
b.proxyCreationChOn = true
return b.proxyCreationCh
}

func (b *Broker) GetProxyDeletionChan() chan *corev1.Pod {
b.proxyDeletionChOn = true
return b.proxyDeletionCh
}

Expand Down Expand Up @@ -876,10 +878,10 @@ func (b *Broker) processEvent(msg events.PubSubMessage) {
// Update proxies if applicable
if event := getProxyUpdateEvent(msg); event != nil {
log.Trace().Msgf("Msg kind %s will update proxies", msg.Kind)
if event.creationPod != nil {
if b.proxyCreationChOn && event.creationPod != nil {
b.proxyCreationCh <- event.creationPod
}
if event.deletionPod != nil {
if b.proxyDeletionChOn && event.deletionPod != nil {
b.proxyDeletionCh <- event.deletionPod
}
atomic.AddUint64(&b.totalQProxyEventCount, 1)
Expand Down
2 changes: 2 additions & 0 deletions pkg/messaging/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ var (
type Broker struct {
queue workqueue.RateLimitingInterface
proxyUpdatePubSub *pubsub.PubSub
proxyCreationChOn bool
proxyCreationCh chan *corev1.Pod
proxyDeletionChOn bool
proxyDeletionCh chan *corev1.Pod
proxyUpdateCh chan proxyUpdateEvent
ingressUpdatePubSub *pubsub.PubSub
Expand Down

0 comments on commit 8514ebe

Please sign in to comment.