Documentation
¶
Overview ¶
Package client is the kubernetes registry client.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrReadNamespace error when failed to read namespace. ErrReadNamespace = errors.New("could not read namespace from service account secret") )
Functions ¶
func CertPoolFromFile ¶
CertPoolFromFile returns an x509.CertPool containing the certificates in the given PEM-encoded file. Returns an error if the file could not be read, a certificate could not be parsed, or if the file does not contain any certificates.
func CertsFromPEM ¶
func CertsFromPEM(pemCerts []byte) ([]*x509.Certificate, error)
CertsFromPEM returns the x509.Certificates contained in the given PEM-encoded byte array. Returns an error if a certificate could not be parsed, or if the data does not contain any certificates.
Types ¶
type Kubernetes ¶
type Kubernetes interface {
ListPods(labels map[string]string) (*PodList, error)
UpdatePod(podName string, pod *Pod) (*Pod, error)
WatchPods(labels map[string]string) (watch.Watch, error)
}
Kubernetes ...
func NewClientByHost ¶
func NewClientByHost(host string) Kubernetes
NewClientByHost sets up a client by host.
func NewClientInCluster ¶
func NewClientInCluster() Kubernetes
NewClientInCluster should work similarly to the official api NewInClient by setting up a client configuration for use within a k8s pod.
type Meta ¶
type Meta struct {
Name string `json:"name,omitempty"`
Labels map[string]*string `json:"labels,omitempty"`
Annotations map[string]*string `json:"annotations,omitempty"`
DeletionTimestamp string `json:"deletionTimestamp,omitempty"`
}
Meta ...