File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ const (
2828 ServiceGroupLabel = "jmsf.jd.com/group"
2929 ServiceSpaceLabel = "jmsf.jd.com/space"
3030 JdapServiceSpaceLabel = "jmsf.jd.com/service-space"
31- ApplicationLabel = "jmsf.jd.com/application "
31+ ApplicationLabel = "jmsf.jd.com/app "
3232 JdapApplicationLabel = "app.jdap.io/name"
3333 WebHookMatchKeyEnv = "JOYLIVE_MATCH_KEY"
3434 WebHookMatchValueEnv = "JOYLIVE_MATCH_VALUE"
Original file line number Diff line number Diff line change @@ -19,9 +19,13 @@ type ApplicationEnvResponse struct {
1919}
2020
2121func GetApplicationEnvironments (labels map [string ]string ) (map [string ]string , error ) {
22- serviceSpace , application := labels [config .ServiceSpaceLabel ], labels [config .ApplicationLabel ]
23- if len (serviceSpace ) == 0 || len (application ) == 0 {
24- serviceSpace , application = labels [config .JdapServiceSpaceLabel ], labels [config .JdapApplicationLabel ]
22+ serviceSpace := labels [config .ServiceSpaceLabel ]
23+ application := labels [config .ApplicationLabel ]
24+ if len (serviceSpace ) == 0 {
25+ serviceSpace = labels [config .JdapServiceSpaceLabel ]
26+ }
27+ if len (application ) == 0 {
28+ application = labels [config .JdapApplicationLabel ]
2529 }
2630 envMaps := make (map [string ]string )
2731 if len (serviceSpace ) != 0 && len (application ) != 0 {
You can’t perform that action at this time.
0 commit comments