googlecloudsourcerepositoriessource

package
v1.22.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2022 License: Apache-2.0 Imports: 37 Imported by: 3

Documentation

Index

Constants

View Source
const (
	// ReasonSubscribed indicates that a source subscribed to change
	// notifications from a Cloud Source Repository.
	ReasonSubscribed = "Subscribed"
	// ReasonUnsubscribed indicates that a source unsubscribed from change
	// notifications from a Cloud Source Repository.
	ReasonUnsubscribed = "Unsubscribed"
	// ReasonFailedSubscribe indicates a failure while synchronizing the
	// notification configuration of a Cloud Source Repository, or the
	// Pub/Sub subscription it depends on.
	ReasonFailedSubscribe = "FailedSubscribe"
	// ReasonFailedUnsubscribe indicates a failure while deleting the
	// notification configuration of a Cloud Source Repository, or the
	// Pub/Sub subscription it depends on.
	ReasonFailedUnsubscribe = "FailedUnsubscribe"
)

Variables

This section is empty.

Functions

func EnsureNoPubSub added in v1.22.0

func EnsureNoPubSub(ctx context.Context, cli *pubsub.Client) error

EnsureNoPubSub ensures the Pub/Sub topic and associated subscription used for receiving change notifications from a Cloud Source Repositories resource are deleted.

func EnsureNoTopicAssociated added in v1.22.0

func EnsureNoTopicAssociated(ctx context.Context, cli *gsourcerepo.Service) error

EnsureNoTopicAssociated looks at status.Repositories and if non-empty will delete it Required permissions: - source.repos.updateRepoConfig - iam.serviceAccounts.actAs

func EnsurePubSub added in v1.22.0

func EnsurePubSub(ctx context.Context, cli *pubsub.Client) (*v1alpha1.GCloudResourceName, error)

EnsurePubSub ensures the existence of a Pub/Sub topic and associated subscription for receiving change notifications from a Cloud Source Repositories resource.

func EnsureTopicAssociated added in v1.22.0

func EnsureTopicAssociated(ctx context.Context, cli *gsourcerepo.Service,
	topicResName *v1alpha1.GCloudResourceName, publishServiceAccount string) error

EnsureTopicAssociated ensures that the Repo has the topic associated. Required permissions: - source.repos.updateRepoConfig - iam.serviceAccounts.actAs

func MakeAppEnv added in v1.21.0

MakeAppEnv extracts environment variables from the object. Exported to be used in external tools for local test environments.

func NewController

func NewController(
	ctx context.Context,
	cmw configmap.Watcher,
) *controller.Impl

NewController creates a Reconciler for the event source and returns the result of NewImpl.

Types

type Reconciler

type Reconciler struct {
	// contains filtered or unexported fields
}

Reconciler implements controller.Reconciler for the event source type.

func (*Reconciler) BuildAdapter

func (r *Reconciler) BuildAdapter(src commonv1alpha1.Reconcilable, sinkURI *apis.URL) (*appsv1.Deployment, error)

BuildAdapter implements common.AdapterBuilder.

func (*Reconciler) FinalizeKind

FinalizeKind is called when the resource is deleted.

func (*Reconciler) ReconcileKind

ReconcileKind implements Interface.ReconcileKind.

Jump to

Keyboard shortcuts

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