From 6cc5fbab64fe502d9ff470e7c95e08ef8d68fd37 Mon Sep 17 00:00:00 2001 From: Kubernetes Prow Robot Date: Thu, 19 Aug 2021 11:35:25 -0700 Subject: [PATCH] Merge pull request #4274 from kinvolk/imran/cloud-provider-packet-fix Cloud provider[Packet] fixes --- .../cloudprovider/packet/README.md | 29 +++++++++++++ .../packet/packet_cloud_provider.go | 13 +++++- .../packet/packet_manager_rest.go | 42 +++++++++++++++++-- 3 files changed, 80 insertions(+), 4 deletions(-) diff --git a/cluster-autoscaler/cloudprovider/packet/README.md b/cluster-autoscaler/cloudprovider/packet/README.md index d78ada775d75..c43d7f0d83be 100644 --- a/cluster-autoscaler/cloudprovider/packet/README.md +++ b/cluster-autoscaler/cloudprovider/packet/README.md @@ -78,6 +78,35 @@ affinity: - t1.small.x86 ``` +## CCM and Controller node labels + +### CCM +By default, autoscaler assumes that you have an older deprecated version of `packet-ccm` installed in your +cluster. If however, that is not the case and you've migrated to the new `cloud-provider-equinix-metal` CCM, +then this must be told to autoscaler. This can be done via setting an environment variable in the deployment: +``` +env: + - name: INSTALLED_CCM + value: cloud-provider-equinix-metal +``` +**NOTE**: As a prerequisite, ensure that all worker nodes in your cluster have the prefix `equinixmetal://` in +the Node spec `.spec.providerID`. If there are any existing worker nodes with prefix `packet://`, then drain +the node, remove the node and restart the kubelet on that worker node to re-register the node in the cluster, +this would ensure that `cloud-provider-equinix-metal` CCM sets the uuid with prefix `equinixmetal://` to the +field `.spec.ProviderID`. + +### Controller node labels + +Autoscaler assumes that control plane nodes in your cluster are identified by the label +`node-role.kubernetes.io/master`. If for some reason, this assumption is not true in your case, then set the +envirnment variable in the deployment: + +``` +env: + - name: PACKET_CONTROLLER_NODE_IDENTIFIER_LABEL + value: