api icon indicating copy to clipboard operation
api copied to clipboard

Add status field to API

Open MorrisLaw opened this issue 2 years ago • 4 comments

We need a way to communicate to the user that the CR is misconfigured. Also, whether or not a Gateway exists in order to implement Policy Attachment correctly (see here).

Task: The status of the targetRef referenced Gateway needs to be exposed to the controller responsible for applying policy. (One idea is to add a status field to Istio/api, but we should also consider existing solutions that may exist (e.g. kstatus)).

MorrisLaw avatar Aug 10 '23 21:08 MorrisLaw

cc @therealmitchconnors who I recall tried to add this for Istio resources, also cc @howardjohn

linsun avatar Aug 14 '23 14:08 linsun

Istio resources already have a status field, which we mostly do not use. I like this idea, but it will require careful API design. For starters, I would consider using kstatus compatible conditions, unless there is a compelling reason to roll our own.

therealmitchconnors avatar Aug 14 '23 15:08 therealmitchconnors

Thank you @linsun @therealmitchconnors. Is this where gateway status is updated?

MorrisLaw avatar Aug 14 '23 16:08 MorrisLaw

Yes but only k8s Gateway. Istio status has been a bit different to date

howardjohn avatar Aug 14 '23 16:08 howardjohn