kube

package
v1.0.0-alpha.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 4, 2017 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteApp

func DeleteApp(c *kubernetes.Clientset, ns, name string) error

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 SetPodEnv

func SetPodEnv(c *kubernetes.Clientset, ns, app string, env map[string]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

func (r *Deployer) CreateOrUpdateService(svc *v1.Service, env string) (*v1.Service, error)

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL