Skip to content

Commit

Permalink
[v1.73] Fix issues with gateway-badging in graph (#6770)
Browse files Browse the repository at this point in the history
* Fix issues with gateway-badging in graph (#6747)
- Fix server-side issue in gateway detection

Backport for #6740
  • Loading branch information
jshaughn committed Oct 24, 2023
1 parent 5a93567 commit 463bb54
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -55,6 +55,8 @@ operator
# Do not commit helm-charts code to this repo
helm-charts

# Ignore ansible if a dev has installed it under kiali for convenience
ansible

############################################
# FRONTEND #
Expand Down
Expand Up @@ -267,6 +267,7 @@ export class GraphStyles {
if (node.hasWorkloadEntry) {
badges = `<span class="${NodeIconWorkloadEntry} ${badgeMargin(badges)}"></span> ${badges}`;
}

if (node.isRoot) {
if (
node.isGateway?.ingressInfo?.hostnames?.length !== undefined ||
Expand Down
6 changes: 4 additions & 2 deletions graph/telemetry/istio/appender/istio_details.go
Expand Up @@ -334,7 +334,8 @@ func (a IstioAppender) decorateGateways(trafficMap graph.TrafficMap, globalInfo
if len(ingressNodeMapping) != 0 || len(egressNodeMapping) != 0 {
gatewaysCrds := a.getIstioGatewayResources(globalInfo)

for cluster, gwCrds := range gatewaysCrds {
for accessibleNamespaceKey, gwCrds := range gatewaysCrds {
cluster := strings.Split(accessibleNamespaceKey, ":")[0]
for _, gwCrd := range gwCrds {
decorateMatchingGateways(cluster, gwCrd, ingressNodeMapping, graph.IsIngressGateway)
decorateMatchingGateways(cluster, gwCrd, egressNodeMapping, graph.IsEgressGateway)
Expand All @@ -346,7 +347,8 @@ func (a IstioAppender) decorateGateways(trafficMap graph.TrafficMap, globalInfo
if len(gatewayAPINodeMapping) != 0 {
gatewaysCrds := a.getGatewayAPIResources(globalInfo)

for cluster, gwCrds := range gatewaysCrds {
for accessibleNamespaceKey, gwCrds := range gatewaysCrds {
cluster := strings.Split(accessibleNamespaceKey, ":")[0]
for _, gwCrd := range gwCrds {
decorateMatchingAPIGateways(cluster, gwCrd, gatewayAPINodeMapping, graph.IsGatewayAPI)
}
Expand Down

0 comments on commit 463bb54

Please sign in to comment.