kubernetes/pkg/kubectl
Kubernetes Submit Queue a2931c6218 Merge pull request #40289 from xilabao/fix-save-config-in-create-subcommand
Automatic merge from submit-queue

fix --save-config in create subcommand

--save-config option doesn't work.
```
#kubectl create rolebinding a --role=b --user=c --save-config  
rolebinding "a" created
```
old output:
```
#kubectl get rolebinding a -o yaml
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: RoleBinding
metadata:
  creationTimestamp: 2017-01-23T10:09:48Z
  name: a
  namespace: default
  resourceVersion: "281"
  selfLink: /apis/rbac.authorization.k8s.io/v1beta1/namespaces/default/rolebindings/a
  uid: 12abccd6-e154-11e6-819c-525400f84377
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: b
subjects:
- apiVersion: rbac/v1alpha1
  kind: User
  name: c
```

expected output:
```
#kubectl get rolebinding a -o yaml
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: RoleBinding
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"kind":"RoleBinding","apiVersion":"rbac.authorization.k8s.io/v1beta1","metadata":{"name":"c","creationTimestamp":null},"subjects":[{"kind":"User","apiVersion":"rbac/v1alpha1","name":"c"}],"roleRef":{"apiGroup":"rbac.authorization.k8s.io","kind":"Role","name":"b"}}
  creationTimestamp: 2017-01-23T10:09:48Z
  name: a
  namespace: default
  resourceVersion: "281"
  selfLink: /apis/rbac.authorization.k8s.io/v1beta1/namespaces/default/rolebindings/a
  uid: 12abccd6-e154-11e6-819c-525400f84377
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: b
subjects:
- apiVersion: rbac/v1alpha1
  kind: User
  name: c
```
2017-02-04 04:40:29 -08:00
..
cmd Merge pull request #40289 from xilabao/fix-save-config-in-create-subcommand 2017-02-04 04:40:29 -08:00
metricsutil Update generated files 2017-01-29 21:41:45 +01:00
resource Update generated files 2017-01-29 21:41:45 +01:00
testing refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
apply.go start the apimachinery repo 2017-01-11 09:09:48 -05:00
autoscale.go Removed HPA objects from extensions api group 2017-02-02 14:09:54 +01:00
bash_comp_utils.go
BUILD Merge pull request #40541 from fabianofranz/fix_sorting_printer_with_missing_fields 2017-01-31 22:00:38 -08:00
cluster_test.go refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
cluster.go refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
clusterrolebinding.go change APIVersion to v1beta1 in create rolebinding/clusterrolebinding 2017-01-24 08:32:56 +08:00
configmap_test.go refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
configmap.go start the apimachinery repo 2017-01-11 09:09:48 -05:00
custom_column_printer_test.go refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
custom_column_printer.go move authoritative client-go utils out of pkg 2017-01-24 08:59:18 -05:00
deployment_test.go refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
deployment.go refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
describe_test.go move util/intstr to apimachinery 2017-01-30 12:46:59 -05:00
describe.go Removed HPA objects from extensions api group 2017-02-02 14:09:54 +01:00
doc.go
explain.go start the apimachinery repo 2017-01-11 09:09:48 -05:00
generate_test.go
generate.go start the apimachinery repo 2017-01-11 09:09:48 -05:00
history.go start the apimachinery repo 2017-01-11 09:09:48 -05:00
interfaces.go find and replace 2017-01-20 08:04:53 -05:00
kubectl_test.go
kubectl.go start the apimachinery repo 2017-01-11 09:09:48 -05:00
namespace_test.go refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
namespace.go start the apimachinery repo 2017-01-11 09:09:48 -05:00
OWNERS Revert "update kubectl approvers" 2017-01-25 17:32:22 -08:00
pdb.go move util/intstr to apimachinery 2017-01-30 12:46:59 -05:00
proxy_server_test.go Merge pull request #38789 from jessfraz/cleanup-temp-dirs 2017-01-20 12:34:58 -08:00
proxy_server.go find and replace 2017-01-20 08:04:53 -05:00
quota_test.go refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
quota.go start the apimachinery repo 2017-01-11 09:09:48 -05:00
resource_filter.go start the apimachinery repo 2017-01-11 09:09:48 -05:00
resource_printer_test.go move util/intstr to apimachinery 2017-01-30 12:46:59 -05:00
resource_printer.go Merge pull request #39279 from andrewsykim/kubectl-get-hpa-show-current-replicas 2017-02-02 09:53:50 -08:00
rolebinding.go change APIVersion to v1beta1 in create rolebinding/clusterrolebinding 2017-01-24 08:32:56 +08:00
rollback.go refactor: move ListOptions references to metav1 2017-01-23 17:52:46 -05:00
rolling_updater_test.go move util/intstr to apimachinery 2017-01-30 12:46:59 -05:00
rolling_updater.go move util/intstr to apimachinery 2017-01-30 12:46:59 -05:00
rollout_status_test.go refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
rollout_status.go start the apimachinery repo 2017-01-11 09:09:48 -05:00
run_test.go pkg/api/resource: move to apimachinery 2017-01-29 21:41:44 +01:00
run.go pkg/api/resource: move to apimachinery 2017-01-29 21:41:44 +01:00
scale_test.go move testing/core to client-go 2017-01-26 13:54:40 -05:00
scale.go refactor: move ListOptions references to metav1 2017-01-23 17:52:46 -05:00
secret_for_docker_registry_test.go refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
secret_for_docker_registry.go start the apimachinery repo 2017-01-11 09:09:48 -05:00
secret_for_tls_test.go move authoritative client-go utils out of pkg 2017-01-24 08:59:18 -05:00
secret_for_tls.go start the apimachinery repo 2017-01-11 09:09:48 -05:00
secret_test.go refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
secret.go start the apimachinery repo 2017-01-11 09:09:48 -05:00
service_basic_test.go move util/intstr to apimachinery 2017-01-30 12:46:59 -05:00
service_basic.go move util/intstr to apimachinery 2017-01-30 12:46:59 -05:00
service_test.go move util/intstr to apimachinery 2017-01-30 12:46:59 -05:00
service.go move util/intstr to apimachinery 2017-01-30 12:46:59 -05:00
serviceaccount_test.go refactor: use metav1.ObjectMeta in other types 2017-01-17 16:17:19 -05:00
serviceaccount.go start the apimachinery repo 2017-01-11 09:09:48 -05:00
sorted_resource_name_list_test.go
sorted_resource_name_list.go kubectl 2016-11-23 15:53:09 -08:00
sorting_printer_test.go Fix sorting printer with missing fields 2017-01-28 19:56:53 -02:00
sorting_printer.go Fix sorting printer with missing fields 2017-01-28 19:56:53 -02:00
stop_test.go move testing/core to client-go 2017-01-26 13:54:40 -05:00
stop.go pkg/util: move uuid and strategicpatch into k8s.io/apimachinery 2017-01-25 19:45:09 +01:00
versioned_client.go run hack/update-codegen.sh 2016-12-14 12:39:49 -08:00