helpers

package
v1.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2022 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QPS   = 200
	Burst = 200
)
View Source
const (
	YamlFormat            string = "yaml"
	JsonFormat            string = "json"
	JsonPathFormat        string = "jsonpath="
	CustomColumnsFormat   string = "columns="
	ColumnsSeparator      string = ","
	SupportedOutputFormat string = YamlFormat + "|" + JsonFormat + "|" + JsonPathFormat + "|" + CustomColumnsFormat + "..."
)
View Source
const (
	RHACM string = "RHACM"
	MCE   string = "MCE"
)

Variables

View Source
var (
	GvrCC                       schema.GroupVersionResource = schema.GroupVersionResource{Group: "hive.openshift.io", Version: "v1", Resource: "clusterclaims"}
	GvrCP                       schema.GroupVersionResource = schema.GroupVersionResource{Group: "hive.openshift.io", Version: "v1", Resource: "clusterpools"}
	GvrCD                       schema.GroupVersionResource = schema.GroupVersionResource{Group: "hive.openshift.io", Version: "v1", Resource: "clusterdeployments"}
	GvrCIS                      schema.GroupVersionResource = schema.GroupVersionResource{Group: "hive.openshift.io", Version: "v1", Resource: "clusterimagesets"}
	GvrPol                      schema.GroupVersionResource = schema.GroupVersionResource{Group: "policy.open-cluster-management.io", Version: "v1", Resource: "policies"}
	GvrMCH                      schema.GroupVersionResource = schema.GroupVersionResource{Group: "operator.open-cluster-management.io", Version: "v1", Resource: "multiclusterhubs"}
	GvrMCE                      schema.GroupVersionResource = schema.GroupVersionResource{Group: "multicluster.openshift.io", Version: "v1alpha1", Resource: "multiclusterengines"}
	GvrMC                       schema.GroupVersionResource = schema.GroupVersionResource{Group: "cluster.open-cluster-management.io", Version: "v1", Resource: "managedclusters"}
	GvrCSV                      schema.GroupVersionResource = schema.GroupVersionResource{Group: "operators.coreos.com", Version: "v1alpha1", Resource: "clusterserviceversions"}
	GvrPLC                      schema.GroupVersionResource = schema.GroupVersionResource{Group: "cluster.open-cluster-management.io", Version: "v1alpha1", Resource: "placements"}
	GvrMCS                      schema.GroupVersionResource = schema.GroupVersionResource{Group: "cluster.open-cluster-management.io", Version: "v1beta1", Resource: "managedclustersets"}
	GvrMCSB                     schema.GroupVersionResource = schema.GroupVersionResource{Group: "cluster.open-cluster-management.io", Version: "v1beta1", Resource: "managedclustersetbindings"}
	GvrIDPConfig                schema.GroupVersionResource = schema.GroupVersionResource{Group: "identityconfig.identitatem.io", Version: "v1alpha1", Resource: "idpconfigs"}
	GvrOpenshiftClusterVersions schema.GroupVersionResource = schema.GroupVersionResource{Group: "config.openshift.io", Version: "v1", Resource: "clusterversions"}
)

Functions

func ConvertReaderFileToValuesMap

func ConvertReaderFileToValuesMap(path string,
	reader *asset.ScenarioResourcesReader) (values map[string]interface{}, err error)

func ConvertValuesFileToValuesMap

func ConvertValuesFileToValuesMap(path, prefix string) (values map[string]interface{}, err error)

func ExecuteWithContext

func ExecuteWithContext(context string, args []string, dryRun bool, streams genericclioptions.IOStreams, outputFile string) error

func GetACMVersion

func GetACMVersion(cmFlags *genericclioptions.CMFlags, kubeClient kubernetes.Interface, dynamicClient dynamic.Interface) (version, snapshot string, err error)

func GetExampleHeader

func GetExampleHeader() string

func GetMCEVersion

func GetMCEVersion(cmFlags *genericclioptions.CMFlags, kubeClient kubernetes.Interface, dynamicClient dynamic.Interface) (version, snapshot string, err error)

func GetVersion

func GetVersion(cmFlags *genericclioptions.CMFlags, isCPHCommand bool, cphName string) (version string, platform string, err error)

func IsIDPInstalled added in v1.0.6

func IsIDPInstalled(cmFlags *genericclioptions.CMFlags, skipIDPCheck bool) (isIDPInstalled bool, err error)

func IsMCE

func IsMCE(cmFlags *genericclioptions.CMFlags) bool

func IsOpenshift added in v1.0.6

func IsOpenshift(cmFlags *genericclioptions.CMFlags) (bool, error)

func IsRHACM

func IsRHACM(cmFlags *genericclioptions.CMFlags) bool

func IsSupported

func IsSupported(cmFlags *genericclioptions.CMFlags) (isSupported bool, err error)

func IsSupportedVersion

func IsSupportedVersion(cmFlags *genericclioptions.CMFlags, isCPHCommand bool, cphName string, rhacmConstraint string, mceConstraint string) (isSupported bool, platform string, err error)

func Openbrowser

func Openbrowser(url string) error

func Print

func Print(obj runtime.Object, printFlags *get.PrintFlags) error

func RandStringRunes_az09

func RandStringRunes_az09(n int) string

func TimeDiff

func TimeDiff(t time.Time, precision time.Duration) string

func WaitKlusterlet

func WaitKlusterlet(clusterClient clusterclientset.Interface,
	clusterName string,
	timeout int) error

func WaitKlusterletAddons

func WaitKlusterletAddons(workClient workclientset.Interface,
	clusterName string,
	timeout int) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL