controller

package
v2.1.74 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2020 License: Apache-2.0 Imports: 65 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateReportTargetURL

func CreateReportTargetURL(templateText string, params ReportParams) string

CreateReportTargetURL creates the target URL for pipeline results/logs from a template

func DigitSuffix

func DigitSuffix(text string) string

DigitSuffix outputs digital suffix

func NewCmdController

func NewCmdController(commonOpts *opts.CommonOptions) *cobra.Command

NewCmdController creates the edit command

func NewCmdControllerBackup

func NewCmdControllerBackup(commonOpts *opts.CommonOptions) *cobra.Command

NewCmdControllerBackup creates a command object for the generic "get" action, which retrieves one or more resources from a server.

func NewCmdControllerBuild

func NewCmdControllerBuild(commonOpts *opts.CommonOptions) *cobra.Command

NewCmdControllerBuild creates a command object for the generic "get" action, which retrieves one or more resources from a server.

func NewCmdControllerBuildNumbers

func NewCmdControllerBuildNumbers(commonOpts *opts.CommonOptions) *cobra.Command

NewCmdControllerBuildNumbers builds a new command to serving build numbers over an HTTP interface.

func NewCmdControllerCommitStatus

func NewCmdControllerCommitStatus(commonOpts *opts.CommonOptions) *cobra.Command

NewCmdControllerCommitStatus creates a command object for the "create" command

func NewCmdControllerEnvironment

func NewCmdControllerEnvironment(commonOpts *opts.CommonOptions) *cobra.Command

NewCmdControllerEnvironment creates the command

func NewCmdControllerRole

func NewCmdControllerRole(commonOpts *opts.CommonOptions) *cobra.Command

func NewCmdControllerTeam

func NewCmdControllerTeam(commonOpts *opts.CommonOptions) *cobra.Command

NewCmdControllerTeam creates a command object for the generic "get" action, which retrieves one or more resources from a server.

func PayloadSignature

func PayloadSignature(payload []byte, key []byte) string

PayloadSignature returns the signature that matches the payload.

func ValidatePayload

func ValidatePayload(payload []byte, sig string, key []byte) bool

ValidatePayload ensures that the request payload signature matches the key.

func ValidateWebhook

func ValidateWebhook(w http.ResponseWriter, r *http.Request, hmacSecret []byte, requireGitHubHeaders bool) (string, string, []byte, bool, int)

ValidateWebhook ensures that the provided request conforms to the format of a Github webhook and the payload can be validated with the provided hmac secret. It returns the event type, the event guid, the payload of the request, whether the webhook is valid or not, and finally the resultant HTTP status code

Types

type ControllerBackupOptions

type ControllerBackupOptions struct {
	ControllerOptions

	GitRepositoryOptions gits.GitRepositoryOptions

	Namespace    string
	Organisation string
}

ControllerBackupOptions are the flags for the commands

func (*ControllerBackupOptions) Run

func (o *ControllerBackupOptions) Run() error

Run implements this command

type ControllerBuildNumbersOptions

type ControllerBuildNumbersOptions struct {
	*opts.CommonOptions
	BindAddress string
	Port        int
}

ControllerBuildNumbersOptions holds the options for the build number service.

func (*ControllerBuildNumbersOptions) Run

Run will execute this command, starting the HTTP build number generation service with the specified options.

type ControllerBuildOptions

type ControllerBuildOptions struct {
	ControllerOptions

	Namespace           string
	InitGitCredentials  bool
	GitReporting        bool
	TargetURLTemplate   string
	FailIfNoGitProvider bool
	JobURLBase          string

	EnvironmentCache *kube.EnvironmentNamespaceCache

	DryRun bool
	// contains filtered or unexported fields
}

ControllerBuildOptions are the flags for the commands

func (*ControllerBuildOptions) Run

func (o *ControllerBuildOptions) Run() error

Run implements this command

type ControllerCommitStatusOptions

type ControllerCommitStatusOptions struct {
	ControllerOptions
}

ControllerCommitStatusOptions the options for the controller

func (*ControllerCommitStatusOptions) Run

Run implements this command

func (*ControllerCommitStatusOptions) UpsertCommitStatusCheck

func (o *ControllerCommitStatusOptions) UpsertCommitStatusCheck(name string, pipelineActName string, url string, sha string, pullRequest string, context string, phase corev1.PodPhase, jxClient jenkinsv1client.Interface, ns string) error

