types

package
v1.28.2-0...-a3f5403 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateDeleteObjectItemConfig

func ValidateDeleteObjectItemConfig(sl validator.StructLevel)

func ValidateDeploymentItemConfig

func ValidateDeploymentItemConfig(sl validator.StructLevel)

func ValidateGitProject

func ValidateGitProject(sl validator.StructLevel)

func ValidateSecretSource

func ValidateSecretSource(sl validator.StructLevel)

func ValidateVarsListItem

func ValidateVarsListItem(sl validator.StructLevel)

Types

type ArchiveMetadata

type ArchiveMetadata struct {
	InvolvedRepos map[string][]InvolvedRepo `yaml:"involvedRepos"`
	Targets       []*DynamicTarget          `yaml:"targets"`
}

type Change

type Change struct {
	Type        string      `yaml:"type" validate:"required"`
	JsonPath    string      `yaml:"jsonPath" validate:"required"`
	OldValue    interface{} `yaml:"oldValue,omitempty"`
	NewValue    interface{} `yaml:"newValue,omitempty"`
	UnifiedDiff string      `yaml:"unifiedDiff,omitempty"`
}

type ChangedObject

type ChangedObject struct {
	Ref       k8s.ObjectRef          `yaml:"ref"`
	NewObject *uo.UnstructuredObject `yaml:"newObject,omitempty"`
	OldObject *uo.UnstructuredObject `yaml:"oldObject,omitempty"`
	Changes   []Change               `yaml:"changes,omitempty"`
}

type ClusterConfig

type ClusterConfig struct {
	Cluster *ClusterConfig2 `yaml:"cluster"`
}

func LoadClusterConfig

func LoadClusterConfig(clusterDir string, clusterName string) (*ClusterConfig, error)

type ClusterConfig2

type ClusterConfig2 struct {
	Name    string                 `yaml:"name" validate:"required"`
	Context string                 `yaml:"context" validate:"required"`
	Vars    *uo.UnstructuredObject `yaml:"vars,omitempty"`
}

func (*ClusterConfig2) MarshalYAML

func (cc *ClusterConfig2) MarshalYAML() (interface{}, error)

func (*ClusterConfig2) UnmarshalYAML

func (cc *ClusterConfig2) UnmarshalYAML(unmarshal func(interface{}) error) error

TODO remove custom unmarshaller when https://github.com/goccy/go-yaml/pull/220 gets released

type CommandResult

type CommandResult struct {
	NewObjects     []*RefAndObject   `yaml:"newObjects,omitempty"`
	ChangedObjects []*ChangedObject  `yaml:"changedObjects,omitempty"`
	HookObjects    []*RefAndObject   `yaml:"hookObjects,omitempty"`
	OrphanObjects  []k8s.ObjectRef   `yaml:"orphanObjects,omitempty"`
	DeletedObjects []k8s.ObjectRef   `yaml:"deletedObjects,omitempty"`
	Errors         []DeploymentError `yaml:"errors,omitempty"`
	Warnings       []DeploymentError `yaml:"warnings,omitempty"`
	SeenImages     []FixedImage      `yaml:"seenImages,omitempty"`
}

type DeleteObjectItemConfig

type DeleteObjectItemConfig struct {
	Group     *string `yaml:"group,omitempty"`
	Version   *string `yaml:"version,omitempty"`
	Kind      *string `yaml:"kind,omitempty"`
	Name      string  `yaml:"name" validate:"required"`
	Namespace string  `yaml:"namespace,omitempty"`
}

type DeploymentArg

type DeploymentArg struct {
	Name    string      `yaml:"name" validate:"required"`
	Default interface{} `yaml:"default,omitempty"`
}

type DeploymentError

type DeploymentError struct {
	Ref   k8s.ObjectRef `yaml:"ref"`
	Error string        `yaml:"error"`
}

type DeploymentItemConfig

type DeploymentItemConfig struct {
	Path             *string                  `yaml:"path,omitempty"`
	Include          *string                  `yaml:"include,omitempty"`
	Tags             []string                 `yaml:"tags,omitempty"`
	Barrier          *bool                    `yaml:"barrier,omitempty"`
	WaitReadiness    *bool                    `yaml:"waitReadiness,omitempty"`
	Vars             []*VarsListItem          `yaml:"vars,omitempty"`
	SkipDeleteIfTags *bool                    `yaml:"skipDeleteIfTags,omitempty"`
	OnlyRender       *bool                    `yaml:"onlyRender,omitempty"`
	AlwaysDeploy     *bool                    `yaml:"alwaysDeploy,omitempty"`
	DeleteObjects    []DeleteObjectItemConfig `yaml:"deleteObjects,omitempty"`
}

type DeploymentProjectConfig

