Merge pull request #66602 from dixudx/kubectl_apply_force_invalid

Automatic merge from submit-queue (batch tested with PRs 66602, 67178, 67207, 67125, 66332). 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: recreating resources for immutable fields when force is applied

**What this PR does / why we need it**:

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

**Special notes for your reviewer**:
/assign soltysh juanvallejo
/cc @kubernetes/sig-cli-bugs 

**Release note**:

```release-note
kubectl: recreating resources for immutable fields when force is applied
```
This commit is contained in:
Kubernetes Submit Queue
2018-08-10 14:13:05 -07:00
committed by GitHub
4 changed files with 40 additions and 1 deletions

10
hack/testdata/service-revision1.yaml vendored Normal file
View File

@@ -0,0 +1,10 @@
apiVersion: v1
kind: Service
metadata:
name: a
spec:
selector:
app: test
clusterIP: None
ports:
- port: 80

10
hack/testdata/service-revision2.yaml vendored Normal file
View File

@@ -0,0 +1,10 @@
apiVersion: v1
kind: Service
metadata:
name: a
spec:
selector:
app: test
clusterIP: 10.0.0.12
ports:
- port: 80