Skip to content
Open
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/fluent-bit/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ keywords:
- logging
- fluent-bit
- fluentd
version: 0.53.0
version: 0.54.0
appVersion: 4.0.7
icon: https://raw.githubusercontent.com/cncf/artwork/master/projects/fluentd/fluentbit/icon/fluentbit-icon-color.svg
home: https://fluentbit.io/
Expand All @@ -23,4 +23,4 @@ maintainers:
annotations:
artifacthub.io/changes: |
- kind: changed
description: "Make securityContext of hot reload container configurable in fluent-bit chart"
description: "Add support for VMServiceScrape object required in VictoriaMetrics K8s Operator"
51 changes: 51 additions & 0 deletions charts/fluent-bit/templates/vmservicescrape.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{{- if .Values.vmServiceScrape.enabled }}
apiVersion: operator.victoriametrics.com/v1beta1
kind: VMServiceScrape
metadata:
name: {{ template "fluent-bit.fullname" . }}
namespace: {{ default .Release.Namespace .Values.vmServiceScrape.namespace }}
labels:
{{- include "fluent-bit.labels" . | nindent 4 }}
{{- with .Values.vmServiceScrape.selector }}
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
jobLabel: app.kubernetes.io/instance
endpoints:
- port: http
path: {{ default "/api/v2/metrics/prometheus" .Values.vmServiceScrape.path }}
{{- with .Values.vmServiceScrape.interval }}
interval: {{ . }}
{{- end }}
{{- with .Values.vmServiceScrape.scrapeTimeout }}
scrapeTimeout: {{ . }}
{{- end }}
{{- with .Values.vmServiceScrape.metricRelabelings }}
metricRelabelings:
{{- if kindIs "string" . }}
{{- tpl . $ | nindent 8 }}
{{- else }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- with .Values.vmServiceScrape.relabelConfigs }}
relabelConfigs:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.vmServiceScrape.scheme }}
scheme: {{ .Values.vmServiceScrape.scheme }}
{{- end }}
{{- if .Values.vmServiceScrape.tlsConfig }}
tlsConfig:
{{- toYaml .Values.vmServiceScrape.tlsConfig | nindent 8 }}
{{- end }}
{{- with .Values.vmServiceScrape.additionalEndpoints }}
{{- toYaml . | nindent 4 }}
{{- end }}
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
selector:
matchLabels:
{{- include "fluent-bit.selectorLabels" . | nindent 6 }}
{{- end }}
53 changes: 53 additions & 0 deletions charts/fluent-bit/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,59 @@ service:
# externalIPs:
# - 2.2.2.2

vmServiceScrape:
enabled: false
# interval: 10s
# scrapeTimeout: 10s
# selector:
# victoria: my-victoria
# ## metric relabel configs to apply to samples before ingestion.
# ##
# metricRelabelings:
# - sourceLabels: [__meta_kubernetes_service_label_cluster]
# targetLabel: cluster
# regex: (.*)
# replacement: ${1}
# action: replace
# ## relabel configs to apply to samples after ingestion.
# ##
relabelConfigs:
- sourceLabels: [__meta_kubernetes_pod_node_name]
separator: ;
regex: ^(.*)$
targetLabel: nodename
replacement: $1
action: replace
# scheme: ""
# tlsConfig: {}

## Bear in mind if you want to collect metrics from a different port
## you will need to configure the new ports on the extraPorts property.
additionalEndpoints: []
# - port: metrics
# path: /metrics
# interval: 10s
# scrapeTimeout: 10s
# scheme: ""
# tlsConfig: {}
# # metric relabel configs to apply to samples before ingestion.
# #
# metricRelabelings:
# - sourceLabels: [__meta_kubernetes_service_label_cluster]
# targetLabel: cluster
# regex: (.*)
# replacement: ${1}
# action: replace
# # relabel configs to apply to samples after ingestion.
# #
# relabelConfigs:
# - sourceLabels: [__meta_kubernetes_pod_node_name]
# separator: ;
# regex: ^(.*)$
# targetLabel: nodename
# replacement: $1
# action: replace

serviceMonitor:
enabled: false
# namespace: monitoring
Expand Down