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

move status calculation into its own controller #255

Merged
merged 1 commit into from
Oct 14, 2020

Commits on Oct 14, 2020

  1. move status calculation into its own controller

    Rather than have each controller responsible for triggering a status calculation, move that responsiblity into its own controller.
    
    Store the upcoming list of Secrets as a shared constant/variable (for use by both the Actuator's Upgradeable() and the status controller's Secret watch list).
    Remove GetUpcomingSecrets() from the Actuator interface.
    Stop setting default ClusterOperator status condition values from the Actuator's Upgradeable() API call (it is already set in the current status calculation codepath).
    Update controllers to register themselves to the new status controller for status calculation callbacks.
    Convert previous pkg/util/status into the new status controller (now in pkg/operator/status).
    Remove hack of sending fake CredentialsRequests just to trigger a status sync from credentialsrequest controller (new status calculator now will watch and react appropriately).
    Update credentialsrequest test cases to only check for the setting of non-default conditions.
    Update credentialsrequest test cases to no longer need to register and deregister status callbacks.
    Move credentialsrequest status test cases to new status controller.
    Update secretannotator actuators to no longer trigger a status sync.
    
    Note: for situations where the status controller cannot watch for certain conditions that should cause a status recalculation, the controller can annotate the CCO's operator config object to add a timestamp (which will in turn trigger a status calc).
    
    Important changes:
    Ensure the managementState field is set on our CCO operator config (otherwise we run into problems trying to annotate the operator config). The operator config should not allow an empty string for the managementState field, but it absolutely is not set at all (which shows up as being set to the empty string after doing a Get() of the operator config). Detect this, and assume that the empty string means a managementState of "Managed", and send back "Managed" on Update().
    Joel Diaz committed Oct 14, 2020
    Configuration menu
    Copy the full SHA
    dbfdb78 View commit details
    Browse the repository at this point in the history