Skip to content

Commit 823aa15

Browse files
committed
reuse realm name
1 parent 174d7ef commit 823aa15

File tree

4 files changed

+3
-19
lines changed

4 files changed

+3
-19
lines changed

src/main/java/io/cryostat/discovery/KubeEndpointSlicesDiscovery.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public class KubeEndpointSlicesDiscovery implements ResourceEventHandler<Endpoin
7373
private static final String NAMESPACE_QUERY_ADDR = "NS_QUERY_ENDPOINT_SLICE";
7474
private static final String ENDPOINT_SLICE_DISCOVERY_ADDR = "ENDPOINT_SLICE_DISC";
7575

76-
public static final String REALM = "KubernetesEndpointSlices";
76+
public static final String REALM = "KubernetesApi";
7777

7878
public static final String DISCOVERY_NAMESPACE_LABEL_KEY = "discovery.cryostat.io/namespace";
7979

src/main/resources/db/migration/V4.0.0__cryostat.sql

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,7 @@
144144
parentNode
145145
) values
146146
((select nextval('DiscoveryNode_SEQ')), '{}'::jsonb, 'Custom Targets', 'Realm', (select id from universe)),
147-
((select nextval('DiscoveryNode_SEQ')), '{}'::jsonb, 'KubernetesEndpoints', 'Realm', (select id from universe)),
148-
((select nextval('DiscoveryNode_SEQ')), '{}'::jsonb, 'KubernetesEndpointSlices', 'Realm', (select id from universe)),
147+
((select nextval('DiscoveryNode_SEQ')), '{}'::jsonb, 'KubernetesApi', 'Realm', (select id from universe)),
149148
((select nextval('DiscoveryNode_SEQ')), '{}'::jsonb, 'JDP', 'Realm', (select id from universe)),
150149
((select nextval('DiscoveryNode_SEQ')), '{}'::jsonb, 'Podman', 'Realm', (select id from universe)),
151150
((select nextval('DiscoveryNode_SEQ')), '{}'::jsonb, 'Docker', 'Realm', (select id from universe));
Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1 @@
11
alter table Rule add column metadata jsonb default '{"labels":{}}';
2-
3-
/* Select the Universe node, then insert Realm nodes for each builtin discovery plugin with the universe as their parent */
4-
with universe as (
5-
select id from DiscoveryNode where (nodeType = 'Universe')
6-
)
7-
insert into DiscoveryNode(
8-
id,
9-
labels,
10-
name,
11-
nodeType,
12-
parentNode
13-
) values
14-
((select nextval('DiscoveryNode_SEQ')), '{}'::jsonb, 'KubernetesEndpointSlices', 'Realm', (select id from universe));
15-
16-
delete from DiscoveryNode where name='KubernetesApi';

src/test/java/io/cryostat/discovery/DiscoveryTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ void testGetUniverse() {
5353
"children",
5454
Matchers.hasItems(
5555
Matchers.hasEntry("name", "Custom Targets"),
56-
Matchers.hasEntry("name", "KubernetesEndpointSlices"),
56+
Matchers.hasEntry("name", "KubernetesApi"),
5757
Matchers.hasEntry("name", "Podman"),
5858
Matchers.hasEntry("name", "Docker"),
5959
Matchers.hasEntry("name", "JDP")))

0 commit comments

Comments
 (0)