annotations

package
v0.2.0-387 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BindingTypeVolumeMount indicates the binding should happen through a volume mount.
	BindingTypeVolumeMount bindingType = "volumemount"
	// BindingTypeEnvVar indicates the binding should happen through environment variables.
	BindingTypeEnvVar bindingType = "env"
)
View Source
const (
	// ServiceBindingOperatorAnnotationPrefix is the prefix of Service Binding Operator related annotations.
	ServiceBindingOperatorAnnotationPrefix = "servicebindingoperator.redhat.io/"
)

Variables

View Source
var ErrEmptyAnnotationName = errors.New("empty annotation name")
View Source
var ErrInvalidAnnotationName = errors.New("invalid annotation name")
View Source
var ErrInvalidAnnotationPrefix = errors.New("invalid annotation prefix")

Functions

func BuildHandler

func BuildHandler(
	kubeClient dynamic.Interface,
	obj *unstructured.Unstructured,
	annotationKey string,
	annotationValue string,
	restMapper meta.RESTMapper,
) (handler, error)

BuildHandler attempts to create an annotation handler for the given annotationKey and annotationValue. kubeClient is required by some annotation handlers, and an error is returned in the case it is required by an annotation handler but is not defined.

func IsErrHandlerNotFound

func IsErrHandlerNotFound(err error) bool

func NewBindingInfo

func NewBindingInfo(name string, value string) (*bindingInfo, error)

NewBindingInfo parses the encoded in the annotation name, returning its parts.

func NewResourceHandler

func NewResourceHandler(
	client dynamic.Interface,
	bi *bindingInfo,
	resource unstructured.Unstructured,
	relatedGroupVersionResource schema.GroupVersionResource,
	inputPathPrefix *string,
	restMapper meta.RESTMapper,
) (*resourceHandler, error)

NewSecretHandler constructs a SecretHandler.

Types

This section is empty.

Jump to

Keyboard shortcuts

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