Merge pull request #61114 from php-coder/psp_printer_priv_fix

Automatic merge from submit-queue (batch tested with PRs 61124, 59537, 61235, 61258, 61114). 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>.

kubectl get psp: show PRIV for column with privileged flag

**What this PR does / why we need it**:
This PR improves a header in the `kubectl get psp` output.

Prior this change:
```console
$ kubectl get psp privileged
NAME         DATA      CAPS      SELINUX    RUNASUSER          FSGROUP    SUPGROUP   READONLYROOTFS   VOLUMES
privileged   true      *         RunAsAny   RunAsAny           RunAsAny   RunAsAny   false            *
```
Note that the 2nd column has DATA caption.

After this change:
```console
$ kubectl get psp 
NAME         PRIV      CAPS      SELINUX    RUNASUSER          FSGROUP    SUPGROUP   READONLYROOTFS   VOLUMES
privileged   true      *         RunAsAny   RunAsAny           RunAsAny   RunAsAny   false            *
```

**Which issue(s) this PR fixes**:
This is regression after #49700
pull/8/head
Kubernetes Submit Queue 2018-03-21 08:39:31 -07:00 committed by GitHub
commit bcf517e372
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -340,7 +340,7 @@ func AddHandlers(h printers.PrintHandler) {
podSecurityPolicyColumnDefinitions := []metav1beta1.TableColumnDefinition{
{Name: "Name", Type: "string", Format: "name", Description: metav1.ObjectMeta{}.SwaggerDoc()["name"]},
{Name: "Data", Type: "string", Description: extensionsv1beta1.PodSecurityPolicySpec{}.SwaggerDoc()["privileged"]},
{Name: "Priv", Type: "string", Description: extensionsv1beta1.PodSecurityPolicySpec{}.SwaggerDoc()["privileged"]},
{Name: "Caps", Type: "string", Description: extensionsv1beta1.PodSecurityPolicySpec{}.SwaggerDoc()["allowedCapabilities"]},
{Name: "SELinux", Type: "string", Description: extensionsv1beta1.PodSecurityPolicySpec{}.SwaggerDoc()["seLinux"]},
{Name: "RunAsUser", Type: "string", Description: extensionsv1beta1.PodSecurityPolicySpec{}.SwaggerDoc()["runAsUser"]},