v1alpha1

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

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

View Source
const (
	// GitHubSourceConditionReady has status True when the
	// GitHubSource is ready to send events.
	GitHubSourceConditionReady = duckv1alpha1.ConditionReady

	// GitHubSourceConditionSecretsProvided has status True when the
	// GitHubSource has valid secret references
	GitHubSourceConditionSecretsProvided duckv1alpha1.ConditionType = "SecretsProvided"

	// GitHubSourceConditionSinkProvided has status True when the
	// GitHubSource has been configured with a sink target.
	GitHubSourceConditionSinkProvided duckv1alpha1.ConditionType = "SinkProvided"

	// GitHubSourceConditionEventTypesProvided has status True when the
	// GitHubSource has been configured with event types.
	GitHubSourceConditionEventTypesProvided duckv1alpha1.ConditionType = "EventTypeProvided"
)

Variables

View Source
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

func GitHubEventSource(ownerAndRepo string) string

GitHubEventSource returns the GitHub CloudEvent source value.

func GitHubEventType

func GitHubEventType(ghEventType string) string

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.

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 *corev1.ObjectReference `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.

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.
	duckv1alpha1.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

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.

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

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.

Jump to

Keyboard shortcuts

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