Documentation ¶
Index ¶
- type Container
- type Credential
- type Deployment
- type DeploymentAPI
- type Environment
- type HPA
- type HPAAPI
- type KubeAPI
- type KubeConfigCredential
- type Kubernetes
- func (k *Kubernetes) Create(entity interface{}) (tx *Kubernetes)
- func (k *Kubernetes) Delete(entity interface{}) (tx *Kubernetes)
- func (k *Kubernetes) Find(entity interface{}) (tx *Kubernetes)
- func (k *Kubernetes) Update(entity interface{}) (tx *Kubernetes)
- func (k *Kubernetes) Upsert(entity interface{}) (tx *Kubernetes)
- type Namespace
- type NamespaceAPI
- type Port
- type Probe
- type PullPolicy
- type Resource
- type Service
- type ServiceAPI
- type ServiceAccountCredential
- type Statement
- type UserPasswordCredential
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container struct { Name string `json:"name"` Image string `json:"image"` PullPolicy PullPolicy `json:"pull_policy"` Ports []Port `json:"ports,omitempty"` Environments []Environment `json:"environments,omitempty"` LivenessProbe *Probe `json:"liveness,omitempty"` ReadinessProbe *Probe `json:"readiness,omitempty"` CPU *Resource `json:"cpu"` Memory *Resource `json:"memory"` }
type Credential ¶
type Credential interface {
Login(string) (*kubernetes.Clientset, error)
}
type Deployment ¶
type Deployment struct { Name string `json:"name"` Namespace string `json:"namespace"` Labels map[string]string `json:"labels,omitempty"` Annotations map[string]string `json:"annotations,omitempty"` Replicas int `json:"replicas"` Containers []Container `json:"containers"` NodeSelectors map[string]string `json:"node_selectors,omitempty"` CreatedAt time.Time `json:"created_at"` }
func (*Deployment) Marshal ¶
func (d *Deployment) Marshal() (appsv1.Deployment, error)
func (*Deployment) ToJSON ¶
func (d *Deployment) ToJSON() string
func (*Deployment) Unmarshal ¶
func (d *Deployment) Unmarshal(deployment *appsv1.Deployment) error
type DeploymentAPI ¶
type DeploymentAPI struct {
Kubernetes *Kubernetes
}
func NewDeploymentAPI ¶
func NewDeploymentAPI(kubernetes *Kubernetes) *DeploymentAPI
func (*DeploymentAPI) Create ¶
func (d *DeploymentAPI) Create()
func (*DeploymentAPI) Delete ¶
func (d *DeploymentAPI) Delete()
func (*DeploymentAPI) Find ¶
func (d *DeploymentAPI) Find()
func (*DeploymentAPI) GetClient ¶
func (d *DeploymentAPI) GetClient() v1.DeploymentInterface
func (*DeploymentAPI) Update ¶
func (d *DeploymentAPI) Update()
func (*DeploymentAPI) Upsert ¶
func (d *DeploymentAPI) Upsert()
type Environment ¶
type Environment struct { Type string `json:"type"` From string `json:"from"` Name string `json:"name"` Value string `json:"value"` }
func (*Environment) Marshal ¶
func (e *Environment) Marshal() *apiv1.EnvVar
func (*Environment) Unmarshal ¶
func (e *Environment) Unmarshal(env *apiv1.EnvVar)
type HPAAPI ¶
type HPAAPI struct { Kubernetes *Kubernetes Client interface{} }
func NewHPAAPI ¶
func NewHPAAPI(kubernetes *Kubernetes) *HPAAPI
type KubeConfigCredential ¶
type KubeConfigCredential struct {
Path string
}
func (KubeConfigCredential) GetPath ¶
func (k KubeConfigCredential) GetPath() string
func (KubeConfigCredential) Login ¶
func (k KubeConfigCredential) Login(address string) (*kubernetes.Clientset, error)
type Kubernetes ¶
type Kubernetes struct { Client *kubernetes.Clientset Statement *Statement Error error RowsAffected int64 }
func (*Kubernetes) Create ¶
func (k *Kubernetes) Create(entity interface{}) (tx *Kubernetes)
func (*Kubernetes) Delete ¶
func (k *Kubernetes) Delete(entity interface{}) (tx *Kubernetes)
func (*Kubernetes) Find ¶
func (k *Kubernetes) Find(entity interface{}) (tx *Kubernetes)
func (*Kubernetes) Update ¶
func (k *Kubernetes) Update(entity interface{}) (tx *Kubernetes)
func (*Kubernetes) Upsert ¶
func (k *Kubernetes) Upsert(entity interface{}) (tx *Kubernetes)
type NamespaceAPI ¶
type NamespaceAPI struct { Kubernetes *Kubernetes Client v1.NamespaceInterface }
func NewNamespaceAPI ¶
func NewNamespaceAPI(kubernetes *Kubernetes) *NamespaceAPI
func (*NamespaceAPI) Create ¶
func (n *NamespaceAPI) Create()
func (*NamespaceAPI) Delete ¶
func (n *NamespaceAPI) Delete()
func (*NamespaceAPI) Find ¶
func (n *NamespaceAPI) Find()
func (*NamespaceAPI) Update ¶
func (n *NamespaceAPI) Update()
func (*NamespaceAPI) Upsert ¶
func (n *NamespaceAPI) Upsert()
type Port ¶
func (*Port) Marshal ¶
func (p *Port) Marshal() *apiv1.ContainerPort
func (*Port) Unmarshal ¶
func (p *Port) Unmarshal(port *apiv1.ContainerPort)
type Probe ¶
type PullPolicy ¶
type PullPolicy string
const ( PullAlways PullPolicy = "Always" PullNever PullPolicy = "Never" PullIfNotPresent PullPolicy = "IfNotPresent" )
type Service ¶
type ServiceAPI ¶
type ServiceAPI struct {
Kubernetes *Kubernetes
}
func NewServiceAPI ¶
func NewServiceAPI(kubernetes *Kubernetes) *ServiceAPI
func (*ServiceAPI) Create ¶
func (s *ServiceAPI) Create()
func (*ServiceAPI) Delete ¶
func (s *ServiceAPI) Delete()
func (*ServiceAPI) Find ¶
func (s *ServiceAPI) Find()
func (*ServiceAPI) GetClient ¶
func (s *ServiceAPI) GetClient() v1.ServiceInterface
func (*ServiceAPI) Update ¶
func (s *ServiceAPI) Update()
func (*ServiceAPI) Upsert ¶
func (s *ServiceAPI) Upsert()
type ServiceAccountCredential ¶
func (ServiceAccountCredential) Login ¶
func (s ServiceAccountCredential) Login(address string) (*kubernetes.Clientset, error)
type Statement ¶
type Statement struct { // A reference to Kubernetes API Client *kubernetes.Clientset // An object provided during updates Origin reflect.Value // An object (or list) provided during // the creation or while fetching objets Target reflect.Value // A reference to the API of a given // (target) object through reflection API KubeAPI }
type UserPasswordCredential ¶
func (UserPasswordCredential) Login ¶
func (u UserPasswordCredential) Login(address string) (*kubernetes.Clientset, error)
Click to show internal directories.
Click to hide internal directories.