Documentation
¶
Index ¶
- func DeleteApp(c *kubernetes.Clientset, ns, name string) error
- func GetServiceEndpoint(c *kubernetes.Clientset, ns, name string) (string, error)
- func RunningPods(ns, app string, c *kubernetes.Clientset) (string, error)
- func SetPodEnv(c *kubernetes.Clientset, ns, app string, env map[string]string) error
- func WaitUntilReady(c *kubernetes.Clientset, ns, name string)
- func WaitUntilUpdated(c *kubernetes.Clientset, ns, name string)
- type DeployRequest
- type DeployResponse
- type Deployer
- func (r *Deployer) CreateOrUpdateDeployment(payload *DeployRequest) (*v1beta1.Deployment, error)
- func (r *Deployer) CreateOrUpdateIngress(ingress *v1beta1.Ingress, env string) (*v1beta1.Ingress, error)
- func (r *Deployer) CreateOrUpdateService(svc *v1.Service, env string) (*v1.Service, error)
- func (d *Deployer) Remove(r *DeployRequest) error
- func (d *Deployer) Run(payload *DeployRequest) (*DeployResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetServiceEndpoint ¶
func GetServiceEndpoint(c *kubernetes.Clientset, ns, name string) (string, error)
func RunningPods ¶
func RunningPods(ns, app string, c *kubernetes.Clientset) (string, error)
func WaitUntilReady ¶
func WaitUntilReady(c *kubernetes.Clientset, ns, name string)
func WaitUntilUpdated ¶
func WaitUntilUpdated(c *kubernetes.Clientset, ns, name string)
Types ¶
type DeployRequest ¶
type DeployRequest struct {
Args []string `json:"arguments"`
ContainerPort intstr.IntOrString `json:"containerPort"`
Environment string `json:"environment"`
EnvVars map[string]string `json:"envVars"`
Heartbeat struct {
Path string `json:"path"`
Port intstr.IntOrString `json:"port"`
InitialDelayLivenessSeconds int `json:"initialDelayLivenessSeconds"`
InitialDelayReadinessSeconds int `json:"initialDelayReadinessSeconds"`
TimeoutSeconds int32 `json:"timeoutSeconds"`
} `json:"heartbeat"`
Image string `json:"image"`
Replicas int32 `json:"replicas"`
ServiceID string `json:"serviceId"`
Secrets []struct {
Name string `json:"name"`
Value string `json:"value"`
} `json:"secrets"`
SSL bool `json:"ssl"`
Tags map[string]string `json:"tags"`
Zone string `json:"zone"`
}
type DeployResponse ¶
type DeployResponse struct {
Request DeployRequest `json:"request"`
NodePort int `json:"nodePort"`
}
type Deployer ¶
type Deployer struct {
Client *kubernetes.Clientset
}
func NewDeployer ¶
func NewDeployer(c *kubernetes.Clientset) (*Deployer, error)
func (*Deployer) CreateOrUpdateDeployment ¶
func (r *Deployer) CreateOrUpdateDeployment(payload *DeployRequest) (*v1beta1.Deployment, error)
CreateOrUpdateDeployment creates or updates a service
func (*Deployer) CreateOrUpdateIngress ¶
func (r *Deployer) CreateOrUpdateIngress(ingress *v1beta1.Ingress, env string) (*v1beta1.Ingress, error)
CreateOrUpdateIngress creates or updates an ingress rule
func (*Deployer) CreateOrUpdateService ¶
CreateOrUpdateService creates or updates a service
func (*Deployer) Remove ¶
func (d *Deployer) Remove(r *DeployRequest) error
func (*Deployer) Run ¶
func (d *Deployer) Run(payload *DeployRequest) (*DeployResponse, error)
Click to show internal directories.
Click to hide internal directories.