applicationset icon indicating copy to clipboard operation
applicationset copied to clipboard

Add 'applications' field to ApplicationSet 'status' field, which would indicate errors/conditions for individual applications

Open jgwest opened this issue 2 years ago • 2 comments

This issue is a follow up to issue #71, which adds .status.conditions to ApplicationSet. This issue is opened to track adding .status.applications to ApplicationSet CRD. Under this new field conditions for individual applications would be added.

Note: There is some concern (myself included), that what is proposed below is too verbose (will produce a status field whose payload is too large) for large numbers of Applications.

Example

Here is an ApplicationSet with a single Application that failed on rendering the template:

status:
  conditions:
    # (proposed on issue #71)

  applications: # new field
    - name: my-app
      condition:
        # Parameter generation was successful...
        - type: ParametersGenerated
          status: True
          reason: ""
          message: ""
          lastTransitionTime: (...)

        # But template rendering failed.
        - type: TemplateRendered
          status: False
          reason: MissingParameter
          message: "Error occurred: Template referenced a parameter that doesn't exist"
          lastTransitionTime: (...)

        # Because template rendering failed, we couldn't apply the resources.
        - type: ResourcesApplied
          status: False
          reason: ""
          message: ""
          lastTransitionTime: (...)

This simulates an ApplicationSet with a single Application has no errors, it sucessfully generated, templated, and applied:

status:
  conditions:
    # (proposed on issue #71)

  applications:
    - name: my-app
      condition:
        # All Conditions were successful
        - type: ParametersGenerated
          status: True
          lastTransitionTime: (...)
        - type: TemplateRendered
          status: True
          lastTransitionTime: (...)
        - type: ResourcesApplied
          status: true
          lastTransitionTime: (...)

condition types for individual Applications (these are for status.applications.conditions):

  • ParametersGenerated: false if error occurred when running the generator, otherwise true (example error: we couldn't connect to the git repository)
  • TemplateRendered: false if error occurred when applying parameters to the template, otherwise true (example error: the template referenced a parameter that doesn't exist)
  • ResourcesApplied: false if we were unable to update/delete the application, otherwise true (example error: the generated application name was too long)

jgwest avatar Aug 20 '21 13:08 jgwest

@jgwest I would like to work on this issue (after merging https://github.com/argoproj-labs/applicationset/pull/372) . Do you mind if I take it?

alexmt avatar Sep 16 '21 19:09 alexmt

I'd love to have this feature so I can write custom health checks for ApplicationSet and use sync wave with it.

khuedoan avatar Feb 27 '22 06:02 khuedoan