deprecatedapis

package
v0.22.2 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DeprecatedAPIUsed occurs when a deprecated resource type version is used
	DeprecatedAPIUsed = "DeprecatedAPIUsed"
)
View Source
const Name = "deprecatedapis"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	CurrentVersion  string `yaml:"currentVersion"`
	TargetedVersion string `yaml:"targetedVersion"`
}

func (*Config) GetCurrentVersion

func (config *Config) GetCurrentVersion() (*Version, error)

func (*Config) GetTargetedVersion

func (config *Config) GetTargetedVersion() (*Version, error)

type DeprecatedAPIs

type DeprecatedAPIs struct {
	CurrentVersion  *Version
	TargetedVersion *Version
}

DeprecatedAPIs implements Auditable

func New

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

func (*DeprecatedAPIs) Audit

func (deprecatedAPIs *DeprecatedAPIs) Audit(resource k8s.Resource, _ []k8s.Resource) ([]*kubeaudit.AuditResult, error)

Audit checks that the resource API version is not deprecated

type Version

type Version struct {
	Major int
	Minor int
}

Jump to

Keyboard shortcuts

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