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 NewClientWithConfig(logger logger.Logger, kubeConfig []byte) (kubernetes.Interface, *rest.Config, error)
- type DynamicClient
- func (c *DynamicClient) ExecutePodf(ctx context.Context, namespace, pod, container string, command ...string) (string, string, error)
- func (c *DynamicClient) FetchResources(ctx context.Context, resources ...unstructured.Unstructured) ([]unstructured.Unstructured, error)
- func (c *DynamicClient) GetClientByGroupVersionKind(group, version, kind string) (dynamic.NamespaceableResourceInterface, error)
- func (c *DynamicClient) GetClientByKind(kind string) (dynamic.NamespaceableResourceInterface, error)
- func (c *DynamicClient) GetDynamicClient() (dynamic.Interface, error)
- func (c *DynamicClient) GetRestMapper() (meta.RESTMapper, 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 NewClientWithConfig ¶
Types ¶
type DynamicClient ¶ added in v1.0.596
type DynamicClient struct {
// contains filtered or unexported fields
}
DynamicClient is an updated & stripped of kommons client
func NewKubeClient ¶ added in v1.0.596
func NewKubeClient(client kubernetes.Interface, config *rest.Config) *DynamicClient
func (*DynamicClient) ExecutePodf ¶ added in v1.0.597
func (*DynamicClient) FetchResources ¶ added in v1.0.596
func (c *DynamicClient) FetchResources( ctx context.Context, resources ...unstructured.Unstructured, ) ([]unstructured.Unstructured, error)
func (*DynamicClient) GetClientByGroupVersionKind ¶ added in v1.0.596
func (c *DynamicClient) GetClientByGroupVersionKind( group, version, kind string, ) (dynamic.NamespaceableResourceInterface, error)
func (*DynamicClient) GetClientByKind ¶ added in v1.0.596
func (c *DynamicClient) 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 (*DynamicClient) GetDynamicClient ¶ added in v1.0.596
func (c *DynamicClient) GetDynamicClient() (dynamic.Interface, error)
GetDynamicClient creates a new k8s client
func (*DynamicClient) GetRestMapper ¶ added in v1.0.596
func (c *DynamicClient) GetRestMapper() (meta.RESTMapper, error)
Click to show internal directories.
Click to hide internal directories.