common

package
v4.34.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2023 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddInitialNamespaceQuotas added in v4.22.0

func AddInitialNamespaceQuotas(namespaceKon string) func(context.Context, *runtime.Runtime) runtime.Result

AddInitialNamespaceQuotas will add the default quotas to a namespace if they are not yet set. This function takes the name of the namespace resource as it appears in the functionIO, it then returns the actual function that implements the composition function step.

func AddSaWithRole

func AddSaWithRole(ctx context.Context, iof *runtime.Runtime, policies []rbacv1.PolicyRule, compName, namespace, suffix string) error

AddSaWithRole creates a service account with the given policy and binds it to the role.

func SetRandomSchedules

func SetRandomSchedules(backup BackupScheduler, maintenance MaintenanceScheduler)

SetRandomSchedules initializes the backup and maintenance schedules if the user did not explicitly provide a schedule. The maintenance will be set to a random time on Tuesday night between 21:00 and 5:00, and the backup schedule will be set to once a day between 20:00 and 4:00. If neither maintenance nor backup is set, the function will make sure that there will be backup scheduled one hour before the maintenance.

Types

type BackupScheduler

type BackupScheduler interface {
	GetBackupSchedule() string
	SetBackupSchedule(string)
}

BackupScheduler can schedule backups

type MaintenanceScheduler

type MaintenanceScheduler interface {
	GetMaintenanceDayOfWeek() string
	SetMaintenanceDayOfWeek(string)
	GetMaintenanceTimeOfDay() string
	SetMaintenanceTimeOfDay(string)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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