mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-19 08:40:42 +00:00
Merge pull request #54628 from deads2k/cli-04-sa-describe
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. make printing deterministic Fixes https://github.com/kubernetes/kubernetes/issues/54619. Describers should be deterministic. This fixes the code so that it prints consistently for a given object.
This commit is contained in:
commit
1f53329c67
@ -2273,7 +2273,8 @@ func describeServiceAccount(serviceAccount *api.ServiceAccount, tokens []api.Sec
|
|||||||
mountHeader: mountSecretNames,
|
mountHeader: mountSecretNames,
|
||||||
tokenHeader: tokenSecretNames,
|
tokenHeader: tokenSecretNames,
|
||||||
}
|
}
|
||||||
for header, names := range types {
|
for _, header := range sets.StringKeySet(types).List() {
|
||||||
|
names := types[header]
|
||||||
if len(names) == 0 {
|
if len(names) == 0 {
|
||||||
w.Write(LEVEL_0, "%s\t<none>\n", header)
|
w.Write(LEVEL_0, "%s\t<none>\n", header)
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user