Documentation ¶
Index ¶
- func NamespaceScopedPodsWithLabels(cf *CmdUtilFactory, namespace string, labelselection map[string]string) (*api.PodList, error)
- func NamespaceScopedServices(cf *CmdUtilFactory, namespace string) (*api.ServiceList, error)
- type ClientWrapper
- func (c *ClientWrapper) FindReplicationController(name string) (*api.ReplicationController, error)
- func (c *ClientWrapper) FindReplicationControllerList() (*api.ReplicationControllerList, error)
- func (c *ClientWrapper) FindService(name string) (*api.Service, error)
- func (c *ClientWrapper) FindServiceList() (*api.ServiceList, error)
- func (c *ClientWrapper) GetDefaultReplicationControllers() ([]k8sapi.ReplicationController, error)
- func (c *ClientWrapper) GetPods() ([]k8sapi.Pod, error)
- func (c *ClientWrapper) RunPod(pod *k8sapi.Pod) (*k8sapi.PodStatus, error)
- type CmdUtilFactory
- type K8sClientConfig
- func (conf *K8sClientConfig) CreateRc(fileName string) (rc *api.ReplicationController, err error)
- func (conf *K8sClientConfig) CreateRcByInput(data []byte) (rc *api.ReplicationController, err error)
- func (conf *K8sClientConfig) DeleteRc(name string) (err error)
- func (conf *K8sClientConfig) GetRc(name string) (rc *api.ReplicationController, err error)
- func (conf *K8sClientConfig) Init()
- func (conf *K8sClientConfig) ListRc(opts api.ListOptions) (rc *api.ReplicationControllerList, err error)
- func (conf *K8sClientConfig) ScaleRc(name string, num int32) (rc *api.ReplicationController, err error)
- func (k8scc *K8sClientConfig) UnversionedClient() *kclient.Client
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NamespaceScopedServices ¶
func NamespaceScopedServices(cf *CmdUtilFactory, namespace string) (*api.ServiceList, error)
Types ¶
type ClientWrapper ¶
type ClientWrapper struct { *kubernetes.Client // contains filtered or unexported fields }
func NewClientWrapper ¶
func NewClientWrapper(apiHost string, userName string, passWord string) (*ClientWrapper, error)
func (*ClientWrapper) FindReplicationController ¶
func (c *ClientWrapper) FindReplicationController(name string) (*api.ReplicationController, error)
func (*ClientWrapper) FindReplicationControllerList ¶
func (c *ClientWrapper) FindReplicationControllerList() (*api.ReplicationControllerList, error)
func (*ClientWrapper) FindService ¶
func (c *ClientWrapper) FindService(name string) (*api.Service, error)
func (*ClientWrapper) FindServiceList ¶
func (c *ClientWrapper) FindServiceList() (*api.ServiceList, error)
func (*ClientWrapper) GetDefaultReplicationControllers ¶
func (c *ClientWrapper) GetDefaultReplicationControllers() ([]k8sapi.ReplicationController, error)
Returns all RCs in the cluster.
type CmdUtilFactory ¶
func NewCmdUtilFactory ¶
func NewCmdUtilFactory(kubeconfigPath, kubeApiserver, kubectlContext string) (*CmdUtilFactory, error)
type K8sClientConfig ¶
type K8sClientConfig struct { ClusterID string NameSpace string // Server is the address of the kubernetes cluster (https://hostname:port). Server string `json:"server"` // APIVersion is the preferred api version for communicating with the kubernetes cluster (v1, v2, etc). APIVersion string `json:"api-version,omitempty"` // InsecureSkipTLSVerify skips the validity check for the server's certificate. This will make your HTTPS connections insecure. InsecureSkipTLSVerify bool `json:"insecure-skip-tls-verify,omitempty"` // CertificateAuthority is the path to a cert file for the certificate authority. CertificateAuthority string `json:"certificate-authority,omitempty"` // CertificateAuthorityData contains PEM-encoded certificate authority certificates. Overrides CertificateAuthority CertificateAuthorityData []byte `json:"certificate-authority-data,omitempty"` // ClientCertificate is the path to a client cert file for TLS. ClientCertificate string `json:"client-certificate,omitempty"` // ClientCertificateData contains PEM-encoded data from a client cert file for TLS. Overrides ClientCertificate ClientCertificateData []byte `json:"client-certificate-data,omitempty"` // ClientKey is the path to a client key file for TLS. ClientKey string `json:"client-key,omitempty"` // ClientKeyData contains PEM-encoded data from a client key file for TLS. Overrides ClientKey ClientKeyData []byte `json:"client-key-data,omitempty"` // contains filtered or unexported fields }
func (*K8sClientConfig) CreateRc ¶
func (conf *K8sClientConfig) CreateRc(fileName string) (rc *api.ReplicationController, err error)
func (*K8sClientConfig) CreateRcByInput ¶
func (conf *K8sClientConfig) CreateRcByInput(data []byte) (rc *api.ReplicationController, err error)
func (*K8sClientConfig) DeleteRc ¶
func (conf *K8sClientConfig) DeleteRc(name string) (err error)
func (*K8sClientConfig) GetRc ¶
func (conf *K8sClientConfig) GetRc(name string) (rc *api.ReplicationController, err error)
func (*K8sClientConfig) Init ¶
func (conf *K8sClientConfig) Init()
func (*K8sClientConfig) ListRc ¶
func (conf *K8sClientConfig) ListRc(opts api.ListOptions) (rc *api.ReplicationControllerList, err error)
func (*K8sClientConfig) ScaleRc ¶
func (conf *K8sClientConfig) ScaleRc(name string, num int32) (rc *api.ReplicationController, err error)
func (*K8sClientConfig) UnversionedClient ¶
func (k8scc *K8sClientConfig) UnversionedClient() *kclient.Client
Click to show internal directories.
Click to hide internal directories.