openshift-online / maestro

Maestro Service Repo
Apache License 2.0
11 stars 20 forks source link

ResourceBundle.metadata field is missing creation/deletion timestamps #158

Closed machi1990 closed 4 months ago

machi1990 commented 4 months ago

looking at the response body of /api/maestro/v1/resource-bundles{/} endpoints and I noticed that the .metadata

 "metadata": {
        "creationTimestamp": null,
        "labels": {
          "maestro.resource.type": "97b3a7e0-f995-5062-aba0-3410f2d257a2"
        },
        "name": "f2224c6c-f765-5c91-b41b-47756ba7f4d3",
        "namespace": "cluster1",
        "resourceVersion": "0",
        "uid": "a3725382-388d-5f0a-9da7-ee90cc8ad904"
      }

doesn't have the creationTimestamp field set post creation of the resource. Additionally deletionTimestamp field isn't set either when a bundle is deletion is issued.

These two fields could be re-populated by https://github.com/openshift-online/maestro/blob/main/pkg/api/metadata_types.go#L53 and https://github.com/openshift-online/maestro/blob/main/pkg/api/metadata_types.go#L55 since they are system controlled / generated values i.e maestro control this and not the source side.