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

Enhance Operator to Improve Resource Visibility and Status Reporting #43

Open
flamarion opened this issue Nov 25, 2024 · 0 comments
Open

Comments

@flamarion
Copy link

Objective:

Enable better debugging and monitoring for users by implementing two key improvements in the Operator:

  1. Report the status of managed resources in the Custom Resource (CR) status field.
  2. Optionally set ownerReferences on managed resources, with safeguards to prevent unintended deletions.

Scope of Work:

  1. CR Status Reporting:
  • Extend the Operator to reflect the status of its managed resources in the CR status field.
  • The status field should include:
    • Overall deployment status (Deploying, Success, Failure).
    • Error messages or details if deployment fails.
  • Ensure the status reporting logic is robust and updates dynamically as resources are created, updated, or deleted.
  1. ownerReferences:
  • Investigate the feasibility of adding ownerReferences to resources managed by the Operator.
  • Implement logic to safely handle the lifecycle of these resources:
    • Use finalizers to prevent accidental deletions when the CR or Operator is uninstalled.
    • Ensure cleanup logic is robust and tested to avoid orphaned resources or unintended data loss.
  • Include a feature flag or configuration toggle to enable or disable this behavior.

Kubernetes doc reference for ownerReferences

The Kubernetes CRD Docs may help with the research about the status field as well as the other resources also used by ownerRefrences

To validate the implementation, deploy a Custom Resource (CR) using the Operator and observe in ArgoCD: with the proposed status updates, you should see resource deployment statuses in the CR; with ownerReferences enabled, the managed resources should appear under the corresponding application in the ArgoCD UI.

Deliverables:

  1. Updated Operator code implementing the above features.
  2. Documentation for:
  • How to use the new status field for monitoring deployments.
  • How and when to enable ownerReferences safely.

Acceptance Criteria:

  • CR status accurately reflects the state of all managed resources.
  • Resources with ownerReferences are safely handled during lifecycle events (deletion, Operator uninstall, etc.).
  • Changes are backward compatible and do not disrupt existing deployments.
  • Code is reviewed and approved by Platform team.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant