controllers

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2020 License: Apache-2.0 Imports: 53 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BucketReconciler added in v0.0.17

type BucketReconciler struct {
	client.Client
	Log                   logr.Logger
	Scheme                *runtime.Scheme
	Storage               *Storage
	EventRecorder         kuberecorder.EventRecorder
	ExternalEventRecorder *events.Recorder
	MetricsRecorder       *metrics.Recorder
}

BucketReconciler reconciles a Bucket object

func (*BucketReconciler) Reconcile added in v0.0.17

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

func (*BucketReconciler) SetupWithManager added in v0.0.17

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

func (*BucketReconciler) SetupWithManagerAndOptions added in v0.0.17

func (r *BucketReconciler) SetupWithManagerAndOptions(mgr ctrl.Manager, opts BucketReconcilerOptions) error

type BucketReconcilerOptions added in v0.0.17

type BucketReconcilerOptions struct {
	MaxConcurrentReconciles int
}

type GitRepositoryReconciler

type GitRepositoryReconciler struct {
	client.Client
	Log                   logr.Logger
	Scheme                *runtime.Scheme
	Storage               *Storage
	EventRecorder         kuberecorder.EventRecorder
	ExternalEventRecorder *events.Recorder
	MetricsRecorder       *metrics.Recorder
}

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 *events.Recorder
	MetricsRecorder       *metrics.Recorder
}

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 *events.Recorder
	MetricsRecorder       *metrics.Recorder
}

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 SourceRevisionChangePredicate added in v0.4.0

type SourceRevisionChangePredicate struct {
	predicate.Funcs
}

func (SourceRevisionChangePredicate) Create added in v0.4.0

func (SourceRevisionChangePredicate) Delete added in v0.4.0

func (SourceRevisionChangePredicate) Update added in v0.4.0

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, ignore *string) (err error)

Archive atomically archives the given directory as a tarball to the given v1beta1.Artifact path, excluding any VCS specific files and directories, or any of the excludes defined in the excludeFiles. If successful, it sets the checksum and last update time on the artifact.

func (*Storage) ArtifactExist

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

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

func (*Storage) AtomicWriteFile added in v0.0.15

func (s *Storage) AtomicWriteFile(artifact *sourcev1.Artifact, reader io.Reader, mode os.FileMode) (err error)

AtomicWriteFile atomically writes the io.Reader contents to the v1beta1.Artifact path. If successful, it sets the checksum and last update time on the artifact.

func (*Storage) Checksum

func (s *Storage) Checksum(reader io.Reader) string

Checksum returns the SHA1 checksum for the data of the given io.Reader as a string.

func (*Storage) Copy added in v0.0.15

func (s *Storage) Copy(artifact *sourcev1.Artifact, reader io.Reader) (err error)

Copy atomically copies the io.Reader contents to the v1beta1.Artifact path. If successful, it sets the checksum and last update time on the artifact.

func (*Storage) CopyFromPath added in v0.0.18

func (s *Storage) CopyFromPath(artifact *sourcev1.Artifact, path string) (err error)

CopyFromPath atomically copies the contents of the given path to the path of the v1beta1.Artifact. If successful, the checksum and last update time on the artifact is set.

func (*Storage) LocalPath added in v0.0.15

func (s *Storage) LocalPath(artifact sourcev1.Artifact) string

LocalPath returns the local path of the given artifact (that is: relative to the Storage.BasePath).

func (*Storage) Lock

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

Lock creates a file lock for the given v1beta1.Artifact.

func (*Storage) MkdirAll

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

MkdirAll calls os.MkdirAll for the given v1beta1.Artifact base dir.

func (*Storage) NewArtifactFor added in v0.0.15

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

NewArtifactFor returns a new v1beta1.Artifact.

func (*Storage) RemoveAll

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

RemoveAll calls os.RemoveAll for the given v1beta1.Artifact base dir.

func (*Storage) RemoveAllButCurrent

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

RemoveAllButCurrent removes all files for the given v1beta1.Artifact base dir, excluding the current one.

func (Storage) SetArtifactURL added in v0.0.15

func (s Storage) SetArtifactURL(artifact *sourcev1.Artifact)

SetArtifactURL sets the URL on the given v1beta1.Artifact.

func (Storage) SetHostname added in v0.0.15

func (s Storage) SetHostname(URL string) string

SetHostname sets the hostname of the given URL string to the current Storage.Hostname and returns the result.

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

Symlink creates or updates a symbolic link for the given v1beta1.Artifact and returns the URL for the symlink.

Jump to

Keyboard shortcuts

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