Fix gateway failure on uninstall
The following fatal error occurs:
"Error cleaning up the datastore: no kind is registered for the type
v1.Cluster in scheme "pkg/runtime/scheme.go:101""
We need to register the submariner types with the scheame prior to
doing uninstall.
@@ -110,6 +110,8 @@ func main() {
k8sClient, err := kubernetes.NewForConfig(cfg)
fatalOnErr(err, "Error creating Kubernetes clientset")
+ fatalOnErr(subv1.AddToScheme(scheme.Scheme), "Error adding submariner types to the scheme")
+
klog.Info("Creating the cable engine")
localCluster := submarinerClusterFrom(&submSpec)
@@ -148,8 +150,6 @@ func main() {
fatalOnErr(natDiscovery.Run(stopCh), "Error starting NAT discovery server")
- fatalOnErr(subv1.AddToScheme(scheme.Scheme), "Error adding submariner types to the scheme")
-
var cableHealthchecker healthchecker.Interface
if !submSpec.HealthCheckEnabled {
