@@ -77,8 +77,6 @@ type eventHandlerConfig struct {
77
77
nginxConfiguredOnStartChecker * nginxConfiguredOnStartChecker
78
78
// controlConfigNSName is the NamespacedName of the NginxGateway config for this controller.
79
79
controlConfigNSName types.NamespacedName
80
- // version is the current version number of the nginx config.
81
- version int
82
80
}
83
81
84
82
// filterKey is the `kind_namespace_name" of an object being filtered.
@@ -107,6 +105,9 @@ type eventHandlerImpl struct {
107
105
108
106
cfg eventHandlerConfig
109
107
lock sync.Mutex
108
+
109
+ // version is the current version number of the nginx config.
110
+ version int
110
111
}
111
112
112
113
// newEventHandlerImpl creates a new eventHandlerImpl.
@@ -177,8 +178,8 @@ func (h *eventHandlerImpl) HandleEventBatch(ctx context.Context, logger logr.Log
177
178
}
178
179
return
179
180
case state .EndpointsOnlyChange :
180
- h .cfg . version ++
181
- cfg := dataplane .BuildConfiguration (ctx , graph , h .cfg .serviceResolver , h .cfg . version )
181
+ h .version ++
182
+ cfg := dataplane .BuildConfiguration (ctx , graph , h .cfg .serviceResolver , h .version )
182
183
183
184
h .setLatestConfiguration (& cfg )
184
185
@@ -188,8 +189,8 @@ func (h *eventHandlerImpl) HandleEventBatch(ctx context.Context, logger logr.Log
188
189
cfg ,
189
190
)
190
191
case state .ClusterStateChange :
191
- h .cfg . version ++
192
- cfg := dataplane .BuildConfiguration (ctx , graph , h .cfg .serviceResolver , h .cfg . version )
192
+ h .version ++
193
+ cfg := dataplane .BuildConfiguration (ctx , graph , h .cfg .serviceResolver , h .version )
193
194
194
195
h .setLatestConfiguration (& cfg )
195
196
0 commit comments