fix application bug
This commit is contained in:
@@ -18,6 +18,7 @@ const (
|
||||
// resource with these following labels considered as part of servicemesh
|
||||
var ApplicationLabels = [...]string{
|
||||
ApplicationNameLabel,
|
||||
ApplicationVersionLabel,
|
||||
AppLabel,
|
||||
}
|
||||
|
||||
@@ -32,6 +33,14 @@ func NormalizeVersionName(version string) string {
|
||||
return version
|
||||
}
|
||||
|
||||
func GetApplictionName(lbs map[string]string) string {
|
||||
if name, ok := lbs[ApplicationNameLabel]; ok {
|
||||
return name
|
||||
}
|
||||
return ""
|
||||
|
||||
}
|
||||
|
||||
func GetComponentName(meta *metav1.ObjectMeta) string {
|
||||
if len(meta.Labels[AppLabel]) > 0 {
|
||||
return meta.Labels[AppLabel]
|
||||
|
||||
Reference in New Issue
Block a user