kubesphere-sigs / ks

ks is a tool that makes it be easy to work with KubeSphere.
MIT License
22 stars 16 forks source link

Avoid delete whole annotation of users #233

Closed LinuxSuRen closed 2 years ago

LinuxSuRen commented 2 years ago

The test output:

root@node1:~# ks get user admin -oyaml | head
apiVersion: iam.kubesphere.io/v1alpha2
kind: User
metadata:
  annotations:
    helm.sh/resource-policy: keep
    iam.kubesphere.io/uninitialized: "true"
    meta.helm.sh/release-name: ks-core
    meta.helm.sh/release-namespace: kubesphere-system
  creationTimestamp: "2021-10-21T04:36:41Z"
  finalizers:
root@node1:~# ks user admin
root@node1:~# ks get user admin -oyaml | head
apiVersion: iam.kubesphere.io/v1alpha2
kind: User
metadata:
  annotations:
    helm.sh/resource-policy: keep
    iam.kubesphere.io/last-password-change-time: "2021-10-21T05:43:00Z"
    iam.kubesphere.io/uninitialized: "false"
    meta.helm.sh/release-name: ks-core
    meta.helm.sh/release-namespace: kubesphere-system
  creationTimestamp: "2021-10-21T04:36:41Z"
codecov[bot] commented 2 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@3f8ecfc). Click here to learn what that means. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #233   +/-   ##
=========================================
  Coverage          ?   10.54%           
=========================================
  Files             ?       33           
  Lines             ?     1451           
  Branches          ?        0           
=========================================
  Hits              ?      153           
  Misses            ?     1285           
  Partials          ?       13           
Flag Coverage Δ
unittests 10.54% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 3f8ecfc...375c098. Read the comment docs.

JohnNiang commented 2 years ago

In my test, even if we changed the annotation iam.kubesphere.io/uninitialized to false, I didn't see the annotation value back to true.