Commit Graph

181 Commits

Author SHA1 Message Date
Kevin Delgado a8a3bb4200 rename cache, add to integration test
Kubernetes-commit: 604db6eb2ada446e78152685943253455b5ec888
2021-07-19 20:04:27 +00:00
Kevin Delgado 613f696b0b Manually set GVK in extract, add commentary to extractor
Kubernetes-commit: dda31bbf2e7a94624e3679e3db56c95e66509ce0
2021-07-08 01:56:58 +00:00
Kevin Delgado 09e56ead9d Initial UnstructuredExtract without caching
Kubernetes-commit: 6e481c5db19cda1ef1b7506c22c0046e440c7fe2
2021-07-03 00:05:11 +00:00
Julian V. Modesto f753bce9f8 Make a public ValidateAnnotationsSize
Kubernetes-commit: 2e771b8e745c4a3be0d5bae3a6dc94087284c73b
2021-05-25 16:01:38 -04:00
Julian V. Modesto a01d02b7fd Make validation totalAnnotationSizeLimitB public.
Replace the forked totalAnnotationSizeLimitB with
apimachineryvalidation.TotalAnnotationSizeLimitB.

Kubernetes-commit: 55ff96301797a503b6ee1d09f0eb2ffc827f01b1
2021-05-18 17:28:11 -04:00
Julian V. Modesto c10cbf5412 Respect annotation size limit for SSA last-applied.
To support CSA and SSA interoperability, SSA updates the CSA
last-applied annotation.

This change ensures we don't set a big last-applied annotation if the
value is over the annotation limits.

Also, make sure that it's possible to opt-out of this behavior by
setting the CSA annotation to "" the empty string.

Kubernetes-commit: 6054320be1e50a450e9d1e19a79caa96f2035d4d
2021-05-18 15:06:48 -04:00
zhuangqh 640ba0e40e docs: fix outdated enhancement doc link
Signed-off-by: zhuangqh <zhuangqhc@gmail.com>

Kubernetes-commit: adf28648cb32d17cd186a6c7e8b264419e6d0759
2021-02-24 15:22:50 +08:00
Lukasz Szaszkiewicz a9e68c9b32 let objects without metadata pass through the managedFields admission controller
Not all objects provide metadata. There might be extention servers that allow for creating objects without the metadata field.

This PR changes the managedFileds admission to deal with objects without the metadata field.
Object without that field will be passed directly to the wrapped admission controller for further validation.

Kubernetes-commit: 3dbaf305ae1e52105a338987f3770ff104def68b
2021-04-29 14:08:36 +02:00
Andrea Nodari ca3910bf4a Add nil path to mapping when a CR has no "scale" subresource
This is to prevent the ScaleHandler to drop the entry. In this way
entries just get ignored.

Kubernetes-commit: 5b666a61a170f61c7e223085478b24a03612fa99
2021-04-18 13:55:15 +02:00
Andrea Nodari a178a9c5d1 Drop managed fields entries with unknown fields
This is aligned to the behaviour of server-side apply on main resources.

Kubernetes-commit: c10dd884c494734d12aceb41daaccd1d8da9356b
2021-04-09 17:17:23 +02:00
Andrea Nodari 9c3786c066 Do not add managed fields if a scale entry doesn't own replicas
This happens when a request changes the .status.replicas but not
.spec.replicas

Kubernetes-commit: 8e4b5c849b67b3a12dbd63391a4e75234382ba2c
2021-04-04 19:05:45 +02:00
Andrea Nodari 8c0975e184 Check request info when updating managed fields during scale
- Test all versions to make sure each resource version is in the
  mappings
- Fail when request info contains an unrecognized version. We have tests
  that guarantee that all known versions are in the mappings. If we
  get a version in request info that is not there we should fail fast to
  prevent inconsistent behaviour (e.g. for some reason the mappings is
  not up to date).

Ensure all known versions are in mappings

Kubernetes-commit: 09649e58b5a1368929e194991a763afc8011795e
2021-03-11 16:51:46 +01:00
Antoine Pelisse ddd271ff4e Use ScaleHandler for all scalable resources
Kubernetes-commit: 816e80206c169006de9d0a76cd385ee31c5aff39
2021-03-11 11:05:05 -08:00
Andrea Nodari 8df8282eaf Track ownership of deployments scale subresource
Kubernetes-commit: a9ea98b3b9272a7f7788a0d37891e4b13b9be38d
2021-01-23 18:50:14 +01:00
Andrea Nodari 2ec597ed01 Add "subresource" field to ManagedFieldEntry
This field is useful to namespace the managed field entries of a
subresource and differentiate them from the ones of the main resource.

