controllers

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2020 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitRepositoryReconciler

type GitRepositoryReconciler struct {
	client.Client
	Log                   logr.Logger
	Scheme                *runtime.Scheme
	Storage               *Storage
	EventRecorder         kuberecorder.EventRecorder
	ExternalEventRecorder *recorder.EventRecorder
}

GitRepositoryReconciler reconciles a GitRepository object

func (*GitRepositoryReconciler) Reconcile

func (r *GitRepositoryReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error)

func (*GitRepositoryReconciler) SetupWithManager

func (r *GitRepositoryReconciler) SetupWithManager(mgr ctrl.Manager) error

func (*GitRepositoryReconciler) SetupWithManagerAndOptions

func (r *GitRepositoryReconciler) SetupWithManagerAndOptions(mgr ctrl.Manager, opts GitRepositoryReconcilerOptions) error

type GitRepositoryReconcilerOptions

type GitRepositoryReconcilerOptions struct {
	MaxConcurrentReconciles int
}

type HelmChartReconciler

type HelmChartReconciler struct {
	client.Client
	Log                   logr.Logger
	Scheme                *runtime.Scheme
	Storage               *Storage
	Getters               getter.Providers
	EventRecorder         kuberecorder.EventRecorder
	ExternalEventRecorder *recorder.EventRecorder
}

HelmChartReconciler reconciles a HelmChart object

func (*HelmChartReconciler) Reconcile

func (r *HelmChartReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error)

func (*HelmChartReconciler) SetupWithManager

func (r *HelmChartReconciler) SetupWithManager(mgr ctrl.Manager) error

func (*HelmChartReconciler) SetupWithManagerAndOptions

func (r *HelmChartReconciler) SetupWithManagerAndOptions(mgr ctrl.Manager, opts HelmChartReconcilerOptions) error

type HelmChartReconcilerOptions

type HelmChartReconcilerOptions struct {
	MaxConcurrentReconciles int
}

type HelmRepositoryReconciler

type HelmRepositoryReconciler struct {
	client.Client
	Log                   logr.Logger
	Scheme                *runtime.Scheme
	Storage               *Storage
	Getters               getter.Providers
	EventRecorder         kuberecorder.EventRecorder
	ExternalEventRecorder *recorder.EventRecorder
}

HelmRepositoryReconciler reconciles a HelmRepository object

func (*HelmRepositoryReconciler) Reconcile

func (r *HelmRepositoryReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error)

func (*HelmRepositoryReconciler) SetupWithManager

func (r *HelmRepositoryReconciler) SetupWithManager(mgr ctrl.Manager) error

func (*HelmRepositoryReconciler) SetupWithManagerAndOptions

func (r *HelmRepositoryReconciler) SetupWithManagerAndOptions(mgr ctrl.Manager, opts HelmRepositoryReconcilerOptions) error

type HelmRepositoryReconcilerOptions

type HelmRepositoryReconcilerOptions struct {
	MaxConcurrentReconciles int
}

type SourceChangePredicate

type SourceChangePredicate struct {
	predicate.Funcs
}

func (SourceChangePredicate) Update

Update implements the default UpdateEvent filter for validating source changes.

type Storage

type Storage struct {
	// BasePath is the local directory path where the source artifacts are stored.
	BasePath string `json:"basePath"`

	// Hostname is the file server host name used to compose the artifacts URIs.
	Hostname string `json:"hostname"`

	// Timeout for artifacts operations
	Timeout time.Duration `json:"timeout"`
}

Storage manages artifacts

func NewStorage

func NewStorage(basePath string, hostname string, timeout time.Duration) (*Storage, error)

NewStorage creates the storage helper for a given path and hostname

func (*Storage) Archive

func (s *Storage) Archive(artifact sourcev1.Artifact, dir string, spec sourcev1.GitRepositorySpec) error

Archive creates a tar.gz to the artifact path from the given dir excluding any VCS specific files and directories, or any of the excludes defined in the excludeFiles.

func (*Storage) ArtifactExist

func (s *Storage) ArtifactExist(artifact sourcev1.Artifact) bool

ArtifactExist returns a boolean indicating whether the artifact exists in storage and is a regular file.

func (*Storage) ArtifactFor

func (s *Storage) ArtifactFor(kind string, metadata metav1.Object, fileName, revision string) sourcev1.Artifact

ArtifactFor returns an artifact for the given Kubernetes object

func (*Storage) Checksum

func (s *Storage) Checksum(b []byte) string

Checksum returns the SHA1 checksum for the given bytes as a string

func (*Storage) Lock

func (s *Storage) Lock(artifact sourcev1.Artifact) (unlock func(), err error)

Lock creates a file lock for the given artifact

func (*Storage) MkdirAll

func (s *Storage) MkdirAll(artifact sourcev1.Artifact) error

MkdirAll calls os.MkdirAll for the given artifact base dir

func (*Storage) RemoveAll

func (s *Storage) RemoveAll(artifact sourcev1.Artifact) error

RemoveAll calls os.RemoveAll for the given artifact base dir

func (*Storage) RemoveAllButCurrent

func (s *Storage) RemoveAllButCurrent(artifact sourcev1.Artifact) error

RemoveAllButCurrent removes all files for the given artifact base dir excluding the current one

func (s *Storage) Symlink(artifact sourcev1.Artifact, linkName string) (string, error)

Symlink creates or updates a symbolic link for the given artifact and returns the URL for the symlink

func (*Storage) WriteFile

func (s *Storage) WriteFile(artifact sourcev1.Artifact, data []byte) error

WriteFile writes the given bytes to the artifact path if the checksum differs

Jump to

Keyboard shortcuts

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