Skip to content

Enhance Operator to Improve Resource Visibility and Status Reporting #43

Description

@flamarion

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions