Documentation ¶
Index ¶
- Variables
- func CheckSum(s []byte) string
- func DeleteValue(values map[string]interface{}, fields ...string)
- func DiffStr(expected interface{}, actual interface{}) string
- func GetBoolValue(values map[string]interface{}, fields ...string) (bool, bool)
- func GetGitRepoRootDir() string
- func GetHostPort(endpoint string) (string, int32)
- func GetTemplatedValues(templateConfig string, values interface{}) ([]byte, error)
- func HTTPGetBytes(url string) ([]byte, error)
- func JoinErrors(errs []error) string
- func MergeValues(origin, patch map[string]interface{})
- func SetStringSlice(values map[string]interface{}, v []string, fields ...string)
- func SetValue(values map[string]interface{}, v interface{}, fields ...string)
- type K8sClient
- type K8sClients
- func (clis K8sClients) Create(ctx context.Context, manifest []byte) error
- func (clis K8sClients) Delete(ctx context.Context, manifest []byte) error
- func (clis K8sClients) Exist(ctx context.Context, gvr schema.GroupVersionResource, namespace, name string) (bool, error)
- func (clis *K8sClients) GetCRDVersionsByNames(ctx context.Context, crdNames []string) (map[string]string, error)
- func (clis *K8sClients) ListCRDs(ctx context.Context) (*apiextensionsv1.CustomResourceDefinitionList, error)
- func (clis K8sClients) WaitDeploymentsReadyByNamespace(ctx context.Context, namespace string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultHTTPTimeout = 15 * time.Second
Functions ¶
func DeleteValue ¶
func DiffStr ¶ added in v0.3.2
func DiffStr(expected interface{}, actual interface{}) string
DiffStr returns a diff of both values as long as both are of the same type and are a struct, map, slice, array or string. Otherwise it returns an empty string. ref: github.com/stretchr/testify/assert:diff()
func GetGitRepoRootDir ¶ added in v0.2.0
func GetGitRepoRootDir() string
func GetHostPort ¶
func GetTemplatedValues ¶
func HTTPGetBytes ¶ added in v0.3.0
func JoinErrors ¶
func MergeValues ¶
func MergeValues(origin, patch map[string]interface{})
func SetStringSlice ¶
Types ¶
type K8sClient ¶ added in v0.3.0
type K8sClient interface { Exist(ctx context.Context, gvr schema.GroupVersionResource, namespace, name string) (bool, error) // Create creates resources from manifest Create(ctx context.Context, manifest []byte) error // Delete delete resources from manifest Delete(ctx context.Context, manifest []byte) error // ListCRDs list all CRDs ListCRDs(ctx context.Context) (*apiextensionsv1.CustomResourceDefinitionList, error) // GetCRDVersionsByNames returns map[crdName]crdVersion GetCRDVersionsByNames(ctx context.Context, crdNames []string) (map[string]string, error) // WaitDeploymentReady WaitDeploymentsReadyByNamespace(ctx context.Context, namespace string) error }
K8sClient wrap functions by k8s clients
type K8sClients ¶ added in v0.3.0
type K8sClients struct { ClientSet kubernetes.Interface ExtClientSet clientset.Interface DynamicClient dynamic.Interface }
func NewK8sClientsForConfig ¶ added in v0.3.0
func NewK8sClientsForConfig(config *rest.Config) (*K8sClients, error)
func (K8sClients) Create ¶ added in v0.3.0
func (clis K8sClients) Create(ctx context.Context, manifest []byte) error
Create creates resource from manifest
func (K8sClients) Delete ¶ added in v0.3.0
func (clis K8sClients) Delete(ctx context.Context, manifest []byte) error
Delete delete resource from manifest
func (K8sClients) Exist ¶ added in v0.3.0
func (clis K8sClients) Exist(ctx context.Context, gvr schema.GroupVersionResource, namespace, name string) (bool, error)
func (*K8sClients) GetCRDVersionsByNames ¶ added in v0.3.0
func (*K8sClients) ListCRDs ¶ added in v0.3.0
func (clis *K8sClients) ListCRDs(ctx context.Context) (*apiextensionsv1.CustomResourceDefinitionList, error)
ListCRDs list all CRDs
func (K8sClients) WaitDeploymentsReadyByNamespace ¶ added in v0.3.0
func (clis K8sClients) WaitDeploymentsReadyByNamespace(ctx context.Context, namespace string) error
Click to show internal directories.
Click to hide internal directories.