Skip to content

Commit 30ec0cf

Browse files
committed
cwp_adding wild-cards with clusterDomain
1 parent 796738b commit 30ec0cf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkg/monitor/cluster/clusterwideproxystatus.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ func (mon *Monitor) emitCWPStatus(ctx context.Context) error {
162162
return err
163163
}
164164
clusterDomain := clusterdetails.Spec.Domain
165-
if !(noProxyMap[clusterDomain] || noProxyMap[".apps."+clusterDomain] || noProxyMap["."+clusterDomain]) {
165+
if !(noProxyMap[clusterDomain] || noProxyMap[".apps."+clusterDomain] || noProxyMap["."+clusterDomain] || noProxyMap["*."+clusterDomain] || noProxyMap["*.apps."+clusterDomain]) {
166166
missing_no_proxy_list = append(missing_no_proxy_list, clusterDomain)
167167
}
168168
for _, gatewayDomain := range clusterdetails.Spec.GatewayDomains {
@@ -186,7 +186,7 @@ func (mon *Monitor) emitCWPStatus(ctx context.Context) error {
186186
return err
187187
}
188188
apiServerIntdomain := strings.Split(apiServerIntURL.Host, ":")[0]
189-
if !noProxyMap[apiServerIntdomain] {
189+
if !(noProxyMap[apiServerIntdomain] || noProxyMap["*."+clusterDomain]) {
190190
missing_no_proxy_list = append(missing_no_proxy_list, apiServerIntdomain)
191191
}
192192

@@ -197,7 +197,7 @@ func (mon *Monitor) emitCWPStatus(ctx context.Context) error {
197197
return err
198198
}
199199
apiServerProfiledomain := strings.Split(apiServerProfileURL.Host, ":")[0]
200-
if !noProxyMap[apiServerProfiledomain] {
200+
if !(noProxyMap[apiServerProfiledomain] || noProxyMap["*."+clusterDomain]) {
201201
missing_no_proxy_list = append(missing_no_proxy_list, apiServerProfiledomain)
202202
}
203203

@@ -208,7 +208,7 @@ func (mon *Monitor) emitCWPStatus(ctx context.Context) error {
208208
"status": strconv.FormatBool(status),
209209
"Message": message,
210210
})
211-
mon.log.Info(message)
211+
mon.log.Infof(message)
212212
if mon.hourlyRun {
213213
mon.log.WithFields(logrus.Fields{
214214
"metric": cwp,

0 commit comments

Comments
 (0)