Skip to content

kube-addon-updater.sh not working properly for Deployments #23471

Closed
@fgrzadkowski

Description

Current logic in kube-addon-updater.sh is the following:

  1. Check object names in the yaml files on disk and compare with objects with kubernetes.io/cluster-service=true label
  2. Delete objects not listed on disk which exist in the system
  3. Create not existing objects
  4. Delete&Create objects for which are using name suffixes to find next version (e.g. heapster-1.0 and heapster-1.1 with - used as a separator). This is currently done only for ReplicationControllers

Recently @Q-Lee in #22893 added support for Deployments in this script and removed name suffixes for objects using Deployments (i.e. heapsteR). This has several problems:

a) Without name change we will never update Deployment object
b) Once we add reconciling ReplicaSet object in addon updater it will clash with Deployment controller - controller will create ReplicaSet, which will be delete by addon updater as it's not explicitly listed in yaml files
c) Even if we fix addon-updater to simply compare object spec (so that we don't have to rely on object name changes) we have addon-resizer, that will modify object spec (request/limit fields) that will show as a difference when comparing spec and addon-updater will override it

I believe we should not cherry-pick this PR to 1.2 and rethink the whole approach.

@Q-Lee (PR author)
@mikedanese (PR reviewer)
@zmerlynn (understands kube-addon-updater.sh)
@bgrant0607 (reviews PRs for cherrypick)
@roberthbailey (active in discussion about this feature)

Metadata

Assignees

Labels

kind/bugCategorizes issue or PR as related to a bug.priority/important-soonMust be staffed and worked on either currently, or very soon, ideally in time for the next release.sig/cluster-lifecycleCategorizes an issue or PR as relevant to SIG Cluster Lifecycle.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions