Documentation
¶
Overview ¶
Package client wraps the k8s client. Useful for mocking
Index ¶
- type Event
- type Job
- func (c *Job) Create(ctx context.Context, namespace string, job *batchv1.Job) (*batchv1.Job, error)
- func (c *Job) Delete(ctx context.Context, namespace string, name string) error
- func (c *Job) GetByGUID(ctx context.Context, guid string, includeCompleted bool) ([]batchv1.Job, error)
- func (c *Job) List(ctx context.Context, includeCompleted bool) ([]batchv1.Job, error)
- func (c *Job) SetAnnotation(ctx context.Context, job *batchv1.Job, key, value string) (*batchv1.Job, error)
- func (c *Job) SetLabel(ctx context.Context, job *batchv1.Job, label, value string) (*batchv1.Job, error)
- type Pod
- func (c *Pod) Delete(ctx context.Context, namespace, name string) error
- func (c *Pod) GetAll(ctx context.Context) ([]corev1.Pod, error)
- func (c *Pod) GetByLRPIdentifier(ctx context.Context, id api.LRPIdentifier) ([]corev1.Pod, error)
- func (c *Pod) SetAndTestAnnotation(ctx context.Context, pod *corev1.Pod, key, value string, oldValue *string) (*corev1.Pod, error)
- func (c *Pod) SetAnnotation(ctx context.Context, pod *corev1.Pod, key, value string) (*corev1.Pod, error)
- type PodDisruptionBudget
- func (c *PodDisruptionBudget) Create(ctx context.Context, namespace string, ...) (*policyv1beta1.PodDisruptionBudget, error)
- func (c *PodDisruptionBudget) Delete(ctx context.Context, namespace string, name string) error
- func (c *PodDisruptionBudget) Get(ctx context.Context, namespace, name string) (*policyv1beta1.PodDisruptionBudget, error)
- func (c *PodDisruptionBudget) SetOwner(ctx context.Context, pdb *policyv1beta1.PodDisruptionBudget, ...) (*policyv1beta1.PodDisruptionBudget, error)
- type Secret
- func (c *Secret) Create(ctx context.Context, namespace string, secret *corev1.Secret) (*corev1.Secret, error)
- func (c *Secret) Delete(ctx context.Context, namespace string, name string) error
- func (c *Secret) Get(ctx context.Context, namespace, name string) (*corev1.Secret, error)
- func (c *Secret) SetOwner(ctx context.Context, secret *corev1.Secret, owner metav1.Object) (*corev1.Secret, error)
- func (c *Secret) Update(ctx context.Context, namespace string, secret *corev1.Secret) (*corev1.Secret, error)
- type StatefulSet
- func (c *StatefulSet) Create(ctx context.Context, namespace string, statefulSet *appsv1.StatefulSet) (*appsv1.StatefulSet, error)
- func (c *StatefulSet) Delete(ctx context.Context, namespace string, name string) error
- func (c *StatefulSet) Get(ctx context.Context, namespace, name string) (*appsv1.StatefulSet, error)
- func (c *StatefulSet) GetByLRPIdentifier(ctx context.Context, id api.LRPIdentifier) ([]appsv1.StatefulSet, error)
- func (c *StatefulSet) GetBySourceType(ctx context.Context, sourceType string) ([]appsv1.StatefulSet, error)
- func (c *StatefulSet) SetAnnotation(ctx context.Context, statefulSet *appsv1.StatefulSet, key, value string) (*appsv1.StatefulSet, error)
- func (c *StatefulSet) SetCPURequest(ctx context.Context, statefulSet *appsv1.StatefulSet, ...) (*appsv1.StatefulSet, error)
- func (c *StatefulSet) Update(ctx context.Context, namespace string, statefulSet *appsv1.StatefulSet) (*appsv1.StatefulSet, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct {
// contains filtered or unexported fields
}
func NewEvent ¶
func NewEvent(clientSet kubernetes.Interface) *Event
type Job ¶
type Job struct {
// contains filtered or unexported fields
}
func (*Job) SetAnnotation ¶
type Pod ¶
type Pod struct {
// contains filtered or unexported fields
}
func (*Pod) GetByLRPIdentifier ¶
func (*Pod) SetAndTestAnnotation ¶
type PodDisruptionBudget ¶
type PodDisruptionBudget struct {
// contains filtered or unexported fields
}
func NewPodDisruptionBudget ¶
func NewPodDisruptionBudget(clientSet kubernetes.Interface) *PodDisruptionBudget
func (*PodDisruptionBudget) Create ¶
func (c *PodDisruptionBudget) Create(ctx context.Context, namespace string, podDisruptionBudget *policyv1beta1.PodDisruptionBudget) (*policyv1beta1.PodDisruptionBudget, error)
func (*PodDisruptionBudget) Get ¶
func (c *PodDisruptionBudget) Get(ctx context.Context, namespace, name string) (*policyv1beta1.PodDisruptionBudget, error)
func (*PodDisruptionBudget) SetOwner ¶
func (c *PodDisruptionBudget) SetOwner(ctx context.Context, pdb *policyv1beta1.PodDisruptionBudget, owner *appsv1.StatefulSet) (*policyv1beta1.PodDisruptionBudget, error)
type Secret ¶
type Secret struct {
// contains filtered or unexported fields
}
func NewSecret ¶
func NewSecret(clientSet kubernetes.Interface) *Secret
type StatefulSet ¶
type StatefulSet struct {
// contains filtered or unexported fields
}
func NewStatefulSet ¶
func NewStatefulSet(clientSet kubernetes.Interface, workloadsNamespace string) *StatefulSet
func (*StatefulSet) Create ¶
func (c *StatefulSet) Create(ctx context.Context, namespace string, statefulSet *appsv1.StatefulSet) (*appsv1.StatefulSet, error)
func (*StatefulSet) Get ¶
func (c *StatefulSet) Get(ctx context.Context, namespace, name string) (*appsv1.StatefulSet, error)
func (*StatefulSet) GetByLRPIdentifier ¶
func (c *StatefulSet) GetByLRPIdentifier(ctx context.Context, id api.LRPIdentifier) ([]appsv1.StatefulSet, error)
func (*StatefulSet) GetBySourceType ¶
func (c *StatefulSet) GetBySourceType(ctx context.Context, sourceType string) ([]appsv1.StatefulSet, error)
func (*StatefulSet) SetAnnotation ¶
func (c *StatefulSet) SetAnnotation(ctx context.Context, statefulSet *appsv1.StatefulSet, key, value string) (*appsv1.StatefulSet, error)
func (*StatefulSet) SetCPURequest ¶
func (c *StatefulSet) SetCPURequest(ctx context.Context, statefulSet *appsv1.StatefulSet, cpuRequest *resource.Quantity) (*appsv1.StatefulSet, error)
func (*StatefulSet) Update ¶
func (c *StatefulSet) Update(ctx context.Context, namespace string, statefulSet *appsv1.StatefulSet) (*appsv1.StatefulSet, error)
Click to show internal directories.
Click to hide internal directories.