Commit 5db0319
committed
Add BMCSettingsApplyResultEntry type to BMCSettings status for ETag-based drift detection
Add the BMCSettingsApplyResultEntry struct to api/v1alpha1/bmcsettings_types.go
and the AppliedETags field to BMCSettingsStatus:
type BMCSettingsApplyResultEntry struct {
URI string `json:"uri,omitempty"`
ETag string `json:"etag,omitempty"`
ValueHash string `json:"valueHash,omitempty"`
}
AppliedETags map[string]BMCSettingsApplyResultEntry `json:"appliedETags,omitempty"`
- URI: the Redfish resource URI from the apply response (Location header for
POST-created resources; request URI for PATCH)
- ETag: drift-detection token after the last successful apply — either a real
ETag returned by the BMC (e.g. W/"20B77DA6") or a SHA-256 hash of the GET
response prefixed with "hash:sha256:" for BMCs that do not return ETag headers
- ValueHash: SHA-256 of the effective (resolved) value at apply time, used to
detect desired-state changes from ConfigMap/Secret rotation without relying
on metadata.generation
The type is named BMCSettingsApplyResultEntry (rather than ApplyResultEntry) to
follow the existing sub-type naming convention (BMCSettingsSpec, BMCSettingsStatus,
BMCSettingsSetStatus, etc.) and to scope it clearly to the BMCSettings resource.
Regenerate CRD manifests and deepcopy/applyconfiguration code via
`make manifests generate`. No controller logic changes in this commit.
Fixes #915
Part of #858
Signed-off-by: Andrew Dodds <andrew.dodds@sap.com>1 parent e0b34f0 commit 5db0319
9 files changed
Lines changed: 208 additions & 0 deletions
File tree
- api/v1alpha1
- applyconfiguration
- api/v1alpha1
- internal
- config/crd/bases
- dist/chart/templates/crd
- docs/api-reference
Lines changed: 53 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
177 | 182 | | |
178 | 183 | | |
179 | 184 | | |
180 | 185 | | |
181 | 186 | | |
182 | 187 | | |
183 | 188 | | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
184 | 208 | | |
185 | 209 | | |
186 | 210 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
260 | 287 | | |
261 | 288 | | |
262 | 289 | | |
| |||
Lines changed: 27 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
266 | 293 | | |
267 | 294 | | |
268 | 295 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
483 | 483 | | |
484 | 484 | | |
485 | 485 | | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
486 | 504 | | |
487 | 505 | | |
488 | 506 | | |
| |||
597 | 615 | | |
598 | 616 | | |
599 | 617 | | |
| 618 | + | |
600 | 619 | | |
601 | 620 | | |
602 | 621 | | |
| |||
0 commit comments