Documentation
¶
Index ¶
- Constants
- Variables
- func AWSCredentials() []corev1.EnvVar
- func CPU(cpu string) k8sresource.Quantity
- func CortexConfigVolume() corev1.Volume
- func CortexConfigVolumeMount() corev1.VolumeMount
- func CreateDeployment(spec *DeploymentSpec) (*appsv1b1.Deployment, error)
- func CreateIngress(spec *IngressSpec) (*v1beta1.Ingress, error)
- func CreateJob(spec *JobSpec) (*batchv1.Job, error)
- func CreatePod(spec *PodSpec) (*corev1.Pod, error)
- func CreateService(spec *ServiceSpec) (*corev1.Service, error)
- func DefaultVolumeMounts() []corev1.VolumeMount
- func DefaultVolumes() []corev1.Volume
- func DeleteDeployment(name string) (bool, error)
- func DeleteIngress(name string) (bool, error)
- func DeleteJob(name string) (bool, error)
- func DeletePod(name string) (bool, error)
- func DeleteService(name string) (bool, error)
- func Deployment(spec *DeploymentSpec) *appsv1b1.Deployment
- func DeploymentExists(name string) (bool, error)
- func DeploymentMap(deployments []appsv1b1.Deployment) map[string]appsv1b1.Deployment
- func DeploymentStartTime(deployment *appsv1b1.Deployment) *time.Time
- func EmptyDirVolume() corev1.Volume
- func EmptyDirVolumeMount() corev1.VolumeMount
- func FieldSelectorNotIn(key string, values []string) string
- func GetDeployment(name string) (*appsv1b1.Deployment, error)
- func GetIngress(name string) (*v1beta1.Ingress, error)
- func GetJob(name string) (*batchv1.Job, error)
- func GetPod(name string) (*corev1.Pod, error)
- func GetPodLastContainerStartTime(pod *corev1.Pod) *time.Time
- func GetPodStatus(pod *corev1.Pod) string
- func GetService(name string) (*corev1.Service, error)
- func Ingress(spec *IngressSpec) *v1beta1.Ingress
- func IngressExists(name string) (bool, error)
- func IngressMap(ingresses []v1beta1.Ingress) map[string]v1beta1.Ingress
- func Job(spec *JobSpec) *batchv1.Job
- func JobExists(name string) (bool, error)
- func JobMap(jobs []batchv1.Job) map[string]batchv1.Job
- func LabelSelector(labels map[string]string) string
- func ListDeployments(opts *metav1.ListOptions) ([]appsv1b1.Deployment, error)
- func ListDeploymentsByLabel(labelKey string, labelValue string) ([]appsv1b1.Deployment, error)
- func ListDeploymentsByLabels(labels map[string]string) ([]appsv1b1.Deployment, error)
- func ListIngresses(opts *metav1.ListOptions) ([]v1beta1.Ingress, error)
- func ListIngressesByLabel(labelKey string, labelValue string) ([]v1beta1.Ingress, error)
- func ListIngressesByLabels(labels map[string]string) ([]v1beta1.Ingress, error)
- func ListJobs(opts *metav1.ListOptions) ([]batchv1.Job, error)
- func ListJobsByLabel(labelKey string, labelValue string) ([]batchv1.Job, error)
- func ListJobsByLabels(labels map[string]string) ([]batchv1.Job, error)
- func ListPods(opts *metav1.ListOptions) ([]corev1.Pod, error)
- func ListPodsByLabel(labelKey string, labelValue string) ([]corev1.Pod, error)
- func ListPodsByLabels(labels map[string]string) ([]corev1.Pod, error)
- func ListServices(opts *metav1.ListOptions) ([]corev1.Service, error)
- func ListServicesByLabel(labelKey string, labelValue string) ([]corev1.Service, error)
- func ListServicesByLabels(labels map[string]string) ([]corev1.Service, error)
- func Mem(mem string) k8sresource.Quantity
- func Pod(spec *PodSpec) *corev1.Pod
- func PodExists(name string) (bool, error)
- func PodMap(pods []corev1.Pod) map[string]corev1.Pod
- func Service(spec *ServiceSpec) *corev1.Service
- func ServiceExists(name string) (bool, error)
- func ServiceMap(services []corev1.Service) map[string]corev1.Service
- func StalledPods() ([]corev1.Pod, error)
- func UpdateDeployment(deployment *appsv1b1.Deployment) (*appsv1b1.Deployment, error)
- func UpdateJob(job *batchv1.Job) (*batchv1.Job, error)
- func ValidName(name string) string
- func ValidNameContainer(name string) string
- func WaitForPodRunning(name string, numSeconds int) error
- type DeploymentSpec
- type IngressSpec
- type JobSpec
- type PodSpec
- type ServiceSpec
Constants ¶
View Source
const ( PodStatusPending = "Pending" PodStatusRunning = "Running" PodStatusTerminating = "Terminating" PodStatusSucceeded = "Succeeded" PodStatusFailed = "Failed" PodStatusKilled = "Killed" PodStatusUnknown = "Unknown" )
View Source
const DeploymentSuccessConditionAll = "!status.unavailableReplicas"
View Source
const JobFailureCondition = "status.failed > 0"
View Source
const JobSuccessCondition = "status.succeeded > 0"
Variables ¶
View Source
var (
Config *rest.Config
)
Functions ¶
func AWSCredentials ¶
func CPU ¶ added in v0.2.0
func CPU(cpu string) k8sresource.Quantity
func CortexConfigVolume ¶
func CortexConfigVolumeMount ¶
func CortexConfigVolumeMount() corev1.VolumeMount
func CreateDeployment ¶
func CreateDeployment(spec *DeploymentSpec) (*appsv1b1.Deployment, error)
func CreateIngress ¶
func CreateIngress(spec *IngressSpec) (*v1beta1.Ingress, error)
func CreateService ¶
func CreateService(spec *ServiceSpec) (*corev1.Service, error)
func DefaultVolumeMounts ¶
func DefaultVolumeMounts() []corev1.VolumeMount
func DefaultVolumes ¶
func DeleteDeployment ¶
func DeleteIngress ¶
func DeleteService ¶
func Deployment ¶
func Deployment(spec *DeploymentSpec) *appsv1b1.Deployment
func DeploymentExists ¶
func DeploymentMap ¶
func DeploymentMap(deployments []appsv1b1.Deployment) map[string]appsv1b1.Deployment
func DeploymentStartTime ¶
func DeploymentStartTime(deployment *appsv1b1.Deployment) *time.Time
func EmptyDirVolume ¶
func EmptyDirVolumeMount ¶
func EmptyDirVolumeMount() corev1.VolumeMount
func FieldSelectorNotIn ¶
func GetDeployment ¶
func GetDeployment(name string) (*appsv1b1.Deployment, error)
func GetPodStatus ¶
func Ingress ¶
func Ingress(spec *IngressSpec) *v1beta1.Ingress
func IngressExists ¶
func LabelSelector ¶
func ListDeployments ¶
func ListDeployments(opts *metav1.ListOptions) ([]appsv1b1.Deployment, error)
func ListDeploymentsByLabel ¶
func ListDeploymentsByLabel(labelKey string, labelValue string) ([]appsv1b1.Deployment, error)
func ListDeploymentsByLabels ¶
func ListDeploymentsByLabels(labels map[string]string) ([]appsv1b1.Deployment, error)
func ListIngresses ¶
func ListIngresses(opts *metav1.ListOptions) ([]v1beta1.Ingress, error)
func ListIngressesByLabel ¶
func ListIngressesByLabels ¶
func ListJobsByLabel ¶
func ListPodsByLabel ¶
func ListServices ¶
func ListServices(opts *metav1.ListOptions) ([]corev1.Service, error)
func ListServicesByLabel ¶
func ListServicesByLabels ¶
func Mem ¶
func Mem(mem string) k8sresource.Quantity
func Service ¶
func Service(spec *ServiceSpec) *corev1.Service
func ServiceExists ¶
func StalledPods ¶
func UpdateDeployment ¶
func UpdateDeployment(deployment *appsv1b1.Deployment) (*appsv1b1.Deployment, error)
func ValidNameContainer ¶
ValidNameContainer ensures name contains only lower case alphanumeric or '-', must start with alphabetic, end with alphanumeric
func WaitForPodRunning ¶
Types ¶
type DeploymentSpec ¶
type IngressSpec ¶
Click to show internal directories.
Click to hide internal directories.