Kubernetes-commit: 862d256195adf3be5475b1a6935e5feb78f884a5
2021-02-27 17:16:46 +01:00
Kevin Delgado ea32c4f47f Chain the field manager creation calls in newDefaultFieldManager and test
Kubernetes-commit: d37461180a1e5a52aeb85cf5853e000acfeb852d
2021-04-13 16:15:25 +00:00
Antoine Pelisse 49b6ebdaae fieldmanager: Strip managedfields BEFORE we update the timestamp
Kubernetes-commit: c8be9651ce0de1eee3fa785882fe01dee4b15d37
2021-03-09 12:46:07 -08:00
Danil-Grigorev de3d390777 Make selectors atomic
Ensure that all label selectors are treated as atomic values,
to exclude situations when selectors are being corrupted by
different actors attempting to apply their overlapping definition
for this field with server-side-apply.

Kubernetes-commit: d8a7764b6396b90313ae7bd50a845f4da4705d67
2021-01-12 18:29:56 +01:00
Kevin Delgado 86db6c67fb Server-Side Apply: Status Wiping/Reset Fields
Adds and implements ResetFieldsProvder interface in order to ensure that
the fieldmanager no longer owns fields that get reset before the object
is persisted.

Co-authored-by: Kevin Wiesmueller <kwiesmul@redhat.com>
Co-authored-by: Kevin Delgado <kevindelgado@google.com>

Kubernetes-commit: a1fac8cbd9289d95db4831a83239292ed56ce59d
2021-03-09 23:54:55 +00:00
Kevin Wiesmueller b101f44b76 cleanup managedFields admission and test
Kubernetes-commit: 2d1ba0c35829a2f146a712d49cb21f382c9894cb
2021-03-04 23:20:51 +01:00
Kevin Wiesmueller 8ef7c0686d only use managedFields decoding for admission check
Kubernetes-commit: 98d498117b5566c1229d754d97923f61600660d8
2021-03-01 20:29:15 +01:00
Kevin Wiesmueller 7c5bd1b084 harden managedFields decoding
Kubernetes-commit: 470ad03d076cae44bc98c64a08eea32e65f1bb9f
2021-03-01 19:58:56 +01:00
Kevin Wiesmueller 543879f479 fix test dependencies
Kubernetes-commit: 295e47f60b64332ef4e3268db282184357440675
2021-02-26 20:33:36 +01:00
Kevin Wiesmueller e4b883c5c7 update licenses and bazel
Kubernetes-commit: 1a8e2bf0358651151a6440717b4de1f662c4571b
2021-02-26 20:14:22 +01:00
Kevin Wiesmueller 04593d2277 prevent fieldManager admission from wrapping nil
Kubernetes-commit: 22dfa6ae1b431cb8e8afe72ce7d60360bf766337
2021-02-26 20:14:11 +01:00
Kevin Wiesmueller a69b2cb302 use existing validation code and decoding in fieldManager admission
Kubernetes-commit: fc1841d72f7418dd2606fb796f2a1b664bb3a721
2021-02-26 20:03:10 +01:00
Kevin Wiesmueller f9c68c0e80 export and cleanup managedFields decoding
Kubernetes-commit: 589ca1be1c9e75b1730feacd1af6e2c817f693ac
2021-02-26 17:47:52 +01:00
Kevin Wiesmueller 81cd3ef7b0 fix admission controller
Kubernetes-commit: 429a96da5e856c435b08b50791d462120724c475
2021-02-11 16:11:43 +01:00
Kevin Wiesmueller 08a5711ffb update bazel
Kubernetes-commit: a06f981fb1388976cd6427d7a4284d36dd2f2448
2021-01-14 20:33:50 +01:00
Kevin Wiesmueller 4a5fdad93b implement managedFields admission controller
Kubernetes-commit: d5ae113e8dfba62709b1fccb8dbc26c6dde9b3e5
2021-01-14 20:14:38 +01:00
chymy f5152b019f Fix static failures for vendor/k8s.io/apiserver/pkg/endpoints/handlers
Kubernetes-commit: 04515b9c0a8634ddbb48883cdceb1c265ae97015
2021-02-26 21:01:55 -05:00
Alan Zhu 3292215ff4 at most every may result in less than expected times if overloaded
Signed-off-by: Alan Zhu <zg.zhu@daocloud.io>

