Skip to content

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

@AustinAbro321

Description

@AustinAbro321

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions