Skip to content

Commit

Permalink
feat(dataplanes): show gateway and inbound data
Browse files Browse the repository at this point in the history
Cleans up the TagList component. Removes its access to router/route-specific services. Adds a link for mesh annotations. Wraps the TagList in KTruncate.

Changes the dataplane detail and summary views to show tags and address per inbound (for standard DPPs) or for the gateway (for gateway DPPs).

Updates mocks to make DPP certificates random per item instead of per list. Also fixes an issue with the mocks adding an extra `mTLS` property.

Signed-off-by: Philipp Rudloff <[email protected]>
  • Loading branch information
Philipp Rudloff committed Nov 9, 2023
1 parent dbdeec7 commit 01fed55
Show file tree
Hide file tree
Showing 21 changed files with 737 additions and 357 deletions.
90 changes: 90 additions & 0 deletions features/mesh/dataplanes/DataplaneDetailsBuiltinGateway.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
Feature: Dataplane details for built-in gateway
Background:
Given the CSS selectors
| Alias | Selector |
| detail-view | [data-testid='data-plane-detail-tabs-view'] |
| policies-view | [data-testid='data-plane-policies-view'] |
| overview-tab | #data-plane-detail-view-tab a |
| policies-tab | #data-plane-policies-view-tab a |
| warnings | [data-testid='dataplane-warnings'] |
| details | [data-testid='dataplane-details'] |
| gateway | [data-testid='dataplane-gateway'] |
| inbounds | [data-testid='dataplane-inbounds'] |
| route-item | [data-testid='builtin-gateway-dataplane-policies'] .accordion-item |
| route-item-button | $route-item:nth-child(1) [data-testid='accordion-item-button'] |
And the environment
"""
KUMA_SUBSCRIPTION_COUNT: 2
KUMA_DATAPLANEINBOUND_COUNT: 0
KUMA_MODE: global
"""
And the URL "/meshes/default/dataplanes/dataplane-gateway_builtin-1/_overview" responds with
"""
body:
mesh: default
dataplane:
networking:
address: 193.107.134.106
gateway:
type: BUILTIN
tags:
kuma.io/protocol: http
kuma.io/zone: zone-1
inbound: !!js/undefined
dataplaneInsight:
subscriptions:
- controlPlaneInstanceId: 'dpp-1-cp-instance-id'
connectTime: 2021-02-17T07:33:36.412683Z
disconnectTime: 2021-02-17T07:33:36.412683Z
- controlPlaneInstanceId: 'dpp-1-cp-instance-id'
connectTime: 2021-02-17T07:33:36.412683Z
disconnectTime: !!js/undefined
version:
kumaDp:
version: 1.0.8
kumaCpCompatible: true
envoy:
kumaDpCompatible: true
"""

When I visit the "/meshes/default/data-planes/dataplane-gateway_builtin-1/overview" URL

Scenario: Overview tab has expected content
Then the page title contains "dataplane-gateway_builtin-1"
And the "$detail-view" element contains "dataplane-gateway_builtin-1"
And the "$warnings" element doesn't exist
And the "$details" element contains "online"
And the "$gateway" element contains "193.107.134.106"
And the "$gateway" element contains "kuma.io/protocol:http"
And the "$gateway" element contains "kuma.io/zone:zone-1"
And the "$inbounds" element doesn't exist

Scenario: Policies tab has expected content
Given the URL "/meshes/default/dataplanes/dataplane-gateway_builtin-1/policies" responds with
"""
body:
listeners:
- hosts:
- routes:
- destinations:
- tags:
kuma.io/service: demo-app_kuma-demo_svc_5000
policies:
CircuitBreaker:
name: circuit-breaker-1
policies:
TrafficLog:
name: traffic-log-1
TrafficTrace:
name: traffic-trace-1
"""

When I click the "$policies-tab" element

Then the "$policies-view" element contains "traffic-log-1"
And the "$policies-view" element contains "traffic-trace-1"

When I click the "$route-item-button" element

