maintenance

package
v4.77.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetReleaseVersion added in v4.46.0

func SetReleaseVersion(ctx context.Context, version string, desiredValues map[string]interface{}, observedValues map[string]interface{}, fields []string) (string, error)

SetReleaseVersion sets the version from the claim if it's a new instance otherwise it is managed by maintenance function It will return the concrete observed version as well.

Types

type ExtraResource

type ExtraResource struct {
	Name     string
	Resource client.Object
	Refs     []xkubev1.Reference
}

ExtraResource is an extra resource to be added to the desired state of a Crossplane Function IO

type Maintenance

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

Maintenance contains data for maintenance k8s resource generation

func New

func New(r client.Object, svc *runtime.ServiceRuntime, schedule vshnv1.VSHNDBaaSMaintenanceScheduleSpec, instanceNamespace, service string) *Maintenance

New creates a Maintenance object with required attributes

func (*Maintenance) Run

func (m *Maintenance) Run(ctx context.Context) *xfnproto.Result

Run generates k8s resources for maintenance

func (*Maintenance) WithExtraEnvs

func (m *Maintenance) WithExtraEnvs(extraEnvs ...corev1.EnvVar) *Maintenance

WithExtraEnvs adds extra environment variables to the cron job

func (*Maintenance) WithExtraResources

func (m *Maintenance) WithExtraResources(extraResources ...ExtraResource) *Maintenance

WithExtraResources adds extra resources to the desired composition function

func (*Maintenance) WithHelmBasedService

func (m *Maintenance) WithHelmBasedService() *Maintenance

WithHelmBasedService adds extra environment variables to the cron job

func (*Maintenance) WithPolicyRules

func (m *Maintenance) WithPolicyRules(policyRules []rbacv1.PolicyRule) *Maintenance

WithPolicyRules sets the policy rules for the role

func (*Maintenance) WithRegistryAuth added in v4.57.0

func (m *Maintenance) WithRegistryAuth(username, password string) *Maintenance

func (*Maintenance) WithRole

func (m *Maintenance) WithRole(role string) *Maintenance

WithRole adds namespaced RBAC rules

Jump to

Keyboard shortcuts

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