Documentation
¶
Index ¶
- Constants
- func CleanupNetBirdResources(ctx context.Context, c client.Client, nbClient *netbirdrest.Client, ...) error
- func GetNetBirdClientFromSecrets(ctx context.Context, c client.Client, colony *infrav1.Colony) (*netbirdrest.Client, error)
- func GetSetupKeyFromSecret(ctx context.Context, c client.Client, colony *infrav1.Colony) (string, error)
- func PatchBootstrapSecretsForCluster(ctx context.Context, c client.Client, colony *infrav1.Colony, ...) error
- func ReconcileNetBird(ctx context.Context, c client.Client, colony *infrav1.Colony) error
- func SecretToColonyMapper(c client.Client) func(context.Context, client.Object) []ctrl.Request
- func WatchAndPatchBootstrapSecrets(ctx context.Context, c client.Client, colony *infrav1.Colony) error
Constants ¶
const ( // BootstrapSecretType is the type for CAPI bootstrap secrets BootstrapSecretType = "cluster.x-k8s.io/secret" // PatchedAnnotation marks secrets that have been patched PatchedAnnotation = "netbird.exalsius.ai/join-url-patched" // PatchedAnnotationValue is the value for the patched annotation PatchedAnnotationValue = "true" // ClusterNameLabel is the label for cluster name ClusterNameLabel = "cluster.x-k8s.io/cluster-name" // K0sTokenPath is the path to the k0s token file in cloud-init K0sTokenPath = "/etc/k0s.token" )
Variables ¶
This section is empty.
Functions ¶
func CleanupNetBirdResources ¶
func CleanupNetBirdResources(ctx context.Context, c client.Client, nbClient *netbirdrest.Client, colony *infrav1.Colony) error
CleanupNetBirdResources cleans up NetBird resources when a Colony is deleted.
func GetNetBirdClientFromSecrets ¶
func GetNetBirdClientFromSecrets(ctx context.Context, c client.Client, colony *infrav1.Colony) (*netbirdrest.Client, error)
GetNetBirdClientFromSecrets retrieves the NetBird API key from a Secret and creates a NetBird client.
func GetSetupKeyFromSecret ¶
func GetSetupKeyFromSecret(ctx context.Context, c client.Client, colony *infrav1.Colony) (string, error)
GetSetupKeyFromSecret retrieves the NetBird setup key from a Secret. It uses the auto-generated secret name from status, or constructs the expected name.
func PatchBootstrapSecretsForCluster ¶
func PatchBootstrapSecretsForCluster( ctx context.Context, c client.Client, colony *infrav1.Colony, clusterName string, ) error
PatchBootstrapSecretsForCluster patches all bootstrap secrets for a specific cluster to replace URLs with the appropriate endpoint (LoadBalancer external or internal DNS).
func ReconcileNetBird ¶
ReconcileNetBird reconciles NetBird integration for a Colony.
func SecretToColonyMapper ¶
SecretToColonyMapper maps a Secret to Colony reconcile requests This is used in the controller's Watch configuration
Types ¶
This section is empty.