discovery

package
v0.0.0-...-fa857ea Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrComposeFileNotFound is raised when discovery package could not found any compose file
	ErrComposeFileNotFound = oktetoErrors.UserError{
		E:    errors.New("could not detect any compose file"),
		Hint: "If you have a compose file, use the flag '--file' to point to your compose file",
	}
	// ErrOktetoManifestNotFound is raised when discovery package could not found any okteto manifest file
	ErrOktetoManifestNotFound = oktetoErrors.UserError{
		E:    errors.New("could not detect any okteto manifest"),
		Hint: "If you have an okteto manifest file, use the flag '--file' to point to your okteto manifest file",
	}
	// ErrOktetoPipelineManifestNotFound is raised when discovery package could not found any okteto pipeline manifest
	ErrOktetoPipelineManifestNotFound = errors.New("could not detect any okteto pipeline manifest")
	// ErrHelmChartNotFound is raised when discovery package could not found any helm chart
	ErrHelmChartNotFound = errors.New("could not detect any helm chart")
	// ErrK8sManifestNotFound is raised when discovery package could not found any k8s manifest
	ErrK8sManifestNotFound = errors.New("could not detect any k8s manifest")
)

Functions

func FindManifestNameWithFilesystem

func FindManifestNameWithFilesystem(cwd string, fs afero.Fs) string

func GetComposePath

func GetComposePath(wd string) (string, error)

GetComposePath returns a compose file if exists, error otherwise

func GetComposePathWithFilesystem

func GetComposePathWithFilesystem(wd string, fs afero.Fs) (string, error)

GetComposePathWithFilesystem returns a compose file if exists, error otherwise

func GetContextResourcePath

func GetContextResourcePath(wd string) (string, error)

GetContextResourcePath returns the file that will load the context resource. Here we only read files which have context information - no k8s or helm files

func GetHelmChartPath

func GetHelmChartPath(cwd string) (string, error)

GetHelmChartPath returns a helm chart directory if exists, error otherwise

func GetHelmChartPathWithFilesystem

func GetHelmChartPathWithFilesystem(cwd string, fs afero.Fs) (string, error)

GetHelmChartPathWithFilesystem returns a helm chart directory if exists, error otherwise

func GetK8sManifestPath

func GetK8sManifestPath(cwd string) (string, error)

GetK8sManifestPath returns a k8s manifest file if exists, error otherwise

func GetK8sManifestPathWithFilesystem

func GetK8sManifestPathWithFilesystem(cwd string, fs afero.Fs) (string, error)

GetK8sManifestPathWithFilesystem returns a k8s manifest file if exists, error otherwise

func GetOktetoManifestPath

func GetOktetoManifestPath(wd string) (string, error)

GetOktetoManifestPath returns an okteto manifest file if exists, error otherwise

func GetOktetoManifestPathWithFilesystem

func GetOktetoManifestPathWithFilesystem(wd string, fs afero.Fs) (string, error)

GetOktetoManifestPathWithFilesystem returns an okteto manifest file if exists, error otherwise

func GetOktetoPipelinePath

func GetOktetoPipelinePath(wd string) (string, error)

GetOktetoPipelinePath returns an okteto pipeline file if exists, error otherwise

func GetOktetoPipelinePathWithFilesystem

func GetOktetoPipelinePathWithFilesystem(wd string, fs afero.Fs) (string, error)

GetOktetoPipelinePathWithFilesystem returns an okteto pipeline file if exists, error otherwise

Types

This section is empty.

Jump to

Keyboard shortcuts

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