Append managed resource to status as soon as they are patched

Instead of the outdated status reported in the issue:

❯ k get  sur sylva-units -o yaml | yq .status
conditions:
  - lastTransitionTime: "2025-12-17T09:41:16Z"
    message: |-
      external-secrets-operator Kustomization is not ready
      flux-system Kustomization is not ready
      sylva-units-operator Kustomization is not ready
    observedGeneration: 30
    reason: ResourceNotReady
    status: "False"
    type: Ready
  - lastTransitionTime: "2025-12-16T16:13:22Z"
    message: Reconciliation in progress
    observedGeneration: 30
    reason: Progressing
    status: Unknown
    type: HelmReleaseReady
  - lastTransitionTime: "2025-12-16T16:13:22Z"
    message: Reconciliation in progress
    observedGeneration: 30
    reason: Progressing
    status: Unknown
    type: HelmReleaseUpToDate
  - lastTransitionTime: "2025-12-16T16:13:22Z"
    message: Reconciliation in progress
    observedGeneration: 30
    reason: Progressing
    status: "False"
    type: PreUpgradeUnitsUpToDate
observedGeneration: 4
resourcesStatus:
  - kind: GitRepository
    name: sylva-units-5a348ccb
    status: Resource is Ready
  - kind: GitRepository
    name: sylva-units-5a348ccb
    status: Resource is Ready
  - kind: Secret
    name: sylva-units-file-01cdd13a
    status: Resource is Ready
  - kind: HelmRelease
    name: sylva-units
    status: InProgress - HelmRelease generation is 31, but latest observed generation is 30

The SylvaUnitStatus will be properly updated when kustomizations are being updated:

❯ k get sur sylva-units -o yaml | yq .status
conditions:
  - lastTransitionTime: "2025-12-17T10:01:58Z"
    message: |-
      sylva-units-operator Kustomization is not up-to-date: ArtifactFailed - Source artifact not found, retrying in 8s
      external-secrets-operator Kustomization is not up-to-date: ArtifactFailed - Source artifact not found, retrying in 8s
      flux-system Kustomization is not up-to-date: ArtifactFailed - Source artifact not found, retrying in 8s
    observedGeneration: 30
    reason: ResourceNotReady
    status: "False"
    type: Ready
  - lastTransitionTime: "2025-12-16T16:13:22Z"
    message: Reconciliation in progress
    observedGeneration: 30
    reason: Progressing
    status: Unknown
    type: HelmReleaseReady
  - lastTransitionTime: "2025-12-16T16:13:22Z"
    message: Reconciliation in progress
    observedGeneration: 30
    reason: Progressing
    status: Unknown
    type: HelmReleaseUpToDate
  - lastTransitionTime: "2025-12-16T16:13:22Z"
    message: Reconciliation in progress
    observedGeneration: 30
    reason: Progressing
    status: "False"
    type: PreUpgradeUnitsUpToDate
observedGeneration: 4
resourcesStatus:
  - kind: GitRepository
    name: sylva-units-e81b9527
    status: InProgress - GitRepository generation is 1, but latest observed generation is -1
  - kind: GitRepository
    name: sylva-units-e81b9527
    status: InProgress - GitRepository generation is 1, but latest observed generation is -1

Closes #85 (closed)

(I feel that it should also solve the point that you were raising here @stoub)

Edited by Francois Eleouet

Merge request reports

Loading