Documentation ¶
Index ¶
- func DeleteApp(c *kubernetes.Clientset, ns, app string, provider cloud.CloudProvider) error
- func DeleteTLSCertificates(c *kubernetes.Clientset, ns, app, domain string, provider cloud.CloudProvider) error
- func GetAllPodNames(c *kubernetes.Clientset, ns, app string) ([]string, error)
- func GetAllPods(c *kubernetes.Clientset, ns, app string) ([]v1.Pod, error)
- func GetAllRunningPods(c *kubernetes.Clientset, ns, app string) ([]v1.Pod, error)
- func GetServiceEndpoint(c *kubernetes.Clientset, ns, name string) (string, error)
- func LogStreamReq(c *kubernetes.Clientset, w io.Writer, ns, app string, opts pb.LogStreamOptions) error
- func MergeCloudSQLManifest(spec *core_v1.PodSpec, app string, env map[string]string)
- func ProcessLimits(c *kubernetes.Clientset, ns, app, resource string, limits map[string]string) error
- func ProcessList(c *kubernetes.Clientset, ns, app string) ([]*pb.Process, error)
- func ProcessRun(c *kubernetes.Clientset, cfg *rest.Config, ns, name, image string, ...) error
- func PruneCloudSQLManifest(spec *core_v1.PodSpec)
- func ScalePodReplicas(c *kubernetes.Clientset, ns, app, proctype, image string, command []string, ...) error
- func SetPodEnv(c *kubernetes.Clientset, ns, app string, env map[string]string) error
- func UpdateTLSCertificates(c *kubernetes.Clientset, ns, app, domain, cert, key string, ...) (err error)
- type DefaultRemoteExecutor
- type DeployRequest
- type DeployResponse
- type Deployer
- func (r *Deployer) CreateOrUpdateCronJob(cj *batch_v1beta1.CronJob, ns string) (*batch_v1beta1.CronJob, error)
- func (r *Deployer) CreateOrUpdateDeployment(payload *DeployRequest) (*v1beta1.Deployment, error)
- func (r *Deployer) CreateOrUpdateIngress(ingress *v1beta1.Ingress, env string, provider cloud.CloudProvider) (*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)
- type ExecOptions
- type LimitRequest
- type RemoteExecutor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteApp ¶
func DeleteApp(c *kubernetes.Clientset, ns, app string, provider cloud.CloudProvider) error
func DeleteTLSCertificates ¶
func DeleteTLSCertificates(c *kubernetes.Clientset, ns, app, domain string, provider cloud.CloudProvider) error
func GetAllPodNames ¶
func GetAllPodNames(c *kubernetes.Clientset, ns, app string) ([]string, error)
func GetAllPods ¶
func GetAllRunningPods ¶
Return the pods which seems to be up and running.
func GetServiceEndpoint ¶
func GetServiceEndpoint(c *kubernetes.Clientset, ns, name string) (string, error)
func LogStreamReq ¶
func LogStreamReq(c *kubernetes.Clientset, w io.Writer, ns, app string, opts pb.LogStreamOptions) error
func MergeCloudSQLManifest ¶
func ProcessLimits ¶
func ProcessList ¶
ProcessList will fetch the list of processes running based on deployments Labels TODO: fetch the status as well
func ProcessRun ¶
func ProcessRun( c *kubernetes.Clientset, cfg *rest.Config, ns, name, image string, options pb.ProcessRunOptions, envVars map[string]string, sqlproxy bool, stream io.ReadWriter, provider cloud.CloudProvider, ) error
func PruneCloudSQLManifest ¶
func ScalePodReplicas ¶
func ScalePodReplicas(c *kubernetes.Clientset, ns, app, proctype, image string, command []string, replicas int32, sqlproxy bool, cronExpr *string, envVars map[string]string, provider cloud.CloudProvider, ) error
ScalePodReplicas can scale up/down pods as per replicas count
func UpdateTLSCertificates ¶
func UpdateTLSCertificates(c *kubernetes.Clientset, ns, app, domain, cert, key string, provider cloud.CloudProvider) (err error)
Types ¶
type DefaultRemoteExecutor ¶
type DefaultRemoteExecutor struct{}
DefaultRemoteExecutor is the standard implementation of remote command execution
type DeployRequest ¶
type DeployRequest struct { Entrypoint []string Args []string ContainerPort intstr.IntOrString Namespace string EnvVars map[string]string Heartbeat struct { Path string Port intstr.IntOrString InitialDelayLivenessSeconds int InitialDelayReadinessSeconds int TimeoutSeconds int32 } Image string Replicas *int32 ServiceID string Secrets []struct { Name string Value string } Domains []string Tags map[string]string App string // to specify pods belonging to an App Version string // to specify the version of pod to deploy Proctype string // to specify the type of process web, worker, or other // For GCP, we need to provision cloudsql-proxy as a sidecar container. EnableCloudSqlProxy bool CronExpr *string // A cron schedule expression, if present we will create an object with `kind: CronJob“ Provider cloud.CloudProvider // cloud provider aws, gcp or local // contains filtered or unexported fields }
type DeployResponse ¶
type DeployResponse struct { Request DeployRequest NodePort int }
type Deployer ¶
type Deployer struct {
Client *kubernetes.Clientset
}
func NewDeployer ¶
func NewDeployer(c *kubernetes.Clientset) (*Deployer, error)
func (*Deployer) CreateOrUpdateCronJob ¶
func (r *Deployer) CreateOrUpdateCronJob(cj *batch_v1beta1.CronJob, ns string) (*batch_v1beta1.CronJob, 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, provider cloud.CloudProvider) (*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)
type ExecOptions ¶
type ExecOptions struct { Namespace string PodName string ContainerName string Stdin bool Command []string In io.Reader Out io.Writer Err io.Writer Executor RemoteExecutor Client *kubernetes.Clientset Config *rest.Config }
ExecOptions declare the arguments accepted by the Exec command
func (*ExecOptions) Run ¶
func (p *ExecOptions) Run() error
Run executes a validated remote execution against a pod.
type LimitRequest ¶
type LimitRequest struct {
// contains filtered or unexported fields
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.