type DeploymentProjectConfig struct {
	Args          []*DeploymentArg     `yaml:"args,omitempty"`
	Vars          []*VarsListItem      `yaml:"vars,omitempty"`
	SealedSecrets *SealedSecretsConfig `yaml:"sealedSecrets,omitempty"`

	Deployments []*DeploymentItemConfig `yaml:"deployments,omitempty"`

	// Obsolete
	KustomizeDirs []*DeploymentItemConfig `yaml:"kustomizeDirs,omitempty"`
	Includes      []*DeploymentItemConfig `yaml:"includes,omitempty"`

	CommonLabels      map[string]string `yaml:"commonLabels,omitempty"`
	DeleteByLabels    map[string]string `yaml:"deleteByLabels,omitempty"`
	OverrideNamespace *string           `yaml:"overrideNamespace,omitempty"`
	Tags              []string          `yaml:"tags,omitempty"`

	IgnoreForDiff    []*IgnoreForDiffItemConfig `yaml:"ignoreForDiff,omitempty"`
	TemplateExcludes []string                   `yaml:"templateExcludes,omitempty"`
}

type DynamicArg

type DynamicArg struct {
	Name    string  `yaml:"name" validate:"required"`
	Pattern *string `yaml:"pattern,omitempty"`
}

type DynamicTarget

type DynamicTarget struct {
	Target         *Target `yaml:"target" validate:"required"`
	BaseTargetName string  `yaml:"baseTargetName"`
}

type ExternalProject

type ExternalProject struct {
	Project GitProject `yaml:"project"`
}

type ExternalProjects

type ExternalProjects struct {
	Projects []ExternalProject
}

func (*ExternalProjects) UnmarshalYAML

func (gp *ExternalProjects) UnmarshalYAML(unmarshal func(interface{}) error) error

type ExternalTargetConfig

type ExternalTargetConfig struct {
	Project *GitProject `yaml:"project,omitempty"`
	// Ref Branch/Tag to be used. Can't be combined with 'refPattern'. If 'branch' and 'branchPattern' are not used, 'branch' defaults to the default branch of targetConfig.project
	Ref *string `yaml:"ref,omitempty"`
	// RefPattern If set, multiple dynamic targets are created, each with 'ref' being set to the ref that matched the given pattern.
	RefPattern *string `yaml:"refPattern,omitempty"`
	// File defaults to 'target-config.yml'
	File *string `yaml:"file,omitempty"`
}

type FixedImage

type FixedImage struct {
	Image         string         `yaml:"image" validate:"required"`
	ResultImage   string         `yaml:"resultImage" validate:"required"`
	DeployedImage *string        `yaml:"deployedImage,omitempty"`
	RegistryImage *string        `yaml:"registryImage,omitempty"`
	Namespace     *string        `yaml:"namespace,omitempty"`
	Object        *k8s.ObjectRef `yaml:"object,omitempty"`
	Deployment    *string        `yaml:"deployment,omitempty"`
	Container     *string        `yaml:"container,omitempty"`
	VersionFilter *string        `yaml:"versionFilter,omitempty"`
	DeployTags    []string       `yaml:"deployTags,omitempty"`
	DeploymentDir *string        `yaml:"deploymentDir,omitempty"`
}

type FixedImagesConfig

type FixedImagesConfig struct {
	Images []FixedImage `yaml:"images,omitempty"`
}

type GitProject

type GitProject struct {
	Url    git_url.GitUrl `yaml:"url" validate:"required"`
	Ref    string         `yaml:"ref,omitempty"`
	SubDir string         `yaml:"subDir,omitempty"`
}

func (*GitProject) UnmarshalYAML

func (gp *GitProject) UnmarshalYAML(unmarshal func(interface{}) error) error

type GlobalSealedSecretsConfig

type GlobalSealedSecretsConfig struct {
	Bootstrap      *bool   `yaml:"bootstrap,omitempty"`
	Namespace      *string `yaml:"namespace,omitempty"`
	ControllerName *string `yaml:"controllerName,omitempty"`
}

type HelmChartConfig

type HelmChartConfig struct {
	HelmChartConfig2 `yaml:"helmChart" validate:"required"`
}

type HelmChartConfig2

type HelmChartConfig2 struct {
	Repo         *string `yaml:"repo" validate:"required"`
	ChartName    *string `yaml:"chartName,omitempty"`
	ChartVersion *string `yaml:"chartVersion" validate:"required"`
	ReleaseName  string  `yaml:"releaseName" validate:"required"`
	Namespace    *string `yaml:"namespace,omitempty"`
	Output       string  `yaml:"output" validate:"required"`
	SkipCRDs     *bool   `yaml:"skipCRDs,omitempty"`
	SkipUpdate   *bool   `yaml:"skipUpdate,omitempty"`
}

type IgnoreForDiffItemConfig

