Skip to content

feat(argus): default disable resources #444

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

Merged
merged 7 commits into from
Jan 21, 2025
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
4 changes: 2 additions & 2 deletions charts/argus/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ maintainers:
- email: [email protected]
name: LogicMonitor
name: argus
version: 11.1.0-rt01
version: 11.1.1-rc01
home: https://logicmonitor.github.io/helm-charts-qa
appVersion: v15.1.0-rt01
appVersion: v15.2.0-rc02
dependencies:
- name: lmutil
repository: https://logicmonitor.github.io/helm-charts-qa
Expand Down
8 changes: 8 additions & 0 deletions charts/argus/templates/_filter_config.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{{/* vim: set filetype=mustache: */}}

{{- define "filter-config" -}}
{{- $disabledBatchingFilter := "contains(owner,\"Job,CronJob\") && type == \"pod\"" }}
{{- $filterValues := append .Values.filters ($disabledBatchingFilter) }}
filters:
{{ toYaml $filterValues | nindent 2 }}
{{- end -}}
4 changes: 4 additions & 0 deletions charts/argus/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ logicmonitor.com/provider: lm-container

{{- define "monitoring.disable" }}
{{ $alwaysDisable := list }}
{{- if eq .Values.monitoringMode "Minimal" }}
{{ $alwaysDisable = list "resourcequotas" "limitranges" "roles" "rolebindings" "networkpolicies" "configmaps" "clusterrolebindings" "clusterroles" "priorityclasses" "storageclasses" "cronjobs" "jobs" "endpoints" "ingresses" "secrets" "serviceaccounts" "poddisruptionbudgets" "customresourcedefinitions" }}
{{- end }}

{{ $resultList := ( concat $alwaysDisable $.Values.monitoring.disable | uniq ) }}
{{- toYaml $resultList | nindent 0}}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion charts/argus/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ data:
config.yaml: |
{{- include "argus-config" . | fromYaml | toYaml | nindent 4 }}
filters-config.yaml: |
filters: {{- toYaml .Values.filters | nindent 6 }}
{{- include "filter-config" . | fromYaml | toYaml | nindent 4 }}
collectorConfig: |
{{- include "collector-config" . | fromYaml | toYaml | nindent 4 }}
28 changes: 28 additions & 0 deletions charts/argus/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,34 @@
],
"$comment": "ui:accessId-ignore tf:optional"
},
"disableBatchingPods": {
"$id": "#/properties/disableBatchingPods",
"type": "boolean",
"title": "Disable Pods created by Jobs / CronJobs",
"description": "Disable Pods created by Jobs / CronJobs",
"default": "true",
"examples": [
"true",
"false"
],
"$comment": "ui:accessKey-ignore tf:optional"
},
"monitoringMode": {
"$id": "#/properties/monitoringMode",
"type": "string",
"title": "Argus Monitoring Mode",
"description": "Monitoring mode for Argus (Minimal/Advanced)",
"default": "Minimal",
"enum": [
"Minimal",
"Advanced"
],
"examples": [
"Minimal",
"Advanced"
],
"$comment": "ui:accessKey-ignore tf:optional"
},
"accessKey": {
"$id": "#/properties/accessKey",
"type": "string",
Expand Down
21 changes: 20 additions & 1 deletion charts/argus/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ log:
level: "info"

ksmUrl: ""
monitoringMode: "Minimal"
disableBatchingPods: true

collectorsetcontroller:
address: collectorset-controller
Expand Down Expand Up @@ -95,7 +97,24 @@ daemons:
sysIpsWaitTimeout: '5m'
monitoring:
# list of resources to disable monitoring
disable: []
disable:
- resourcequotas
- limitranges
- roles
- rolebindings
- networkpolicies
- configmaps
- clusterrolebindings
- clusterroles
- priorityclasses
- storageclasses
- cronjobs
- jobs
- endpoints
- secrets
- serviceaccounts
- poddisruptionbudgets
- customresourcedefinitions
# annotations to be ignored while performing an update operation
annotations:
ignore: []
Expand Down
12 changes: 11 additions & 1 deletion commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
module.exports = { extends: ['@commitlint/config-conventional'] };
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'body-max-line-length' : [
2,
'always',
1000
]
}
};

Loading