kubernetes-sigs / cli-utils

This repo contains binaries that built from libraries in cli-runtime.
Apache License 2.0
155 stars 78 forks source link

Use empty object status list when the StatusPolicyNone is used #566

Closed Liujingfang1 closed 2 years ago

Liujingfang1 commented 2 years ago

This reduces the request size when StatusPolicyNone is used

Liujingfang1 commented 2 years ago

The default inventory provider was deliberately StatusPolicyNone, because the custom inventory provider tests StatusPolicyAll. Why change it?

We injected the apply status into the inventory configmap. If the passed in []ObjectStatus is empty, it throws an error. Updated the code to allow this.

You might want to add some unit tests that test a custom provider so that we know the status update works when StatusPolicyAll and doesn't write them when StatusPolicyNone.

Added an updated unit tests for this.

k8s-ci-robot commented 2 years ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: karlkfi, Liujingfang1

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubernetes-sigs/cli-utils/blob/master/OWNERS)~~ [Liujingfang1] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment