controllers

package
v0.0.0-...-4927335 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DebugLogger *logrus.Logger

Functions

This section is empty.

Types

type BucketReconciler

type BucketReconciler struct {
	client.Client
	Scheme *runtime.Scheme
}

BucketReconciler reconciles a Bucket object

func (*BucketReconciler) Reconcile

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

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.14.1/pkg/reconcile

func (*BucketReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type ConnectionDetails

type ConnectionDetails struct {
	Endpoint        string
	UseSSL          bool
	AccessKeyID     string
	SecretAccessKey string
	Region          string
	CA              []byte
}

func GetS3ConnectionDetails

func GetS3ConnectionDetails(AccessKeyID string, SecretAccessKey string, Region string, Endpoint string, UseSSL bool) (ConnectionDetails, error)

GetConnectionDetails retrieves s3 details

func (*ConnectionDetails) ValidateS3ConnectionDetails

func (details *ConnectionDetails) ValidateS3ConnectionDetails() error

Validate makes sure the provided S3 settings are valid

type Manager

type Manager struct {
	// contains filtered or unexported fields
}
var S3Manager *Manager

S3 manager

func NewS3Manager

func NewS3Manager(connectionDetails ConnectionDetails) (*Manager, error)

New returns an instance of an s3 manager

func (*Manager) EnsureBucketCreated

func (m *Manager) EnsureBucketCreated(ctx context.Context, bucket *s3v1.Bucket) error

EnsureBucketCreated creates a bucket

func (*Manager) EnsureBucketDeleted

func (m *Manager) EnsureBucketDeleted(ctx context.Context, bucket *s3v1.Bucket) error

EnsureBucketDeleted delete a bucket

Jump to

Keyboard shortcuts

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