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