Skip to content
Permalink
Browse files

Merge pull request #7941 from prksu/fix-panic-when-ssh-key-not-exists…

…-on-do

Fix panic when ssh key not exists on digitalocean
  • Loading branch information
k8s-ci-robot committed Nov 20, 2019
2 parents d171027 + cc3f8aa commit 3ef957322ee5232d8dc966cdab92535a382f7515
Showing with 4 additions and 0 deletions.
  1. +4 −0 upup/pkg/fi/cloudup/apply_cluster.go
@@ -385,6 +385,10 @@ func (c *ApplyClusterCmd) Run() error {
return fmt.Errorf("DigitalOcean support is currently (very) alpha and is feature-gated. export KOPS_FEATURE_FLAGS=AlphaAllowDO to enable it")
}

if len(sshPublicKeys) == 0 && c.Cluster.Spec.SSHKeyName == "" {
return fmt.Errorf("SSH public key must be specified when running with DigitalOcean (create with `kops create secret --name %s sshpublickey admin -i ~/.ssh/id_rsa.pub`)", cluster.ObjectMeta.Name)
}

modelContext.SSHPublicKeys = sshPublicKeys

l.AddTypes(map[string]interface{}{

0 comments on commit 3ef9573

Please sign in to comment.
You can’t perform that action at this time.