utils

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateNewClientset

func CreateNewClientset(kubeconfig string) (kubernetes.Interface, error)

Create a new kubernetes clientset from the provided kubeconfig. Default to in-cluster if none is provided.

func GetNamespace

func GetNamespace() (string, error)

Read the namespace from the inserted serviceaccount file. Fallback to default if the file does not exist.

func NewErrorGetNamespace

func NewErrorGetNamespace(path string, err error) error

func Pointer

func Pointer[T any](v T) *T

Return a pointer to the variable value

Types

type ErrorGetNamespace

type ErrorGetNamespace struct {
	// contains filtered or unexported fields
}

func (*ErrorGetNamespace) Error

func (e *ErrorGetNamespace) Error() string

Jump to

Keyboard shortcuts

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