config

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KustomizerConfigKind        = "Config"
	KustomizerConfigApiVersion  = "kustomizer.dev/v1"
	KustomizerFieldManagerName  = "kustomizer"
	KustomizerFieldManagerGroup = "inventory.kustomizer.dev"
)

Variables

This section is empty.

Functions

func DefaultConfigPath

func DefaultConfigPath() (string, error)

DefaultConfigPath returns '$HOME/.kustomizer/config'

Types

type Config

type Config struct {
	metav1.TypeMeta `json:",inline"`

	// ApplyOrder holds the list of the Kubernetes API Kinds that
	// describes in which order they are reconciled.
	ApplyOrder *KindOrder `json:"applyOrder,omitempty"`

	// FieldManager holds the manager name and group used for server-side apply.
	FieldManager *FieldManager `json:"fieldManager,omitempty"`
}

func NewConfig

func NewConfig() *Config

NewConfig returns a config with the default apply order.

func Read

func Read(configPath string) (*Config, error)

Read loads the config from the specified path, if the config file is not found, a default is returned.

func (*Config) Write

func (c *Config) Write(configPath string) error

Write saves the config at the given path, if no path is specified it will create or override '$HOME/.kustomizer/config'.

type FieldManager

type FieldManager struct {
	// Name sets the field manager for the reconciled objects.
	Name string `json:"name"`

	// Group sets the owner label key prefix.
	Group string `json:"group"`
}

type KindOrder

type KindOrder struct {
	// First contains the list of Kubernetes API Kinds
	// that are applied first and delete last.
	First []string `json:"first"`

	// Last contains the list of Kubernetes API Kinds
	// that are applied last and delete first.
	Last []string `json:"last"`
}

KindOrder holds the list of the Kubernetes API Kinds that describes in which order they are reconciled.

Jump to

Keyboard shortcuts

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