k8sv1

package
v1.19.1 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// YAMLExtension yaml
	YAMLExtension = "yaml"

	// YAMLExtension2 yml
	YAMLExtension2 = "yml"

	// JSONExtension json
	JSONExtension = "json"

	// UnknownExtension unknown
	UnknownExtension = "unknown"
)

Variables

View Source
var (

	// ErrNoKind is returned when the "kind" key is not available (not a valid kubernetes resource)
	ErrNoKind = fmt.Errorf("kind does not exist")
)

Functions

func K8sFileExtensions

func K8sFileExtensions() []string

K8sFileExtensions returns the valid extensions for k8s (yaml, yml, json)

Types

type K8sV1

type K8sV1 struct {
	// contains filtered or unexported fields
}

K8sV1 struct implements the IacProvider interface

func (*K8sV1) LoadIacDir

func (k *K8sV1) LoadIacDir(absRootDir string, options map[string]interface{}) (output.AllResourceConfigs, error)

LoadIacDir loads all k8s files in the current directory

func (*K8sV1) LoadIacFile

func (k *K8sV1) LoadIacFile(absFilePath string, options map[string]interface{}) (allResourcesConfig output.AllResourceConfigs, err error)

LoadIacFile loads the k8s file specified Note that a single k8s yaml file may contain multiple resource definitions

func (*K8sV1) Name

func (*K8sV1) Name() string

Name returns name of the provider

func (*K8sV1) Normalize

func (k *K8sV1) Normalize(doc *utils.IacDocument) (*output.ResourceConfig, error)

Normalize takes the input document and normalizes it

Jump to

Keyboard shortcuts

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