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-contrib/pkg/apis/sources +k8s:defaulter-gen=TypeMeta +groupName=sources.eventing.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-contrib/pkg/apis/sources +k8s:defaulter-gen=TypeMeta +groupName=sources.eventing.knative.dev
Index ¶
- Constants
- Variables
- func GitHubEventSource(ownerAndRepo string) string
- func GitHubEventType(ghEventType string) string
- func Resource(resource string) schema.GroupResource
- type GitHubSource
- func (in *GitHubSource) DeepCopy() *GitHubSource
- func (in *GitHubSource) DeepCopyInto(out *GitHubSource)
- func (in *GitHubSource) DeepCopyObject() runtime.Object
- func (s *GitHubSource) GetGroupVersionKind() schema.GroupVersionKind
- func (g *GitHubSource) SetDefaults(ctx context.Context)
- func (g *GitHubSource) Validate(ctx context.Context) *apis.FieldError
- type GitHubSourceList
- type GitHubSourceSpec
- type GitHubSourceStatus
- func (in *GitHubSourceStatus) DeepCopy() *GitHubSourceStatus
- func (in *GitHubSourceStatus) DeepCopyInto(out *GitHubSourceStatus)
- func (s *GitHubSourceStatus) GetCondition(t apis.ConditionType) *apis.Condition
- func (s *GitHubSourceStatus) InitializeConditions()
- func (s *GitHubSourceStatus) IsReady() bool
- func (s *GitHubSourceStatus) MarkEventTypes()
- func (s *GitHubSourceStatus) MarkNoEventTypes(reason, messageFormat string, messageA ...interface{})
- func (s *GitHubSourceStatus) MarkNoSecrets(reason, messageFormat string, messageA ...interface{})
- func (s *GitHubSourceStatus) MarkNoSink(reason, messageFormat string, messageA ...interface{})
- func (s *GitHubSourceStatus) MarkSecrets()
- func (s *GitHubSourceStatus) MarkSink(uri string)
- func (s *GitHubSourceStatus) MarkSinkWarnRefDeprecated(uri string)
- type SecretValueFromSource
Constants ¶
const ( // GitHubSourceConditionReady has status True when the // GitHubSource is ready to send events. GitHubSourceConditionReady = apis.ConditionReady // GitHubSourceConditionSecretsProvided has status True when the // GitHubSource has valid secret references GitHubSourceConditionSecretsProvided apis.ConditionType = "SecretsProvided" // GitHubSourceConditionSinkProvided has status True when the // GitHubSource has been configured with a sink target. GitHubSourceConditionSinkProvided apis.ConditionType = "SinkProvided" // GitHubSourceConditionEventTypesProvided has status True when the // GitHubSource has been configured with event types. GitHubSourceConditionEventTypesProvided apis.ConditionType = "EventTypeProvided" // GitHubSourceReconciled has status True when the // GitHubSource has been properly reconciled GitHub )
Variables ¶
var ( // SchemeGroupVersion is group version used to register these objects SchemeGroupVersion = schema.GroupVersion{Group: "sources.eventing.knative.dev", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
func GitHubEventSource ¶
GitHubEventSource returns the GitHub CloudEvent source value.
func GitHubEventType ¶
GitHubEventType returns the GitHub CloudEvent type value.
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type GitHubSource ¶
type GitHubSource struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec GitHubSourceSpec `json:"spec,omitempty"` Status GitHubSourceStatus `json:"status,omitempty"` }
GitHubSource is the Schema for the githubsources API +k8s:openapi-gen=true +kubebuilder:subresource:status +kubebuilder:categories=all,knative,eventing,sources
func (*GitHubSource) DeepCopy ¶
func (in *GitHubSource) DeepCopy() *GitHubSource
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitHubSource.
func (*GitHubSource) DeepCopyInto ¶
func (in *GitHubSource) DeepCopyInto(out *GitHubSource)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GitHubSource) DeepCopyObject ¶
func (in *GitHubSource) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*GitHubSource) GetGroupVersionKind ¶ added in v0.11.0
func (s *GitHubSource) GetGroupVersionKind() schema.GroupVersionKind
func (*GitHubSource) SetDefaults ¶ added in v0.12.0
func (g *GitHubSource) SetDefaults(ctx context.Context)
func (*GitHubSource) Validate ¶ added in v0.12.0
func (g *GitHubSource) Validate(ctx context.Context) *apis.FieldError
type GitHubSourceList ¶
type GitHubSourceList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []GitHubSource `json:"items"` }
GitHubSourceList contains a list of GitHubSource
func (*GitHubSourceList) DeepCopy ¶
func (in *GitHubSourceList) DeepCopy() *GitHubSourceList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitHubSourceList.
func (*GitHubSourceList) DeepCopyInto ¶
func (in *GitHubSourceList) DeepCopyInto(out *GitHubSourceList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GitHubSourceList) DeepCopyObject ¶
func (in *GitHubSourceList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type GitHubSourceSpec ¶
type GitHubSourceSpec struct { // 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 GitHubSource exists. // +optional ServiceAccountName string `json:"serviceAccountName,omitempty"` // OwnerAndRepository is the GitHub owner/org and repository to // receive events from. The repository may be left off to receive // events from an entire organization. // Examples: // myuser/project // myorganization // +kubebuilder:validation:MinLength=1 OwnerAndRepository string `json:"ownerAndRepository"` // EventType is the type of event to receive from GitHub. These // correspond to the "Webhook event name" values listed at // https://developer.github.com/v3/activity/events/types/ - ie // "pull_request" // +kubebuilder:validation:MinItems=1 // +kubebuilder:validation:Enum=check_suite,commit_comment,create,delete,deployment,deployment_status,fork,gollum,installation,integration_installation,issue_comment,issues,label,member,membership,milestone,organization,org_block,page_build,ping,project_card,project_column,project,public,pull_request,pull_request_review,pull_request_review_comment,push,release,repository,status,team,team_add,watch EventTypes []string `json:"eventTypes"` // AccessToken is the Kubernetes secret containing the GitHub // access token AccessToken SecretValueFromSource `json:"accessToken"` // SecretToken is the Kubernetes secret containing the GitHub // secret token SecretToken SecretValueFromSource `json:"secretToken"` // Sink is a reference to an object that will resolve to a domain // name to use as the sink. // +optional Sink *duckv1beta1.Destination `json:"sink,omitempty"` // API URL if using github enterprise (default https://api.github.com) // +optional GitHubAPIURL string `json:"githubAPIURL,omitempty"` // Secure can be set to true to configure the webhook to use https. // +optional Secure bool `json:"secure,omitempty"` }
GitHubSourceSpec defines the desired state of GitHubSource +kubebuilder:categories=all,knative,eventing,sources
func (*GitHubSourceSpec) DeepCopy ¶
func (in *GitHubSourceSpec) DeepCopy() *GitHubSourceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitHubSourceSpec.
func (*GitHubSourceSpec) DeepCopyInto ¶
func (in *GitHubSourceSpec) DeepCopyInto(out *GitHubSourceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GitHubSourceSpec) SetDefaults ¶ added in v0.12.0
func (gs *GitHubSourceSpec) SetDefaults(ctx context.Context)
func (*GitHubSourceSpec) Validate ¶ added in v0.12.0
func (gs *GitHubSourceSpec) Validate(ctx context.Context) *apis.FieldError
type GitHubSourceStatus ¶
type GitHubSourceStatus struct { // inherits duck/v1alpha1 Status, 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. duckv1.Status `json:",inline"` // WebhookIDKey is the ID of the webhook registered with GitHub WebhookIDKey string `json:"webhookIDKey,omitempty"` // SinkURI is the current active sink URI that has been configured // for the GitHubSource. // +optional SinkURI string `json:"sinkUri,omitempty"` }
GitHubSourceStatus defines the observed state of GitHubSource
func (*GitHubSourceStatus) DeepCopy ¶
func (in *GitHubSourceStatus) DeepCopy() *GitHubSourceStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitHubSourceStatus.
func (*GitHubSourceStatus) DeepCopyInto ¶
func (in *GitHubSourceStatus) DeepCopyInto(out *GitHubSourceStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GitHubSourceStatus) GetCondition ¶
func (s *GitHubSourceStatus) GetCondition(t apis.ConditionType) *apis.Condition
GetCondition returns the condition currently associated with the given type, or nil.
func (*GitHubSourceStatus) InitializeConditions ¶
func (s *GitHubSourceStatus) InitializeConditions()
InitializeConditions sets relevant unset conditions to Unknown state.
func (*GitHubSourceStatus) IsReady ¶
func (s *GitHubSourceStatus) IsReady() bool
IsReady returns true if the resource is ready overall.
func (*GitHubSourceStatus) MarkEventTypes ¶
func (s *GitHubSourceStatus) MarkEventTypes()
MarkEventTypes sets the condition that the source has set its event types.
func (*GitHubSourceStatus) MarkNoEventTypes ¶
func (s *GitHubSourceStatus) MarkNoEventTypes(reason, messageFormat string, messageA ...interface{})
MarkNoEventTypes sets the condition that the source does not its event types configured.
func (*GitHubSourceStatus) MarkNoSecrets ¶
func (s *GitHubSourceStatus) MarkNoSecrets(reason, messageFormat string, messageA ...interface{})
MarkNoSecrets sets the condition that the source does not have a valid spec
func (*GitHubSourceStatus) MarkNoSink ¶
func (s *GitHubSourceStatus) MarkNoSink(reason, messageFormat string, messageA ...interface{})
MarkNoSink sets the condition that the source does not have a sink configured.
func (*GitHubSourceStatus) MarkSecrets ¶
func (s *GitHubSourceStatus) MarkSecrets()
MarkSecrets sets the condition that the source has a valid spec
func (*GitHubSourceStatus) MarkSink ¶
func (s *GitHubSourceStatus) MarkSink(uri string)
MarkSink sets the condition that the source has a sink configured.
func (*GitHubSourceStatus) MarkSinkWarnRefDeprecated ¶ added in v0.11.0
func (s *GitHubSourceStatus) MarkSinkWarnRefDeprecated(uri string)
MarkSinkWarnDeprecated sets the condition that the source has a sink configured and warns ref is deprecated.
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.