result

package
v2.24.1 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 13 Imported by: 2

Documentation

Overview

Package result contains result types used in Kluctl projects +kubebuilder:object:generate=true

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildReducedObject added in v2.21.0

func BuildReducedObject(o *uo.UnstructuredObject) *uo.UnstructuredObject

Types

type BaseObject

type BaseObject struct {
	Ref     k8s.ObjectRef `json:"ref"`
	Changes []Change      `json:"changes,omitempty"`

	New     bool `json:"new,omitempty"`
	Orphan  bool `json:"orphan,omitempty"`
	Deleted bool `json:"deleted,omitempty"`
	Hook    bool `json:"hook,omitempty"`
}

func (*BaseObject) DeepCopy

func (in *BaseObject) DeepCopy() *BaseObject

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BaseObject.

func (*BaseObject) DeepCopyInto

func (in *BaseObject) DeepCopyInto(out *BaseObject)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Change

type Change struct {
	Type        string                `json:"type" validate:"required"`
	JsonPath    string                `json:"jsonPath" validate:"required"`
	OldValue    *apiextensionsv1.JSON `json:"oldValue,omitempty"`
	NewValue    *apiextensionsv1.JSON `json:"newValue,omitempty"`
	UnifiedDiff string                `json:"unifiedDiff,omitempty"`
}

func (*Change) DeepCopy

func (in *Change) DeepCopy() *Change

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Change.

func (*Change) DeepCopyInto

func (in *Change) DeepCopyInto(out *Change)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ChangedObject

type ChangedObject struct {
	Ref     k8s.ObjectRef `json:"ref"`
	Changes []Change      `json:"changes,omitempty"`
}

func (*ChangedObject) DeepCopy

func (in *ChangedObject) DeepCopy() *ChangedObject

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChangedObject.

func (*ChangedObject) DeepCopyInto

func (in *ChangedObject) DeepCopyInto(out *ChangedObject)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ClusterInfo

type ClusterInfo struct {
	ClusterId string `json:"clusterId"`
}

func (*ClusterInfo) DeepCopy

func (in *ClusterInfo) DeepCopy() *ClusterInfo

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterInfo.

func (*ClusterInfo) DeepCopyInto

func (in *ClusterInfo) DeepCopyInto(out *ClusterInfo)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CommandInfo

type CommandInfo struct {
	Initiator             CommandInitiator       `json:"initiator" validate:"oneof=CommandLine KluctlDeployment"`
	StartTime             metav1.Time            `json:"startTime"`
	EndTime               metav1.Time            `json:"endTime"`
	Command               string                 `json:"command,omitempty"`
	Target                string                 `json:"target,omitempty"`
	TargetNameOverride    string                 `json:"targetNameOverride,omitempty"`
	ContextOverride       string                 `json:"contextOverride,omitempty"`
	Args                  *uo.UnstructuredObject `json:"args,omitempty"`
	Images                []types.FixedImage     `json:"images,omitempty"`
	DryRun                bool                   `json:"dryRun,omitempty"`
	NoWait                bool                   `json:"noWait,omitempty"`
	ForceApply            bool                   `json:"forceApply,omitempty"`
	ReplaceOnError        bool                   `json:"replaceOnError,omitempty"`
	ForceReplaceOnError   bool                   `json:"forceReplaceOnError,omitempty"`
	AbortOnError          bool                   `json:"abortOnError,omitempty"`
	IncludeTags           []string               `json:"includeTags,omitempty"`
	ExcludeTags           []string               `json:"excludeTags,omitempty"`
	IncludeDeploymentDirs []string               `json:"includeDeploymentDirs,omitempty"`
	ExcludeDeploymentDirs []string               `json:"excludeDeploymentDirs,omitempty"`
}

func (*CommandInfo) DeepCopy

func (in *CommandInfo) DeepCopy() *CommandInfo

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommandInfo.

func (*CommandInfo) DeepCopyInto

func (in *CommandInfo) DeepCopyInto(out *CommandInfo)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CommandInitiator

type CommandInitiator string
const (
	CommandInititiator_CommandLine      CommandInitiator = "CommandLine"
	CommandInititiator_KluctlDeployment                  = "KluctlDeployment"
)

type CommandResult

type CommandResult struct {
	Id               string                         `json:"id"`
	ReconcileId      string                         `json:"reconcileId"`
	ProjectKey       ProjectKey                     `json:"projectKey"`
	TargetKey        TargetKey                      `json:"targetKey"`
	Target           types.Target                   `json:"target"`
	Command          CommandInfo                    `json:"command,omitempty"`
	KluctlDeployment *KluctlDeploymentInfo          `json:"kluctlDeployment,omitempty"`
	OverridesPatch   *uo.UnstructuredObject         `json:"overridesPatch,omitempty"`
	GitInfo          GitInfo                        `json:"gitInfo,omitempty"`
	ClusterInfo      ClusterInfo                    `json:"clusterInfo"`
	Deployment       *types.DeploymentProjectConfig `json:"deployment,omitempty"`

	RenderedObjectsHash string         `json:"renderedObjectsHash,omitempty"`
	Objects             []ResultObject `json:"objects,omitempty"`

	Errors     []DeploymentError  `json:"errors,omitempty"`
	Warnings   []DeploymentError  `json:"warnings,omitempty"`
	SeenImages []types.FixedImage `json:"seenImages,omitempty"`
}

func (*CommandResult) BuildDriftDetectionResult added in v2.21.0

func (cr *CommandResult) BuildDriftDetectionResult() *DriftDetectionResult

func (*CommandResult) BuildSummary

func (cr *CommandResult) BuildSummary() *CommandResultSummary

func (*CommandResult) DeepCopy

func (in *CommandResult) DeepCopy() *CommandResult

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommandResult.

func (*CommandResult) DeepCopyInto

func (in *CommandResult) DeepCopyInto(out *CommandResult)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CommandResult) ToCompacted

func (cr *CommandResult) ToCompacted() *CompactedCommandResult

func (*CommandResult) ToReducedObjects

func (cr *CommandResult) ToReducedObjects() *CommandResult

type CommandResultSummary

type CommandResultSummary struct {
	Id               string                `json:"id"`
	ReconcileId      string                `json:"reconcileId"`
	ProjectKey       ProjectKey            `json:"projectKey"`
	TargetKey        TargetKey             `json:"targetKey"`
	Target           types.Target          `json:"target"`
	Command          CommandInfo           `json:"commandInfo"`
	KluctlDeployment *KluctlDeploymentInfo `json:"kluctlDeployment,omitempty"`
	GitInfo          GitInfo               `json:"gitInfo,omitempty"`
	ClusterInfo      ClusterInfo           `json:"clusterInfo,omitempty"`

	RenderedObjectsHash string `json:"renderedObjectsHash,omitempty"`

	RenderedObjects    int `json:"renderedObjects"`
	RemoteObjects      int `json:"remoteObjects"`
	AppliedObjects     int `json:"appliedObjects"`
	AppliedHookObjects int `json:"appliedHookObjects"`

	NewObjects     int `json:"newObjects"`
	ChangedObjects int `json:"changedObjects"`
	OrphanObjects  int `json:"orphanObjects"`
	DeletedObjects int `json:"deletedObjects"`

	Errors   []DeploymentError `json:"errors"`
	Warnings []DeploymentError `json:"warnings"`

	TotalChanges int `json:"totalChanges"`
}

func (*CommandResultSummary) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommandResultSummary.

func (*CommandResultSummary) DeepCopyInto

func (in *CommandResultSummary) DeepCopyInto(out *CommandResultSummary)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CompactedCommandResult

type CompactedCommandResult struct {
	CommandResult

	CompactedObjects CompactedObjects `json:"compactedObjects,omitempty"`
}

func (*CompactedCommandResult) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CompactedCommandResult.

func (*CompactedCommandResult) DeepCopyInto

func (in *CompactedCommandResult) DeepCopyInto(out *CompactedCommandResult)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*CompactedCommandResult) ToNonCompacted

func (ccr *CompactedCommandResult) ToNonCompacted() *CommandResult

type CompactedObject

type CompactedObject struct {
	BaseObject

	Rendered string `json:"rendered,omitempty"`
	Remote   string `json:"remote,omitempty"`
	Applied  string `json:"applied,omitempty"`
}

