Skip to content

Commit

Permalink
migrate hacks to root
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewChubatiuk committed Oct 17, 2024
1 parent 7a4211c commit 1b1c2e9
Show file tree
Hide file tree
Showing 30 changed files with 355 additions and 407 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ CONTAINER_TOOL ?= docker
REPODIR := $(dir $(realpath $(lastword $(MAKEFILE_LIST))))
WORKDIR := $(REPODIR)/..

include $(shell find charts -name Makefile)
include $(shell find hack -name Makefile)

ifeq ($(CONTAINER_TOOL),docker)
CONTAINER_USER_OPTION = --user $(shell id -u):$(shell id -g)
Expand Down
2 changes: 1 addition & 1 deletion charts/victoria-logs-single/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
appVersion: v0.29.0
appVersion: v0.36.0
description: Victoria Logs Single version - high-performance, cost-effective and scalable logs storage
name: victoria-logs-single
version: 0.6.6
Expand Down

This file was deleted.

38 changes: 38 additions & 0 deletions charts/victoria-logs-single/files/rules/generated/vlogs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{{- $Values := (.helm).Values | default .Values }}
concurrency: 2
condition: '{{ true }}'
interval: 30s
name: vlogs
rules:
- alert: DiskRunsOutOfSpace
annotations:
description: "Disk utilisation on instance {{`{{`}} $labels.instance {{`}}`}} is more than 80%.\n Having less than 20% of free disk space could cripple merge processes and overall performance. Consider to limit the ingestion rate, decrease retention or scale the disk space if possible."
summary: 'Instance {{`{{`}} $labels.instance {{`}}`}} (job={{`{{`}} $labels.job {{`}}`}}) will run out of disk space soon'
condition: '{{ true }}'
expr: |-
sum(vl_data_size_bytes) by (job,instance,{{ $Values.global.clusterLabel }}) /
(
sum(vl_free_disk_space_bytes) by (job,instance,{{ $Values.global.clusterLabel }}) +
sum(vl_data_size_bytes) by (job,instance,{{ $Values.global.clusterLabel }})
) > 0.8
for: 30m
labels:
severity: critical
- alert: RequestErrorsToAPI
annotations:
description: 'Requests to path {{`{{`}} $labels.path {{`}}`}} are receiving errors. Please verify if clients are sending correct requests.'
summary: 'Too many errors served for path {{`{{`}} $labels.path {{`}}`}} (instance {{`{{`}} $labels.instance {{`}}`}})'
condition: '{{ true }}'
expr: increase(vl_http_errors_total[5m]) > 0
for: 15m
labels:
severity: warning
- alert: RowsRejectedOnIngestion
annotations:
description: 'VictoriaLogs is rejecting to ingest rows on "{{`{{`}} $labels.instance {{`}}`}}" due to the following reason: "{{`{{`}} $labels.reason {{`}}`}}"'
summary: 'Some rows are rejected on "{{`{{`}} $labels.instance {{`}}`}}" on ingestion attempt'
condition: '{{ true }}'
expr: rate(vl_rows_dropped_total[5m]) > 0
for: 15m
labels:
severity: warning
1 change: 0 additions & 1 deletion charts/victoria-metrics-k8s-stack/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
- Renamed `grafana.additionalDataSources` to `grafana.sidecar.datasources.extra`
- Renamed `grafana.defaultDashboardsTimezone` to `grafana.sidecar.dashboards.defaultTimezone`
- Moved `grafana.defaultDatasourceType` to `grafana.sidecar.datasources.victoriametrics`
- Added `vlogs` resource management

## 0.27.5

Expand Down
167 changes: 0 additions & 167 deletions charts/victoria-metrics-k8s-stack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -626,8 +626,6 @@ selectAllByDefault: true
<td><pre class="helm-vars-default-value" language-yaml" lang="plaintext">
<code class="language-yaml">node-exporter-full:
enabled: true
victorialogs:
enabled: false
victoriametrics-operator:
enabled: false
victoriametrics-vmalert:
Expand Down Expand Up @@ -1226,8 +1224,6 @@ sidecar:
enabled: true
extra: []
initDatasources: true
victorialogs:
- name: VictoriaLogs
victoriametrics:
- isDefault: true
name: VictoriaMetrics
Expand Down Expand Up @@ -1294,17 +1290,6 @@ vmScrape:
</pre>
</td>
<td><p>Configure additional grafana datasources (passed through tpl). Check <a href="http://docs.grafana.org/administration/provisioning/#datasources" target="_blank">here</a> for details</p>
</td>
</tr>
<tr>
<td>grafana.sidecar.datasources.victorialogs</td>
<td>list</td>
<td><pre class="helm-vars-default-value" language-yaml" lang="plaintext">
<code class="language-yaml">- name: VictoriaLogs
</code>
</pre>
</td>
<td><p>List of VictoriaLogs datasources. VLogs generated <code>url</code> will be added to each datasource in template if vlogs is enabled</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -2145,158 +2130,6 @@ serviceMonitor:
</pre>
</td>
<td><p>By default, operator converts prometheus-operator objects.</p>
</td>
</tr>
<tr>
<td>vlogs.annotations</td>
<td>object</td>
<td><pre class="helm-vars-default-value" language-yaml" lang="plaintext">
<code class="language-yaml">{}
</code>
</pre>
</td>
<td><p>VLogs annotations</p>
</td>
</tr>
<tr>
<td>vlogs.enabled</td>
<td>bool</td>
<td><pre class="helm-vars-default-value" language-yaml" lang="">
<code class="language-yaml">false
</code>
</pre>
</td>
<td><p>Create VLogs CR</p>
</td>
</tr>
<tr>
<td>vlogs.ingress.annotations</td>
<td>object</td>
<td><pre class="helm-vars-default-value" language-yaml" lang="plaintext">
<code class="language-yaml">{}
</code>
</pre>
</td>
<td><p>Ingress annotations</p>
</td>
</tr>
<tr>
<td>vlogs.ingress.enabled</td>
<td>bool</td>
<td><pre class="helm-vars-default-value" language-yaml" lang="">
<code class="language-yaml">false
</code>
</pre>
</td>
<td><p>Enable deployment of ingress for server component</p>
</td>
</tr>
<tr>
<td>vlogs.ingress.extraPaths</td>
<td>list</td>
<td><pre class="helm-vars-default-value" language-yaml" lang="plaintext">
<code class="language-yaml">[]
</code>
</pre>
</td>
<td><p>Extra paths to prepend to every host configuration. This is useful when working with annotation based services.</p>
</td>
</tr>
<tr>
<td>vlogs.ingress.hosts</td>
<td>list</td>
<td><pre class="helm-vars-default-value" language-yaml" lang="plaintext">
<code class="language-yaml">[]
</code>
</pre>
</td>
<td><p>Array of host objects</p>
</td>
</tr>
<tr>
<td>vlogs.ingress.ingressClassName</td>
<td>string</td>
<td><pre class="helm-vars-default-value" language-yaml" lang="">
<code class="language-yaml">""
</code>
</pre>
</td>
<td><p>Ingress controller class name</p>
</td>
</tr>
<tr>
<td>vlogs.ingress.labels</td>
<td>object</td>
<td><pre class="helm-vars-default-value" language-yaml" lang="plaintext">
<code class="language-yaml">{}
</code>
</pre>
</td>
<td><p>Ingress extra labels</p>
</td>
</tr>
<tr>
<td>vlogs.ingress.path</td>
<td>string</td>
<td><pre class="helm-vars-default-value" language-yaml" lang="">
<code class="language-yaml">""
</code>
</pre>
</td>
<td><p>Ingress default path</p>
</td>
</tr>
<tr>
<td>vlogs.ingress.pathType</td>
<td>string</td>
<td><pre class="helm-vars-default-value" language-yaml" lang="">
<code class="language-yaml">Prefix
</code>
</pre>
</td>
<td><p>Ingress path type</p>
</td>
</tr>
<tr>
<td>vlogs.ingress.tls</td>
<td>list</td>
<td><pre class="helm-vars-default-value" language-yaml" lang="plaintext">
<code class="language-yaml">[]
</code>
</pre>
</td>
<td><p>Array of TLS objects</p>
</td>
</tr>
<tr>
<td>vlogs.spec</td>
<td>object</td>
<td><pre class="helm-vars-default-value" language-yaml" lang="plaintext">
<code class="language-yaml">extraArgs: {}
port: "9428"
replicaCount: 1
retentionPeriod: "1"
storage:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Gi
</code>
</pre>
</td>
<td><p>Full spec for VLogs CRD. Allowed values describe <a href="https://docs.victoriametrics.com/operator/api#vlogsspec" target="_blank">here</a></p>
</td>
</tr>
<tr>
<td>vlogs.spec.retentionPeriod</td>
<td>string</td>
<td><pre class="helm-vars-default-value" language-yaml" lang="">
<code class="language-yaml">"1"
</code>
</pre>
</td>
<td><p>Data retention period. Possible units character: h(ours), d(ays), w(eeks), y(ears), if no unit character specified - month. The minimum retention period is 24h. See these <a href="https://docs.victoriametrics.com/single-server-victoriametrics/#retention" target="_blank">docs</a></p>
</td>
</tr>
<tr>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- $Values := (.helm).Values | default .Values }}
condition: '{{ $Values.alertmanager.enabled }}'
condition: '{{ ($Values.alertmanager).enabled }}'
name: alertmanager.rules
rules:
- alert: AlertmanagerFailedReload
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- $Values := (.helm).Values | default .Values }}
condition: '{{ $Values.kubeEtcd.enabled }}'
condition: '{{ ($Values.kubeEtcd).enabled }}'
name: etcd
rules:
- alert: etcdMembersDown
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- $Values := (.helm).Values | default .Values }}
condition: '{{ $Values.kubeApiServer.enabled }}'
condition: '{{ ($Values.kubeApiServer).enabled }}'
interval: 3m
name: kube-apiserver-availability.rules
rules:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- $Values := (.helm).Values | default .Values }}
condition: '{{ $Values.kubeApiServer.enabled }}'
condition: '{{ ($Values.kubeApiServer).enabled }}'
name: kube-apiserver-burnrate.rules
rules:
- condition: '{{ true }}'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- $Values := (.helm).Values | default .Values }}
condition: '{{ $Values.kubeApiServer.enabled }}'
condition: '{{ ($Values.kubeApiServer).enabled }}'
name: kube-apiserver-histogram.rules
rules:
- condition: '{{ true }}'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- $Values := (.helm).Values | default .Values }}
condition: '{{ $Values.kubeApiServer.enabled }}'
condition: '{{ ($Values.kubeApiServer).enabled }}'
name: kube-apiserver-slos
rules:
- alert: KubeAPIErrorBudgetBurn
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- $Values := (.helm).Values | default .Values }}
condition: '{{ $Values.kubeScheduler.enabled }}'
condition: '{{ ($Values.kubeScheduler).enabled }}'
name: kube-scheduler.rules
rules:
- condition: '{{ true }}'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- $Values := (.helm).Values | default .Values }}
condition: '{{ $Values.kubelet.enabled }}'
condition: '{{ ($Values.kubelet).enabled }}'
name: kubelet.rules
rules:
- condition: '{{ true }}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ rules:
description: 'KubeAPI has disappeared from Prometheus target discovery.'
runbook_url: '{{ $Values.defaultRules.runbookUrl }}/kubernetes/kubeapidown'
summary: 'Target disappeared from Prometheus target discovery.'
condition: '{{ $Values.kubeApiServer.enabled }}'
condition: '{{ ($Values.kubeApiServer).enabled }}'
expr: absent(up{job="apiserver"} == 1)
for: 15m
labels:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{{- $Values := (.helm).Values | default .Values }}
condition: '{{ $Values.kubeControllerManager.enabled }}'
condition: '{{ ($Values.kubeControllerManager).enabled }}'
name: kubernetes-system-controller-manager
rules:
- alert: KubeControllerManagerDown
annotations:
description: 'KubeControllerManager has disappeared from Prometheus target discovery.'
runbook_url: '{{ $Values.defaultRules.runbookUrl }}/kubernetes/kubecontrollermanagerdown'
summary: 'Target disappeared from Prometheus target discovery.'
condition: '{{ $Values.kubeControllerManager.enabled }}'
condition: '{{ ($Values.kubeControllerManager).enabled }}'
expr: absent(up{job="kube-controller-manager"} == 1)
for: 15m
labels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ rules:
description: 'Kubelet has disappeared from Prometheus target discovery.'
runbook_url: '{{ $Values.defaultRules.runbookUrl }}/kubernetes/kubeletdown'
summary: 'Target disappeared from Prometheus target discovery.'
condition: '{{ $Values.kubelet.enabled }}'
condition: '{{ ($Values.kubelet).enabled }}'
expr: absent(up{job="kubelet", metrics_path="/metrics"} == 1)
for: 15m
labels:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{{- $Values := (.helm).Values | default .Values }}
condition: '{{ $Values.kubeScheduler.enabled }}'
condition: '{{ ($Values.kubeScheduler).enabled }}'
name: kubernetes-system-scheduler
rules:
- alert: KubeSchedulerDown
annotations:
description: 'KubeScheduler has disappeared from Prometheus target discovery.'
runbook_url: '{{ $Values.defaultRules.runbookUrl }}/kubernetes/kubeschedulerdown'
summary: 'Target disappeared from Prometheus target discovery.'
condition: '{{ $Values.kubeScheduler.enabled }}'
condition: '{{ ($Values.kubeScheduler).enabled }}'
expr: absent(up{job="kube-scheduler"} == 1)
for: 15m
labels:
Expand Down
Loading

0 comments on commit 1b1c2e9

Please sign in to comment.