deviation

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Failed  = "FAILED"
	Success = "SUCCESS"
	Yes     = "YES"
	No      = "NO"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Deviation

type Deviation struct {
	NameSpace    string `json:"namespace,omitempty" yaml:"namespace,omitempty"`
	Deviations   string `json:"deviations,omitempty" yaml:"deviations,omitempty"`
	HasDrift     bool   `json:"has_drift,omitempty" yaml:"has_drift,omitempty"`
	Kind         string `json:"kind,omitempty" yaml:"kind,omitempty"`
	Resource     string `json:"resource,omitempty" yaml:"resource,omitempty"`
	TemplatePath string `json:"template_path,omitempty" yaml:"template_path,omitempty"`
	ManifestPath string `json:"manifest_path,omitempty" yaml:"manifest_path,omitempty"`
}

Deviation holds drift information of all manifests from the selected release/chart.

func (*Deviation) Drifted

func (dvn *Deviation) Drifted() string

Drifted returns Yes if at least one of the manifest from a release has Drifted.

type Deviations

type Deviations []Deviation

func (Deviations) Count

func (dvn Deviations) Count() int

Count returns total number of drifts in release.

func (*Deviations) GetDriftAsMap

func (dvn *Deviations) GetDriftAsMap(chart, release, time string) map[string]interface{}

GetDriftAsMap returns the map equivalent of drifted release configuration.

func (Deviations) Status

func (dvn Deviations) Status() string

Status returns Failed if at least one of the manifest in release has Drifted.

type DriftedRelease

type DriftedRelease struct {
	Chart      string      `json:"chart,omitempty" yaml:"chart,omitempty"`
	Namespace  string      `json:"namespace,omitempty" yaml:"namespace,omitempty"`
	Release    string      `json:"release,omitempty" yaml:"release,omitempty"`
	HasDrift   bool        `json:"has_drift,omitempty" yaml:"has_drift,omitempty"`
	Deviations []Deviation `json:"deviations,omitempty" yaml:"deviations,omitempty"`
}

DriftedRelease holds drift information of the selected release/chart.

func (*DriftedRelease) Drifted

func (dvn *DriftedRelease) Drifted() string

Drifted returns Yes if the release has Drifted.

type DriftedReleases

type DriftedReleases []DriftedRelease

func (DriftedReleases) Count

func (dvn DriftedReleases) Count() int

Count returns total number of drifted release.

func (*DriftedReleases) Drifted

func (dvn *DriftedReleases) Drifted() string

Drifted returns Yes if at least one of the release has Drifted.

func (DriftedReleases) Status

func (dvn DriftedReleases) Status() string

Status returns Failed if at least one of the release has Drifted.

Jump to

Keyboard shortcuts

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