v1

package
v2.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SchemeGroupVersion schema.GroupVersion

Functions

func ConfigureScheme

func ConfigureScheme(GroupName string, GroupVersion string) error

ConfigureScheme configures the runtime scheme for use with CRD creation

Types

type JobConfig

type JobConfig struct {
	Phase            JobPhase          `json:"phase"`            // the state or phase of the job
	Timeout          string            `json:"timeout"`          // the maximum time the pod is allowed to run before a failure is assumed
	PodSpec          apiv1.PodSpec     `json:"podSpec"`          // a spec for the external job
	ExtraAnnotations map[string]string `json:"extraAnnotations"` // a map of extra annotations that will be applied to the pod
	ExtraLabels      map[string]string `json:"extraLabels"`      // a map of extra labels that will be applied to the pod
}

JobConfig represents a configuration for a kuberhealthy external checker job. This includes the pod spec to run, and the whitelisted UUID that is currently allowed to report-in to the status reporting endpoint. +k8s:openapi-gen=true

func (*JobConfig) DeepCopy

func (in *JobConfig) DeepCopy() *JobConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JobConfig.

func (*JobConfig) DeepCopyInto

func (in *JobConfig) DeepCopyInto(out *JobConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type JobPhase

type JobPhase string

JobPhase is a label for the condition of the job at the current time.

const (
	JobRunning   JobPhase = "Running"
	JobCompleted JobPhase = "Completed"
)

These are the valid phases of jobs.

type KHJobV1Client

type KHJobV1Client struct {
	// contains filtered or unexported fields
}

KHJobV1Client is used to interact with features provided by the khjob group.

func Client

func Client(kubeConfigFile string) (*KHJobV1Client, error)

func New

New creates a new KHJobV1Client for the given RESTClient.

func NewForConfig

func NewForConfig(c *rest.Config) (*KHJobV1Client, error)

NewForConfig creates a new KHJobV1Client for the given config.

func NewForConfigOrDie

func NewForConfigOrDie(c *rest.Config) *KHJobV1Client

NewForConfigOrDie creates a new KHJobV1Client for the given config and panics if there is an error in the config.

func (*KHJobV1Client) KuberhealthyJobs

func (c *KHJobV1Client) KuberhealthyJobs(namespace string) KuberhealthyJobInterface

func (*KHJobV1Client) RESTClient

func (c *KHJobV1Client) RESTClient() rest.Interface

RESTClient returns a RESTClient that is used to communicate with API server by this client implementation.

type KHJobV1Interface

type KHJobV1Interface interface {
	RESTClient() rest.Interface
	KuberhealthyJobsGetter
}

type KuberhealthyJob

type KuberhealthyJob struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	// Spec holds the desired state of the Star (from the client).
	// +optional
	Spec JobConfig `json:"spec,omitempty"`
}

KuberhealthyJob represents the data in the CRD for configuring an external checker job for Kuberhealthy +k8s:openapi-gen=true

func NewKuberhealthyJob

func NewKuberhealthyJob(name string, namespace string, spec JobConfig) KuberhealthyJob

NewKuberhealthyJob creates a KuberhealthyCheck struct which represents the data inside a KuberhealthyCheck resource

func (*KuberhealthyJob) DeepCopy

func (in *KuberhealthyJob) DeepCopy() *KuberhealthyJob

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KuberhealthyJob.

func (*KuberhealthyJob) DeepCopyInto

func (in *KuberhealthyJob) DeepCopyInto(out *KuberhealthyJob)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*KuberhealthyJob) DeepCopyObject

func (in *KuberhealthyJob) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type KuberhealthyJobInterface

type KuberhealthyJobInterface interface {
	Create(*KuberhealthyJob) (KuberhealthyJob, error)
	Update(*KuberhealthyJob) (KuberhealthyJob, error)
	Delete(name string, options *metav1.DeleteOptions) error
	DeleteCollection(options *metav1.DeleteOptions, listOptions metav1.ListOptions) error
	Get(name string, options metav1.GetOptions) (KuberhealthyJob, error)
	List(opts metav1.ListOptions) (KuberhealthyJobList, error)
	Watch(opts metav1.ListOptions) (watch.Interface, error)
	Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result KuberhealthyJob, err error)
}

KuberhealthyJobInterface has methods to work with KuberhealthyJob resources.

type KuberhealthyJobList

type KuberhealthyJobList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata"`

	Items []KuberhealthyJob `json:"items"`
}

StarList is a list of Star resources

func (*KuberhealthyJobList) DeepCopy

func (in *KuberhealthyJobList) DeepCopy() *KuberhealthyJobList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KuberhealthyJobList.

func (*KuberhealthyJobList) DeepCopyInto

func (in *KuberhealthyJobList) DeepCopyInto(out *KuberhealthyJobList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*KuberhealthyJobList) DeepCopyObject

func (in *KuberhealthyJobList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type KuberhealthyJobsGetter

type KuberhealthyJobsGetter interface {
	KuberhealthyJobs(namespace string) KuberhealthyJobInterface
}

KuberhealthyJobsGetter has a method to return a KuberhealthyJobInterface. A group's client should implement this interface.

Jump to

Keyboard shortcuts

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