package
0.0.0-20241024234740-5f3fcd68d7c6
Repository: https://github.com/sergiochamba/nginx-lb-operator.git
Documentation: pkg.go.dev

# Functions

AllocateIP allocates an IP address for the given service.
ConfigureKeepalived generates and updates Keepalived configurations.
ConfigureNGINX generates and updates the NGINX configuration for the service.
ContainsString checks if a string is present in a slice.
CopyFileToNGINXServer copies a file directly to the NGINX server via SSH and writes it using sudo.
ExecuteSSHCommand executes a command on the NGINX server via SSH.
FetchFileFromNGINXServer retrieves the content of a file from the NGINX server via SSH.
FetchVRIDAllocationsFromNGINX fetches the VRID_allocations.conf from the NGINX server.
GenerateKeepalivedConfig creates the Keepalived configuration content from the template.
GenerateNGINXConfig creates the NGINX configuration content from the template.
GetAllocatedIPForService retrieves the IP allocated to the service.
GetClusterName retrieves the cluster name from the environment variable.
GetEnv retrieves an environment variable or returns a default value.
GetOrAllocateVRIDs retrieves VRIDs for the cluster from the ConfigMap.
GetOrAllocateVRIDsOnStartup handles VRID allocation at operator startup.
GetServiceEndpoints retrieves the IPs of the pods backing the service.
GetServiceNodeIPs retrieves the IPs of the Kubernetes nodes where the pods backing the service are running.
GetSSHClientConfig retrieves SSH client configuration from the Kubernetes Secret.
IsIPAllocatedToService checks if the service already has an IP allocated.
LoadAllocatedIPs loads allocated IPs from the ConfigMap.
LoadIPPool loads the IP pool from the ConfigMap.
ReleaseIP releases an IP associated with a service.
ReloadNGINX reloads the NGINX service on the server via SSH.
RemoveFileFromNGINXServer removes a file directly from the NGINX server via SSH using sudo.
RemoveNGINXConfig removes the NGINX configuration for the specified service.
RemoveString removes a string from a slice.
RestartKeepalived restarts the Keepalived service on the NGINX server via SSH.
SaveAllocatedIPs saves allocated IPs to the ConfigMap.
UpdateVRIDAllocationsFile updates the VRID_allocations.conf on the NGINX server.

# Structs

SSHClientConfig holds the SSH client configuration details.