Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding more Kinds for Authorinos, Limitadors and Kuadrants. Hide DNSRecords #147

Merged
merged 2 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions install.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
apiVersion: v1
kind: Namespace
metadata:
name: kuadrant-console-plugin
name: kuadrant-system
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: kuadrant-console-plugin
namespace: kuadrant-console-plugin
namespace: kuadrant-system
labels:
app: kuadrant-console-plugin
app.kubernetes.io/component: kuadrant-console-plugin
app.kubernetes.io/instance: kuadrant-console-plugin
app.kubernetes.io/name: kuadrant-console-plugin
app.kubernetes.io/part-of: kuadrant-console-plugin
app.openshift.io/runtime-namespace: kuadrant-console-plugin
app.openshift.io/runtime-namespace: kuadrant-system
spec:
replicas: 1
selector:
Expand Down Expand Up @@ -70,7 +70,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-conf
namespace: kuadrant-console-plugin
namespace: kuadrant-system
labels:
app: kuadrant-console-plugin
app.kubernetes.io/component: kuadrant-console-plugin
Expand Down Expand Up @@ -112,7 +112,7 @@ metadata:
annotations:
service.alpha.openshift.io/serving-cert-secret-name: plugin-serving-cert
name: kuadrant-console-plugin
namespace: kuadrant-console-plugin
namespace: kuadrant-system
labels:
app: kuadrant-console-plugin
app.kubernetes.io/component: kuadrant-console-plugin
Expand Down Expand Up @@ -140,6 +140,6 @@ spec:
type: Service
service:
name: kuadrant-console-plugin
namespace: kuadrant-console-plugin
namespace: kuadrant-system
port: 9443
basePath: '/'
3 changes: 2 additions & 1 deletion src/components/PolicyTopologyPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
configScript.innerHTML = script;
document.head.appendChild(configScript);

return (window as any).kuadrant_config || defaultConfig;

Check warning on line 69 in src/components/PolicyTopologyPage.tsx

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
} catch (error) {
console.error('Error loading config.js:', error);
return defaultConfig;
Expand All @@ -78,12 +78,12 @@
};

// Convert DOT graph to PatternFly node/edge models
const parseDotToModel = (dotString: string): { nodes: any[]; edges: any[] } => {

Check warning on line 81 in src/components/PolicyTopologyPage.tsx

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type

Check warning on line 81 in src/components/PolicyTopologyPage.tsx

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
try {
const graph = dot.read(dotString);
const nodes: any[] = [];

Check warning on line 84 in src/components/PolicyTopologyPage.tsx

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
const edges: any[] = [];

Check warning on line 85 in src/components/PolicyTopologyPage.tsx

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
const groups: any[] = [];

Check warning on line 86 in src/components/PolicyTopologyPage.tsx

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
const connectedNodeIds = new Set<string>();

const shapeMapping: { [key: string]: NodeShape } = {
Expand All @@ -107,6 +107,7 @@
'AuthorizationPolicy',
'EnvoyFilter',
'GatewayClass',
'DNSRecord',
]);

// kinds for unassociated policies - these will be grouped
Expand All @@ -118,7 +119,7 @@
]);

// kinds for Kuadrant internals - these will be grouped also
const kuadrantInternals = new Set(['ConfigMap', 'Kuadrant']);
const kuadrantInternals = new Set(['ConfigMap', 'Kuadrant', 'Limitador', 'Authorino']);

// reconnect edges for excluded, connected nodes (e.g. GatewayClass)
const rewireExcludedEdges = (graph, sourceNodeId, targetNodeId) => {
Expand Down Expand Up @@ -226,7 +227,7 @@
}
};

const CustomNode: React.FC<any> = ({

Check warning on line 230 in src/components/PolicyTopologyPage.tsx

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
element,
onSelect,
selected,
Expand Down Expand Up @@ -337,7 +338,7 @@
window.location.href = url;
};

const customLayoutFactory = (type: string, graph: any): any => {

Check warning on line 341 in src/components/PolicyTopologyPage.tsx

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type

Check warning on line 341 in src/components/PolicyTopologyPage.tsx

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
return new DagreLayout(graph, {
rankdir: 'TB',
nodesep: 20,
Expand Down
3 changes: 3 additions & 0 deletions src/utils/latest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ const resourceGVKMapping: { [key: string]: { group: string; version: string; kin
Listener: { group: 'gateway.networking.k8s.io', version: 'v1', kind: 'Listener' },
GatewayClass: { group: 'gateway.networking.k8s.io', version: 'v1', kind: 'GatewayClass' },
WasmPlugin: { group: 'extensions.istio.io', version: 'v1alpha1', kind: 'WasmPlugin' },
Authorino: { group: 'operator.authorino.kuadrant.io', version: 'v1beta1', kind: 'Authorino' },
Limitador: { group: 'limitador.kuadrant.io', version: 'v1alpha1', kind: 'Limitador' },
Kuadrant: { group: 'kuadrant.io', version: 'v1beta1', kind: 'Kuadrant' },
};

export default resourceGVKMapping;
Loading