Then the "$policies-view" element contains "circuit-breaker-1"
And the "$policies-view" element contains "demo-app_kuma-demo_svc_5000"
93 changes: 93 additions & 0 deletions features/mesh/dataplanes/DataplaneDetailsDelegatedGateway.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
Feature: Dataplane details for delegated gateway
Background:
Given the CSS selectors
| Alias | Selector |
| detail-view | [data-testid='data-plane-detail-tabs-view'] |
| policies-view | [data-testid='data-plane-policies-view'] |
| overview-tab | #data-plane-detail-view-tab a |
| policies-tab | #data-plane-policies-view-tab a |
| warnings | [data-testid='dataplane-warnings'] |
| details | [data-testid='dataplane-details'] |
| gateway | [data-testid='dataplane-gateway'] |
| inbounds | [data-testid='dataplane-inbounds'] |
| policy-item | [data-testid='policy-list'] .accordion-item |
| policy-item-button | $policy-item:nth-child(1) [data-testid='accordion-item-button'] |
| rule-item | [data-testid='rule-list'] .accordion-item |
| rule-item-button | $rule-item:nth-child(1) [data-testid='accordion-item-button'] |
And the environment
"""
KUMA_SUBSCRIPTION_COUNT: 2
KUMA_DATAPLANEINBOUND_COUNT: 0
KUMA_MODE: global
"""
And the URL "/meshes/default/dataplanes/dataplane-gateway_delegated-1/_overview" responds with
"""
body:
mesh: default
dataplane:
networking:
address: 193.107.134.106
gateway:
type: DELEGATED
tags:
kuma.io/protocol: http
kuma.io/zone: zone-1
inbound: !!js/undefined
dataplaneInsight:
subscriptions:
- controlPlaneInstanceId: 'dpp-1-cp-instance-id'
connectTime: 2021-02-17T07:33:36.412683Z
disconnectTime: 2021-02-17T07:33:36.412683Z
- controlPlaneInstanceId: 'dpp-1-cp-instance-id'
connectTime: 2021-02-17T07:33:36.412683Z
disconnectTime: !!js/undefined
version:
kumaDp:
version: 1.0.8
kumaCpCompatible: true
envoy:
kumaDpCompatible: true
"""

When I visit the "/meshes/default/data-planes/dataplane-gateway_delegated-1/overview" URL

Scenario: Overview tab has expected content
Then the page title contains "dataplane-gateway_delegated-1"
And the "$detail-view" element contains "dataplane-gateway_delegated-1"
And the "$warnings" element doesn't exist
And the "$details" element contains "online"
And the "$gateway" element contains "193.107.134.106"
And the "$gateway" element contains "kuma.io/protocol:http"
And the "$gateway" element contains "kuma.io/zone:zone-1"
And the "$inbounds" element doesn't exist

Scenario: Policies tab has expected content
Given the URL "/meshes/default/dataplanes/dataplane-gateway_delegated-1/policies" responds with
"""
body:
items:
- matchedPolicies:
FaultInjection:
- sources:
- match:
kuma.io/service: service-a
"""
And the URL "/meshes/default/dataplanes/dataplane-gateway_delegated-1/rules" responds with
"""
body:
items:
- name: ''
- name: demo-app_kuma-demo_svc_5000
service: demo-app_kuma-demo_svc_5000
tags:
kuma.io/service: demo-app_kuma-demo_svc_5000
"""

When I click the "$policies-tab" element
And I click the "$policy-item-button" element

Then the "$policies-view" element contains "kuma.io/service:service-a"

When I click the "$rule-item-button" element

