k8s

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package k8s provides functionalities to interact with the Kubernetes API server

Index

Constants

View Source
const (
	LegacyGroupName = "core"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client added in v0.2.0

type Client struct {
	Client      dynamic.Interface
	Disco       discovery.DiscoveryInterface
	CoreRest    rest.Interface
	JsonPrinter printers.JSONPrinter
}

Client prepares and exposes a dynamic, discovery, and Rest clients

func New added in v0.2.0

func New(kubeconfig string) (*Client, error)

New returns a *Client

func (*Client) Search added in v0.2.1

func (k8sc *Client) Search(groups, kinds, namespaces, versions, names, labels, containers string) ([]runtime.Object, error)

Search does a drill-down search from group, version, resourceList, to resources. The following rules are applied

  1. Legacy core group (api/v1) can be specified as "core"
  2. All specified search params will use AND operator for match (i.e. groups=core AND kinds=pods AND versions=v1 AND ... etc)
  3. kinds will match resource.Kind or resource.Name
  4. All search params are passed as comma- or space-separated sets that are matched using OR (i.e. kinds=pods services will match resouces of type pods or services)

Jump to

Keyboard shortcuts

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