helpers

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2021 License: Apache-2.0 Imports: 33 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"}
	GvrMC   schema.GroupVersionResource = schema.GroupVersionResource{Group: "cluster.open-cluster-management.io", Version: "v1", Resource: "managedclusters"}
	GvrMCE  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"}
)

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 IsMCE

func IsMCE(cmFlags *genericclioptions.CMFlags) bool

func IsRHACM

func IsRHACM(cmFlags *genericclioptions.CMFlags) bool

func IsSupported

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

func IsSupportedVersion added in v1.0.4

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