Documentation ¶
Index ¶
- Variables
- func CreateOrUpdate(ctx context.Context, cl client.Client, o client.Object, skipFields ...string) (*unstructured.Unstructured, controllerutil.OperationResult, error)
- func Debug(msg string, o interface{}, fields ...string)
- func Dump(o interface{}, fields ...string) string
- func Exec(o ExecOptions) error
- func ExitOnError(err error)
- func GetClientNamespace(configPath string) (string, error)
- func GetOpenshift3ManagementConsoleUrl(ctx context.Context, dynClient dynamic.Interface) (string, error)
- func GetOpenshift4ManagementConsoleUrl(ctx context.Context, rtClient client.Client) (string, error)
- func GetPodWithLabelSelector(ctx context.Context, api kubernetes.Interface, namespace string, ...) (*v1.Pod, error)
- func IsNoKindMatchError(err error) bool
- func ListInChunks(ctx context.Context, c client.Client, options *client.ListOptions, ...) (err error)
- func LoadJsonFromFile(path string) ([]byte, error)
- func LoadRawResourceFromYaml(data string) (*unstructured.Unstructured, error)
- func LoadResourceFromFile(scheme *runtime.Scheme, path string) (runtime.Object, error)
- func LoadResourceFromYaml(scheme *runtime.Scheme, source []byte) (runtime.Object, error)
- func LoadUnstructuredObject(data []byte) (*unstructured.Unstructured, error)
- func LoadUnstructuredObjectFromFile(path string) (*unstructured.Unstructured, error)
- func MustMarshal(data []byte, err error) []byte
- func MustRenderGoTemplate(goTemplate string, o interface{}) string
- func MustString(data string, err error) string
- func NewFileInfoMappingFS(source http.FileSystem, mapper FileInfoMappingFunction) http.FileSystem
- func NewObjectKey(name string, namespace string) client.ObjectKey
- func PostgreSQLVersionAt(username string, password string, database string, dbUrl string) (float64, error)
- func RenderGoTemplate(goTemplate string, o interface{}) (string, error)
- func RunAsMinishiftAdminIfPossible(c *rest.Config, action func() error) error
- func RuntimeObjectFromUnstructured(scheme *runtime.Scheme, u *unstructured.Unstructured) (runtime.Object, error)
- func SeperateStructuredAndUnstructured(scheme *runtime.Scheme, in []unstructured.Unstructured) ([]runtime.Object, []unstructured.Unstructured)
- func ToMetaObject(resource interface{}) metav1.Object
- func ToRuntimeObject(resource interface{}) runtime.Object
- func ToUnstructured(obj runtime.Object) (*unstructured.Unstructured, error)
- func UnifiedDiff(a string, b string) (string, error)
- func UnmarshalYaml(data []byte, target interface{}) error
- func UnstructuredsToRuntimeObject(items []unstructured.Unstructured) runtime.Object
- func WaitForDeploymentReady(ctx context.Context, client dynamic.Interface, namespace string, name string, ...) (bool, error)
- func WaitForResourceCondition(ctx context.Context, client dynamic.Interface, gvr schema.GroupVersionResource, ...) (bool, error)
- func WithStackIfMissing(err error) error
- type ExecOptions
- type FileInfoMappingFunction
- type MinishiftCluster
Constants ¶
This section is empty.
Variables ¶
var FlagSet *pflag.FlagSet = nil
var KnownDockerImages = map[string]bool{}
Functions ¶
func CreateOrUpdate ¶
func CreateOrUpdate(ctx context.Context, cl client.Client, o client.Object, skipFields ...string) (*unstructured.Unstructured, controllerutil.OperationResult, error)
func Debug ¶
Debug lets you print to the console a message and a value or fields of the value. if no fields are specified the whole value is dumped to the console in yaml format.
func Dump ¶
Dump returns the fields of the value o as string. If no fields are specified, then the whole value is dumped as yaml. fields are specified using go template expression like ".MyField"
func Exec ¶
func Exec(o ExecOptions) error
func ExitOnError ¶
func ExitOnError(err error)
func GetClientNamespace ¶
func GetOpenshift3ManagementConsoleUrl ¶
func GetOpenshift3ManagementConsoleUrl(ctx context.Context, dynClient dynamic.Interface) (string, error)
Only on Openshift 3 - read the configmap/webconsole-config from openshift-web-console namespace to retrieve the URL of Web Admin Console
func GetOpenshift4ManagementConsoleUrl ¶
Only on Openshift 4 - read the consoles/cluster object to retrieve the URL of Web Admin Console
func GetPodWithLabelSelector ¶
func IsNoKindMatchError ¶
func ListInChunks ¶
func ListInChunks(ctx context.Context, c client.Client, options *client.ListOptions, list *unstructured.UnstructuredList, handler func([]unstructured.Unstructured) error) (err error)
func LoadJsonFromFile ¶
func LoadRawResourceFromYaml ¶
func LoadRawResourceFromYaml(data string) (*unstructured.Unstructured, error)
LoadRawResourceFromYaml loads a k8s resource from a yaml definition without making assumptions on the underlying type
func LoadResourceFromFile ¶
func LoadResourceFromYaml ¶
func LoadUnstructuredObject ¶
func LoadUnstructuredObject(data []byte) (*unstructured.Unstructured, error)
func LoadUnstructuredObjectFromFile ¶
func LoadUnstructuredObjectFromFile(path string) (*unstructured.Unstructured, error)
func MustMarshal ¶
func MustRenderGoTemplate ¶
func MustString ¶
func NewFileInfoMappingFS ¶
func NewFileInfoMappingFS(source http.FileSystem, mapper FileInfoMappingFunction) http.FileSystem
func PostgreSQLVersionAt ¶
func PostgreSQLVersionAt(username string, password string, database string, dbUrl string) (float64, error)
PostgreSQLVersionAt determines the version of a PotgreSQL database running at hostname and port
func RenderGoTemplate ¶
func RuntimeObjectFromUnstructured ¶
func RuntimeObjectFromUnstructured(scheme *runtime.Scheme, u *unstructured.Unstructured) (runtime.Object, error)
RuntimeObjectFromUnstructured converts an unstructured to a runtime object
func SeperateStructuredAndUnstructured ¶
func SeperateStructuredAndUnstructured(scheme *runtime.Scheme, in []unstructured.Unstructured) ([]runtime.Object, []unstructured.Unstructured)
func ToMetaObject ¶
func ToRuntimeObject ¶
func ToUnstructured ¶
func ToUnstructured(obj runtime.Object) (*unstructured.Unstructured, error)
func UnmarshalYaml ¶
func UnstructuredsToRuntimeObject ¶
func UnstructuredsToRuntimeObject(items []unstructured.Unstructured) runtime.Object
func WaitForDeploymentReady ¶
func WithStackIfMissing ¶
Types ¶
type ExecOptions ¶
type ExecOptions struct { Config *rest.Config Api kubernetes.Interface Namespace string Pod string Container string Command []string remotecommand.StreamOptions }
type MinishiftCluster ¶
type MinishiftCluster struct {
// contains filtered or unexported fields
}
func GetMinishiftCluster ¶
func GetMinishiftCluster(c *rest.Config) *MinishiftCluster
func (*MinishiftCluster) MinishiftAdminLogin ¶
func (this *MinishiftCluster) MinishiftAdminLogin() error
func (*MinishiftCluster) MinishiftUserLogin ¶
func (this *MinishiftCluster) MinishiftUserLogin(username string) error
func (*MinishiftCluster) MinishiftWhoAmI ¶
func (this *MinishiftCluster) MinishiftWhoAmI() (string, error)