config

package
v0.32.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2022 License: Apache-2.0 Imports: 15 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindNamespace added in v0.20.3

func FindNamespace(loader namespaceLoader, dir string) (string, error)

FindNamespace looks up the namespace that should be used for the inventory template of the package. If the namespace is specified with the --namespace flag, it will be used no matter what. If not, this will look at all the resource, and if all belong in the same namespace, it will return that namespace. Otherwise, it will return the namespace set in the context.

func NormalizeDir added in v0.20.3

func NormalizeDir(dirPath string) (string, error)

NormalizeDir returns full absolute directory path of the passed directory or an error. This function cleans up paths such as current directory (.), relative directories (..), or multiple separators.

Types

type InitOptions

type InitOptions struct {

	// Template string; must be a valid k8s resource.
	Template string
	// Package directory argument; must be valid directory.
	Dir string
	// Namespace for inventory object; can not be empty.
	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 NewInitOptions

func NewInitOptions(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *InitOptions

func (*InitOptions) Complete

func (i *InitOptions) Complete(args []string) error

Complete fills in the InitOptions fields. TODO(seans3): Look into changing this kubectl-inspired way of organizing the InitOptions (e.g. Complete and Run methods).

func (*InitOptions) Run

func (i *InitOptions) Run() error

Jump to

Keyboard shortcuts

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