v1beta1

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2020 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Overview

Package v1beta1 contains API Schema definitions for the notification v1beta1 API group +kubebuilder:object:generate=true +groupName=notification.toolkit.fluxcd.io

Index

Constants

View Source
const (
	// InitializedReason represents the fact that a given resource has been initialized.
	InitializedReason string = "Initialized"

	// TokenNotFound represents the fact that receiver token can't be found.
	TokenNotFoundReason string = "TokenNotFound"
)
View Source
const (
	GenericProvider string = "generic"
	SlackProvider   string = "slack"
	DiscordProvider string = "discord"
	MSTeamsProvider string = "msteams"
	RocketProvider  string = "rocket"
	GitHubProvider  string = "github"
	GitLabProvider  string = "gitlab"
)
View Source
const (
	GenericReceiver   string = "generic"
	GitHubReceiver    string = "github"
	GitLabReceiver    string = "gitlab"
	BitbucketReceiver string = "bitbucket"
	HarborReceiver    string = "harbor"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "notification.toolkit.fluxcd.io", Version: "v1beta1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type Alert

type Alert struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   AlertSpec   `json:"spec,omitempty"`
	Status AlertStatus `json:"status,omitempty"`
}

Alert is the Schema for the alerts API

func (*Alert) DeepCopy

func (in *Alert) DeepCopy() *Alert

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

func (*Alert) DeepCopyInto

func (in *Alert) DeepCopyInto(out *Alert)

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

func (*Alert) DeepCopyObject

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

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

type AlertList

type AlertList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Alert `json:"items"`
}

AlertList contains a list of Alert

func (*AlertList) DeepCopy

func (in *AlertList) DeepCopy() *AlertList

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

func (*AlertList) DeepCopyInto

func (in *AlertList) DeepCopyInto(out *AlertList)

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

func (*AlertList) DeepCopyObject

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

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

type AlertSpec

type AlertSpec struct {
	// Send events using this provider
	// +required
	ProviderRef corev1.LocalObjectReference `json:"providerRef"`

	// Filter events based on severity, defaults to ('info').
	// If set to 'info' no events will be filtered.
	// +kubebuilder:validation:Enum=info;error
	// +kubebuilder:default:=info
	// +optional
	EventSeverity string `json:"eventSeverity,omitempty"`

	// Filter events based on the involved objects
	// +required
	EventSources []CrossNamespaceObjectReference `json:"eventSources"`

	// This flag tells the controller to suspend subsequent events dispatching.
	// Defaults to false.
	// +optional
	Suspend bool `json:"suspend,omitempty"`
}

AlertSpec defines an alerting rule for events involving a list of objects

func (*AlertSpec) DeepCopy

func (in *AlertSpec) DeepCopy() *AlertSpec

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

func (*AlertSpec) DeepCopyInto

func (in *AlertSpec) DeepCopyInto(out *AlertSpec)

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

type AlertStatus

type AlertStatus struct {
	// +optional
	Conditions []meta.Condition `json:"conditions,omitempty"`
}

AlertStatus defines the observed state of Alert

func (*AlertStatus) DeepCopy

func (in *AlertStatus) DeepCopy() *AlertStatus

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

func (*AlertStatus) DeepCopyInto

func (in *AlertStatus) DeepCopyInto(out *AlertStatus)

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

type CrossNamespaceObjectReference

type CrossNamespaceObjectReference struct {
	// API version of the referent
	// +optional
	APIVersion string `json:"apiVersion,omitempty"`

	// Kind of the referent
	// +kubebuilder:validation:Enum=Bucket;GitRepository;Kustomization;HelmRelease;HelmChart;HelmRepository
	// +required
	Kind string `json:"kind,omitempty"`

	// Name of the referent
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=53
	// +required
	Name string `json:"name"`

	// Namespace of the referent
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:MaxLength=53
	// +kubebuilder:validation:Optional
	// +optional
	Namespace string `json:"namespace,omitempty"`
}

CrossNamespaceObjectReference contains enough information to let you locate the typed referenced object at cluster level

func (*CrossNamespaceObjectReference) DeepCopy

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

func (*CrossNamespaceObjectReference) DeepCopyInto

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

type Provider

type Provider struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   ProviderSpec   `json:"spec,omitempty"`
	Status ProviderStatus `json:"status,omitempty"`
}

Provider is the Schema for the providers API

func (*Provider) DeepCopy

func (in *Provider) DeepCopy() *Provider

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

func (*Provider) DeepCopyInto

func (in *Provider) DeepCopyInto(out *Provider)

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

func (*Provider) DeepCopyObject

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

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

type ProviderList

type ProviderList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Provider `json:"items"`
}

ProviderList contains a list of Provider

func (*ProviderList) DeepCopy

func (in *ProviderList) DeepCopy() *ProviderList

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