Kubernetes-commit: 67234271ef50da475b4627b484b3b45ee54e8f8d
2021-02-25 16:27:42 +08:00
Tim Bannister b29ffb4398 Update generated code
Kubernetes-commit: 284e03e1abde67cae5520a9b61497a71cca78e90
2021-02-15 22:50:30 +00:00
lala123912 5d990a9e20 staging\src\k8s.io\apiserver\pkg\endpoints:migrate to structured logs
Kubernetes-commit: 12076ff3e587be00f1ef52e546fa3a3a85d41e7b
2021-01-15 15:23:55 +08:00
Ken Sipe 92af261bb8 fix SA2006 value of err not used
Signed-off-by: Ken Sipe <kensipe@gmail.com>

Kubernetes-commit: a549d0a75e3a09d26f3a316982ff3711be4ed1d2
2020-06-25 17:23:37 -05:00
Ken Sipe 8877e7bd70 fix S1039 unnecessary use of fmt.Sprintf
Signed-off-by: Ken Sipe <kensipe@gmail.com>

Kubernetes-commit: 168677400c964fe823b985db35b5e1473db17b0f
2020-06-25 17:04:41 -05:00
Tim Hockin c2f3123308 Make tests deal with old and new topology labels
Kubernetes-commit: 3bd337baf487a0ad9d748e7e0362b3d1b5eb5c4d
2020-11-06 08:47:32 -08:00
Jefftree c13cd1f0d3 Make versionconverter functions private
Kubernetes-commit: 1f986cc69d8ac5b579ccc2e6817fd0a07903692b
2020-10-22 13:21:38 -07:00
Jefftree ce4c2eff1a Reuse SSA type converter for resources in the same API Group
Kubernetes-commit: 7182d84b109bb1c928bd5bf92d8c175432b9eeae
2020-10-20 11:16:51 -07:00
Joe Betz 2c72507385 Tag LabelSelector with +structType=atomic
Kubernetes-commit: 8874bdf00402b55cf5ede88a5ba4dfc94e9f4399
2020-08-11 11:34:15 -07:00
Antoine Pelisse d0b4a78e16 Do not update managedFields timestamp when they don't change
Kubernetes-commit: fedc0b7093e396aaf1fca7fd6f145a0f3cfd5c47
2020-10-01 10:53:16 -07:00
Andrea Nodari 99200040ed Do not allow manual changes to manageFields via subresources
If a request tries to change managedFields, the response returns the
managedField of the live object.

Kubernetes-commit: c522ee08a3d248ec1097e3673119ffa7a4e1ef7b
2020-07-14 17:42:54 +02:00
Julian V. Modesto dea021183c Add tests for managed fields tracking.
- Test that client-side apply users don't encounter a conflict with
server-side apply for objects that previously didn't track managedFields
- Test that we stop tracking managed fields with `managedFields: []`
- Test that we stop tracking managed fields when the feature is disabled

Kubernetes-commit: f2deb2417a6c542c54606ab17376b26ef1552b87
2020-07-16 17:14:35 -04:00
Ken Sipe ce7f425acc fix S1002 omit comp to bool
Signed-off-by: Ken Sipe <kensipe@gmail.com>

Kubernetes-commit: e8878687b18fd961e9f3e29c1c46fe018157a77d
2020-06-26 10:36:38 -05:00
Antoine Pelisse c4c20f4f7d Update SMD to v4.0.1 and kube-openapi
Kubernetes-commit: f4c145511a0bb62ea7ee1f2154945c84c17ffcd5
2020-08-10 13:02:25 -07:00
Julian V. Modesto fac7ebd95f Implement server-side apply upgrade & downgrade.
- Allow client-side to server-side apply upgrade.

  Ensure that a user can change management of an object from client-side apply to
  server-side apply without conflicts.

- Allow server-side apply to client-side downgrade.

  For an object managed with client-side apply, a user may upgrade to
  managing the object with server-side apply, then decide to downgrade.

  We can support this downgrade by keeping the last-applied-configuration
  annotation for client-side apply updated with server-side apply.

