Skip to content

Commit

Permalink
feat(kiali): istio config list and details (janus-idp#1326)
Browse files Browse the repository at this point in the history
* istio config

* fixing link issues

* updated entity view

* fix hook issue
  • Loading branch information
leandroberetta authored Apr 3, 2024
1 parent d59ad04 commit f8fc349
Show file tree
Hide file tree
Showing 38 changed files with 2,497 additions and 234 deletions.
326 changes: 242 additions & 84 deletions plugins/kiali/dev/__fixtures__/general/istioConfig.json

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions plugins/kiali/dev/__fixtures__/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ import bookinfoHealthApp from './namespaces/bookinfo/health/app.json';
import bookinfoHealthService from './namespaces/bookinfo/health/service.json';
import bookinfoHealthWorkload from './namespaces/bookinfo/health/workload.json';
import bookinfoIstioConfig from './namespaces/bookinfo/istio_config.json';
import bookinfoGateway from './namespaces/bookinfo/istio_configs/gateways/bookinfo-gateway.json';
import bookinfoVirtualService from './namespaces/bookinfo/istio_configs/virtualservices/bookinfo.json';
import bookInfoMetrics from './namespaces/bookinfo/metrics';
import bookinfoServices from './namespaces/bookinfo/services.json';
import detailsService from './namespaces/bookinfo/services/details.json';
Expand Down Expand Up @@ -124,6 +126,9 @@ import travelControlHealthApp from './namespaces/travel-control/health/app.json'
import travelControlHealthService from './namespaces/travel-control/health/service.json';
import travelControlHealthWorkload from './namespaces/travel-control/health/workload.json';
import travelControlIstioConfig from './namespaces/travel-control/istio_config.json';
import controlDR from './namespaces/travel-control/istio_configs/destinationrules/control.json';
import controlGW from './namespaces/travel-control/istio_configs/gateways/control-gateway.json';
import controlVR from './namespaces/travel-control/istio_configs/virtualservices/control.json';
import travelControlMetrics from './namespaces/travel-control/metrics';
import travelControlServices from './namespaces/travel-control/services.json';
import controlService from './namespaces/travel-control/services/control.json';
Expand Down Expand Up @@ -236,6 +241,14 @@ export const kialiData: { [index: string]: any } = {
reviews: reviewsApp,
kialitrafficgenerator: kialiTrafficGeneratorApp,
},
istioConfigDetails: {
gateways: {
'bookinfo-gateway': bookinfoGateway,
},
virtualservices: {
bookinfo: bookinfoVirtualService,
},
},
istioConfigList: bookinfoIstioConfig,
dashboard: bookinfoDashboard,
spans: bookinfoSpans,
Expand All @@ -257,6 +270,17 @@ export const kialiData: { [index: string]: any } = {
apps: {
control: controlApp,
},
istioConfigDetails: {
destinationrules: {
control: controlDR,
},
virtualservices: {
control: controlVR,
},
gateways: {
'control-gateway': controlGW,
},
},
istioConfigList: travelControlIstioConfig,
dashboard: travelControlDashboard,
spans: travelControlSpans,
Expand Down
166 changes: 108 additions & 58 deletions plugins/kiali/dev/__fixtures__/namespaces/bookinfo/istio_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,27 @@
"annotations": null
},
"destinationRules": [],
"envoyFilters": [
"envoyFilters": [],
"gateways": [
{
"kind": "EnvoyFilter",
"apiVersion": "networking.istio.io/v1alpha3",
"kind": "Gateway",
"apiVersion": "networking.istio.io/v1beta1",
"metadata": {
"name": "reviews-lua",
"name": "bookinfo-gateway",
"namespace": "bookinfo",
"uid": "6188f1b2-d252-441b-912f-abd011ff8556",
"resourceVersion": "90356",
"generation": 1,
"creationTimestamp": "2024-02-19T09:39:06Z",
"uid": "6369d379-ce97-4a77-98ef-5702845ddc56",
"resourceVersion": "811259",
"generation": 3,
"creationTimestamp": "2024-03-05T14:38:05Z",
"annotations": {
"kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"networking.istio.io/v1alpha3\",\"kind\":\"EnvoyFilter\",\"metadata\":{\"annotations\":{},\"name\":\"reviews-lua\",\"namespace\":\"bookinfo\"},\"spec\":{\"workloadSelector\":{\"labels\":{\"app\":\"reviews\"}}}}\n"
"kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"networking.istio.io/v1alpha3\",\"kind\":\"Gateway\",\"metadata\":{\"annotations\":{},\"name\":\"bookinfo-gateway\",\"namespace\":\"bookinfo\"},\"spec\":{\"selector\":{\"istio\":\"ingressgateway\"},\"servers\":[{\"hosts\":[\"*\"],\"port\":{\"name\":\"http\",\"number\":8080,\"protocol\":\"HTTP\"}}]}}\n"
},
"managedFields": [
{
"manager": "kubectl-client-side-apply",
"operation": "Update",
"apiVersion": "networking.istio.io/v1alpha3",
"time": "2024-02-19T09:39:06Z",
"time": "2024-03-05T14:38:05Z",
"fieldsType": "FieldsV1",
"fieldsV1": {
"f:metadata": {
Expand All @@ -37,48 +38,67 @@
},
"f:spec": {
".": {},
"f:workloadSelector": {
".": {},
"f:labels": {
".": {},
"f:app": {}
}
"f:selector": {},
"f:servers": {}
}
}
},
{
"manager": "kiali",
"operation": "Update",
"apiVersion": "networking.istio.io/v1beta1",
"time": "2024-03-20T12:42:26Z",
"fieldsType": "FieldsV1",
"fieldsV1": {
"f:spec": {
"f:selector": {
"f:istio": {}
}
}
}
}
]
},
"spec": {
"workloadSelector": {
"labels": {
"app": "reviews"
"servers": [
{
"port": {
"number": 8080,
"protocol": "HTTP",
"name": "http"
},
"hosts": ["*"]
}
],
"selector": {
"istio": "ingressgateway"
}
},
"status": {}
}
],
"gateways": [
"serviceEntries": [],
"sidecars": [],
"virtualServices": [
{
"kind": "Gateway",
"kind": "VirtualService",
"apiVersion": "networking.istio.io/v1beta1",
"metadata": {
"name": "bookinfo-gateway",
"name": "bookinfo",
"namespace": "bookinfo",
"uid": "39d3bdc1-0b75-41ad-b6c4-7b5e62266d4f",
"resourceVersion": "942",
"generation": 1,
"creationTimestamp": "2024-02-26T09:51:07Z",
"uid": "16c9b2e6-4bc2-426c-9464-853a4148435f",
"resourceVersion": "784735",
"generation": 9,
"creationTimestamp": "2024-03-05T14:38:05Z",
"annotations": {
"kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"networking.istio.io/v1alpha3\",\"kind\":\"Gateway\",\"metadata\":{\"annotations\":{},\"name\":\"bookinfo-gateway\",\"namespace\":\"bookinfo\"},\"spec\":{\"selector\":{\"istio\":\"ingressgateway\"},\"servers\":[{\"hosts\":[\"*\"],\"port\":{\"name\":\"http\",\"number\":8080,\"protocol\":\"HTTP\"}}]}}\n"
"kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"networking.istio.io/v1alpha3\",\"kind\":\"VirtualService\",\"metadata\":{\"annotations\":{},\"name\":\"bookinfo\",\"namespace\":\"bookinfo\"},\"spec\":{\"gateways\":[\"bookinfo-gateway\"],\"hosts\":[\"*\"],\"http\":[{\"match\":[{\"uri\":{\"exact\":\"/productpage\"}},{\"uri\":{\"prefix\":\"/static\"}},{\"uri\":{\"exact\":\"/login\"}},{\"uri\":{\"exact\":\"/logout\"}},{\"uri\":{\"prefix\":\"/api/v1/products\"}}],\"route\":[{\"destination\":{\"host\":\"productpage\",\"port\":{\"number\":9080}}}]}]}}\n"
},
"managedFields": [
{
"manager": "kubectl-client-side-apply",
"operation": "Update",
"apiVersion": "networking.istio.io/v1alpha3",
"time": "2024-02-26T09:51:07Z",
"time": "2024-03-05T14:38:05Z",
"fieldsType": "FieldsV1",
"fieldsV1": {
"f:metadata": {
Expand All @@ -89,55 +109,85 @@
},
"f:spec": {
".": {},
"f:selector": {
".": {},
"f:istio": {}
},
"f:servers": {}
"f:hosts": {},
"f:http": {}
}
}
},
{
"manager": "kiali",
"operation": "Update",
"apiVersion": "networking.istio.io/v1beta1",
"time": "2024-03-19T14:43:01Z",
"fieldsType": "FieldsV1",
"fieldsV1": {
"f:spec": {
"f:gateways": {}
}
}
}
]
},
"spec": {
"servers": [
"hosts": ["*"],
"gateways": ["bookinfo-gateway"],
"http": [
{
"port": {
"number": 8080,
"protocol": "HTTP",
"name": "http"
},
"hosts": ["*"]
"match": [
{
"uri": {
"exact": "/productpage"
}
},
{
"uri": {
"prefix": "/static"
}
},
{
"uri": {
"exact": "/login"
}
},
{
"uri": {
"exact": "/logout"
}
},
{
"uri": {
"prefix": "/api/v1/products"
}
}
],
"route": [
{
"destination": {
"host": "productpage",
"port": {
"number": 9080
}
}
}
]
}
],
"selector": {
"istio": "ingressgateway"
}
]
},
"status": {}
}
],
"serviceEntries": [],
"sidecars": [],
"virtualServices": [],
"workloadEntries": [],
"workloadGroups": [],
"wasmPlugins": [],
"telemetries": [],
"k8sGateways": [],
"k8sGRPCRoutes": [],
"k8sHTTPRoutes": [],
"k8sReferenceGrants": [],
"k8sTCPRoutes": [],
"k8sTLSRoutes": [],
"authorizationPolicies": [],
"peerAuthentications": [],
"requestAuthentications": [],
"validations": {
"gateway": {
"bookinfo-gateway.bookinfo": {
"name": "bookinfo-gateway",
"objectType": "gateway",
"valid": true,
"checks": [],
"references": null
}
}
}
"validations": {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
{
"namespace": {
"name": "bookinfo",
"cluster": "",
"isAmbient": false,
"labels": null,
"annotations": null
},
"objectType": "gateways",
"authorizationPolicy": null,
"destinationRule": null,
"envoyFilter": null,
"gateway": {
"kind": "Gateway",
"apiVersion": "networking.istio.io/v1beta1",
"metadata": {
"name": "bookinfo-gateway",
"namespace": "bookinfo",
"uid": "6369d379-ce97-4a77-98ef-5702845ddc56",
"resourceVersion": "811259",
"generation": 3,
"creationTimestamp": "2024-03-05T14:38:05Z",
"annotations": {
"kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"networking.istio.io/v1alpha3\",\"kind\":\"Gateway\",\"metadata\":{\"annotations\":{},\"name\":\"bookinfo-gateway\",\"namespace\":\"bookinfo\"},\"spec\":{\"selector\":{\"istio\":\"ingressgateway\"},\"servers\":[{\"hosts\":[\"*\"],\"port\":{\"name\":\"http\",\"number\":8080,\"protocol\":\"HTTP\"}}]}}\n"
},
"managedFields": [
{
"manager": "kubectl-client-side-apply",
"operation": "Update",
"apiVersion": "networking.istio.io/v1alpha3",
"time": "2024-03-05T14:38:05Z",
"fieldsType": "FieldsV1",
"fieldsV1": {
"f:metadata": {
"f:annotations": {
".": {},
"f:kubectl.kubernetes.io/last-applied-configuration": {}
}
},
"f:spec": {
".": {},
"f:selector": {},
"f:servers": {}
}
}
},
{
"manager": "kiali",
"operation": "Update",
"apiVersion": "networking.istio.io/v1beta1",
"time": "2024-03-20T12:42:26Z",
"fieldsType": "FieldsV1",
"fieldsV1": {
"f:spec": {
"f:selector": {
"f:istio": {}
}
}
}
}
]
},
"spec": {
"servers": [
{
"port": {
"number": 8080,
"protocol": "HTTP",
"name": "http"
},
"hosts": ["*"]
}
],
"selector": {
"istio": "ingressgateway"
}
},
"status": {}
},
"peerAuthentication": null,
"requestAuthentication": null,
"serviceEntry": null,
"sidecar": null,
"virtualService": null,
"workloadEntry": null,
"workloadGroup": null,
"wasmPlugin": null,
"telemetry": null,
"k8sGateway": null,
"k8sGRPCRoute": null,
"k8sHTTPRoute": null,
"k8sReferenceGrant": null,
"k8sTCPRoute": null,
"k8sTLSRoute": null,
"permissions": {
"create": true,
"update": true,
"delete": true
},
"validation": null,
"references": null,
"help": null
}
Loading

0 comments on commit f8fc349

Please sign in to comment.