cluster

package
v3.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package cluster intercepts write activity to Cluster objects.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

func IsNotAllowed

func IsNotAllowed(err error) bool

IsNotAllowed asserts notAllowedError.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound asserts notFoundError.

func IsParsingFailed

func IsParsingFailed(err error) bool

IsParsingFailed asserts parsingFailedError.

func UpgradeScheduleTimeIsValid added in v3.3.0

func UpgradeScheduleTimeIsValid(updateTime string) bool

Types

type Config

type Config struct {
	K8sClient k8sclient.Interface
	Logger    micrologger.Logger
}

type Mutator

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

Mutator for Cluster object.

func NewMutator

func NewMutator(config config.Config) (*Mutator, error)

func (*Mutator) Log

func (m *Mutator) Log(keyVals ...interface{})

func (*Mutator) Mutate

Mutate is the function executed for every matching webhook request.

func (*Mutator) MutateCreate

func (m *Mutator) MutateCreate(request *admissionv1.AdmissionRequest) ([]mutator.PatchOperation, error)

MutateCreate is the function executed for every create webhook request.

func (*Mutator) MutateInfraRef

func (m *Mutator) MutateInfraRef(cluster capiv1alpha3.Cluster, releaseVersion *semver.Version) ([]mutator.PatchOperation, error)

func (*Mutator) MutateOperatorVersion

func (m *Mutator) MutateOperatorVersion(cluster capiv1alpha3.Cluster, releaseVersion *semver.Version) ([]mutator.PatchOperation, error)

func (*Mutator) MutateReleaseUpdate

func (m *Mutator) MutateReleaseUpdate(cluster capiv1alpha3.Cluster, oldCluster capiv1alpha3.Cluster) ([]mutator.PatchOperation, error)

func (*Mutator) MutateReleaseVersion

func (m *Mutator) MutateReleaseVersion(cluster capiv1alpha3.Cluster) ([]mutator.PatchOperation, error)

func (*Mutator) MutateUpdate

func (m *Mutator) MutateUpdate(request *admissionv1.AdmissionRequest) ([]mutator.PatchOperation, error)

MutateUpdate is the function executed for every update webhook request.

func (*Mutator) Resource

func (m *Mutator) Resource() string

type Validator

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

func NewValidator

func NewValidator(config config.Config) (*Validator, error)

func (*Validator) ClusterAnnotationUpgradeReleaseIsValid added in v3.3.0

func (v *Validator) ClusterAnnotationUpgradeReleaseIsValid(cluster *capiv1alpha3.Cluster) error

func (*Validator) ClusterAnnotationUpgradeTimeIsValid added in v3.3.0

func (v *Validator) ClusterAnnotationUpgradeTimeIsValid(cluster *capiv1alpha3.Cluster, oldCluster *capiv1alpha3.Cluster) error

func (*Validator) ClusterLabelKeysValid

func (v *Validator) ClusterLabelKeysValid(oldCluster *capiv1alpha3.Cluster, newCluster *capiv1alpha3.Cluster) error

func (*Validator) ClusterLabelValuesValid

func (v *Validator) ClusterLabelValuesValid(oldCluster *capiv1alpha3.Cluster, newCluster *capiv1alpha3.Cluster) error

func (*Validator) ClusterStatusValid

func (v *Validator) ClusterStatusValid(oldCluster *capiv1alpha3.Cluster, newCluster *capiv1alpha3.Cluster) error

func (*Validator) Log

func (v *Validator) Log(keyVals ...interface{})

func (*Validator) ReleaseVersionValid

func (v *Validator) ReleaseVersionValid(oldCluster *capiv1alpha3.Cluster, newCluster *capiv1alpha3.Cluster) error

func (*Validator) Resource

func (v *Validator) Resource() string

func (*Validator) UpgradeScheduleReleaseIsValid added in v3.3.0

func (v *Validator) UpgradeScheduleReleaseIsValid(targetRelease string, currentRelease string) error

func (*Validator) Validate

func (v *Validator) Validate(request *admissionv1.AdmissionRequest) (bool, error)

func (*Validator) ValidateCreate

func (v *Validator) ValidateCreate(request *admissionv1.AdmissionRequest) (bool, error)

func (*Validator) ValidateUpdate

func (v *Validator) ValidateUpdate(request *admissionv1.AdmissionRequest) (bool, error)

Jump to

Keyboard shortcuts

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