You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: enhancements/sig-architecture/179-work-feedback-scrape-type/README.md
+34-15Lines changed: 34 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,18 +84,18 @@ be a good place to talk about core concepts and how they relate.
84
84
85
85
### Risks and Mitigation
86
86
87
-
What are the risks of this proposal and how do we mitigate. Think broadly. For
88
-
example, consider both security and how this will impact the larger OKD
89
-
ecosystem.
87
+
#### Risk #1: Too many watch events and update calls to the ManifestWork.
90
88
91
-
How will security be reviewed and by whom? How will UX be reviewed and by whom?
89
+
This will be mitigated by limiting when the ManifestWork controller sends updates to the ManifestWork and to stop processing WATCH events once the ManifestWork is "Ready".
92
90
93
-
Consider including folks that also work outside your immediate sub-project.
91
+
ManifestWork Controller will parse the response from the informer watch and only send an update to the ManifestWork if there is an update on the feedbackRules.
94
92
95
-
## Design Details
93
+
ManifestWork Controller that registers informers per resource, will unregister the informer once the ManifestWork is Ready.
feedbackScrapeType: WATCH (Options: WATCH | POLL, POLL is default behavior)
127
+
....
128
+
```
129
+
114
130
This change will also be populated upwards to the ManifestWorkReplicaSet level of
115
131
`spec.manifestWorkTemplate.manifestConfigs`.
116
132
@@ -127,8 +143,8 @@ sequenceDiagram
127
143
128
144
opt if feedbackScrapeType == WATCH
129
145
A->>B: (WATCH) event for resource changes
130
-
B->>B: feedbackRules & conditionRule Updates
131
-
B->>C: (WATCH) for feedbackRule updates
146
+
B->>B: feedbackRules & conditionRule Updates (if there is any update)
147
+
B->>C: (WATCH) for feedbackRule updates only (if Progressing = True & Degraded = False|not set)
132
148
C->>C: Update status.Conditions
133
149
end
134
150
```
@@ -143,19 +159,22 @@ Poll remains as a safety net.
143
159
Create a FeedbackScrape interface that polls or watches resources.
144
160
145
161
In the ManifestWork Controller (pkg/work/spoke/controllers/statuscontroller/availablestatus_controller.go)
146
-
introduce a watch-based path alongside the existing poll loop. When syncing the ManifestWork, register a informer for the resource if `feedbackScrapeType` WATCH.
162
+
introduce a watch-based path alongside the existing poll loop.
163
+
164
+
When syncing the ManifestWork, register a informer for the resource if `feedbackScrapeType` WATCH. If the `feedbackScrapeType` is no longer WATCH, unregister the informer. If the ManifestWork is in Ready state (Progressing == False and Degraded == False / NotSet), unregister the informer. This will prevent long running WATCH from triggering too many ManifestWork changes. If there is new rollout, and the status changes to Progressing, then register the informer again.
147
165
148
-
When there is a change seen on the WATCH type, patch the status conditions for that resource.
166
+
When the informer recieves an event (create, update, delete), verify that there is a change on the fields defined in the `feedbackRules` and patch the status conditions for that resource. If there is no change on one of the `feedbackRules` field, ignore the WATCH event.
The update to the hub level will be the same for the new feature of `feedbackScrapeType` WATCH | POLL. When the ManifestWork has an update in the status feedback, trigger a resync of the MWRS to get the status feedback details. Once the MWRS is `Ready` status which has completed the rollout, stop the reconciler to prevent overloading the KubeAPI. (`Ready` status Proposal is TBD)
170
+
There should be no updates on the MWRS reconciler. The expected behavior is that when the ManifestWork has an update in the status feedback, trigger a resync of the MWRS to get the status feedback details.
153
171
172
+
In the current model, the MWRS controller is reconciled if there are changes to the ManifestWork (that are managed by manifestworkreplicaset), PlacementDecisions and Placements. Therefore any update to the status.Feedback on the ManifestWork should trigger the reconcile. Standard factory used [here](https://github.com/open-cluster-management-io/ocm/blob/main/pkg/work/hub/manager.go#L97-L98)
154
173
155
-
### Open Questions [optional]
156
174
157
-
> 1. Is there a limit that should be set on the `WATCH` type to prevent overloading of the KubeAPI?
0 commit comments