v1alpha1

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2020 License: Apache-2.0 Imports: 10 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: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:defaulter-gen=TypeMeta +groupName=sources.knative.dev

Index

Constants

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

	// GitHubSourceConditionWebhookConfigured has a status True when the
	// GitHubSource has been configured with a webhook.
	GitHubSourceConditionWebhookConfigured apis.ConditionType = "WebhookConfigured"

	// GitHubSourceReconciled has status True when the
	// GitHubSource has been properly reconciled
	GitHub
)

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: sources.GroupName, Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)

	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 Kind added in v0.14.0

func Kind(kind string) schema.GroupKind

Kind takes an unqualified kind and returns back a Group qualified GroupKind.

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 *duckv1.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,
	// or false to use http.  Omitting it relies on the scheme of the
	// Knative Service created (e.g. if auto-TLS is enabled it should
	// do the right thing).
	// +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/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"`

	// WebhookIDKey is the ID of the webhook registered with GitHub
	WebhookIDKey string `json:"webhookIDKey,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) 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 *apis.URL)

MarkSink sets the condition that the source has a sink configured.

func (*GitHubSourceStatus) MarkWebhookConfigured added in v0.14.0

func (s *GitHubSourceStatus) MarkWebhookConfigured()

MarkWebhookConfigured sets the condition that the source has set its webhook configured.

func (*GitHubSourceStatus) MarkWebhookNotConfigured added in v0.14.0

func (s *GitHubSourceStatus) MarkWebhookNotConfigured(reason, messageFormat string, messageA ...interface{})

MarkWebhookNotConfigured sets the condition that the source does not have its webhook 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