func (*CompactedObject) DeepCopy

func (in *CompactedObject) DeepCopy() *CompactedObject

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CompactedObject.

func (*CompactedObject) DeepCopyInto

func (in *CompactedObject) DeepCopyInto(out *CompactedObject)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CompactedObjects

type CompactedObjects []ResultObject

func (CompactedObjects) DeepCopy

func (in CompactedObjects) DeepCopy() CompactedObjects

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CompactedObjects.

func (CompactedObjects) DeepCopyInto

func (in CompactedObjects) DeepCopyInto(out *CompactedObjects)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (CompactedObjects) MarshalJSON

func (l CompactedObjects) MarshalJSON() ([]byte, error)

func (*CompactedObjects) UnmarshalJSON

func (l *CompactedObjects) UnmarshalJSON(b []byte) error

type DeploymentError

type DeploymentError struct {
	Ref     k8s.ObjectRef `json:"ref"`
	Message string        `json:"message"`
}

func (*DeploymentError) DeepCopy

func (in *DeploymentError) DeepCopy() *DeploymentError

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentError.

func (*DeploymentError) DeepCopyInto

func (in *DeploymentError) DeepCopyInto(out *DeploymentError)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DriftDetectionResult added in v2.21.0

type DriftDetectionResult struct {
	Id                  string                `json:"id"`
	ReconcileId         string                `json:"reconcileId"`
	ProjectKey          ProjectKey            `json:"projectKey"`
	TargetKey           TargetKey             `json:"targetKey"`
	KluctlDeployment    *KluctlDeploymentInfo `json:"kluctlDeployment,omitempty"`
	RenderedObjectsHash string                `json:"renderedObjectsHash,omitempty"`
	StartTime           metav1.Time           `json:"startTime"`
	EndTime             metav1.Time           `json:"endTime"`

	Warnings []DeploymentError `json:"warnings,omitempty"`
	Errors   []DeploymentError `json:"errors,omitempty"`
	Objects  []DriftedObject   `json:"objects,omitempty"`
}

func (*DriftDetectionResult) BuildShortMessage added in v2.21.0

func (dr *DriftDetectionResult) BuildShortMessage() string

func (*DriftDetectionResult) DeepCopy added in v2.21.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DriftDetectionResult.

func (*DriftDetectionResult) DeepCopyInto added in v2.21.0

func (in *DriftDetectionResult) DeepCopyInto(out *DriftDetectionResult)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DriftedObject added in v2.21.0

type DriftedObject struct {
	BaseObject

	LastResourceVersion string `json:"lastResourceVersion"`
}

func (*DriftedObject) DeepCopy added in v2.21.0

func (in *DriftedObject) DeepCopy() *DriftedObject

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DriftedObject.

func (*DriftedObject) DeepCopyInto added in v2.21.0

func (in *DriftedObject) DeepCopyInto(out *DriftedObject)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GitInfo

type GitInfo struct {
	Url    *types.GitUrl `json:"url"`
	Ref    *types.GitRef `json:"ref"`
	SubDir string        `json:"subDir"`
	Commit string        `json:"commit"`
	Dirty  bool          `json:"dirty"`
}

func (*GitInfo) DeepCopy

func (in *GitInfo) DeepCopy() *GitInfo

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitInfo.

func (*GitInfo) DeepCopyInto

func (in *GitInfo) DeepCopyInto(out *GitInfo)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type KluctlDeploymentInfo

type KluctlDeploymentInfo struct {
	Name      string `json:"name"`
	Namespace string `json:"namespace"`
	ClusterId string `json:"clusterId"`
}

func (*KluctlDeploymentInfo) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KluctlDeploymentInfo.

func (*KluctlDeploymentInfo) DeepCopyInto

func (in *KluctlDeploymentInfo) DeepCopyInto(out *KluctlDeploymentInfo)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ProjectKey

type ProjectKey struct {
	RepoKey types.RepoKey `json:"repoKey,omitempty"`
	SubDir  string        `json:"subDir,omitempty"`
}

func (*ProjectKey) DeepCopy

func (in *ProjectKey) DeepCopy() *ProjectKey

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectKey.

