Description
Add the ApplyResultEntry type to BMCSettingsStatus so the controller can persist ETag metadata from successful apply operations. This enables ETag-based drift detection in subsequent reconcile loops without re-reading every attribute value.
Changes
-
Add AppliedETags map[string]ApplyResultEntry field to BMCSettingsStatus
-
Define the ApplyResultEntry struct:
```go
type ApplyResultEntry struct {
URI string json:"uri,omitempty"
ETag string json:"etag,omitempty"
ValueHash string json:"valueHash,omitempty"
}
```
URI: the Redfish resource URI from the apply response
ETag: the ETag captured after successful apply
ValueHash: SHA-256 hash of the effective value at apply time (detects desired-state changes from ConfigMap/Secret rotation)
-
Regenerate CRD manifests and deepcopy code (make manifests generate)
Files
api/v1alpha1/bmcsettings_types.go
api/v1alpha1/zz_generated.deepcopy.go (generated)
api/v1alpha1/applyconfiguration/api/v1alpha1/applyresultentry.go (generated)
api/v1alpha1/applyconfiguration/api/v1alpha1/bmcsettingsstatus.go (generated)
api/v1alpha1/applyconfiguration/internal/internal.go (generated)
api/v1alpha1/applyconfiguration/utils.go (generated)
config/crd/bases/metal.ironcore.dev_bmcsettings.yaml (generated)
Acceptance Criteria
Description
Add the
ApplyResultEntrytype toBMCSettingsStatusso the controller can persist ETag metadata from successful apply operations. This enables ETag-based drift detection in subsequent reconcile loops without re-reading every attribute value.Changes
Add
AppliedETags map[string]ApplyResultEntryfield toBMCSettingsStatusDefine the
ApplyResultEntrystruct:```go
type ApplyResultEntry struct {
URI string
json:"uri,omitempty"ETag string
json:"etag,omitempty"ValueHash string
json:"valueHash,omitempty"}
```
URI: the Redfish resource URI from the apply responseETag: the ETag captured after successful applyValueHash: SHA-256 hash of the effective value at apply time (detects desired-state changes from ConfigMap/Secret rotation)Regenerate CRD manifests and deepcopy code (
make manifests generate)Files
api/v1alpha1/bmcsettings_types.goapi/v1alpha1/zz_generated.deepcopy.go(generated)api/v1alpha1/applyconfiguration/api/v1alpha1/applyresultentry.go(generated)api/v1alpha1/applyconfiguration/api/v1alpha1/bmcsettingsstatus.go(generated)api/v1alpha1/applyconfiguration/internal/internal.go(generated)api/v1alpha1/applyconfiguration/utils.go(generated)config/crd/bases/metal.ironcore.dev_bmcsettings.yaml(generated)Acceptance Criteria
make manifests generateproduces clean outputmake testgreenkubectl apply --dry-run=server