v1alpha1

package
v0.17.6 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2020 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/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-contrib/gitlab/pkg/apis/sources +k8s:defaulter-gen=TypeMeta +groupName=sources.knative.dev

Index

Constants

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

	// GitLabSourceConditionSecretProvided has status True when the
	// GitlabSource can read secret with gitlab tokens.
	GitLabSourceConditionSecretProvided apis.ConditionType = "SecretProvided"
)

Variables

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

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 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 +k8s:openapi-gen=true +kubebuilder:subresource:status +kubebuilder:categories=all,knative,eventing,sources

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) GetConditionSet added in v0.16.0

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

func (*GitLabSource) GetStatus added in v0.16.0

func (g *GitLabSource) GetStatus() *duckv1.Status

GetStatus retrieves the duck status for this resource. Implements the KRShaped interface.

func (*GitLabSource) SetDefaults added in v0.15.0

func (g *GitLabSource) SetDefaults(ctx context.Context)

func (*GitLabSource) Validate added in v0.15.0

func (g *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 {
	// 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"`

	// EventType is the type of event to receive from Gitlab. These
	// correspond to supported events to the add project hook
	// https://docs.gitlab.com/ee/api/projects.html#add-project-hook
	// +kubebuilder:validation:MinItems=1
	// +kubebuilder:validation:Enum=push_events,push_events_branch_filter,issues_events,confidential_issues_events,merge_requests_events,tag_push_events,note_events,job_events,pipeline_events,wiki_page_events
	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"`

	// 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"`
}

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

func (gs *GitLabSourceSpec) SetDefaults(ctx context.Context)

func (*GitLabSourceSpec) Validate added in v0.15.0

func (gs *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"`

	// ID of the project hook registered with GitLab
	Id string `json:"Id,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) GetCondition

func (s *GitLabSourceStatus) GetCondition(t apis.ConditionType) *apis.Condition

GetCondition returns the condition currently associated with the given type, or nil.

func (*GitLabSourceStatus) InitializeConditions

func (s *GitLabSourceStatus) InitializeConditions()

InitializeConditions sets relevant unset conditions to Unknown state.

func (*GitLabSourceStatus) IsReady

func (s *GitLabSourceStatus) IsReady() bool

IsReady returns true if the resource is ready overall.

func (*GitLabSourceStatus) MarkNoSecret

func (s *GitLabSourceStatus) MarkNoSecret(reason, messageFormat string, messageA ...interface{})

MarkNoSecret sets the condition that the source does not have a gitlab secret created.

func (*GitLabSourceStatus) MarkNoSink

func (s *GitLabSourceStatus) MarkNoSink(reason, messageFormat string, messageA ...interface{})

MarkNoSink sets the condition that the source does not have a sink configured.

func (*GitLabSourceStatus) MarkSecret

func (s *GitLabSourceStatus) MarkSecret()

MarkSecret sets the condition that the source have a gitlab secret.

func (*GitLabSourceStatus) MarkSink

func (s *GitLabSourceStatus) MarkSink(uri *apis.URL)

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