Documentation ¶
Index ¶
- func GetClusterName(kubeconfigPath string) (string, error)
- func GetOCPVersion(client *clients.Settings) (string, error)
- func GetOperatorVersionFromCsv(client *clients.Settings, operatorName, operatorNamespace string) (string, error)
- func GetZTPVersionFromArgoCd(client *clients.Settings, name, namespace string) (string, error)
- func IsVersionStringInRange(version, minimum, maximum string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetClusterName ¶
GetClusterName extracts the cluster name from provided kubeconfig, assuming there's one cluster in the kubeconfig.
func GetOCPVersion ¶
GetOCPVersion uses the cluster version on a given cluster to find the latest OCP version, returning the desired version if the latest version could not be found.
func GetOperatorVersionFromCsv ¶
func GetOperatorVersionFromCsv(client *clients.Settings, operatorName, operatorNamespace string) (string, error)
GetOperatorVersionFromCsv returns operator version from csv, or an empty string if no CSV for the provided operator is found.
func GetZTPVersionFromArgoCd ¶
GetZTPVersionFromArgoCd is used to fetch the version of the ztp-site-generate init container.
func IsVersionStringInRange ¶
IsVersionStringInRange checks if a version string is between a specified min and max value, inclusive. All the string inputs to this function should contain dot separated positive intergers, e.g. "1.0.0" or "4.10". Each string input must contain at least two dot separarted integers but may also contain more, though only the first two are compared. Digits are compared per position, so 4.Y is not less than 5.0 if Y > 0.
Types ¶
This section is empty.