Skip to content

Commit 60abf4e

Browse files
Merge pull request #10 from hypertrace/remove_entity_service_configurationCommands
Entity serivce changes to move configs to config-bootstrapper docker …
2 parents fb44042 + 2bfbb69 commit 60abf4e

File tree

6 files changed

+58
-198
lines changed

6 files changed

+58
-198
lines changed

entity-service/src/main/resources/configs/common/application.conf

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,58 @@ entity.service.config = {
1111
}
1212
}
1313
}
14-
# This should be completely driven based on config given in app packaging.
15-
entity.service.attributeMap = []
14+
entity.service.attributeMap = [
15+
{
16+
"scope": "API",
17+
"name": "API.id",
18+
"subDocPath": "entityId"
19+
},
20+
{
21+
"scope": "API",
22+
"name": "API.name",
23+
"subDocPath": "entityName"
24+
},
25+
{
26+
"scope": "API",
27+
"name": "API.apiType",
28+
"subDocPath": "attributes.API_TYPE"
29+
},
30+
{
31+
"scope": "API",
32+
"name": "API.httpMethod",
33+
"subDocPath": "attributes.http_method"
34+
},
35+
{
36+
"scope": "API",
37+
"name": "API.httpUrl",
38+
"subDocPath": "attributes.API_NAME"
39+
},
40+
{
41+
"scope": "API",
42+
"name": "API.serviceId",
43+
"subDocPath": "attributes.SERVICE_ID"
44+
},
45+
{
46+
"scope": "API",
47+
"name": "API.createdTime",
48+
"subDocPath": "createdTime"
49+
},
50+
{
51+
"scope": "API",
52+
"name": "API.apiDiscoveryState",
53+
"subDocPath": "attributes.api_discovery_state"
54+
},
55+
{
56+
"scope": "SERVICE",
57+
"name": "SERVICE.id",
58+
"subDocPath": "entityId"
59+
},
60+
{
61+
"scope": "SERVICE",
62+
"name": "SERVICE.name",
63+
"subDocPath": "entityName"
64+
}
65+
]
1666

1767
metrics.reporter {
1868
prefix = org.hypertrace.entity.service.EntityService

helm/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ version: 0.1.0
2424
dependencies:
2525
- name: config-bootstrapper
2626
repository: "https://storage.googleapis.com/hypertrace-helm-charts"
27-
version: 0.1.0
27+
version: 0.1.7

helm/configs/1_entityrelationshiptypes.conf

Lines changed: 0 additions & 45 deletions
This file was deleted.

helm/configs/1_entitytypes.conf

Lines changed: 0 additions & 109 deletions
This file was deleted.
Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
1+
{{- if ( index .Values "config-bootstrapper" "configurationCommands" ) }}
12
apiVersion: v1
23
kind: ConfigMap
34
metadata:
45
name: {{ index .Values "config-bootstrapper" "job" "prefix" }}-bootstrap-configs
56
labels:
67
release: {{ .Release.Name }}
78
data:
8-
{{- range $path, $bytes := .Files.Glob "configs/**" }}
9-
{{- $name := base ($path) }}
10-
{{ tpl ($.Files.Glob (printf "configs/%s" $name)).AsConfig $ | indent 2 }}
11-
{{- end }}
12-
{{- if .Values.configurationCommands }}
13-
{{ uuidv4 }}: |
14-
{{- range $key, $value := .Values.configurationCommands }}
9+
{{- range $key, $value := ( index .Values "config-bootstrapper" "configurationCommands" ) }}
10+
{{ $key }}: |
1511
{{ $value | indent 4 }}
1612
{{- end }}
1713
{{- end }}

helm/values.yaml

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -80,38 +80,7 @@ entityServiceConfig:
8080
mongoHost: mongo
8181
mongoUrl: ""
8282

83-
attributes:
84-
- scope: API
85-
name: API.id
86-
subDocPath: entityId
87-
- scope: API
88-
name: API.name
89-
subDocPath: entityName
90-
- scope: API
91-
name: API.apiType
92-
subDocPath: attributes.API_TYPE
93-
- scope: API
94-
name: API.httpMethod
95-
subDocPath: attributes.http_method
96-
- scope: API
97-
name: API.httpUrl
98-
subDocPath: attributes.API_NAME
99-
- scope: API
100-
name: API.serviceId
101-
subDocPath: attributes.SERVICE_ID
102-
- scope: API
103-
name: API.createdTime
104-
subDocPath: createdTime
105-
- scope: API
106-
name: API.apiDiscoveryState
107-
subDocPath: attributes.api_discovery_state
108-
- scope: SERVICE
109-
name: SERVICE.id
110-
subDocPath: entityId
111-
- scope: SERVICE
112-
name: SERVICE.name
113-
subDocPath: entityName
114-
83+
attributes: []
11584
extraAttributes: []
11685

11786
logConfig:
@@ -126,5 +95,4 @@ logConfig:
12695
config-bootstrapper:
12796
job:
12897
prefix: entity
129-
130-
configurationCommands: {}
98+
configurationCommands: {}

0 commit comments

Comments
 (0)