profile

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompleteProfile

func CompleteProfile(profileName string) error

CompleteProfile completes a profile with default values

func ValidateAllProfiles

func ValidateAllProfiles() error

func ValidateAndCompleteProfile

func ValidateAndCompleteProfile(profileName string) error

func ValidateDebugProfileFile

func ValidateDebugProfileFile() error

func ValidateKubectlPath

func ValidateKubectlPath() error

func ValidateProfile

func ValidateProfile(_ string) error

ValidateProfile validates a single profile

This function is not implemented yet future ideas: check if the profile file exists and it's a valid pod.spec

Types

type CustomDebugProfile

type CustomDebugProfile struct {
	Profiles    []Profile `koanf:"profiles" yaml:"profiles"`
	KubectlPath string    `koanf:"kubectlPath" yaml:"kubectlPath"`
}
var Config CustomDebugProfile

global Profile configuration

type Profile

type Profile struct {
	ProfileName       string            `koanf:"name" yaml:"name" validate:"required"`
	CustomProfileFile string            `koanf:"profile" yaml:"profile" validate:"required"`
	Image             string            `koanf:"image" yaml:"image" validate:"required"`
	Namespace         string            `koanf:"namespace" yaml:"namespace" validate:"required"`
	ImagePullPolicy   corev1.PullPolicy `koanf:"imagePullPolicy" yaml:"imagePullPolicy" validate:"required"`
	TargetContainer   string            `koanf:"targetContainer" yaml:"targetContainer" validate:"required"`
	MatchLabels       map[string]string `koanf:"matchLabels" yaml:"matchLabels" validate:"required"`
}

Jump to

Keyboard shortcuts

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