This is a complete hack

This does the following:
 - Bumps client-go a version
 - Adds the missing `contexts`
 - Takes leaderElection from Kubernetes upstream and adds a fix
This commit is contained in:
thebsdbox
2020-08-28 16:36:24 +01:00
parent 4c0fc591fe
commit d8505dab55
13 changed files with 1725 additions and 12 deletions

View File

@@ -1,6 +1,7 @@
package cmd
import (
"context"
"fmt"
"net"
"os"
@@ -142,7 +143,7 @@ var kubeKubeadmJoin = &cobra.Command{
opts := metav1.ListOptions{}
opts.LabelSelector = "node-role.kubernetes.io/master"
nodes, err := clientset.CoreV1().Nodes().List(opts)
nodes, err := clientset.CoreV1().Nodes().List(context.TODO(), opts)
// Iterate over all nodes that are masters and find the details to build a peer list
for x := range nodes.Items {