Documentation ¶
Index ¶
- Constants
- func ChangedDNSProvider(currentDNS, desiredDNS *pb.DNS) bool
- func CloseClientConnection(connection *grpc.ClientConn)
- func ConcurrentExec[K any](items []K, f func(item K) error) error
- func CreateDirectory(dir string) error
- func CreateHash(length int) string
- func CreateKeyFile(key string, outputPath string, keyName string) error
- func FindName(realNames []string, name string) string
- func GetClusterByName(clusterName string, clusters []*pb.K8Scluster) *pb.K8Scluster
- func GetNodePoolByName(nodePoolName string, nodePools []*pb.NodePool) *pb.NodePool
- func GetRegions(nodepools []*pb.NodePool) []string
- func GetenvOr(envKey string, defaultVal string) string
- func GroupNodepoolsByProvider(clusterInfo *pb.ClusterInfo) map[string][]*pb.NodePool
- func GroupNodepoolsByProviderSpecName(clusterInfo *pb.ClusterInfo) map[string][]*pb.NodePool
- func GrpcDialWithInsecure(serviceName string, serviceURL string) (*grpc.ClientConn, error)
- func InitLog(moduleName string)
- func SanitiseKubeconfig(s string) string
- func SanitiseURI(s string) string
Constants ¶
const HashLength = 7
Variables ¶
This section is empty.
Functions ¶
func ChangedDNSProvider ¶
func CloseClientConnection ¶
func CloseClientConnection(connection *grpc.ClientConn)
CloseClientConnection is a wrapper around grpc.ClientConn Close function
func ConcurrentExec ¶ added in v0.1.3
func CreateDirectory ¶ added in v0.1.3
func CreateHash ¶
func CreateKeyFile ¶
CreateKeyFile writes the given key to a file. The key filename is specified by its outputPath and KeyName operands.
func FindName ¶
findName will return a real node name based on the user defined one example: name defined in cloud provider: gcp-cluster-jkshbdc-gcp-control-1 -> name defined in cluster : gcp-control-1
func GetClusterByName ¶
func GetClusterByName(clusterName string, clusters []*pb.K8Scluster) *pb.K8Scluster
GetClusterByName will return Cluster that will have same name as specified in parameters If no name is found, return nil
func GetNodePoolByName ¶
GetNodePoolByName will return first Nodepool that will have same name as specified in parameters If no name is found, return nil
func GetRegions ¶
GetRegions will return a list of all regions used in list of nodepools
func GetenvOr ¶
GetenvOr returns the value of the env variable argument if it exists. Otherwise it returns the provided default value.
func GroupNodepoolsByProvider ¶
func GroupNodepoolsByProvider(clusterInfo *pb.ClusterInfo) map[string][]*pb.NodePool
groups nodepool by cloud provider name into the map[Provider Name][]*pb.Nodepool
func GroupNodepoolsByProviderSpecName ¶
func GroupNodepoolsByProviderSpecName(clusterInfo *pb.ClusterInfo) map[string][]*pb.NodePool
groups nodepool by provider spec name into the map[Provider Name][]*pb.Nodepool
func GrpcDialWithInsecure ¶
func GrpcDialWithInsecure(serviceName string, serviceURL string) (*grpc.ClientConn, error)
func InitLog ¶
func InitLog(moduleName string)
Initialize the logging framework. Inputs are the golang module name used as a logging prefix and the env variable with the logging level
func SanitiseKubeconfig ¶ added in v0.1.1
SanitiseKubeconfig replaces the entire kubeconfig found after the '--kubeconfig' flag with '*****'. This has been decided to be the superior option when compared to matching sensitive fields and obscuring just those.
func SanitiseURI ¶ added in v0.1.1
SanitiseURI replaces passwords with '*****' in connection strings that are in the form of <scheme>://<username>:<password>@<domain>.<tld> or <scheme>://<username>:<password>@<pqdn>.
Types ¶
This section is empty.