Kubernetes-commit: e4368eb67e363d3d03f81214a8929268d2fe88ff
2019-10-02 11:13:40 -04:00
Joe Betz 5bb316ec73 Bump to sigs.k8s.io/structured-merge-diff 43c19b to pick up unsetting fields changes PR#166
Kubernetes-commit: 11c38a9c703b825c61d6490e8da85202b760f3b1
2020-06-26 20:05:34 -07:00
Antoine Pelisse 025116d4fa Fix fieldType being dropped by older go-clients
Kubernetes-commit: 3f10709e4ce7e14fa9efc019ade3e99bb0a84b8a
2020-04-30 13:38:23 -07:00
Antoine Pelisse 3b7411b225 FieldManager: Reset if we receive nil or a list with one empty item
Kubernetes-commit: ed2cf6ef2cc4f4d358eee038d2d87387614bbf45
2020-05-21 13:23:30 -07:00
Antoine Pelisse cc0f41ad59 fieldManager: Ignore and log all errors when updating managedFields
Kubernetes-commit: 5378a788e471a18594c446888306d826d3b44661
2020-05-08 12:48:09 -07:00
Wei Huang a67f43f565 Remove `EvenPodsSpread` featuregate and related logic
Kubernetes-commit: 133dde63589bfb9f149607d1e8f6ae519d41719f
2020-05-27 14:24:26 -07:00
Tariq Ibrahim d8082ddfe6 s/RelicaSets/ReplicaSets
Kubernetes-commit: 9760dec9dc84d68c6613887128de192b4a66feff
2020-04-29 12:59:05 -07:00
Davanum Srinivas 5879417a28 switch over k/k to use klog v2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: 442a69c3bdf6fe8e525b05887e57d89db1e2f3a5
2020-04-17 15:25:06 -04:00
Antoine Pelisse 05f95a480d managedfields: Update Apply time if neither object nor managedfields have changed
Kubernetes-commit: 5231c6815c7b06248575892f3ec96c15c634d368
2020-03-05 13:13:27 -08:00
Antoine Pelisse c81c86d33f Bump sigs.k8s.io/structured-merge-diff to v3
Kubernetes-commit: df41fd932bef1686b30a1abee477c5009ebabe80
2020-03-05 13:09:50 -08:00
Antoine Pelisse 2ff45c3592 fieldmanager: Add failing test for no-op apply actually writing to etcd
Kubernetes-commit: 7120abe6989afff0d4ad879a4590a960f4ab19f0
2020-03-05 10:09:08 -08:00
Antoine Pelisse 5de3b6339e fieldmanager: Move ManagedFields update logic into its own class
Kubernetes-commit: 39681aa5800492b8e4b4ff5fb82e034376864a37
2020-03-05 10:01:37 -08:00
Antoine Pelisse 82ecbdb375 Don't log "SHOULD NOT HAPPEN" errors more than once per second
Kubernetes-commit: 389dd0a499e4fa79d3d2ef4261aa9f25aa94e6b0
2020-02-26 15:58:57 -08:00
Antoine Pelisse 07f3bde07d Enable field management for all new objects
Kubernetes-commit: a54a52c5de3458bfa5dbe1973d12584f59a5581c
2020-02-10 09:06:18 -08:00
Yu-Ju Hong 809bbdf7f8 Replace Beta OS/arch labels with the GA ones
Beta OS/arch labels have been deprecated since 1.14.
This change replaces these labels with the GA ones.

Kubernetes-commit: bcd975aa6575ae37ec3be3481e44cd0dccd02337
2020-02-12 11:30:39 -08:00
jennybuckley 4e7f113e29 Round times to nearest second before sorting
Kubernetes-commit: 888a322d9ca3070b811b348e05ee4a3ce7da6ae9
2020-02-11 11:54:21 -08:00
Jordan Liggitt 51a2cc34eb Lower server-side apply percentage to 10%
Kubernetes-commit: a657d51ce35eb3886a56ed710805cd68732461ee
2020-02-11 09:15:12 -05:00
Antoine Pelisse 3104ef647b Enable field management for all new objects
Kubernetes-commit: 8438bba5fd911c4674e46519228e6c47b5057346
2020-02-10 09:06:18 -08:00
Joe Betz dced5f29d8 Bump to latest SMD to pick up performance optimizations
Kubernetes-commit: d9faaca64738a50455f38dd88845e8b4b5ca37e2
2020-02-06 15:10:25 -08:00
Antoine Pelisse 977fdf9f57 Add UpdateTwice and UpdateApply benchmarks for fieldmanager
I've also moved the deserialization of the object outside the benchmark
since we're not trying to benchmark the yaml parser.

