util

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2021 License: Apache-2.0 Imports: 5 Imported by: 3

Documentation

Index

Constants

View Source
const (
	AppLabel                     = "app"
	VersionLabel                 = "version"
	ApplicationNameLabel         = "app.kubernetes.io/name"
	ApplicationVersionLabel      = "app.kubernetes.io/version"
	ServiceMeshEnabledAnnotation = "servicemesh.kubesphere.io/enabled"
)

Variables

resource with these following labels considered as part of servicemesh

View Source
var TrimChars = [...]string{".", "_", "-"}

Functions

func ExtractApplicationLabels

func ExtractApplicationLabels(meta *metav1.ObjectMeta) map[string]string

func FillDestinationPort

func FillDestinationPort(vs *clientgonetworkingv1alpha3.VirtualService, service *v1.Service)

if virtualservice not specified with port number, then fill with service first port

func GetApplictionName

func GetApplictionName(lbs map[string]string) string

func GetComponentName

func GetComponentName(meta *metav1.ObjectMeta) string

func GetComponentVersion

func GetComponentVersion(meta *metav1.ObjectMeta) string

func IsApplicationComponent

func IsApplicationComponent(lbs map[string]string) bool

func IsServicemeshEnabled

func IsServicemeshEnabled(annotations map[string]string) bool

func NormalizeVersionName

func NormalizeVersionName(version string) string

normalize version names strip [_.-]

Types

This section is empty.

Jump to

Keyboard shortcuts

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