Documentation ¶
Overview ¶
Package v1 contains API Schema definitions for the notification v1 API group. +kubebuilder:object:generate=true +groupName=notification.toolkit.fluxcd.io
Index ¶
- Constants
- Variables
- type CrossNamespaceObjectReference
- type Receiver
- func (in *Receiver) DeepCopy() *Receiver
- func (in *Receiver) DeepCopyInto(out *Receiver)
- func (in *Receiver) DeepCopyObject() runtime.Object
- func (in *Receiver) GetConditions() []metav1.Condition
- func (in *Receiver) GetInterval() time.Duration
- func (in *Receiver) GetWebhookPath(token string) string
- func (in *Receiver) SetConditions(conditions []metav1.Condition)
- type ReceiverList
- type ReceiverSpec
- type ReceiverStatus
Constants ¶
const ( // InitializedReason represents the fact that a given resource has been initialized. InitializedReason string = "Initialized" // ValidationFailedReason represents the fact that some part of the spec of a given resource // couldn't be validated. ValidationFailedReason string = "ValidationFailed" // TokenNotFoundReason represents the fact that receiver token can't be found. TokenNotFoundReason string = "TokenNotFound" )
const ( ReceiverKind string = "Receiver" ReceiverWebhookPath string = "/hook/" GenericReceiver string = "generic" GenericHMACReceiver string = "generic-hmac" GitHubReceiver string = "github" GitLabReceiver string = "gitlab" BitbucketReceiver string = "bitbucket" HarborReceiver string = "harbor" DockerHubReceiver string = "dockerhub" QuayReceiver string = "quay" GCRReceiver string = "gcr" NexusReceiver string = "nexus" ACRReceiver string = "acr" CDEventsReceiver string = "cdevents" )
const NotificationFinalizer = "finalizers.fluxcd.io"
Variables ¶
var ( // GroupVersion is group version used to register these objects. GroupVersion = schema.GroupVersion{Group: "notification.toolkit.fluxcd.io", Version: "v1"} // 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 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;ImageRepository;ImagePolicy;ImageUpdateAutomation;OCIRepository // +required Kind string `json:"kind"` // Name of the referent // If multiple resources are targeted `*` may be set. // +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"` // MatchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels // map is equivalent to an element of matchExpressions, whose key field is "key", the // operator is "In", and the values array contains only "value". The requirements are ANDed. // MatchLabels requires the name to be set to `*`. // +optional MatchLabels map[string]string `json:"matchLabels,omitempty"` }
CrossNamespaceObjectReference contains enough information to let you locate the typed referenced object at cluster level
func (*CrossNamespaceObjectReference) DeepCopy ¶
func (in *CrossNamespaceObjectReference) DeepCopy() *CrossNamespaceObjectReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CrossNamespaceObjectReference.
func (*CrossNamespaceObjectReference) DeepCopyInto ¶
func (in *CrossNamespaceObjectReference) DeepCopyInto(out *CrossNamespaceObjectReference)
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"` // +kubebuilder:default:={"observedGeneration":-1} Status ReceiverStatus `json:"status,omitempty"` }
Receiver is the Schema for the receivers API.
func (*Receiver) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Receiver.
func (*Receiver) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Receiver) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Receiver) GetConditions ¶
GetConditions returns the status conditions of the object.
func (*Receiver) GetInterval ¶
GetInterval returns the interval value with a default of 10m for this Receiver.
func (*Receiver) GetWebhookPath ¶
GetWebhookPath returns the incoming webhook path for the given token.
func (*Receiver) SetConditions ¶
SetConditions sets the status conditions on the object.
type ReceiverList ¶
type ReceiverList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Receiver `json:"items"` }
ReceiverList contains a list of Receivers.
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;generic-hmac;github;gitlab;bitbucket;harbor;dockerhub;quay;gcr;nexus;acr;cdevents // +required Type string `json:"type"` // Interval at which to reconcile the Receiver with its Secret references. // +kubebuilder:validation:Type=string // +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$" // +kubebuilder:default:="10m" // +optional Interval *metav1.Duration `json:"interval,omitempty"` // Events specifies the list of event types to handle, // e.g. 'push' for GitHub or 'Push Hook' for GitLab. // +optional Events []string `json:"events,omitempty"` // A list of resources to be notified about changes. // +required Resources []CrossNamespaceObjectReference `json:"resources"` // SecretRef specifies the Secret containing the token used // to validate the payload authenticity. // +required SecretRef meta.LocalObjectReference `json:"secretRef"` // Suspend tells the controller to suspend subsequent // events handling for this receiver. // +optional Suspend bool `json:"suspend,omitempty"` }
ReceiverSpec defines the desired state of the 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 { meta.ReconcileRequestStatus `json:",inline"` // Conditions holds the conditions for the Receiver. // +optional Conditions []metav1.Condition `json:"conditions,omitempty"` // WebhookPath is the generated incoming webhook address in the format // of '/hook/sha256sum(token+name+namespace)'. // +optional WebhookPath string `json:"webhookPath,omitempty"` // ObservedGeneration is the last observed generation of the Receiver object. // +optional ObservedGeneration int64 `json:"observedGeneration,omitempty"` }
ReceiverStatus defines the observed state of the 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.