Kubernetes-commit: a52776fbfb305374d87bb553739f712e055b2206
2020-02-06 09:25:52 -08:00
jennybuckley 0fe6670327 Make schema error log message more useful
Kubernetes-commit: fee77388c6d4cc04731f35055d9dfcdf08b0f874
2020-01-29 15:01:44 -08:00
jennybuckley 605316fae2 Re-enable apply for 50% of requests
Kubernetes-commit: 9b679748239faa4d01f13c32af1956ffdbfff9aa
2020-01-23 11:27:20 -08:00
jennybuckley 49d583f0ef Update Structured Merge Diff to V3
Kubernetes-commit: b33fbc84d9d6e7033c36fa3bc321b8fea28ceed6
2020-01-21 15:03:56 -08:00
Jordan Liggitt 223f76bd7a Set managedField probability to 0%
Lowers probability of managedField population on create/update to 0%
until serialization/normalization issues are resolved

Kubernetes-commit: ba23aa98f6574bd1f9781f0d3e61d0496f16fc53
2020-01-14 14:47:35 -05:00
Jennifer Buckley 2ac09e3ec3 Update fieldmanager.go
Kubernetes-commit: 4db3822ebbac30248463eb529d88176f8b258fd9
2020-01-10 11:15:06 -08:00
jennybuckley d516617523 create probabilistic SkipNonAppliedManager
Kubernetes-commit: 6cab3a7bec75e42581e8041395c3ceaa14e07c74
2020-01-09 14:15:34 -08:00
Kevin Wiesmüller 4694e4eb62 fix nits
Kubernetes-commit: a2526286498762de187db23f13da5d747ddd1c90
2020-01-10 00:58:52 +01:00
Kevin Wiesmüller 41bde5b991 change Apply signature and move decoding into handlers
Kubernetes-commit: ddf0d4b8034697a8dca23a3c8bc5620629bd691b
2020-01-09 22:34:33 +01:00
sshukun 38b2d97314 Fix golint failure not contained in .golint_failures
Kubernetes-commit: 8110e08dd4abd4458b2d3793f5c1eb50069ae7df
2019-12-19 14:40:26 +09:00
Jordan Liggitt e00fbd05dd Use openapi fixture for server-side apply tests
Kubernetes-commit: 2b4fac5760ff390d46c2b9bb373feafe9bd97a38
2019-12-04 10:29:48 -05:00
Antoine Pelisse bab2370cac Update structured-merge-diff to latest version
Kubernetes-commit: 4f0346530d3e228db20aca6bb484d3ed3c83e33b
2019-11-06 09:53:38 -08:00
jennybuckley 72d976a445 Cap the number of managedFields entries for updates at 10
Kubernetes-commit: 61b19c729892a150b61dde19359f6fb19e8d61f1
2019-09-26 12:53:28 -07:00
jennybuckley 49914e3423 Refactor fieldmanager to be more modular
Kubernetes-commit: d72260b9dad186d96aa621dc8594ca9bd6088937
2019-09-19 13:14:36 -07:00
Jordan Liggitt f7fbf2eee4 Limit YAML/JSON decode size
Kubernetes-commit: 8ef4566cefebf49f9a806a36df2105c9149785a1
2019-09-27 16:36:48 -04:00
Antoine Pelisse 3e0b6a7493 Apply current parses the yaml object 3 times
This is super expensive and not needed at all since we don't have to
reparse the entire object. Remove all allocations but the first one.

Kubernetes-commit: 31c644a1e79c685b52683ed1e84964186a37f3ff
2019-09-25 12:38:38 -07:00
Antoine Pelisse 81b54ad46e Add tests and benchmarks for endpoints and node
Kubernetes-commit: 0b7ea8bb0e9cc10335044f9ef75920d59462a4ca
2019-09-20 13:32:06 -07:00
Antoine Pelisse db9f1ff5ea Improve fieldmanager tests and benchmarks
Kubernetes-commit: fae9d0ee2136d3443cdd87b1a26a06d7857b01ee
2019-09-10 14:06:08 -07:00
jennybuckley 6c75819b84 Split fieldmanager with interface
Kubernetes-commit: 2c67bf47db8557b6481a5181bdae924e91665988
2019-09-12 10:57:21 -07:00
Antoine Pelisse 912f3b47b9 Refactor FieldManager tests to make them simpler
This is the first step on this, but there are a few improvements that
I'd like to do here.

Kubernetes-commit: b10ad55119a155b776b272a7139dfbed604b05d6
2019-09-10 15:05:26 -07:00
Ted Yu a50931ba7e Move Update Apply conflict test to field manager test
Kubernetes-commit: 9828f986afd4db79a10c78bee1cc2e449faee3a6
2019-08-30 14:47:39 -07:00
Kubernetes Prow Robot c229c2ca0a Merge pull request #81453 from joshmsamuels/master
Apply will fail with managed fields + tests

