config

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: Apache-2.0 Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultInventoryID added in v0.0.6

func DefaultInventoryID() (string, error)

defaultInventoryID returns a UUID string as a default unique identifier for a inventory object label.

func GetInventoryInfo

func GetInventoryInfo(path string) (*unstructured.Unstructured, error)

func InventoryPath

func InventoryPath(path string) string

func ParseInventoryFile added in v0.0.6

func ParseInventoryFile(b []byte) (*unstructured.Unstructured, error)

Types

type Config

type Config struct {

	// Template string; must be a valid k8s resource.
	Template string
	// Package directory argument; must be valid directory.
	Dir string
	// Namespace for inventory object; Kform is fixed to kform-system.
	Namespace string
	// Inventory object label value; must be a valid k8s label value.
	InventoryID string
	// contains filtered or unexported fields
}

InitOptions contains the fields necessary to generate a inventory object template ConfigMap.

func New

func New(ioStreams genericclioptions.IOStreams) *Config

func (*Config) Complete

func (r *Config) Complete(ctx context.Context, path string) error

Complete adds the inventoryID to the config if it is not supplied If the inventoryID is generated or supplied the fn validates the correctness of the inventoryID

func (*Config) GetInventoryFileString added in v0.0.6

func (r *Config) GetInventoryFileString() string

func (*Config) Run

func (r *Config) Run(ctx context.Context) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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