resources

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2021 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventNormal  = "Normal"
	EventWarning = "Warning"
)

constants for event types. its a bit odd that this isn't already in one of the k8s pkgs

View Source
const (
	ReasonCreatedPersistentVolumeClaim = "CreatedPersistentVolumeClaim"
	ReasonCreatedDeployment            = "CreatedDeployment"
	ReasonCreatedService               = "CreatedService"
	ReasonReadyForConfiguration        = "ReadyForConfiguration"
	ReasonFirstUserCreated             = "FirstUserCreated"
	ReasonConnectedToPortal            = "ConnectedToPortal"
	ReasonCacheGatewayStarted          = "CacheGatewayStarted"
	ReasonExportsConfigured            = "ExportsConfigured"
	ReasonConfiguredSuccessfully       = "ConfiguredSuccessfully"
	ReasonNotRunning                   = "NotRunning"
)

constants for event reasons.

View Source
const (
	// RunDirMountPath is the path for the "run" directory inside the container
	RunDirMountPath = "/run"
	// TmpDirMountPath is the path for the "tmp" directory inside the container
	TmpDirMountPath = "/tmp"
	// CgroupDirLocalPath is the path for the "cgroup" directory on the Host machine
	CgroupDirLocalPath = "/sys/fs/cgroup"
	// CgroupDirMountPath is the path for the "cgroup" directory inside the container
	CgroupDirMountPath = "/sys/fs/cgroup"
)
View Source
const (
	// GatewayUsernameKey is the name of the key to read the username from when reading the secret
	GatewayUsernameKey = "username"
	// GatewayDefaultUsername is the username for the secret
	GatewayDefaultUsername = "admin"
	// GatewayPasswordKey is the name of the key to read the password from when reading the secret
	GatewayPasswordKey = "password"

	// GatewayPasswordLength is the length of the generated password
	GatewayPasswordLength = 16
	// GatewayPasswordNumDigits is the amount of digits in the generated password
	GatewayPasswordNumDigits = 2
	// GatewayPasswordNumSymbols is the amount of symbols in the generated password
	GatewayPasswordNumSymbols = 2
	// GatewayPasswordNoUpper sets whether upper case letters may be used
	GatewayPasswordNoUpper = false
	// GatewayPasswordAllowRepeat sets whether the same charcter may repeat
	GatewayPasswordAllowRepeat = false

	// GatewayJwtSecretKey is the name of the key to read the JWT Token from when reading the secret
	GatewayJwtSecretKey = "jwt_secret"
	// GatewayJwtSecretLength is the length of the generated secret for the JWT encoding
	GatewayJwtSecretLength = 16
	// GatewayJwtSecretNumDigits is the amount of digits in the generated secret for the JWT encoding
	GatewayJwtSecretNumDigits = 2
	// GatewayJwtSecretNumSymbols is the amount of symbols in the generated secret for the JWT encoding
	GatewayJwtSecretNumSymbols = 2
	// GatewayJwtSecretNoUpper sets whether upper case letters may be used in the generated secret for the JWT encoding
	GatewayJwtSecretNoUpper = false
	// GatewayJwtSecretAllowRepeat sets whether the same charcter may repeat in the generated secret for the JWT encoding
	GatewayJwtSecretAllowRepeat = false
)

Variables

View Source
var (
	// Done represents a result that is complete.
	Done = Result{}
	// Requeue is a result that needs to be re-queued.
	Requeue = Result{/* contains filtered or unexported fields */}
)

Functions

This section is empty.

Types

type KubeFilerExportManager

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

KubeFilerExportManager is used to manage KubeFilerExport resources.

func NewKubeFilerExportManager

func NewKubeFilerExportManager(client client.Client, recorder record.EventRecorder, logger Logger) *KubeFilerExportManager

NewKubeFilerExportManager creates a KubeFilerExportManager.

func (*KubeFilerExportManager) Finalize

Finalize should be called when there's a finalizer on the resource and we need to do some cleanup.

func (*KubeFilerExportManager) Process

Process is called by the controller on any type of reconciliation.

func (*KubeFilerExportManager) Update

Update should be called when a KubeFiler resource changes.

type KubeFilerManager

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

KubeFilerManager is used to manage KubeFiler resources.

func NewKubeFilerManager

func NewKubeFilerManager(client client.Client, recorder record.EventRecorder, logger Logger) *KubeFilerManager

NewKubeFilerManager creates a KubeFilerManager.

func (*KubeFilerManager) CanConfigure

func (m *KubeFilerManager) CanConfigure(ctx context.Context, instance *kubefilerv1alpha1.KubeFiler) Result

func (*KubeFilerManager) Configure

func (m *KubeFilerManager) Configure(ctx context.Context, instance *kubefilerv1alpha1.KubeFiler) Result

func (*KubeFilerManager) Deploy

Update should be called when a KubeFiler resource changes.

func (*KubeFilerManager) Finalize

func (m *KubeFilerManager) Finalize(ctx context.Context, instance *kubefilerv1alpha1.KubeFiler) Result

Finalize should be called when there's a finalizer on the resource and we need to do some cleanup.

func (*KubeFilerManager) IsRunning

func (m *KubeFilerManager) IsRunning(ctx context.Context, instance *kubefilerv1alpha1.KubeFiler) Result

func (*KubeFilerManager) Process

func (m *KubeFilerManager) Process(ctx context.Context, nsname types.NamespacedName) Result

Process is called by the controller on any type of reconciliation.

func (*KubeFilerManager) StartDeployment

func (m *KubeFilerManager) StartDeployment(ctx context.Context, instance *kubefilerv1alpha1.KubeFiler) Result

func (*KubeFilerManager) Update

type Logger

type Logger interface {
	Info(string, ...interface{})
	Error(error, string, ...interface{})
}

Logger interfaces are used to provide logging to the resources package.

type Result

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

Result encapsulates the result of the work performed by a resource update.

func (Result) Err

func (r Result) Err() error

Err returns any error associated with the result.

func (Result) Requeue

func (r Result) Requeue() bool

Requeue returns true if a requeue is needed.

Jump to

Keyboard shortcuts

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