Kubernetes-commit: 64718f678695884c93d6d3df8f5799614746bea2
2019-09-13 08:22:53 +00:00
jennybuckley b1cbdafe99 Use CRD validation field in server-side apply
Kubernetes-commit: c0617933d4bec5b00dbbfcd24edb7d7e7fc5509d
2019-08-28 15:28:49 -07:00
Antoine Pelisse 625e8a84fc Add new FieldsType to clarify the format of Fields
Kubernetes-commit: ff4e1f3592bfd51aea3018ed7e0a8579e5c0eea1
2019-08-21 16:13:53 -07:00
jennybuckley 263df041f9 Add tests
Kubernetes-commit: 3279c73945553e211ddb7812e07b3c9d46b5e96a
2019-08-22 13:27:38 -07:00
jennybuckley 350fef76f5 Only update managedFields on update if it already exists
Kubernetes-commit: 9a12e37a6dc28fd1d209eb84c210eb0723e6e38f
2019-06-05 14:09:08 -07:00
jennybuckley dcedf932c2 Make sure no op updates don't affect the resource version
Kubernetes-commit: aa1f01ec7e6ebf29444b93de7c3cb65a1a54d47e
2019-08-20 15:09:42 -07:00
jennybuckley 427507ed32 Group update managedFieldsEntries by manager name
Kubernetes-commit: 87eabcdbfa5d551af7ebcae3fb07fd8f386badc3
2019-08-19 13:50:15 -07:00
jennybuckley d98d4e6ca0 Use raw bytes in metav1.Fields instead of map
Also define custom proto unmarshaller that understands the old format

Kubernetes-commit: addad99b6f796bc0f0a2eeafa0296396667800e9
2019-07-31 16:05:48 -07:00
Daniel Smith 1fc8fb4c4b fix breaking change
Kubernetes-commit: f55efb8dae5b41a8af083dc96c53b5b6f6e59b49
2019-07-19 15:25:56 -07:00
jennybuckley 6d17cee146 Make changes to integrate new version
Kubernetes-commit: 229894c730c70d39992b27fe3ef98968b2a3fbff
2019-07-08 16:32:03 -07:00
jennybuckley 5751866f63 apiserver: make changes to integrate new structured-merge-patch
Kubernetes-commit: bd333e3ac7f84c33abebc7d55a8c581743d891f7
2019-07-08 16:32:03 -07:00
Antoine Pelisse 2f450e5e39 Add benchmarks for FieldManager handling
We don't have a lot of data on allocations and how much time it takes to
run apply or update on objects, so adding some benchmark will help us
investigate possible improvements.

Kubernetes-commit: 92cf3764f979e63317c8f483d8e841e0358599f4
2019-07-09 14:00:21 -07:00
jennybuckley e67aadb10a Don't dereference nil pointer in conflicts
Kubernetes-commit: c71583a31368d1e4e71cd458d6961d8fec2265f1
2019-06-13 14:42:19 -07:00
zhoulin xie 77ddb0c208 remove redundant words 'the' in comment
Signed-off-by: zhoulin xie <zhoulin.xie@daocloud.io>

Kubernetes-commit: 77ba845e6d2f0cba81993621531ae5915e7c072b
2019-02-13 22:40:34 +08:00
Antoine Pelisse 2d27d30e4d fieldManager: Ignore conversion errors to internal types
Errors on updates are bad because they usually come from controllers and
it's very hard to take actions on them. We also don't want to start
breaking kubernetes clusters if something in a schema happens a way we
didn't foresee (even though we've tried to be diligent and test as much
as possible, these can still happen).

Log an identifiable error when they happen. Ideally people can look in
the logs to find these and report them, or providers can look for these
in logs and make sure they don't happen.

Only conversion to internal types are going to be logged and ignored.

It means that we're still failing for:
- Version conversions. If we can't convert the object from one version
  to another,
- Unions. If we can't normalize the union,
- Invalid MangedFields sent in the object. If something has changed the
  ManagedFields to an invalid value.
- Failure to serialize the manager information, this really shouldn't
  happen.
- Encoding the ManagedFields

Kubernetes-commit: 4e32d183d0257c9f6c7f8342d1f9aa7f28458f2f
2019-05-16 11:07:47 -07:00