type IgnoreForDiffItemConfig struct {
	FieldPath SingleStringOrList `yaml:"fieldPath" validate:"required"`
	Group     *string            `yaml:"group,omitempty"`
	Kind      *string            `yaml:"kind,omitempty"`
	Name      *string            `yaml:"name,omitempty"`
	Namespace *string            `yaml:"namespace,omitempty"`
}

type InvolvedRepo

type InvolvedRepo struct {
	RefPattern string            `yaml:"refPattern"`
	Refs       map[string]string `yaml:"refs"`
}

type KluctlProject

type KluctlProject struct {
	Deployment    *ExternalProject `yaml:"deployment,omitempty"`
	SealedSecrets *ExternalProject `yaml:"sealedSecrets,omitempty"`
	Clusters      ExternalProjects `yaml:"clusters,omitempty"`
	Targets       []*Target        `yaml:"targets,omitempty"`
	SecretsConfig *SecretsConfig   `yaml:"secretsConfig,omitempty"`
}

type RefAndObject

type RefAndObject struct {
	Ref    k8s.ObjectRef          `yaml:"ref"`
	Object *uo.UnstructuredObject `yaml:"object,omitempty"`
}

type SealedSecretsConfig

type SealedSecretsConfig struct {
	OutputPattern *string `yaml:"outputPattern,omitempty"`
}

type SealingConfig

type SealingConfig struct {
	// DynamicSealing Set this to false if you want to disable sealing for every dynamic target
	DynamicSealing *bool                  `yaml:"dynamicSealing,omitempty"`
	Args           *uo.UnstructuredObject `yaml:"args,omitempty"`
	SecretSets     []string               `yaml:"secretSets,omitempty"`
}

type SecretSet

type SecretSet struct {
	Name    string         `yaml:"name" validate:"required"`
	Sources []SecretSource `yaml:"sources" validate:"required,gt=0"`
}

type SecretSource

type SecretSource struct {
	Path              *string                        `yaml:"path,omitempty"`
	SystemEnvVars     *uo.UnstructuredObject         `yaml:"systemEnvVars,omitempty"`
	AwsSecretsManager *SecretSourceAwsSecretsManager `yaml:"awsSecretsManager,omitempty"`
}

type SecretSourceAwsSecretsManager

type SecretSourceAwsSecretsManager struct {
	// Name or ARN of the secret. In case a name is given, the region must be specified as well
	SecretName string `yaml:"secretName" validate:"required"`
	// The aws region
	Region *string `yaml:"region,omitempty"`
	// AWS credentials profile to use. The AWS_PROFILE environemnt variables will take precedence in case it is also set
	Profile *string `yaml:"profile,omitempty"`
}

type SecretsConfig

type SecretsConfig struct {
	SealedSecrets *GlobalSealedSecretsConfig `yaml:"sealedSecrets,omitempty"`
	SecretSets    []SecretSet                `yaml:"secretSets,omitempty"`
}

type SingleStringOrList

type SingleStringOrList []string

func (*SingleStringOrList) UnmarshalYAML

func (s *SingleStringOrList) UnmarshalYAML(unmarshal func(interface{}) error) error

type Target

type Target struct {
	Name          string                 `yaml:"name" validate:"required"`
	Cluster       string                 `yaml:"cluster" validate:"required"`
	Args          *uo.UnstructuredObject `yaml:"args,omitempty"`
	DynamicArgs   []DynamicArg           `yaml:"dynamicArgs,omitempty"`
	TargetConfig  *ExternalTargetConfig  `yaml:"targetConfig,omitempty"`
	SealingConfig *SealingConfig         `yaml:"sealingConfig,omitempty"`
	Images        []FixedImage           `yaml:"images,omitempty"`
}

type TargetConfig

type TargetConfig struct {
	FixedImagesConfig `yaml:"fixed_images_config,inline"`
	Args              *uo.UnstructuredObject `yaml:"args,omitempty"`
}

type ValidateResult

type ValidateResult struct {
	Ready    bool                  `yaml:"ready"`
	Warnings []DeploymentError     `yaml:"warnings,omitempty"`
	Errors   []DeploymentError     `yaml:"errors,omitempty"`
	Results  []ValidateResultEntry `yaml:"results,omitempty"`
}

type ValidateResultEntry

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

type VarsListItem

type VarsListItem struct {
	Values           *uo.UnstructuredObject                `yaml:"values,omitempty"`
	File             *string                               `yaml:"file,omitempty"`
	ClusterConfigMap *VarsListItemClusterConfigMapOrSecret `yaml:"clusterConfigMap,omitempty"`
	ClusterSecret    *VarsListItemClusterConfigMapOrSecret `yaml:"clusterSecret,omitempty"`
}

type VarsListItemClusterConfigMapOrSecret

type VarsListItemClusterConfigMapOrSecret struct {
	Name      string `yaml:"name" validate:"required"`
	Namespace string `yaml:"namespace,omitempty"`
	Key       string `yaml:"key" validate:"required"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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