kubeinteraction

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2022 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StateStarted   = "started"
	StateQueued    = "queued"
	StateCompleted = "completed"
)

Variables

This section is empty.

Functions

func AddLabelsAndAnnotations

func AddLabelsAndAnnotations(event *info.Event, pipelineRun *tektonv1beta1.PipelineRun, repo *apipac.Repository, providerinfo *info.ProviderConfig)

func GetBasicAuthSecretName

func GetBasicAuthSecretName() string

func PollImmediateWithContext

func PollImmediateWithContext(ctx context.Context, pollTimeout time.Duration, fn func() (bool, error)) error

Types

type GetSecretOpt

type GetSecretOpt struct {
	Namespace string
	Name      string
	Key       string
}

type Interaction

type Interaction struct {
	Run *params.Run
}

func NewKubernetesInteraction

func NewKubernetesInteraction(c *params.Run) (*Interaction, error)

func (Interaction) CleanupPipelines

func (k Interaction) CleanupPipelines(ctx context.Context, logger *zap.SugaredLogger, repo *v1alpha1.Repository, pr *v1beta1.PipelineRun, maxKeep int) error

func (Interaction) CreateBasicAuthSecret

func (k Interaction) CreateBasicAuthSecret(ctx context.Context, logger *zap.SugaredLogger, runevent *info.Event,
	targetNamespace string, secretName string,
) error

CreateBasicAuthSecret Create a secret for git-clone basic-auth workspace

func (Interaction) DeleteBasicAuthSecret

func (k Interaction) DeleteBasicAuthSecret(ctx context.Context, logger *zap.SugaredLogger, targetNamespace, secretName string) error

DeleteBasicAuthSecret deletes the secret created for git-clone basic-auth

func (Interaction) GetSecret

func (k Interaction) GetSecret(ctx context.Context, secretopt GetSecretOpt) (string, error)

type Interface

type Interface interface {
	CleanupPipelines(context.Context, *zap.SugaredLogger, *v1alpha1.Repository, *v1beta1.PipelineRun, int) error
	CreateBasicAuthSecret(context.Context, *zap.SugaredLogger, *info.Event, string, string) error
	DeleteBasicAuthSecret(context.Context, *zap.SugaredLogger, string, string) error
	GetSecret(context.Context, GetSecretOpt) (string, error)
}

Jump to

Keyboard shortcuts

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