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

Implement .status.conditions on package.uds.dev to allow for evaluation with kstatus #991

Open
AustinAbro321 opened this issue Nov 8, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@AustinAbro321
Copy link

Is your feature request related to a problem? Please describe.

Since Zarf v0.42.0 deployments automatically wait for all resources in the deployed chart to be ready using kstatus. This allows users to avoid the .actions.wait.cluster syntax and have their packages automatically wait for resources that Helm won't wait for such as CRDs. However, not all CRDs are implemented in such a way that allows kstatus to tell if they are reconciled. packages.uds.dev custom resources are immediately considered reconciled upon creation, because the .status.conditions field is not implemented. The Package CRD uses .status.phase instead, however according to the Kubernetes API-convention docs, .status.phase is deprecated.

The only condition required for kstatus to work is the Ready condition. The UDS operator should create packages.uds.dev objects with an entry in the .status.conditions map with status set to "False", then update the status field to "True" when the resource is ready.

status:
   conditions:
    - type: Ready 
      status: "False" # Update to "True" when ready

This will allow owners of UDS packages to delete the common wait entry that looks like the yaml below. Additionally, by adopting the community standard other tools, such as Lula, will have an easier time integrating when waits are required.

      - description: Validate nginx Deployment
        maxTotalSeconds: 300
        wait:
          cluster:
            kind: Deployment
            name: nginx
            namespace: nginx
            condition: Available
@AustinAbro321 AustinAbro321 added the enhancement New feature or request label Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant