Help us shape the future of Go! Take the 2026 Go Developer Survey

bootstrap

package
v0.34.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2025 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bootstrapper

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

func New

func New(config *Config) (*Bootstrapper, error)

New creates a new bootstrapper

func (*Bootstrapper) Run

func (b *Bootstrapper) Run(ctx context.Context) error

Run executes the bootstrap process

type Config

type Config struct {
	// Namespace is the target namespace for Triggers resources
	Namespace string

	// Provider is the Git provider (currently only "github" is supported)
	Provider string

	// InstallDeps tells whether to install Tekton Pipelines
	InstallDeps bool

	// CreateExamples tells whether to create example resources
	CreateExamples bool

	// Kubernetes client configuration
	KubeConfig *rest.Config

	// configuration
	GitHubRepo    string // GitHub repo (owner/repo)
	GitHubToken   string // GitHub PAT
	PublicDomain  string // Public domain for webhooks
	WebhookSecret string // Webhook secret
}

type GitHubManager

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

func NewGitHubManager

func NewGitHubManager(config *Config) *GitHubManager

func (*GitHubManager) GetWebhookSecret

func (g *GitHubManager) GetWebhookSecret() string

GetWebhookSecret returns the webhook secret for storing in Kubernetes

func (*GitHubManager) SetupWebhook

func (g *GitHubManager) SetupWebhook(ctx context.Context) error

SetupWebhook creates a GitHub webhook for the repository

type Installer

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

func NewInstaller

func NewInstaller(kubeClient kubernetes.Interface, config *Config) *Installer

func (*Installer) InstallTektonPipelines

func (i *Installer) InstallTektonPipelines(ctx context.Context) error

InstallTektonPipelines installs Tekton Pipelines if requested and not present

func (*Installer) InstallTriggers

func (i *Installer) InstallTriggers(ctx context.Context) error

InstallTriggers installs Tekton Triggers CRDs and controllers

type RBACManager

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

func NewRBACManager

func NewRBACManager(kubeClient kubernetes.Interface, config *Config) *RBACManager

func (*RBACManager) CreateNamespace

func (r *RBACManager) CreateNamespace(ctx context.Context) error

CreateNamespace creates the target namespace if it doesn't exist

func (*RBACManager) CreateWebhookSecret

func (r *RBACManager) CreateWebhookSecret(ctx context.Context, webhookSecret string) error

CreateWebhookSecret creates a Kubernetes secret for webhook authentication

func (*RBACManager) SetupRBAC

func (r *RBACManager) SetupRBAC(ctx context.Context) error

SetupRBAC creates necessary service accounts, roles, and bindings

type TemplateData

type TemplateData struct {
	Namespace      string
	Name           string
	ServiceAccount string
	Provider       string
}

type TemplatesManager

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

TemplatesManager handles creation of Trigger templates and resources

func NewTemplatesManager

func NewTemplatesManager(triggersClient triggersclientset.Interface, config *Config) *TemplatesManager

NewTemplatesManager creates a new templates manager

func (*TemplatesManager) CreateExamples

func (t *TemplatesManager) CreateExamples(ctx context.Context) error

CreateExamples creates the Pipeline from getting-started docs

func (*TemplatesManager) CreateTriggerResources

func (t *TemplatesManager) CreateTriggerResources(ctx context.Context) error

CreateTriggerResources creates Trigger resources from getting-started docs

type WebhookConfig

type WebhookConfig struct {
	URL         string `json:"url"`
	ContentType string `json:"content_type"`
	Secret      string `json:"secret,omitempty"`
	InsecureSSL string `json:"insecure_ssl"`
}

WebhookConfig represents webhook configuration

type WebhookPayload

type WebhookPayload struct {
	Name   string        `json:"name"`
	Config WebhookConfig `json:"config"`
	Events []string      `json:"events"`
	Active bool          `json:"active"`
}

WebhookPayload represents the GitHub webhook payload

Jump to

Keyboard shortcuts

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