util

package
v1.7.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRancherCACert added in v1.2.3

func GetRancherCACert(ctx context.Context, cli client.Client) string

GetRancherCACert returns the cacerts included within Rancher settings. If not configured returns an empty string

func GetSettingsValue added in v1.2.3

func GetSettingsValue(ctx context.Context, cli client.Client, name string) (string, error)

GetSettingsValue find the given name in Rancher settings and returns its value if found

func IsHTTP added in v1.2.3

func IsHTTP(uri string) bool

func IsObjectOwned added in v1.2.3

func IsObjectOwned(obj *metav1.ObjectMeta, uid types.UID) bool

func JSONObjectToYamlBytes added in v1.7.0

func JSONObjectToYamlBytes(object map[string]runtime.RawExtension) ([]byte, error)

JSONObjectToYamlBytes converts any-schema JSON object to YAML bytes

func MarshalCloudConfig added in v1.2.0

func MarshalCloudConfig(cloudConfig map[string]runtime.RawExtension) ([]byte, error)

func PlanChecksum added in v1.3.1

func PlanChecksum(input []byte) string

func RemoveInvalidConditions added in v1.1.0

func RemoveInvalidConditions(conditions []metav1.Condition) []metav1.Condition

Types

type CommandRunner added in v1.7.0

type CommandRunner interface {
	Run(name string, arg ...string) error
}

CommandRunner is a simple interface to allow mocking and ease testing.

type ExecRunner added in v1.7.0

type ExecRunner struct{}

func (*ExecRunner) Run added in v1.7.0

func (e *ExecRunner) Run(name string, arg ...string) error

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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