type ControllerEnvironmentOptions

type ControllerEnvironmentOptions struct {
	*opts.CommonOptions
	BindAddress           string
	Path                  string
	Port                  int
	NoGitCredeentialsInit bool
	NoRegisterWebHook     bool
	RequireHeaders        bool
	GitServerURL          string
	GitOwner              string
	GitRepo               string
	GitKind               string
	SourceURL             string
	WebHookURL            string
	Branch                string
	PushRef               string
	Labels                map[string]string

	StepCreateTaskOptions create.StepCreateTaskOptions
	// contains filtered or unexported fields
}

ControllerEnvironmentOptions holds the command line arguments

func (*ControllerEnvironmentOptions) Run

Run will implement this command

type ControllerOptions

type ControllerOptions struct {
	*opts.CommonOptions
}

ControllerOptions contains the CLI options

func (*ControllerOptions) LoadProwOAuthConfig

func (o *ControllerOptions) LoadProwOAuthConfig(ns string) (string, error)

LoadProwOAuthConfig returns the OAuth Token for Prow

func (*ControllerOptions) Run

func (o *ControllerOptions) Run() error

Run implements this command

type ControllerRoleFlags

type ControllerRoleFlags struct {
	Version string
}

type ControllerRoleOptions

type ControllerRoleOptions struct {
	ControllerOptions

	NoWatch bool

	Roles           map[string]*rbacv1.Role
	EnvRoleBindings map[string]*v1.EnvironmentRoleBinding
	TeamNs          string
}

ControllerRoleOptions the command line options

func (*ControllerRoleOptions) Run

func (o *ControllerRoleOptions) Run() error

func (*ControllerRoleOptions) UpsertEnvironmentRoleBinding

func (o *ControllerRoleOptions) UpsertEnvironmentRoleBinding(newEnv *v1.EnvironmentRoleBinding) error

UpsertEnvironmentRoleBinding processes an insert/update of the EnvironmentRoleBinding resource its public so that we can make testing easier

func (*ControllerRoleOptions) UpsertRole

func (o *ControllerRoleOptions) UpsertRole(newRole *rbacv1.Role) error

UpsertRole processes the insert/update of a Role this function is public for easier testing

func (*ControllerRoleOptions) WatchEnvironmentRoleBindings

func (o *ControllerRoleOptions) WatchEnvironmentRoleBindings(jxClient versioned.Interface, ns string) error

func (*ControllerRoleOptions) WatchEnvironments

func (o *ControllerRoleOptions) WatchEnvironments(kubeClient kubernetes.Interface, jxClient versioned.Interface, ns string) error

func (*ControllerRoleOptions) WatchRoles

func (o *ControllerRoleOptions) WatchRoles(kubeClient kubernetes.Interface, ns string) error

type ControllerTeamOptions

type ControllerTeamOptions struct {
	ControllerOptions
	create.InstallOptions

	GitRepositoryOptions gits.GitRepositoryOptions
}

ControllerTeamOptions are the flags for the commands

func (*ControllerTeamOptions) Run

func (o *ControllerTeamOptions) Run() error

Run implements this command

type LongTermStorageLogWriter

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

LongTermStorageLogWriter is an implementation of logs.LogWriter that saves the obtained log lines and sends them to a Collector when the channel is closed

func (*LongTermStorageLogWriter) BytesLimit

func (w *LongTermStorageLogWriter) BytesLimit() int

BytesLimit defines the limit of bytes to be used to fetch the logs from the kube API defaulted to 0 for this implementation

func (*LongTermStorageLogWriter) StreamLog

func (w *LongTermStorageLogWriter) StreamLog(lch <-chan logs.LogLine, ech <-chan error) error

StreamLog will receive a logs channel and an errors channel which the logs producer will send it will mask the lines marked as ShouldMask then it will append the line's bytes to the already stored ones

func (*LongTermStorageLogWriter) WriteLog

func (w *LongTermStorageLogWriter) WriteLog(logLine logs.LogLine, lch chan<- logs.LogLine) error

WriteLog will receive a logs.LogLine value and append its bytes to the LongTermStorageLogWriter stored bytes

type ReportParams

type ReportParams struct {
	BaseURL, Owner, Repository, Branch, Build, Context, Namespace string
}

ReportParams contains the parameters for target URL templates

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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