const ( // ComponentDevMode indicates the resource is deployed using dev command ComponentDevMode = "Dev" // ComponentDeployMode indicates the resource is deployed using deploy command ComponentDeployMode = "Deploy" // ComponentAnyMode is used to search resources deployed using either dev or deploy command ComponentAnyMode = "" )
func AddCommonAnnotations(annotations map[string]string)
func AddStorageInfo(labels map[string]string, storageName string, isSourceVolume bool)
AddStorageInfo adds labels for storage resources
func Builder() builder
func GetAppName(labels map[string]string) string
func GetComponentName(labels map[string]string) string
func GetDevfileStorageName(labels map[string]string) string
func GetLabels(componentName string, applicationName string, runtime string, mode string, isPartOfComponent bool) map[string]string
GetLabels return labels that should be applied to every object for given component in active application if you need labels to filter component then use GetSelector instead Note: isPartOfComponent denotes if the label is required for a core resource(deployment, svc, pvc, pv) of a given component deployed with `odo dev`; it is the only thing that sets it apart from the resources created via other ways (`odo deploy`, deploying resource with apply command during `odo dev`)
func GetManagedBy(labels map[string]string) string
func GetManagedByVersion(labels map[string]string) string
func GetMode(labels map[string]string) string
func GetNameSelector(componentName string) string
func GetProjectType(labels map[string]string, annotations map[string]string) (string, error)
func GetSelector(componentName string, applicationName string, mode string, isPartOfComponent bool) string
GetSelector returns a selector string used for selection of resources which are part of the given component in given mode Note: isPartOfComponent denotes if the selector is required for a core resource(deployment, svc, pvc, pv) of a given component deployed with `odo dev` it is the only thing that sets it apart from the resources created via other ways (`odo deploy`, deploying resource with apply command during `odo dev`)
func GetStorageName(labels map[string]string) string
func IsCoreComponent(labels map[string]string) bool
IsCoreComponent determines if a resource is core component (created in Dev mode and includes deployment, svc, pv, pvc, etc.) by checking for 'component' label key.
func IsManagedByOdo(labels map[string]string) bool
func IsProjectTypeSetInAnnotations(annotations map[string]string) bool
IsProjectTypeSetInAnnotations checks if the ProjectType annotation is set; this function is helpful in identifying if a resource is created by odo
func SelectorBuilder() selectorBuilder
func SetProjectType(annotations map[string]string, value string)