Closed yuwenma closed 1 year ago
/retest
/lgtm
@yuwenma: you cannot LGTM your own PR.
Thanks @yuwenma
/approve /lgtm
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: justinsb, yuwenma
The full list of commands accepted by this bot can be found here.
The pull request process is described here
Problem
The current applyset relies on the
status.conditions
to determine a resource healthy condition. But some legacy k8s resources do not havestatus.conditions
, likeStatefulSet
Service
NetworkPolicy
. This results inInternalError
even if those resources are actually healthy.As suggested in the
TODO
comment, kstatus provides a reliable approach on determining the status of those core k8s resources even if they have differentstatus
specifications.However, kstatus is under cli-utils (originally in kustomize) and we do not want to import cli-utils in applyset. The workaround in this PR is to use a specific kstatus version when it was a standalone go library in kustomize. This introduces the minimum dependencies.
related go libraries: kstatus is removed from kustomize in api/v0.4.2 https://github.com/kubernetes-sigs/kustomize/pull/2674 this PR uses the version from api/v0.4.1