util

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ComponentName is the name of this project
	ComponentName = "captain"

	//LeaderLockName is the name of lock for leader election
	LeaderLockName = "captain-controller-lock"

	// FinalizerName is the finalizer name we append to each HelmRequest resource
	FinalizerName = "captain.cpaas.io"

	// ProjectKey is the annotation key for project
	ProjectKey = "alauda.io/project"

	// NoSyncAnotation indicate to ignore a helmrequest
	NoSyncAnotation = "captain-no-sync"

	// KubectlCaptainSync is a key in annotations to indicate that kubectl-captain have force
	// trigger a upgrade for this HelmRequest, we need to resync it. Usally it's value is current timestamp
	KubectlCaptainSync = "kubectl-captain.resync"

	// KeepResourcesAnnotation indicate to keep k8s resources when uninstall a chart
	KeepResourcesAnnotation = "captain-keep-resources"

	// ForceAdoptResourcesAnnotation indicate to force adopt resources when insall or upgrade a chart
	ForceAdoptResourcesAnnotation = "captain-force-adopt-resources"
)

Variables

This section is empty.

Functions

func InstallCRDIfRequired added in v0.9.3

func InstallCRDIfRequired(cfg *rest.Config, required bool) error

InstallCRDIfRequired install helmrequest CRD may be we should move it out of main

func InstallHelmRequestCRD added in v0.9.3

func InstallHelmRequestCRD(cfg *rest.Config) error

InstallHelmRequestCRD install HelmRequest crd with timeout

func NewOwnerRef added in v0.9.2

func NewOwnerRef(owner metav1.Object, gvk schema.GroupVersionKind) *metav1.OwnerReference

NewOwnerRef creates an OwnerReference pointing to the given owner.

func ParseChartName

func ParseChartName(name string) (repo, chart string)

ParseChartName is a simple function that parse chart name

Types

This section is empty.

Jump to

Keyboard shortcuts

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