Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Deployment ¶
type Deployment struct {
Kind string `yaml:"kind"`
Metadata kubeTypeMetadata `yaml:"metadata"`
Spec kubeTypeResourceSpec `yaml:"spec"`
Status kubeTypeStatus `yaml:"status"`
}
Deployment is k8s Deployment resource
func ToDeploymentList ¶
func ToDeploymentList(list []KubeResourceInterface) []Deployment
ToDeploymentList is helper to convert []KubeResourceInterface to []Deployment
func (*Deployment) GetKind ¶
func (d *Deployment) GetKind() string
GetKind interface method support, returns string "deployment"
func (*Deployment) GetName ¶
func (d *Deployment) GetName() string
GetName return name of Deployment
type KubeCall ¶
type KubeCall struct {
Cmd kubeCommandInterface
Parser kubeResourceParserInterface
}
KubeCall is kubectl wrapper combined with parser
func CommandDeploymentList ¶
CommandDeploymentList return call which return list of deployments registered in kubernetes clusted
func CommandNamespaceList ¶
func CommandNamespaceList() *KubeCall
CommandNamespaceList return call which will return list of namespaces registered in kubernetes cluster
func CommandReplicaSetList ¶
CommandReplicaSetList return call which return list of replicasets registered in kubernetes cluster
func (*KubeCall) RunAndParse ¶
func (c *KubeCall) RunAndParse() ([]KubeResourceInterface, error)
RunAndParse run command and try to parse output with provided parser
func (*KubeCall) RunAndParseFirst ¶
func (c *KubeCall) RunAndParseFirst() (KubeResourceInterface, error)
RunAndParseFirst run command, parse output and return first element of decoded items
type KubeResourceInterface ¶
type KubeResourceInterface interface {
GetKind() string
}
KubeResourceInterface is common interface to all k8s resource types
type Namespace ¶
type Namespace struct {
Kind string `yaml:"kind"`
Metadata kubeTypeMetadata `yaml:"metadata"`
}
Namespace is k8s Namespace resource
func ToNamespaceList ¶
func ToNamespaceList(list []KubeResourceInterface) []Namespace
ToNamespaceList is helper to convert []KubeResourceInterface type to []Namespace
type ReplicaSet ¶
type ReplicaSet struct {
Kind string `yaml:"kind"`
Metadata kubeTypeMetadata `yaml:"metadata"`
Spec kubeTypeResourceSpec `yaml:"spec"`
Status kubeTypeStatus `yaml:"status"`
}
ReplicaSet is k8s ReplicaSet resource
func ToReplicaSetList ¶
func ToReplicaSetList(list []KubeResourceInterface) []ReplicaSet
ToReplicaSetList is helper to convert []KubeResourceInterface to []ReplicaSet
func (*ReplicaSet) GetImages ¶
func (r *ReplicaSet) GetImages() []string
GetImages return list of docker images registered in ReplicaSet
func (*ReplicaSet) GetKind ¶
func (r *ReplicaSet) GetKind() string
GetKind interface method support, returns string "replicaset"
func (*ReplicaSet) GetName ¶
func (r *ReplicaSet) GetName() string
GetName return name of ReplicaSet