func (*ProviderList) DeepCopyInto

func (in *ProviderList) DeepCopyInto(out *ProviderList)

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

func (*ProviderList) DeepCopyObject

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

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

type ProviderSpec

type ProviderSpec struct {
	// Type of provider
	// +kubebuilder:validation:Enum=slack;discord;msteams;rocket;generic;github;gitlab
	// +required
	Type string `json:"type"`

	// Alert channel for this provider
	// +optional
	Channel string `json:"channel,omitempty"`

	// Bot username for this provider
	// +optional
	Username string `json:"username,omitempty"`

	// HTTP/S webhook address of this provider
	// +kubebuilder:validation:Pattern="^(http|https)://"
	// +kubebuilder:validation:Optional
	// +optional
	Address string `json:"address,omitempty"`

	// HTTP/S address of the proxy
	// +kubebuilder:validation:Pattern="^(http|https)://"
	// +kubebuilder:validation:Optional
	// +optional
	Proxy string `json:"proxy,omitempty"`

	// Secret reference containing the provider webhook URL
	// +optional
	SecretRef *corev1.LocalObjectReference `json:"secretRef,omitempty"`
}

ProviderSpec defines the desired state of Provider

func (*ProviderSpec) DeepCopy

func (in *ProviderSpec) DeepCopy() *ProviderSpec

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

func (*ProviderSpec) DeepCopyInto

func (in *ProviderSpec) DeepCopyInto(out *ProviderSpec)

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

type ProviderStatus

type ProviderStatus struct {
	// +optional
	Conditions []meta.Condition `json:"conditions,omitempty"`
}

ProviderStatus defines the observed state of Provider

func (*ProviderStatus) DeepCopy

func (in *ProviderStatus) DeepCopy() *ProviderStatus

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

func (*ProviderStatus) DeepCopyInto

func (in *ProviderStatus) DeepCopyInto(out *ProviderStatus)

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

type Receiver

type Receiver struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   ReceiverSpec   `json:"spec,omitempty"`
	Status ReceiverStatus `json:"status,omitempty"`
}

Receiver is the Schema for the receivers API

func ReceiverNotReady

func ReceiverNotReady(receiver Receiver, reason, message string) Receiver

func ReceiverReady

func ReceiverReady(receiver Receiver, reason, message, url string) Receiver

func (*Receiver) DeepCopy

func (in *Receiver) DeepCopy() *Receiver

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

func (*Receiver) DeepCopyInto

func (in *Receiver) DeepCopyInto(out *Receiver)

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

func (*Receiver) DeepCopyObject

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

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

type ReceiverList

type ReceiverList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Receiver `json:"items"`
}

ReceiverList contains a list of Receiver

func (*ReceiverList) DeepCopy

func (in *ReceiverList) DeepCopy() *ReceiverList

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

func (*ReceiverList) DeepCopyInto

func (in *ReceiverList) DeepCopyInto(out *ReceiverList)

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

func (*ReceiverList) DeepCopyObject

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

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

type ReceiverSpec

type ReceiverSpec struct {
	// Type of webhook sender, used to determine
	// the validation procedure and payload deserialization.
	// +kubebuilder:validation:Enum=generic;github;gitlab;bitbucket;harbor
	// +required
	Type string `json:"type"`

	// A list of events to handle,
	// e.g. 'push' for GitHub or 'Push Hook' for GitLab.
	// +optional
	Events []string `json:"events"`

	// A list of resources to be notified about changes.
	// +required
	Resources []CrossNamespaceObjectReference `json:"resources"`

	// Secret reference containing the token used
	// to validate the payload authenticity
	// +required
	SecretRef corev1.LocalObjectReference `json:"secretRef,omitempty"`

	// This flag tells the controller to suspend subsequent events handling.
	// Defaults to false.
	// +optional
	Suspend bool `json:"suspend,omitempty"`
}

ReceiverSpec defines the desired state of Receiver

func (*ReceiverSpec) DeepCopy

func (in *ReceiverSpec) DeepCopy() *ReceiverSpec

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

func (*ReceiverSpec) DeepCopyInto

func (in *ReceiverSpec) DeepCopyInto(out *ReceiverSpec)

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

type ReceiverStatus

type ReceiverStatus struct {
	// +optional
	Conditions []meta.Condition `json:"conditions,omitempty"`

	// Generated webhook URL in the format
	// of '/hook/sha256sum(token+name+namespace)'.
	// +optional
	URL string `json:"url,omitempty"`
}

ReceiverStatus defines the observed state of Receiver

func (*ReceiverStatus) DeepCopy

func (in *ReceiverStatus) DeepCopy() *ReceiverStatus

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

func (*ReceiverStatus) DeepCopyInto

func (in *ReceiverStatus) DeepCopyInto(out *ReceiverStatus)

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

Jump to

Keyboard shortcuts

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