types

package
v0.0.0-...-b82b62a Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2023 License: Apache-2.0 Imports: 12 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChartFlags

type ChartFlags struct {
	// ConfigFlags support string, bool and int types as helm chart flags
	// check: https://github.com/helm/helm/blob/d7b4c38c42cb0b77f1bcebf9bb4ae7695a10da0b/pkg/action/install.go#L67
	ConfigFlags Flags

	// SetFlags are chart value overrides
	SetFlags Flags
}

ChartFlags define flag based configurations for helm chart processing.

type ChartInfo

type ChartInfo struct {
	ChartPath   string
	RepoName    string
	URL         string
	ChartName   string
	ReleaseName string
}

ChartInfo defines helm chart information.

type ClusterInfo

type ClusterInfo struct {
	Config *rest.Config
	Client client.Client
}

ClusterInfo describes client and config for a cluster.

func (ClusterInfo) IsEmpty

func (r ClusterInfo) IsEmpty() bool

IsEmpty indicates if ClusterInfo is empty.

type Codec

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

+kubebuilder:object:generate=false

func NewCodec

func NewCodec() (*Codec, error)

func (*Codec) Decode

func (c *Codec) Decode(data []byte, obj interface{}, refType RefTypeMetadata) error

func (*Codec) Validate

func (c *Codec) Validate(data []byte, refType RefTypeMetadata) error

type Flags

type Flags map[string]interface{}

Flags define a set of configurable flags.

type HelmChartSpec

type HelmChartSpec struct {
	// URL defines the helm repo URL
	// +kubebuilder:validation:Optional
	URL string `json:"url"`

	// ChartName defines the helm chart name
	// +kubebuilder:validation:Optional
	ChartName string `json:"chartName"`

	// Type defines the chart as "helm-chart"
	// +kubebuilder:validation:Optional
	Type RefTypeMetadata `json:"type"`
}

+k8s:deepcopy-gen=true HelmChartSpec defines the specification for a helm chart.

func (*HelmChartSpec) DeepCopy

func (in *HelmChartSpec) DeepCopy() *HelmChartSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmChartSpec.

func (*HelmChartSpec) DeepCopyInto

func (in *HelmChartSpec) DeepCopyInto(out *HelmChartSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ImageSpec

type ImageSpec struct {
	// Repo defines the Image repo
	Repo string `json:"repo,omitempty"`

	// Name defines the Image name
	Name string `json:"name,omitempty"`

	// Ref is either a sha value, tag or version
	Ref string `json:"ref,omitempty"`

	// Type defines the chart as "oci-ref"
	Type RefTypeMetadata `json:"type,omitempty"`

	// CredSecretSelector is an optional field, for OCI image saved in private registry,
	// use it to indicate the secret which contains registry credentials,
	// must exist in the namespace same as manifest
	CredSecretSelector *metav1.LabelSelector `json:"credSecretSelector,omitempty"`
}

+k8s:deepcopy-gen=true ImageSpec defines OCI Image specifications.

func (*ImageSpec) DeepCopy

func (in *ImageSpec) DeepCopy() *ImageSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageSpec.

func (*ImageSpec) DeepCopyInto

func (in *ImageSpec) DeepCopyInto(out *ImageSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type KustomizeSpec

type KustomizeSpec struct {
	// Path defines the Kustomize local path
	Path string `json:"path"`

	// URL defines the Kustomize remote URL
	URL string `json:"url"`

	// Type defines the chart as "kustomize"
	// +kubebuilder:validation:Optional
	Type RefTypeMetadata `json:"type"`
}

KustomizeSpec defines the specification for a Kustomize specification.

type LabelNotFoundError

type LabelNotFoundError struct {
	Resource  client.Object
	LabelName string
}

func (*LabelNotFoundError) Error

func (m *LabelNotFoundError) Error() string

type ManifestResources

type ManifestResources struct {
	Items []*unstructured.Unstructured
	Blobs [][]byte
}

ManifestResources holds a collection of objects, so that we can filter / sequence them.

type MultiError

type MultiError struct {
	Errs []error
}

func NewMultiError

func NewMultiError(errs []error) *MultiError

func (MultiError) Error

func (m MultiError) Error() string

type ParsedFile

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

ParsedFile contains the parsed content and any error encountered during processing of a file.

func NewParsedFile

func NewParsedFile(content string, err error) *ParsedFile

func (*ParsedFile) Error

func (fe *ParsedFile) Error() string

Error returns the error message during parsing of the file.

func (*ParsedFile) FilterOsErrors

func (fe *ParsedFile) FilterOsErrors() *ParsedFile

FilterOsErrors filters out os.IsPermission and os.IsNotExist errors.

func (*ParsedFile) GetContent

func (fe *ParsedFile) GetContent() string

GetContent returns the raw content of the parsed file.

func (*ParsedFile) GetRawError

func (fe *ParsedFile) GetRawError() error

GetRawError returns the raw error during parsing of the file.

func (*ParsedFile) IsResultConclusive

func (fe *ParsedFile) IsResultConclusive() bool

IsResultConclusive indicates if caching results are processed.

type RefTypeMetadata

type RefTypeMetadata string

RefTypeMetadata specifies the type of installation specification that could be provided as part of a custom resource. This time is used in codec to successfully decode from raw extensions. +kubebuilder:validation:Enum=helm-chart;oci-ref;"kustomize";""

const (
	HelmChartType RefTypeMetadata = "helm-chart"
	OciRefType    RefTypeMetadata = "oci-ref"
	KustomizeType RefTypeMetadata = "kustomize"
	NilRefType    RefTypeMetadata = ""
)

func GetSpecType

func GetSpecType(data []byte) (RefTypeMetadata, error)

func (RefTypeMetadata) NotEmpty

func (r RefTypeMetadata) NotEmpty() bool

type ResourceLists

type ResourceLists struct {
	Target    kube.ResourceList
	Installed kube.ResourceList
	Namespace kube.ResourceList
}

Jump to

Keyboard shortcuts

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