Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kubectl set resource can not update multi resource in local #52994

Closed
zjj2wry opened this issue Sep 25, 2017 · 3 comments · Fixed by #53000
Closed

kubectl set resource can not update multi resource in local #52994

zjj2wry opened this issue Sep 25, 2017 · 3 comments · Fixed by #53000
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. sig/cli Categorizes an issue or PR as relevant to SIG CLI.

Comments

@zjj2wry
Copy link
Contributor

zjj2wry commented Sep 25, 2017

Is this a BUG REPORT or FEATURE REQUEST?:

Uncomment only one, leave it on its own line:

/kind bug
/kind feature

What happened:
my yaml:

apiVersion: v1
kind: ReplicationController
metadata:
  name: first-rc
spec:
  replicas: 1
  selector:
    app: mock
  template:
    metadata:
      labels:
        app: mock
    spec:
      containers:
      - name: mock-container
        image: gcr.io/google-containers/pause:2.0
---
apiVersion: v1
kind: ReplicationController
metadata:
  name: second-rc
spec:
  replicas: 1
  selector:
    app: mock
  template:
    metadata:
      labels:
        app: mock
    spec:
      containers:
      - name: mock-container
        image: gcr.io/google-containers/pause:2.0

exec kubectl set resources command,just update first object:

admindeMacBook-Pro-2:kubectl admin$ ./kubectl set resources -f ../../test/fixtures/pkg/kubectl/cmd/set/multi-resource-yaml.yaml --limits=cpu=200m,memory=512Mi --local -o yaml
apiVersion: v1
kind: ReplicationController
metadata:
  creationTimestamp: null
  labels:
    app: mock
  name: first-rc
  namespace: default
spec:
  replicas: 1
  selector:
    app: mock
  template:
    metadata:
      creationTimestamp: null
      labels:
        app: mock
    spec:
      containers:
      - image: gcr.io/google-containers/pause:2.0
        imagePullPolicy: IfNotPresent
        name: mock-container
        resources:
          limits:
            cpu: 200m
            memory: 512Mi
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      terminationGracePeriodSeconds: 30
status:
  replicas: 0

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • Kubernetes version (use kubectl version):
  • Cloud provider or hardware configuration**:
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:
@zjj2wry
Copy link
Contributor Author

zjj2wry commented Sep 25, 2017

/sig cli

@k8s-github-robot k8s-github-robot added the needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label Sep 25, 2017
@k8s-ci-robot k8s-ci-robot added the sig/cli Categorizes an issue or PR as relevant to SIG CLI. label Sep 25, 2017
@zjj2wry
Copy link
Contributor Author

zjj2wry commented Sep 25, 2017

/kind bug

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Sep 25, 2017
@zjj2wry
Copy link
Contributor Author

zjj2wry commented Sep 25, 2017

/assign

@k8s-github-robot k8s-github-robot removed the needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label Sep 25, 2017
zjj2wry pushed a commit to zjj2wry/kubernetes that referenced this issue Sep 30, 2017
zjj2wry pushed a commit to zjj2wry/kubernetes that referenced this issue Oct 26, 2017
hh pushed a commit to ii/kubernetes that referenced this issue Oct 26, 2017
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>.

fix issue(kubernetes#52994)kubectl set resource can not update multi resource i…

…n local



**What this PR does / why we need it**:
Fixes kubernetes#52994

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. sig/cli Categorizes an issue or PR as relevant to SIG CLI.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants