• Kubernetes Submit Queue's avatar
    Merge pull request #46091 from xilabao/new-output-in-edit · 8ce63785
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue (batch tested with PRs 46091, 48280)
    
    allow output patch string in edit command
    
    **What this PR does / why we need it**:
    allow user to get the patch from edit command if user is not familiar with the patch format.
    
    ```
    # ./cluster/kubectl.sh create role a --verb=get,list --resource=no
    role "a" created
    
    # ./cluster/kubectl.sh edit role a --output-patch=true
    Patch: {"rules":[{"apiGroups":[""],"resources":["nodes"],"verbs":["get","list","delete"]}]}
    role "a" edited
    
    # ./cluster/kubectl.sh create role b --verb=get,list --resource=no
    role "b" created
    
    # ./cluster/kubectl.sh patch role b -p '{"rules":[{"apiGroups":[""],"resources":["nodes"],"verbs":["get","list","delete"]}]}'
    role "b" patched
    ```
    **Which issue this PR fixes**: fixes #47173
    
    **Special notes for your reviewer**:
    
    **Release note**:
    
    ```release-note
    Could get the patch from kubectl edit command
    ```
    8ce63785
Name
Last commit
Last update
..
helpers Loading commit data...
build.sh Loading commit data...
cross.sh Loading commit data...
make-help.sh Loading commit data...
test-cmd-util.sh Loading commit data...
test-cmd.sh Loading commit data...
test-e2e-node.sh Loading commit data...
test-federation-cmd.sh Loading commit data...
test-integration.sh Loading commit data...
test-kubeadm-cmd.sh Loading commit data...
test.sh Loading commit data...
verify.sh Loading commit data...
vet.sh Loading commit data...