Then the "$policies-view" element contains "kuma.io/service:demo-app_kuma-demo_svc_5000"
155 changes: 155 additions & 0 deletions features/mesh/dataplanes/DataplaneDetailsStandardProxy.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
Feature: Dataplane details for standard Data Plane Proxy
Background:
Given the CSS selectors
| Alias | Selector |
| detail-view | [data-testid='data-plane-detail-tabs-view'] |
| policies-view | [data-testid='data-plane-policies-view'] |
| clusters-view | [data-testid='data-plane-clusters-view'] |
| overview-tab | #data-plane-detail-view-tab a |
| policies-tab | #data-plane-policies-view-tab a |
| clusters-tab | #data-plane-clusters-view-tab a |
| warnings | [data-testid='dataplane-warnings'] |
| details | [data-testid='dataplane-details'] |
| gateway | [data-testid='dataplane-gateway'] |
| inbounds | [data-testid='dataplane-inbounds'] |
| subscriptions | [data-testid='dataplane-subscriptions'] |
| status-cds | [data-testid='subscription-status-cds'] |
| status-eds | [data-testid='subscription-status-eds'] |
| status-lds | [data-testid='subscription-status-lds'] |
| status-rds | [data-testid='subscription-status-rds'] |
| policy-item | [data-testid='policy-list'] .accordion-item |
| policy-item-button | $policy-item:nth-child(1) [data-testid='accordion-item-button'] |
| rule-item | [data-testid='rule-list'] .accordion-item |
| rule-item-button | $rule-item:nth-child(1) [data-testid='accordion-item-button'] |
And the environment
"""
KUMA_SUBSCRIPTION_COUNT: 2
KUMA_DATAPLANEINBOUND_COUNT: 1
KUMA_MODE: global
"""
And the URL "/meshes/default/dataplanes/dpp-1-name-of-dataplane/_overview" responds with
"""
body:
mesh: default
dataplane:
networking:
address: 193.107.134.106
gateway: !!js/undefined
inbound:
- health:
ready: true
port: 1328
serviceAddress: 44.167.201.218
servicePort: 62098
tags:
kuma.io/protocol: http
kuma.io/zone: zone-1
dataplaneInsight:
subscriptions:
- controlPlaneInstanceId: 'dpp-1-cp-instance-id'
connectTime: 2021-02-17T07:33:36.412683Z
disconnectTime: 2021-02-17T07:33:36.412683Z
version:
kumaDp:
version: 1.0.7
kumaCpCompatible: false
envoy:
kumaDpCompatible: false
- controlPlaneInstanceId: 'dpp-1-cp-instance-id'
connectTime: 2021-02-17T07:33:36.412683Z
disconnectTime: !!js/undefined
status:
total:
responsesSent: '12'
responsesAcknowledged: '10'
cds:
responsesSent: '2'
responsesAcknowledged: '1'
eds:
responsesSent: '4'
responsesAcknowledged: '3'
lds:
responsesSent: '6'
responsesAcknowledged: '6'
rds: {}
version:
kumaDp:
version: 1.0.8
kumaCpCompatible: true
envoy:
kumaDpCompatible: true
"""

When I visit the "/meshes/default/data-planes/dpp-1-name-of-dataplane/overview" URL

Scenario: Overview tab has expected content
Then the page title contains "dpp-1-name-of-dataplane"
And the "$detail-view" element contains "dpp-1-name-of-dataplane"
And the "$warnings" element doesn't exist
And the "$details" element contains "online"
And the "$gateway" element doesn't exist
And the "$inbounds" element contains "healthy"
And the "$inbounds" element contains "193.107.134.106:1328"
And the "$inbounds" element contains "44.167.201.218:62098"
And the "$inbounds" element contains "kuma.io/protocol:http"
And the "$inbounds" element contains "kuma.io/zone:zone-1"
And the "$subscriptions" element contains "Connected: Feb 17, 2021, 7:33 AM"
And the "$subscriptions" element contains "CP instance ID: dpp-1-cp-instance-id"

When I click the ".accordion-item:nth-child(1) [data-testid='accordion-item-button']" element

Then the "$status-cds" element contains "CDS"
And the "$status-cds" element contains "1"
And the "$status-cds" element contains "2"
And the "$status-eds" element contains "EDS"
And the "$status-eds" element contains "3"
And the "$status-eds" element contains "4"
And the "$status-lds" element contains "LDS"
And the "$status-lds" element contains "6"
And the "$status-rds" element contains "RDS"
And the "$status-rds" element contains "0"

Scenario: Policies tab has expected content
Given the URL "/meshes/default/dataplanes/dpp-1-name-of-dataplane/policies" responds with
"""
body:
items:
- matchedPolicies:
FaultInjection:
- sources:
- match:
kuma.io/service: service-a
"""
And the URL "/meshes/default/dataplanes/dpp-1-name-of-dataplane/rules" responds with
"""
body:
items:
- name: ''
- name: demo-app_kuma-demo_svc_5000
service: demo-app_kuma-demo_svc_5000
tags:
kuma.io/service: demo-app_kuma-demo_svc_5000
"""

When I click the "$policies-tab" element
And I click the "$policy-item-button" element

Then the "$policies-view" element contains "kuma.io/service:service-a"

When I click the "$rule-item-button" element

Then the "$policies-view" element contains "kuma.io/service:demo-app_kuma-demo_svc_5000"

Scenario: Clusters tab has expected content
Given the URL "/meshes/default/dataplanes/dpp-1-name-of-dataplane/clusters" responds with
"""
body:
access_log_sink::observability_name::access_log_sink
access_log_sink::default_priority::max_connections::1024
access_log_sink::default_priority::max_pending_requests::1024
access_log_sink::default_priority::max_requests::1024
"""

When I click the "$clusters-tab" element

Then the "$clusters-view" element contains "access_log_sink::observability_name::access_log_sink"
Loading

0 comments on commit 01fed55

Please sign in to comment.