Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Handle alternate forms of resource status #233

Merged
merged 4 commits into from
May 13, 2022
Merged

Handle alternate forms of resource status #233

merged 4 commits into from
May 13, 2022

Commits on May 12, 2022

  1. Handle alternate forms of resource status

    We previously assumed that a resource either conformed to our notion of
    status or didn't have a status field at all. If a status field existed,
    but either didn't have the structure we expected or did have the
    structure but was a pointer, would err.
    
    Now we gracefully unpack the status as best we can, and safely ignore
    cases where the structure does not conform to our ideal structure. In
    those cases the functionality that would be applied is skipped. This
    includes:
    - calling `status.InitializeConditions()`
    - setting `status.ObservedGeneration`
    - normalizing the LastTransitionTime for conditions
    
    Signed-off-by: Scott Andrews <andrewssc@vmware.com>
    scothis committed May 12, 2022
    Configuration menu
    Copy the full SHA
    c487726 View commit details
    Browse the repository at this point in the history
  2. Preserve go 1.17 support

    Signed-off-by: Scott Andrews <andrewssc@vmware.com>
    scothis committed May 12, 2022
    Configuration menu
    Copy the full SHA
    1798862 View commit details
    Browse the repository at this point in the history

Commits on May 13, 2022

  1. Log warning when a parent resource doesn't follow best practices

    We log when a ParentReconciler is setup when:
    - there is no status
    - the status is a pointer
    - the status doesn't have a ObservedGeneration int64 field
    - the status doesn't have a Conditions []metav1.Condition field
    - the status doesn't have an InitializeConditions() method
    
    None of these will block the system at runtime, if a field/method is
    missing, the behavior is skipped.
    
    Signed-off-by: Scott Andrews <andrewssc@vmware.com>
    scothis committed May 13, 2022
    Configuration menu
    Copy the full SHA
    a259f8e View commit details
    Browse the repository at this point in the history
  2. polish readme

    Signed-off-by: Scott Andrews <andrewssc@vmware.com>
    scothis committed May 13, 2022
    Configuration menu
    Copy the full SHA
    d3f7560 View commit details
    Browse the repository at this point in the history