When running on non-aws platform or (aws platform which fails to be detected properly - see #84) the secret with external-dns configuration fails to be copied. This because the target namespace (hypershift) is only created by the installer if aws platform is detected:
|
// Seed the hypershift namespace, the uninstall will remove this namespace. |
|
ns := &corev1.Namespace{ObjectMeta: metav1.ObjectMeta{Name: hypershiftOperatorKey.Namespace}} |
|
if err := c.spokeUncachedClient.Get(ctx, client.ObjectKeyFromObject(ns), ns); err != nil { |
|
if apierrors.IsNotFound(err) { |
|
if err := c.spokeUncachedClient.Create(ctx, ns); err != nil { |
|
return err |
|
} |
|
} else { |
|
return err |
|
} |
|
} |
If this code block is skipped, the call to create the secret on the spoke cluster fails due to the missing namespace:
|
if err := c.createSpokeSecret(ctx, sExtDNS); err != nil { |
When running on non-aws platform or (aws platform which fails to be detected properly - see #84) the secret with external-dns configuration fails to be copied. This because the target namespace (
hypershift) is only created by the installer if aws platform is detected:hypershift-addon-operator/pkg/install/hypershift.go
Lines 182 to 192 in 47e349c
If this code block is skipped, the call to create the secret on the spoke cluster fails due to the missing namespace:
hypershift-addon-operator/pkg/install/hypershift.go
Line 231 in 47e349c