Documentation ¶
Index ¶
- Variables
- func BytesToUtf8Lf(file []byte) (string, error)
- func GetClusterName(config *rest.Config) string
- func GetUnstructuredObjects(data []byte) ([]unstructured.Unstructured, error)
- func NewClient(logger logger.Logger, kubeconfigPaths ...string) (kubernetes.Interface, *rest.Config, error)
- func NewClientFromPathOrConfig(logger logger.Logger, kubeconfigOrPath string) (kubernetes.Interface, *rest.Config, error)
- func NewClientWithConfig(logger logger.Logger, kubeConfig []byte) (kubernetes.Interface, *rest.Config, error)
- type Client
- func (c *Client) DeleteByGVK(ctx context.Context, namespace, name string, gvk schema.GroupVersionKind) (bool, error)
- func (c *Client) ExecutePodf(ctx context.Context, namespace, pod, container string, command ...string) (string, string, error)
- func (c *Client) FetchResources(ctx context.Context, resources ...unstructured.Unstructured) ([]unstructured.Unstructured, error)
- func (c *Client) GetClientByGroupVersionKind(group, version, kind string) (dynamic.NamespaceableResourceInterface, error)
- func (c *Client) GetClientByKind(kind string) (dynamic.NamespaceableResourceInterface, error)
- func (c *Client) GetDynamicClient() (dynamic.Interface, error)
- func (c *Client) GetPodLogs(ctx context.Context, namespace, podName, container string) (io.ReadCloser, error)
- func (c *Client) GetRestMapper() (meta.RESTMapper, error)
- func (c *Client) StreamLogsV2(ctx context.Context, namespace, name string, timeout time.Duration, ...) error
- func (c *Client) WaitForContainerStart(ctx context.Context, namespace, name string, timeout time.Duration, ...) error
- func (c *Client) WaitForPod(ctx context.Context, namespace, name string, timeout time.Duration, ...) error
Constants ¶
This section is empty.
Variables ¶
View Source
var Nil = fake.NewSimpleClientset()
Functions ¶
func BytesToUtf8Lf ¶ added in v1.0.660
func GetClusterName ¶ added in v1.0.596
ExecutePodf runs the specified shell command inside a container of the specified pod
func GetUnstructuredObjects ¶ added in v1.0.660
func GetUnstructuredObjects(data []byte) ([]unstructured.Unstructured, error)
func NewClientFromPathOrConfig ¶ added in v1.0.763
func NewClientWithConfig ¶
Types ¶
type Client ¶ added in v1.0.770
type Client struct {
// contains filtered or unexported fields
}
func NewKubeClient ¶ added in v1.0.596
func NewKubeClient(client kubernetes.Interface, config *rest.Config) *Client
func (*Client) DeleteByGVK ¶ added in v1.0.770
func (*Client) ExecutePodf ¶ added in v1.0.770
func (*Client) FetchResources ¶ added in v1.0.770
func (c *Client) FetchResources( ctx context.Context, resources ...unstructured.Unstructured, ) ([]unstructured.Unstructured, error)
func (*Client) GetClientByGroupVersionKind ¶ added in v1.0.770
func (c *Client) GetClientByGroupVersionKind( group, version, kind string, ) (dynamic.NamespaceableResourceInterface, error)
func (*Client) GetClientByKind ¶ added in v1.0.770
func (c *Client) GetClientByKind(kind string) (dynamic.NamespaceableResourceInterface, error)
WARN: "Kind" is not specific enough. A cluster can have various resources with the same Kind. example: helmchrats.helm.cattle.io & helmcharts.source.toolkit.fluxcd.io both have HelmChart as the kind.
Use GetClientByGroupVersionKind instead.
func (*Client) GetDynamicClient ¶ added in v1.0.770
GetDynamicClient creates a new k8s client
func (*Client) GetPodLogs ¶ added in v1.0.770
func (*Client) GetRestMapper ¶ added in v1.0.770
func (c *Client) GetRestMapper() (meta.RESTMapper, error)
func (*Client) StreamLogsV2 ¶ added in v1.0.770
func (*Client) WaitForContainerStart ¶ added in v1.0.770
func (c *Client) WaitForContainerStart( ctx context.Context, namespace, name string, timeout time.Duration, containerNames ...string, ) error
WaitForContainerStart waits for the specified containers to be started (or any container if no names are specified) - returns an error if the timeout is exceeded
Click to show internal directories.
Click to hide internal directories.