func (*ProjectKey) DeepCopyInto

func (in *ProjectKey) DeepCopyInto(out *ProjectKey)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (ProjectKey) Less

func (k ProjectKey) Less(o ProjectKey) bool

type ResultObject

type ResultObject struct {
	BaseObject

	Rendered *uo.UnstructuredObject `json:"rendered,omitempty"`
	Remote   *uo.UnstructuredObject `json:"remote,omitempty"`
	Applied  *uo.UnstructuredObject `json:"applied,omitempty"`
}

func (*ResultObject) DeepCopy

func (in *ResultObject) DeepCopy() *ResultObject

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResultObject.

func (*ResultObject) DeepCopyInto

func (in *ResultObject) DeepCopyInto(out *ResultObject)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TargetKey

type TargetKey struct {
	TargetName    string `json:"targetName,omitempty"`
	ClusterId     string `json:"clusterId"`
	Discriminator string `json:"discriminator,omitempty"`
}

func (*TargetKey) DeepCopy

func (in *TargetKey) DeepCopy() *TargetKey

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetKey.

func (*TargetKey) DeepCopyInto

func (in *TargetKey) DeepCopyInto(out *TargetKey)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (TargetKey) Less

func (k TargetKey) Less(o TargetKey) bool

type ValidateResult

type ValidateResult struct {
	Id                  string                 `json:"id"`
	ReconcileId         string                 `json:"reconcileId"`
	ProjectKey          ProjectKey             `json:"projectKey"`
	TargetKey           TargetKey              `json:"targetKey"`
	KluctlDeployment    *KluctlDeploymentInfo  `json:"kluctlDeployment,omitempty"`
	OverridesPatch      *uo.UnstructuredObject `json:"overridesPatch,omitempty"`
	RenderedObjectsHash string                 `json:"renderedObjectsHash,omitempty"`
	StartTime           metav1.Time            `json:"startTime"`
	EndTime             metav1.Time            `json:"endTime"`
	Ready               bool                   `json:"ready"`
	Warnings            []DeploymentError      `json:"warnings,omitempty"`
	Errors              []DeploymentError      `json:"errors,omitempty"`
	Results             []ValidateResultEntry  `json:"results,omitempty"`
}

func (*ValidateResult) BuildSummary added in v2.21.0

func (vr *ValidateResult) BuildSummary() ValidateResultSummary

func (*ValidateResult) DeepCopy

func (in *ValidateResult) DeepCopy() *ValidateResult

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidateResult.

func (*ValidateResult) DeepCopyInto

func (in *ValidateResult) DeepCopyInto(out *ValidateResult)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ValidateResultEntry

type ValidateResultEntry struct {
	Ref        k8s.ObjectRef `json:"ref"`
	Annotation string        `json:"annotation"`
	Message    string        `json:"message"`
}

func (*ValidateResultEntry) DeepCopy

func (in *ValidateResultEntry) DeepCopy() *ValidateResultEntry

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidateResultEntry.

func (*ValidateResultEntry) DeepCopyInto

func (in *ValidateResultEntry) DeepCopyInto(out *ValidateResultEntry)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ValidateResultSummary added in v2.21.0

type ValidateResultSummary struct {
	Id                  string                `json:"id"`
	ReconcileId         string                `json:"reconcileId"`
	ProjectKey          ProjectKey            `json:"projectKey"`
	TargetKey           TargetKey             `json:"targetKey"`
	KluctlDeployment    *KluctlDeploymentInfo `json:"kluctlDeployment,omitempty"`
	RenderedObjectsHash string                `json:"renderedObjectsHash,omitempty"`
	StartTime           metav1.Time           `json:"startTime"`
	EndTime             metav1.Time           `json:"endTime"`
	Ready               bool                  `json:"ready"`

	Warnings int `json:"warnings"`
	Errors   int `json:"errors"`
	Results  int `json:"results"`
}

func (*ValidateResultSummary) DeepCopy added in v2.21.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidateResultSummary.

func (*ValidateResultSummary) DeepCopyInto added in v2.21.0

func (in *ValidateResultSummary) DeepCopyInto(out *ValidateResultSummary)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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