Is this a request for help?: Yes
Is this an ISSUE or FEATURE REQUEST? (choose one): ISSUE
What version of aks-engine?: 0.33.2
Kubernetes version: 1.13.5
What happened:
What you expected to happen:
upgrade command should update all addons images
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know:
@mo-saeed I couldn't repro this behavior. Here's what I get:
"image": "k8s.gcr.io/cluster-autoscaler:v1.3.7","image": "k8s.gcr.io/cluster-autoscaler:v1.3.8",However, jumping on the cluster, I do see that the cluster-autoscaler pod is still using Image: k8s.gcr.io/cluster-autoscaler:v1.3.7 but that the image in /etc/kubernetes/addons/cluster-autoscaler-deployment.yaml is 1.3.8. Looking into this.
I've added some unit tests at https://github.com/Azure/aks-engine/pull/1385 to validate the default image behavior for upgrade and scale scenarios.
Update: the cluster-autoscaler deployment addonmanager.kubernetes.io/mode was EnsureExists. That's why cluster-autoscaler didn't get the latest /etc/kubernetes/addons yaml after the upgrade. I changed it to Reconcile in #1385 and will audit the code for other addons using EnsureExists.
@CecileRobertMichon
1- Apimodel change
yes you are right, I think i know now why it wasn't updated in my case. the cluster autoscaler in my existing cluster was disabled "enabled": false, I did a test and modified it manually to true and did the upgrade then the apimodel got the correct autoscaler image version.
I am not sure if this should be the behaviour anyway, for me i would say the image version should be updated in both cases (autoscaler enabled or disabled).
2- Actual change in cluster
Thank you for figuring this out, I think this fix needs to be applied for all other addons besides the cluster-autoscaler, for example after upgrade i still have the older version of networkmonitor image containernetworking/networkmonitor:v0.0.5
Thank you !
Updated other addons that had either Deployments or DaemonSets set to EnsureExists in the same PR, including networkmonitor.
I am not sure if this should be the behaviour anyway, for me i would say the image version should be updated in both cases (autoscaler enabled or disabled).
I agree, although it doesn't have any functional impact it's counter-intuitive. My guess is that there's an if enabled somewhere that we can remove.
@CecileRobertMichon is there any updates regarding the addons upgrade issue ? this one https://github.com/Azure/aks-engine/pull/1401 should fix it ?
If possible, I have also a question regarding the addons: is azure-ip-masq-agent necessary to be installed in case of using azure-cni network plugin (not kubenet) ? as per my understand it can be only necessary incase of any plugin using basic networking (e.g. kubenet...) as NAT is needed
azure-ip-masq-agent is currently installed if k.NetworkPlugin != NetworkPluginCilium. This might be a bug, I agree with you that it probably shouldn't be installed for azure CNI. @jackfrancis is working on a pretty big refactor in #1409 so we should wait for that to go in first before we change the default.