diff --git a/snap/kube-controller-manager.yaml b/snap/kube-controller-manager.yaml index 3856559900f..6be4f67a756 100644 --- a/snap/kube-controller-manager.yaml +++ b/snap/kube-controller-manager.yaml @@ -33,4 +33,21 @@ parts: cp $KUBE_SNAP_ROOT/kube-controller-manager/kube-controller-manager-wrapper . $KUBE_SNAP_ROOT/shared/generate-configure-hook kube-controller-manager - snapcraftctl build \ No newline at end of file + # By mistake --service-account-private-key-file was marked as deprecated + # https://github.com/kubernetes/kubernetes/pull/62722 + # Should be fixed soon by https://github.com/kubernetes/kubernetes/pull/60270/files#diff-fc9db90cc6b68d7c3ca838a8512447e9R61 + # But until then, we need to do 1.11 testing + ensure_arg() { + type="$1" + config="$2" + if ! grep "^config-arg.* $config\$" meta/hooks/configure > /dev/null; then + if [ "$type" = "bool" ]; then + echo "config-arg-bool $config" >> meta/hooks/configure + else + echo "config-arg $config" >> meta/hooks/configure + fi + fi + } + ensure_arg string service-account-private-key-file + + snapcraftctl build