@@ -44,37 +44,32 @@ type UpdaterConfig struct {
44
44
//
45
45
// (1) It doesn't understand the leader election. Only the leader must report the statuses of the resources. Otherwise,
46
46
// multiple replicas will step on each other when trying to report statuses for the same resources.
47
- // FIXME(pleshakov): address limitation (1)
48
47
//
49
48
// (2) It is not smart. It will update the status of a resource (make an API call) even if it hasn't changed.
50
- // FIXME(pleshakov) address limitation (2)
51
49
//
52
50
// (3) It is synchronous, which means the status reporter can slow down the event loop.
53
51
// Consider the following cases:
54
52
// (a) Sometimes the Gateway will need to update statuses of all resources it handles, which could be ~1000. Making 1000
55
53
// status API calls sequentially will take time.
56
54
// (b) k8s API can become slow or even timeout. This will increase every update status API call.
57
55
// Making updaterImpl asynchronous will prevent it from adding variable delays to the event loop.
58
- // FIXME(pleshakov) address limitation (3)
59
56
//
60
57
// (4) It doesn't retry on failures. This means there is a chance that some resources will not have up-to-do statuses.
61
58
// Statuses are important part of the Gateway API, so we need to ensure that the Gateway always keep the resources
62
59
// statuses up-to-date.
63
- // FIXME(pleshakov): address limitation (4)
64
60
//
65
61
// (5) It doesn't clear the statuses of a resources that are no longer handled by the Gateway. For example, if
66
62
// an HTTPRoute resource no longer has the parentRef to the Gateway resources, the Gateway must update the status
67
63
// of the resource to remove the status about the removed parentRef.
68
- // FIXME(pleshakov): address limitation (5)
69
64
//
70
65
// (6) If another controllers changes the status of the Gateway/HTTPRoute resource so that the information set by our
71
66
// Gateway is removed, our Gateway will not restore the status until the EventLoop invokes the StatusUpdater as a
72
67
// result of processing some other new change to a resource(s).
73
- // FIXME(pleshakov): Figure out if this is something that needs to be addressed.
68
+ // FIXME(pleshakov): Make updater production ready
69
+ // https://github.com/nginxinc/nginx-kubernetes-gateway/issues/691
74
70
75
- // (7) To support new resources, updaterImpl needs to be modified. Consider making updaterImpl extendable, so that it
71
+ // To support new resources, updaterImpl needs to be modified. Consider making updaterImpl extendable, so that it
76
72
// goes along the Open-closed principle.
77
- // FIXME(pleshakov): address limitation (7)
78
73
type updaterImpl struct {
79
74
cfg UpdaterConfig
80
75
}
@@ -88,7 +83,7 @@ func NewUpdater(cfg UpdaterConfig) Updater {
88
83
89
84
func (upd * updaterImpl ) Update (ctx context.Context , statuses state.Statuses ) {
90
85
// FIXME(pleshakov) Merge the new Conditions in the status with the existing Conditions
91
- // FIXME(pleshakov) Skip the status update (API call) if the status hasn't changed.
86
+ // https://github.com/nginxinc/nginx-kubernetes-gateway/issues/558
92
87
93
88
if upd .cfg .UpdateGatewayClassStatus && statuses .GatewayClassStatus != nil {
94
89
upd .update (
@@ -135,8 +130,6 @@ func (upd *updaterImpl) update(
135
130
statusSetter func (client.Object ),
136
131
) {
137
132
// The function handles errors by reporting them in the logs.
138
- // FIXME(pleshakov): figure out appropriate log level for these errors. Perhaps 3?
139
-
140
133
// We need to get the latest version of the resource.
141
134
// Otherwise, the Update status API call can fail.
142
135
// Note: the default client uses a cache for reads, so we're not making an unnecessary API call here.
0 commit comments