File tree 5 files changed +47
-2
lines changed
5 files changed +47
-2
lines changed Original file line number Diff line number Diff line change @@ -6,9 +6,9 @@ maintainers:
6
6
7
7
name : LogicMonitor
8
8
name : argus
9
- version : 11.0 .0-rt01
9
+ version : 11.1 .0-rc01
10
10
home : https://logicmonitor.github.io/helm-charts-qa
11
- appVersion : v15.0 .0-rt01
11
+ appVersion : v15.1 .0-rc01
12
12
dependencies :
13
13
- name : lmutil
14
14
repository : https://logicmonitor.github.io/helm-charts-qa
Original file line number Diff line number Diff line change 76
76
proxy:
77
77
url: { { .Values.global.proxy.url } }
78
78
{ {- end } }
79
+ ksmUrl: { { include " ksm-url" . } }
79
80
{ {- end -} }
Original file line number Diff line number Diff line change @@ -117,6 +117,38 @@ Collector Pod security context
117
117
{ { toYaml .Values.collector.podSecurityContext | nindent 0 } }
118
118
{ {- end } }
119
119
120
+ { {- define " ksm-url" -} }
121
+ { {- $url := " " } }
122
+ { {- $ksm := index .Values " kube-state-metrics" } }
123
+ { {- if .Values.ksmUrl } }
124
+ { {- $url = .Values.ksmUrl } }
125
+ { {- else if $ksm .enabled } }
126
+ { {- $port := " " } }
127
+ { {- range $p := .Release.Service.spec.ports } }
128
+ { {- if or (eq $p .name " http" ) (eq $p .name " http-metrics" ) } }
129
+ { {- $port = $p .port } }
130
+ { {- end } }
131
+ { {- end } }
132
+ { {- $url = printf " http://%s-kube-state-metrics.%s.svc.cluster.local:%d/metrics" .Release.metadata.name .Release.Namespace $port } }
133
+ { {- else } }
134
+ { {- $services := (lookup " v1" " Service" " " " " ) | default dict } }
135
+ { {- $filteredServices := dict " items" (list) } }
136
+ { {- range $service := $services .items } }
137
+ { {- if eq (index $service .metadata.labels " app.kubernetes.io/name" | default " " ) " kube-state-metrics" } }
138
+ { {- $_ := set $filteredServices " items" (append $filteredServices .items $service ) } }
139
+ { {- $port := " " } }
140
+ { {- range $p := $service .spec.ports } }
141
+ { {- if or (eq $p .name " http" ) (eq $p .name " http-metrics" ) } }
142
+ { {- $port = $p .port } }
143
+ { {- end } }
144
+ { {- end } }
145
+ { {- $url = printf " http://%s.%s.svc.cluster.local:%d/metrics" $service .metadata.name $service .metadata.namespace $port } }
146
+ { {- end } }
147
+ { {- end } }
148
+ { {- end } }
149
+ { {- $url } }
150
+ { {- end } }
151
+
120
152
{ {- define " collector-csp" } }
121
153
{ {- $addCaps := .Values.collector.securityContext.capabilities.add } }
122
154
{ {- if and (eq (include " lmutil.get-platform" .) " gke" ) (not (has " NET_RAW" $addCaps )) } }
Original file line number Diff line number Diff line change 461
461
},
462
462
"$comment" : " tf:optional,yamlencode"
463
463
},
464
+ "ksmUrl" : {
465
+ "$id" : " #/properties/ksmUrl" ,
466
+ "type" : " string" ,
467
+ "title" : " KSM service URL" ,
468
+ "description" : " KSM service URL to be used by devices in the portal" ,
469
+ "default" : " " ,
470
+ "examples" : [
471
+ " http://lmc-kube-state-metrics.logicmonitor.svc.cluster.local:8080/metrics"
472
+ ]
473
+ },
464
474
"replicas" : {
465
475
"$id" : " #/properties/replicas" ,
466
476
"type" : " integer" ,
Original file line number Diff line number Diff line change @@ -64,6 +64,8 @@ resourceContainerID: 1
64
64
log :
65
65
level : " info"
66
66
67
+ ksmUrl : " "
68
+
67
69
collectorsetcontroller :
68
70
address : collectorset-controller
69
71
port : 50000
You can’t perform that action at this time.
0 commit comments