Commit Graph

7 Commits

Author SHA1 Message Date
Antoine Pelisse b02ebf4b97 Make internal managers private
This significantly reduces the surface area of the fieldmanager package
by hiding all the private "managers" objects, as well as the interface
that was made specifically for these. There is no reason to configure
these.

Kubernetes-commit: adfc65ec23292ebd95d96727654acd8e8e0452a5
2022-12-12 14:07:13 -08:00
Davanum Srinivas 7e94033a61 Generate and format files
- Run hack/update-codegen.sh
- Run hack/update-generated-device-plugin.sh
- Run hack/update-generated-protobuf.sh
- Run hack/update-generated-runtime.sh
- Run hack/update-generated-swagger-docs.sh
- Run hack/update-openapi-spec.sh
- Run hack/update-gofmt.sh

Signed-off-by: Davanum Srinivas <davanum@gmail.com>

Kubernetes-commit: a9593d634c6a053848413e600dadbf974627515f
2022-07-19 20:54:13 -04: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