Skip to content

Commit ce24db7

Browse files
authored
feat(argus): release argus charts v11.1.0 (#169)
1 parent e97f23f commit ce24db7

File tree

5 files changed

+66
-2
lines changed

5 files changed

+66
-2
lines changed

charts/argus/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ maintainers:
66
- email: argus@logicmonitor.com
77
name: LogicMonitor
88
name: argus
9-
version: 11.0.0
9+
version: 11.1.0
1010
home: https://logicmonitor.github.io/helm-charts
11-
appVersion: v15.0.0
11+
appVersion: v15.1.0
1212
dependencies:
1313
- name: lmutil
1414
repository: https://logicmonitor.github.io/helm-charts

charts/argus/templates/_argus_config.tpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,5 @@ proxy:
7676
proxy:
7777
url: {{ .Values.global.proxy.url }}
7878
{{- end }}
79+
ksmUrl: {{ include "ksm-url" . | quote }}
7980
{{- end -}}

charts/argus/templates/_helpers.tpl

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,49 @@ Collector Pod security context
117117
{{ toYaml .Values.collector.podSecurityContext | nindent 0 }}
118118
{{- end }}
119119

120+
{{- define "ksm-url" -}}
121+
{{- $url := "" }}
122+
{{- $ksm := index .Values.global "kube-state-metrics" }}
123+
{{- if not (empty .Values.ksmUrl) }}
124+
{{- $url = .Values.ksmUrl }}
125+
{{- else if $ksm.enabled }}
126+
{{- $port := 8080 }}
127+
{{- $url = printf "http://%s-kube-state-metrics.%s.svc.cluster.local:%d/metrics" .Release.Name .Release.Namespace $port }}
128+
{{- else }}
129+
{{- $nsservices := (lookup "v1" "Service" .Release.Namespace "") | default dict }}
130+
{{- $nsfilteredServices := dict "items" (list) }}
131+
{{- range $service := $nsservices.items }}
132+
{{- if eq (index $service.metadata.labels "app.kubernetes.io/name" | default "") "kube-state-metrics" }}
133+
{{- $_ := set $nsfilteredServices "items" (append $nsfilteredServices.items $service) }}
134+
{{- $port := "" }}
135+
{{- range $p := $service.spec.ports }}
136+
{{- if or (eq $p.name "http") (eq $p.name "http-metrics") }}
137+
{{- $port = $p.port }}
138+
{{- end }}
139+
{{- end }}
140+
{{- $url = printf "http://%s.%s.svc.cluster.local:%d/metrics" $service.metadata.name $service.metadata.namespace $port }}
141+
{{- end }}
142+
{{- end }}
143+
{{- if (empty $url)}}
144+
{{- $services := (lookup "v1" "Service" "" "") | default dict }}
145+
{{- $filteredServices := dict "items" (list) }}
146+
{{- range $service := $services.items }}
147+
{{- if eq (index $service.metadata.labels "app.kubernetes.io/name" | default "") "kube-state-metrics" }}
148+
{{- $_ := set $filteredServices "items" (append $filteredServices.items $service) }}
149+
{{- $port := "" }}
150+
{{- range $p := $service.spec.ports }}
151+
{{- if or (eq $p.name "http") (eq $p.name "http-metrics") }}
152+
{{- $port = $p.port }}
153+
{{- end }}
154+
{{- end }}
155+
{{- $url = printf "http://%s.%s.svc.cluster.local:%d/metrics" $service.metadata.name $service.metadata.namespace $port }}
156+
{{- end }}
157+
{{- end }}
158+
{{- end }}
159+
{{- end }}
160+
{{- $url }}
161+
{{- end }}
162+
120163
{{- define "collector-csp" }}
121164
{{- $addCaps := .Values.collector.securityContext.capabilities.add }}
122165
{{- if and (eq (include "lmutil.get-platform" .) "gke") (not (has "NET_RAW" $addCaps)) }}

charts/argus/values.schema.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,16 @@
461461
},
462462
"$comment": "tf:optional,yamlencode"
463463
},
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+
},
464474
"replicas": {
465475
"$id": "#/properties/replicas",
466476
"type": "integer",
@@ -2325,6 +2335,14 @@
23252335
"default": "",
23262336
"description" : "The Logicmonitor account domain"
23272337
},
2338+
"kube-state-metrics": {
2339+
"$id": "#/properties/global/properties/kube-state-metrics",
2340+
"type": "object",
2341+
"title": "Kube state metrics config",
2342+
"description": "Kube state metrics.",
2343+
"additionalItems": true,
2344+
"additionalProperties": true
2345+
},
23282346
"imagePullSecrets": {
23292347
"description": "ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod",
23302348
"examples": [

charts/argus/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ resourceContainerID: 1
6464
log:
6565
level: "info"
6666

67+
ksmUrl: ""
68+
6769
collectorsetcontroller:
6870
address: collectorset-controller
6971
port: 50000

0 commit comments

Comments
 (0)