utils

package
v0.0.0-...-cc682f1 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2020 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Asset status.
	AssetStatusActive  = "active"
	AssetStatusFailed  = "failed"
	AssetStatusUnknown = "unknown"
)

Variables

This section is empty.

Functions

func DeleteAsset

func DeleteAsset(c client.Client, asset kabanerov1alpha2.RepositoryAssetStatus, assetOwner metav1.OwnerReference, logger logr.Logger) error

Deletes an asset. This can mean removing an object owner, or completely deleting it.

func DownloadToByte

func DownloadToByte(c client.Client, namespace string, url string, gitRelease kabanerov1alpha2.GitReleaseInfo, skipCertVerification bool, reqLogger logr.Logger) ([]byte, error)

Types

type DirectiveProcessor

type DirectiveProcessor struct {
}

The DirectiveProcessor processes text processing directives found in the yaml source

func (DirectiveProcessor) Render

func (g DirectiveProcessor) Render(b []byte, context map[string]interface{}) ([]byte, error)

type PipelineUseMap

type PipelineUseMap map[PipelineUseMapKey]*PipelineUseMapValue

func ActivatePipelines

func ActivatePipelines(spec kabanerov1alpha2.ComponentSpec, status kabanerov1alpha2.ComponentStatus, targetNamespace string, renderingContext map[string]interface{}, assetOwner metav1.OwnerReference, c client.Client, logger logr.Logger) (PipelineUseMap, error)

type PipelineUseMapKey

type PipelineUseMapKey struct {
	Url        string
	GitRelease kabanerov1alpha2.GitReleaseInfo
	Digest     string
}

A key to the pipeline use count map

type PipelineUseMapValue

type PipelineUseMapValue struct {
	kabanerov1alpha2.PipelineStatus

	ManifestError error
	// contains filtered or unexported fields
}

The value in the pipeline use count map

type StackAsset

type StackAsset struct {
	Name    string
	Group   string
	Version string
	Kind    string
	Sha256  string
	Yaml    unstructured.Unstructured
}

This is the rendered asset, including its sha256 from the manifest.

func GetManifests

func GetManifests(c client.Client, namespace string, pipelineStatus kabanerov1alpha2.PipelineStatus, renderingContext map[string]interface{}, skipCertVerification bool, reqLogger logr.Logger) ([]StackAsset, error)

type StackContents

type StackContents struct {
	File   string `yaml:"file,omitempty"`
	Sha256 string `yaml:"sha256,omitempty"`
}

type StackManifest

type StackManifest struct {
	Contents []StackContents `yaml:"contents,omitempty"`
}

Stack archive manifest.yaml

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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