v1

package
v2.7.1 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SchemeGroupVersion schema.GroupVersion

SchemeGroupVersion variable for newly added kh checks to be added to Kuberhealthy

Functions

func ConfigureScheme

func ConfigureScheme(GroupName string, GroupVersion string) error

ConfigureScheme configures the runtime scheme for use with CRD creation

Types

type CheckConfig

type CheckConfig struct {
	RunInterval string        `json:"runInterval" yaml:"runInterval"` // the interval at which the check runs
	Timeout     string        `json:"timeout" yaml:"timeout"`         // the maximum time the pod is allowed to run before a failure is assumed
	PodSpec     apiv1.PodSpec `json:"podSpec" yaml:"podSpec"`         // a spec for the external checker
	// +optional
	ExtraAnnotations map[string]string `json:"extraAnnotations" yaml:"extraAnnotations"` // a map of extra annotations that will be applied to the pod
	// +optional
	ExtraLabels map[string]string `json:"extraLabels" yaml:"extraLabels"` // a map of extra labels that will be applied to the pod
}

CheckConfig represents a configuration for a kuberhealthy external check. 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 (*CheckConfig) DeepCopy

func (in *CheckConfig) DeepCopy() *CheckConfig

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

func (*CheckConfig) DeepCopyInto

func (in *CheckConfig) DeepCopyInto(out *CheckConfig)

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

type KHCheckV1Client

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

KHCheckV1Client is used to interact with features provided by the khcheck group.

func Client

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

func New

New creates a new KHCheckV1Client for the given RESTClient.

func NewForConfig

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

NewForConfig creates a new KHCheckV1Client for the given config.

func NewForConfigOrDie

func NewForConfigOrDie(c *rest.Config) *KHCheckV1Client

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

func (*KHCheckV1Client) KuberhealthyChecks

func (c *KHCheckV1Client) KuberhealthyChecks(namespace string) KuberhealthyCheckInterface

func (*KHCheckV1Client) RESTClient

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

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

type KHCheckV1Interface

type KHCheckV1Interface interface {
	RESTClient() rest.Interface
	KuberhealthyChecksGetter
}

type KuberhealthyCheck

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

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

KuberhealthyCheck represents the data in the CRD for configuring an external check for Kuberhealthy +k8s:openapi-gen=true +kubebuilder:resource:path="khchecks" +kubebuilder:resource:singular="khcheck" +kubebuilder:resource:shortName="khc"

func NewKuberhealthyCheck

func NewKuberhealthyCheck(name string, namespace string, spec CheckConfig) KuberhealthyCheck

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

func (*KuberhealthyCheck) DeepCopy

func (in *KuberhealthyCheck) DeepCopy() *KuberhealthyCheck

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

func (*KuberhealthyCheck) DeepCopyInto

func (in *KuberhealthyCheck) DeepCopyInto(out *KuberhealthyCheck)

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

func (*KuberhealthyCheck) DeepCopyObject

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

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

type KuberhealthyCheckInterface

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

KuberhealthyCheckInterface has methods to work with KuberhealthyCheck resources.

type KuberhealthyCheckList

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

	Items []KuberhealthyCheck `json:"items" yaml:"items"`
}

KuberhealthyCheckList is a list of KuberhealthyCheck resources

func (*KuberhealthyCheckList) DeepCopy

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

func (*KuberhealthyCheckList) DeepCopyInto

func (in *KuberhealthyCheckList) DeepCopyInto(out *KuberhealthyCheckList)

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

func (*KuberhealthyCheckList) DeepCopyObject

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

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

type KuberhealthyChecksGetter

type KuberhealthyChecksGetter interface {
	KuberhealthyChecks(namespace string) KuberhealthyCheckInterface
}

KuberhealthyChecksGetter has a method to return a KuberhealthyCheckInterface. 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