Open pmalek opened 1 year ago
To not lose it, one point from our discussion: when checking the conditions, we need to make sure that the conditions' observed generation is equal to the actual object generation (see how kubectl wait
does it).
Probably the best approach for such CLI would be a Kubernetes plugin installed with krew. For instance, Datadog and Cillium have such ones.
Is there an existing issue for this?
Problem Statement
Given a set of kubernetes resources which are to be applied by KIC to the dataplane - Kong Gateway - there exists no universal approach to wait for those resources to be applied to be programmed on the dataplane and be ready to serve traffic as configured.
Various off the shelf solutions might exist such as e.g.
kubectl wait ...
but those have their own limitations.For example the Gateway API
HTTPRoute
, contains its conditions instatus.parents[].conditions[]
(ref)which prevents it from working withkubectl wait ... --for=condition=Programmed=True
One could try to work around it by using
--for=jsonpath='{.status.parents[0].conditions[?(@.type=="Programmed")].status}'=True
but that has its own problems e.g. https://github.com/kubernetes/kubectl/issues/1224.Even with the above fixed,
kubectl wait
:which doesn't fit the use case here since users might include in the manifest resources which do not support a particular readiness condition.
Proposed Solution
HTTPRoute
Programmed
conditionStatus
set toTrue
. Otherwise report a failure with this conditionkubectl
commandAdditional information
No response
Acceptance Criteria