Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle alternate forms of resource status #233

Merged
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
    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
    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
    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
    Copy the full SHA
    d3f7560 View commit details
    Browse the repository at this point in the history