pkg

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ImageRegex is the default regex, that is used to split one big helm template to multiple templates.
	// Splitting templates eases the task of  identifying Kubernetes objects.
	ImageRegex = `---\n# Source:\s.*.`
)

Variables

This section is empty.

Functions

func Contains added in v0.1.0

func Contains(slice []string, image string) bool

func FilteredImages added in v0.1.0

func FilteredImages(images, registries []string) []string

func GetImagesFromKind added in v0.1.0

func GetImagesFromKind(kinds []*k8s.Image) []string

GetImagesFromKind returns list of images from array of k8s.Image.

func GetLoglevel added in v0.0.7

func GetLoglevel(level string) log.Level

GetLoglevel sets the loglevel to the kind of log asked for.

func GetUniqEntries added in v0.1.0

func GetUniqEntries(slice []string) []string

Types

type Images

type Images struct {
	Registries   []string   `json:"registries,omitempty"    yaml:"registries,omitempty"`
	Kind         []string   `json:"kind,omitempty"          yaml:"kind,omitempty"`
	Values       []string   `json:"values,omitempty"        yaml:"values,omitempty"`
	StringValues []string   `json:"string_values,omitempty" yaml:"string_values,omitempty"`
	FileValues   []string   `json:"file_values,omitempty"   yaml:"file_values,omitempty"`
	ShowOnly     []string   `json:"show_only,omitempty"     yaml:"show_only,omitempty"`
	Skip         []string   `json:"skip,omitempty"          yaml:"skip,omitempty"`
	Version      string     `json:"version,omitempty"       yaml:"version,omitempty"`
	ImageRegex   string     `json:"image_regex,omitempty"   yaml:"image_regex,omitempty"`
	ValueFiles   ValueFiles `json:"value_files,omitempty"   yaml:"value_files,omitempty"`
	LogLevel     string     `json:"log_level,omitempty"     yaml:"log_level,omitempty"`
	OutputFormat string     `json:"output_format,omitempty" yaml:"output_format,omitempty"`
	SkipTests    bool       `json:"skip_tests,omitempty"    yaml:"skip_tests,omitempty"`
	SkipCRDS     bool       `json:"skip_crds,omitempty"     yaml:"skip_crds,omitempty"`
	FromRelease  bool       `json:"from_release,omitempty"  yaml:"from_release,omitempty"`
	UniqueImages bool       `json:"unique_images,omitempty" yaml:"unique_images,omitempty"`
	NoColor      bool       `json:"no_color,omitempty"      yaml:"no_color,omitempty"`
	Validate     bool       `json:"validate,omitempty"      yaml:"validate,omitempty"`
	// contains filtered or unexported fields
}

Images represents GetImages.

func (*Images) FilterImagesByRegistries added in v0.1.0

func (image *Images) FilterImagesByRegistries(images []*k8s.Image) []*k8s.Image

FilterImagesByRegistries filters images those are part of registries list passed.

func (*Images) GetChart added in v0.1.0

func (image *Images) GetChart() string

GetChart returns the chart set under Images.

func (*Images) GetImage added in v0.1.4

func (image *Images) GetImage(currentKind, kubeKindTemplate string) ([]*k8s.Image, error)

GetImage returns []*k8s.Image from the kubernetes manifests.

func (*Images) GetImages

func (image *Images) GetImages() error

GetImages fetches all available images from the specified chart. Also filters identified images, to get just unique ones.

func (*Images) GetRelease added in v0.1.0

func (image *Images) GetRelease() string

GetRelease returns the release set under Images.

func (*Images) GetResourcesToSkip added in v0.1.4

func (image *Images) GetResourcesToSkip() []Skip

GetResourcesToSkip returns the skip from translating the flags.

func (*Images) GetTemplates added in v0.1.0

func (image *Images) GetTemplates(template []byte) []string

GetTemplates returns the split manifests fetched from one big template string fetched from `helm template`.

func (*Images) SetChart added in v0.0.7

func (image *Images) SetChart(chart string)

SetChart sets chart passed.

func (*Images) SetLogger added in v0.0.7

func (image *Images) SetLogger(logLevel string)

SetLogger sets logger to the Images.

func (*Images) SetOutputFormats added in v0.1.2

func (image *Images) SetOutputFormats()

func (*Images) SetRelease added in v0.0.7

func (image *Images) SetRelease(release string)

SetRelease sets release passed.

func (*Images) SetRenderer added in v0.1.2

func (image *Images) SetRenderer()

SetRenderer sets renderer to Images.

type Skip added in v0.1.4

type Skip struct {
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
	Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
}

type ValueFiles

type ValueFiles []string

func (*ValueFiles) Set

func (v *ValueFiles) Set(value string) error

func (*ValueFiles) String

func (v *ValueFiles) String() string

func (*ValueFiles) Type

func (v *ValueFiles) Type() string

func (*ValueFiles) Valid

func (v *ValueFiles) Valid() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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