releasemaxhistory

package
v4.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name = "releasemaxhistory"
)

Variables

This section is empty.

Functions

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

Types

type Config

type Config struct {
	// Dependencies.
	HelmClients *clientpair.ClientPair
	K8sClient   kubernetes.Interface
	Logger      micrologger.Logger
}

type Resource

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

func New

func New(config Config) (*Resource, error)

New creates a new configured releasemaxhistory resource.

func (*Resource) EnsureCreated

func (r *Resource) EnsureCreated(ctx context.Context, obj interface{}) error

EnsureCreated checks if the helm release has failed the max number of attempts. If so we delete the oldest revision if it is over 1 minute old. So we still retry the update but at a reduced rate. This is needed because the max history setting for Helm update does not count failures.

func (*Resource) EnsureDeleted

func (r *Resource) EnsureDeleted(ctx context.Context, obj interface{}) error

EnsureDeleted is a no-op.

func (Resource) Name

func (r Resource) Name() string

Jump to

Keyboard shortcuts

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