kubernetes

package
v0.0.0-...-15868fb Latest Latest
Warning

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

Go to latest
Published: May 1, 2019 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BaseURL

func BaseURL(ip string) string

BaseURL returns the base url of the deployment

func CleanupDeployment

func CleanupDeployment(pr *github.PullRequestEvent) error

CleanupDeployment cleans up all deployments related to the given pull request

func CreateDeployment

func CreateDeployment(pr *github.PullRequestEvent, svc *v1.Service, externalIP string) (*appsv1.Deployment, error)

CreateDeployment creates a deployment for this pull request The deployment has two containers:

  1. An init container to git clone the PR branch
  2. A container to run hugo server

and one emptyDir volume to hold the git repository

func CreateService

func CreateService(pr *github.PullRequestEvent) (*v1.Service, error)

CreateService creates a service for the deployment to bind to and returns the external IP of the service

func GetExternalIP

func GetExternalIP(s *v1.Service) (string, error)

GetExternalIP polls the service until an external IP is available and returns it

func Logs

func Logs(d *appsv1.Deployment) string

Logs returns the logs for both containers for the given deployment

func WaitForDeploymentToStabilize

func WaitForDeploymentToStabilize(d *appsv1.Deployment, ip string) error

WaitForDeploymentToStabilize waits till the Deployment has stabilized

Types

This section is empty.

Jump to

Keyboard shortcuts

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