Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

fix: use reconcile mode in addon specs #1401

Merged
merged 3 commits into from
Jun 7, 2019

Conversation

CecileRobertMichon
Copy link
Contributor

Reason for Change:

Addon specs delivered via aks-engine should use Reconcile mode in order for clusters to use the latest spec after an upgrade or a scale (ie. whenever the addon spec gets rewritten on disk in /etc/kubernetes/addons). Otherwise, new values in the addon spec such as new image versions won't be applied after an upgrade.

Issue Fixed:

Related to #1372

Requirements:

Notes:
Omitted Heapster purposefully because of #275

@codecov
Copy link

codecov bot commented May 29, 2019

Codecov Report

Merging #1401 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1401   +/-   ##
=======================================
  Coverage   75.52%   75.52%           
=======================================
  Files         128      128           
  Lines       18132    18132           
=======================================
  Hits        13695    13695           
  Misses       3643     3643           
  Partials      794      794

@@ -52,7 +52,7 @@ metadata:
name: kube-dns
namespace: kube-system
labels:
addonmanager.kubernetes.io/mode: EnsureExists
addonmanager.kubernetes.io/mode: Reconcile
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we probably want to keep this as EnsureExists as a Reconcile might blow away a pre-existing ConfigMap with data in it.

Ref:

https://github.com/kubernetes/kubernetes/blob/master/cluster/addons/dns/kube-dns/kube-dns.yaml.in

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated all ConfigMaps to use EnsureExists

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm torn about the omsagent ConfigMap since it data that is part of the ConfigMap resource definition, wondering I'm thinking we want to leave it to Reconcile so changes to that data get picked up by updates (it's currently set to Reconcile):

@@ -35,7 +35,7 @@ metadata:
rbac.authorization.kubernetes.io/autoupdate: "true"
labels:
kubernetes.io/bootstrapping: rbac-defaults
addonmanager.kubernetes.io/mode: EnsureExists
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, same comment about ConfigMap resources everywhere, but I'm torn on this particular ClusterRoleBinding as it is set to EnsureExists in the reference yaml:

https://github.com/kubernetes/kubernetes/blob/master/cluster/addons/dns/coredns/coredns.yaml.in

But I don't know why you wouldn't want to set this to Reconcile to allow the spec to adapt over time. @lachie83 @khenidak Any idea why you would bootstrap an addon spec w/ a ClusterRoleBinding set to EnsureExists? (That means essentially that the next time the addon manager picks up a change to this resource from /etc/kubernetes/addons/* it will not automatically reconcile it in the runtime)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left this as EnsureExists for now

@jackfrancis
Copy link
Member

lgtm

Copy link
Member

@mboersma mboersma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@acs-bot
Copy link

acs-bot commented Jun 6, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: CecileRobertMichon, mboersma

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [CecileRobertMichon,mboersma]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants