pkg

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2024 License: MIT Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TemplateRegex 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.
	TemplateRegex = `---\n# Source:\s.*.`
)

Variables

This section is empty.

Functions

func GetLoglevel

func GetLoglevel(level string) log.Level

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

Types

type Drift

type Drift struct {
	ValueFiles           ValueFiles `json:"value_files,omitempty"             yaml:"value_files,omitempty"`
	SkipTests            bool       `json:"skip_tests,omitempty"              yaml:"skip_tests,omitempty"`
	SkipValidation       bool       `json:"skip_validation,omitempty"         yaml:"skip_validation,omitempty"`
	SkipClean            bool       `json:"skip_clean,omitempty"              yaml:"skip_clean,omitempty"`
	FromRelease          bool       `json:"from_release,omitempty"            yaml:"from_release,omitempty"`
	NoColor              bool       `json:"no_color,omitempty"                yaml:"no_color,omitempty"`
	DisableExitWithError bool       `json:"disable_exit_with_error,omitempty" yaml:"disable_exit_with_error,omitempty"`
	All                  bool       `json:"all,omitempty"                     yaml:"all,omitempty"`
	IsDefaultNamespace   bool       `json:"is_default_namespace,omitempty"    yaml:"is_default_namespace,omitempty"`
	ConsiderHooks        bool       `json:"consider_hooks,omitempty"          yaml:"consider_hooks,omitempty"`
	SkipCRDS             bool       `json:"skipCRDS,omitempty"                yaml:"skipCRDS,omitempty"`
	Validate             bool       `json:"validate,omitempty"                yaml:"validate,omitempty"`
	IgnoreHPAChanges     bool       `json:"ignore_hpa_changes,omitempty"      yaml:"ignore_hpa_changes,omitempty"`
	Revision             int        `json:"revision,omitempty"                yaml:"revision,omitempty"`
	Concurrency          int        `json:"concurrency,omitempty"             yaml:"concurrency,omitempty"`
	Limit                int        `json:"limit,omitempty"                   yaml:"limit,omitempty"`
	Kind                 []string   `json:"kind,omitempty"                    yaml:"kind,omitempty"`
	SkipReleases         []string   `json:"skip_releases,omitempty"           yaml:"skip_releases,omitempty"`
	SkipKinds            []string   `json:"skip_kinds,omitempty"              yaml:"skip_kinds,omitempty"`
	IgnoreHookTypes      []string   `json:"ignore_hook_types,omitempty"       yaml:"ignore_hook_types,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"`
	Version              string     `json:"version,omitempty"                 yaml:"version,omitempty"`
	Regex                string     `json:"regex,omitempty"                   yaml:"regex,omitempty"`
	LogLevel             string     `json:"log_level,omitempty"               yaml:"log_level,omitempty"`
	TempPath             string     `json:"temp_path,omitempty"               yaml:"temp_path,omitempty"`
	CustomDiff           string     `json:"custom_diff,omitempty"             yaml:"custom_diff,omitempty"`
	Name                 string     `json:"name,omitempty"                    yaml:"name,omitempty"`
	OutputFormat         string     `json:"output_format,omitempty"           yaml:"output_format,omitempty"`
	// contains filtered or unexported fields
}

Drift represents GetDrift.

func (*Drift) Diff

func (drift *Drift) Diff(renderedManifests *deviation.DriftedRelease) (*deviation.DriftedRelease, error)

func (*Drift) GetAllDrift added in v0.0.3

func (drift *Drift) GetAllDrift()

func (*Drift) GetDrift

func (drift *Drift) GetDrift()

GetDrift gets all the drifts that the given release/chart has.

func (*Drift) IsManagedByHPA added in v0.1.0

func (drift *Drift) IsManagedByHPA(name, kind, nameSpace string) (bool, error)

func (*Drift) SetChart

func (drift *Drift) SetChart(chart string)

SetChart sets chart name for helm drift.

func (*Drift) SetKubeConfig added in v0.0.8

func (drift *Drift) SetKubeConfig(kubeConfig string)

func (*Drift) SetKubeContext added in v0.0.8

func (drift *Drift) SetKubeContext(kubeContext string)

func (*Drift) SetLogger

func (drift *Drift) SetLogger(logLevel string)

func (*Drift) SetNamespace added in v0.0.8

func (drift *Drift) SetNamespace(namespace string)

func (*Drift) SetOutputFormats added in v0.1.0

func (drift *Drift) SetOutputFormats()

func (*Drift) SetRelease

func (drift *Drift) SetRelease(release string)

SetRelease sets release for helm drift.

func (*Drift) SetReleasesToSkips added in v0.1.0

func (drift *Drift) SetReleasesToSkips() error

func (*Drift) SetRenderer added in v0.1.0

func (drift *Drift) SetRenderer()

SetRenderer sets renderer to Images.

func (*Drift) SetWriter

func (drift *Drift) SetWriter(writer io.Writer)

SetWriter sets writer to be used by helm drift.

func (*Drift) ValidatePrerequisite added in v0.0.3

func (drift *Drift) ValidatePrerequisite() bool

func (*Drift) WasScaledByHpa added in v0.1.0

func (drift *Drift) WasScaledByHpa(diffOutput string) (bool, error)

type HelmTemplate added in v0.0.5

type HelmTemplate string

func NewHelmTemplate added in v0.0.5

func NewHelmTemplate(template string) *HelmTemplate

func (*HelmTemplate) Get added in v0.0.5

func (template *HelmTemplate) Get(log *logrus.Logger) (*deviation.Deviation, error)

func (*HelmTemplate) GetTemplate added in v0.1.0

func (template *HelmTemplate) GetTemplate() string

type HelmTemplates added in v0.0.5

type HelmTemplates []string

func NewHelmTemplates added in v0.0.5

func NewHelmTemplates(templates []string) *HelmTemplates

func (*HelmTemplates) FilterByHelmHook added in v0.0.7

func (templates *HelmTemplates) FilterByHelmHook(drift *Drift) []string

func (*HelmTemplates) FilterByKind added in v0.0.5

func (templates *HelmTemplates) FilterByKind(drift *Drift) []string

func (*HelmTemplates) FilterByName added in v0.0.5

func (templates *HelmTemplates) FilterByName(drift *Drift) []string

func (*HelmTemplates) FilterBySkip added in v0.0.5

func (templates *HelmTemplates) FilterBySkip(drift *Drift) []string

func (*HelmTemplates) Get added in v0.0.5

func (templates *HelmTemplates) Get(log *logrus.Logger) ([]*deviation.Deviation, error)

type Skip added in v0.1.0

type Skip interface {
	// contains filtered or unexported methods
}

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