linkerd2/controller/cmd
Matei David 7ed904f31d
Enable endpoint slices when upgrading through CLI (#4864)
## What/How
@adleong  pointed out in #4780 that when enabling slices during an upgrade, the new value does not persist in the `linkerd-config` ConfigMap. I took a closer look and it seems that we were never overwriting the values in case they were different.

* To fix this, I added an if block when validating and building the upgrade options -- if the current flag value differs from what we have in the ConfigMap, then change the ConfigMap value.
* When doing so, I made sure to check that if the cluster does not support `EndpointSlices` yet the flag is set to true, we will error out. This is done similarly (copy&paste similarily) to what's in the install part.
* Additionally, I have noticed that the helm ConfigMap template stored the flag value under `enableEndpointSlices` field name. I assume this was not changed in the initial PR to reflect the changes made in the protocol buffer. The API (and thus the CLI) uses the field name `endpointSliceEnabled` instead. I have changed the config template so that helm installations will use the same field, which can then be used in the destination service or other components that may implement slice support in the future.

Signed-off-by: Matei David <matei.david.35@gmail.com>
2020-08-24 14:34:50 -07:00
..
destination Enable endpoint slices when upgrading through CLI (#4864) 2020-08-24 14:34:50 -07:00
heartbeat Add `as-group` CLI flag (#3952) 2020-01-22 16:38:31 +02:00
identity Spelling (#4872) 2020-08-12 21:59:50 -07:00
proxy-injector Add CronJobs and ReplicaSets to dashboard and CLI (#3687) 2019-12-11 10:02:37 -08:00
public-api Remove/Relax prometheus related checks (#4724) 2020-07-20 14:24:00 -07:00
service-mirror Spelling (#4872) 2020-08-12 21:59:50 -07:00
sp-validator Shrink controller Docker image from 315MB to 38MB (#3378) 2019-09-05 11:44:03 -07:00
tap Service Mirroring Component (#4028) 2020-03-02 21:16:08 +02:00
main.go Service Mirroring Component (#4028) 2020-03-02 21:16:08 +02:00