Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the sources v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=knative.dev/eventing-gitlab/pkg/apis/sources +k8s:defaulter-gen=TypeMeta +groupName=sources.knative.dev
Package v1alpha1 contains API Schema definitions for the sources v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=knative.dev/eventing-gitlab/pkg/apis/sources +k8s:defaulter-gen=TypeMeta +groupName=sources.knative.dev
Index ¶
- Constants
- Variables
- func GitLabEventType(eventType string) string
- func Kind(kind string) schema.GroupKind
- func Resource(resource string) schema.GroupResource
- type GitLabSource
- func (s *GitLabSource) AsEventSource() string
- func (in *GitLabSource) DeepCopy() *GitLabSource
- func (in *GitLabSource) DeepCopyInto(out *GitLabSource)
- func (in *GitLabSource) DeepCopyObject() runtime.Object
- func (s *GitLabSource) EventTypes() []string
- func (*GitLabSource) GetConditionSet() apis.ConditionSet
- func (*GitLabSource) GetGroupVersionKind() schema.GroupVersionKind
- func (g *GitLabSource) GetStatus() *duckv1.Status
- func (g *GitLabSource) SetDefaults(ctx context.Context)
- func (s *GitLabSource) Validate(ctx context.Context) *apis.FieldError
- type GitLabSourceList
- type GitLabSourceSpec
- type GitLabSourceStatus
- func (in *GitLabSourceStatus) DeepCopy() *GitLabSourceStatus
- func (in *GitLabSourceStatus) DeepCopyInto(out *GitLabSourceStatus)
- func (s *GitLabSourceStatus) MarkDeployed()
- func (s *GitLabSourceStatus) MarkNoSink()
- func (s *GitLabSourceStatus) MarkNoWebhook(reason, messageFormat string, messageA ...interface{})
- func (s *GitLabSourceStatus) MarkNotDeployed(reason, messageFormat string, messageA ...interface{})
- func (s *GitLabSourceStatus) MarkSink(uri *apis.URL)
- func (s *GitLabSourceStatus) MarkWebhook()
- type SecretValueFromSource
Constants ¶
const ( // GitLabSourceConditionReady has status True when the // GitLabSource is ready to send events. GitLabSourceConditionReady = apis.ConditionReady // GitLabSourceConditionSinkProvided has status True when the // GitLabSource has been configured with a sink target. GitLabSourceConditionSinkProvided apis.ConditionType = "SinkProvided" // GitLabSourceConditionWebhookConfigured has a status True when the // GitLabSource has been configured with a webhook. GitLabSourceConditionWebhookConfigured apis.ConditionType = "WebhookConfigured" // GitLabSourceConditionDeployed has status True when the // GitLabSource's receive adapter has been successfully deployed. GitLabSourceConditionDeployed apis.ConditionType = "Deployed" )
const ( GitLabEventTypeBuild = "build" GitLabEventTypeDeployment = "deployment" GitLabEventTypeIssue = "issue" GitLabEventTypeMergeRequest = "merge_request" GitLabEventTypeNote = "note" GitLabEventTypePipeline = "pipeline" GitLabEventTypePush = "push" GitLabEventTypeTagPush = "tag_push" GitLabEventTypeWikiPage = "wiki_page" )
Types of events emitted by a GitLabSource. The chosen format and case matches the "object_kind" attribute contained in payloads sent by GitLab's webhooks. https://docs.gitlab.com/ee/user/project/integrations/webhooks.html#events
const ( GitLabWebhookConfidentialIssues = "confidential_issues_events" GitLabWebhookConfidentialNote = "confidential_note_events" GitLabWebhookDeployment = "deployment_events" GitLabWebhookIssues = "issues_events" GitLabWebhookJob = "job_events" GitLabWebhookMergeRequests = "merge_requests_events" GitLabWebhookNote = "note_events" GitLabWebhookPipeline = "pipeline_events" GitLabWebhookPush = "push_events" GitLabWebhookTagPush = "tag_push_events" GitLabWebhookWikiPage = "wiki_page_events" )
Types of webhooks that can be enabled on a GitLab project. https://docs.gitlab.com/ee/api/projects.html#add-project-hook
Variables ¶
var ( // SchemeGroupVersion is group version used to register these objects SchemeGroupVersion = schema.GroupVersion{Group: "sources.knative.dev", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
func GitLabEventType ¶ added in v0.18.1
GitLabEventType returns a GitLab event type in a format suitable for usage as a CloudEvent type attribute.
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type GitLabSource ¶
type GitLabSource struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec GitLabSourceSpec `json:"spec,omitempty"` Status GitLabSourceStatus `json:"status,omitempty"` }
GitLabSource is the Schema for the gitlabsources API.
func (*GitLabSource) AsEventSource ¶ added in v0.18.1
func (s *GitLabSource) AsEventSource() string
AsEventSource returns a unique reference to the source suitable for use as a CloudEvent source attribute.
func (*GitLabSource) DeepCopy ¶
func (in *GitLabSource) DeepCopy() *GitLabSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitLabSource.
func (*GitLabSource) DeepCopyInto ¶
func (in *GitLabSource) DeepCopyInto(out *GitLabSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GitLabSource) DeepCopyObject ¶
func (in *GitLabSource) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*GitLabSource) EventTypes ¶ added in v0.18.1
func (s *GitLabSource) EventTypes() []string
EventTypes returns the types of events emitted by the source, sorted in increasing lexical order.
func (*GitLabSource) GetConditionSet ¶
func (*GitLabSource) GetConditionSet() apis.ConditionSet
GetConditionSet retrieves the condition set for this resource. Implements the KRShaped interface.
func (*GitLabSource) GetGroupVersionKind ¶
func (*GitLabSource) GetGroupVersionKind() schema.GroupVersionKind
GetGroupVersionKind returns a GitLabSource GVK. Implements the kmeta.OwnerRefable interface.
func (*GitLabSource) GetStatus ¶
func (g *GitLabSource) GetStatus() *duckv1.Status
GetStatus retrieves the duck status for this resource. Implements the KRShaped interface.
func (*GitLabSource) SetDefaults ¶
func (g *GitLabSource) SetDefaults(ctx context.Context)
func (*GitLabSource) Validate ¶
func (s *GitLabSource) Validate(ctx context.Context) *apis.FieldError
Validate GitLab source object fields
type GitLabSourceList ¶
type GitLabSourceList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []GitLabSource `json:"items"` }
GitLabSourceList contains a list of GitLabSource.
func (*GitLabSourceList) DeepCopy ¶
func (in *GitLabSourceList) DeepCopy() *GitLabSourceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitLabSourceList.
func (*GitLabSourceList) DeepCopyInto ¶
func (in *GitLabSourceList) DeepCopyInto(out *GitLabSourceList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GitLabSourceList) DeepCopyObject ¶
func (in *GitLabSourceList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type GitLabSourceSpec ¶
type GitLabSourceSpec struct { duckv1.SourceSpec `json:",inline"` // ServiceAccountName holds the name of the Kubernetes service account // as which the underlying K8s resources should be run. If unspecified // this will default to the "default" service account for the namespace // in which the GitLabSource exists. // +optional ServiceAccountName string `json:"serviceAccountName,omitempty"` // ProjectURL is the url of the GitLab project for which we are interested // to receive events from. // Examples: // https://gitlab.com/gitlab-org/gitlab-foss // +kubebuilder:validation:MinLength=1 ProjectURL string `json:"projectUrl"` // List of webhooks to enable on the selected GitLab project. // Those correspond to the attributes enumerated at // https://docs.gitlab.com/ee/api/projects.html#add-project-hook EventTypes []string `json:"eventTypes"` // AccessToken is the Kubernetes secret containing the GitLab // access token AccessToken SecretValueFromSource `json:"accessToken"` // SecretToken is the Kubernetes secret containing the GitLab // secret token SecretToken SecretValueFromSource `json:"secretToken"` // SSLVerify if true configure webhook so the ssl verification is done when triggering the hook SSLVerify bool `json:"sslverify,omitempty"` }
GitLabSourceSpec defines the desired state of GitLabSource +kubebuilder:categories=all,knative,eventing,sources
func (*GitLabSourceSpec) DeepCopy ¶
func (in *GitLabSourceSpec) DeepCopy() *GitLabSourceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitLabSourceSpec.
func (*GitLabSourceSpec) DeepCopyInto ¶
func (in *GitLabSourceSpec) DeepCopyInto(out *GitLabSourceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GitLabSourceSpec) SetDefaults ¶
func (gs *GitLabSourceSpec) SetDefaults(ctx context.Context)
func (*GitLabSourceSpec) Validate ¶
func (s *GitLabSourceSpec) Validate(ctx context.Context) *apis.FieldError
Validate GitLab source Spec object fields
type GitLabSourceStatus ¶
type GitLabSourceStatus struct { // inherits duck/v1 SourceStatus, which currently provides: // * ObservedGeneration - the 'Generation' of the Service that was last // processed by the controller. // * Conditions - the latest available observations of a resource's current // state. // * SinkURI - the current active sink URI that has been configured for the // Source. duckv1.SourceStatus `json:",inline"` // WebhookID of the project hook registered with GitLab WebhookID *int `json:"webhookID,omitempty"` }
GitLabSourceStatus defines the observed state of GitLabSource
func (*GitLabSourceStatus) DeepCopy ¶
func (in *GitLabSourceStatus) DeepCopy() *GitLabSourceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitLabSourceStatus.
func (*GitLabSourceStatus) DeepCopyInto ¶
func (in *GitLabSourceStatus) DeepCopyInto(out *GitLabSourceStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GitLabSourceStatus) MarkDeployed ¶
func (s *GitLabSourceStatus) MarkDeployed()
MarkWebhook sets the Deployed condition to True.
func (*GitLabSourceStatus) MarkNoSink ¶
func (s *GitLabSourceStatus) MarkNoSink()
MarkNoSink sets the SinkProvided condition to False.
func (*GitLabSourceStatus) MarkNoWebhook ¶
func (s *GitLabSourceStatus) MarkNoWebhook(reason, messageFormat string, messageA ...interface{})
MarkNoWebhook sets the WebhookConfigured condition to False with the given reason and message.
func (*GitLabSourceStatus) MarkNotDeployed ¶
func (s *GitLabSourceStatus) MarkNotDeployed(reason, messageFormat string, messageA ...interface{})
MarkNotDeployed sets the Deployed condition to False with the given reason and message.
func (*GitLabSourceStatus) MarkSink ¶
func (s *GitLabSourceStatus) MarkSink(uri *apis.URL)
MarkSink sets the SinkProvided condition to True using the given URI.
func (*GitLabSourceStatus) MarkWebhook ¶
func (s *GitLabSourceStatus) MarkWebhook()
MarkWebhook sets the WebhookConfigured condition to True.
type SecretValueFromSource ¶
type SecretValueFromSource struct { // The Secret key to select from. SecretKeyRef *corev1.SecretKeySelector `json:"secretKeyRef,omitempty"` }
SecretValueFromSource represents the source of a secret value
func (*SecretValueFromSource) DeepCopy ¶
func (in *SecretValueFromSource) DeepCopy() *SecretValueFromSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretValueFromSource.
func (*SecretValueFromSource) DeepCopyInto ¶
func (in *SecretValueFromSource) DeepCopyInto(out *SecretValueFromSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.