Documentation ¶
Index ¶
- Constants
- Variables
- func ExtractApplicationLabels(meta *metav1.ObjectMeta) map[string]string
- func FillDestinationPort(vs *clientgonetworkingv1alpha3.VirtualService, service *v1.Service)
- func GetApplictionName(lbs map[string]string) string
- func GetComponentName(meta *metav1.ObjectMeta) string
- func GetComponentVersion(meta *metav1.ObjectMeta) string
- func IsApplicationComponent(lbs map[string]string) bool
- func IsServicemeshEnabled(annotations map[string]string) bool
- func NormalizeVersionName(version string) string
Constants ¶
View Source
const ( AppLabel = "app" VersionLabel = "version" ApplicationNameLabel = "app.kubernetes.io/name" ApplicationVersionLabel = "app.kubernetes.io/version" ServiceMeshEnabledAnnotation = "servicemesh.kubesphere.io/enabled" )
Variables ¶
View Source
var ApplicationLabels = [...]string{ ApplicationNameLabel, ApplicationVersionLabel, AppLabel, }
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 GetComponentName ¶
func GetComponentName(meta *metav1.ObjectMeta) string
func GetComponentVersion ¶
func GetComponentVersion(meta *metav1.ObjectMeta) string
func IsApplicationComponent ¶
func IsServicemeshEnabled ¶
func NormalizeVersionName ¶
normalize version names strip [_.-]
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.