add vector-aggregator
This commit is contained in:
parent
3dd13b051c
commit
9384099003
5 changed files with 124 additions and 0 deletions
|
@ -9,4 +9,5 @@ resources:
|
|||
- ./alertmanager/ks.yaml
|
||||
- ./gatus/ks.yaml
|
||||
- ./prometheus-operator-crds/ks.yaml
|
||||
- ./vector-aggregator/ks.yaml
|
||||
- ./victoria-metrics/ks.yaml
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
---
|
||||
# yaml-language-server: $schema=https://ks.hsn.dev/helm.toolkit.fluxcd.io/helmrelease_v2.json
|
||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
||||
kind: HelmRelease
|
||||
metadata:
|
||||
name: vector-aggregator
|
||||
spec:
|
||||
interval: 30m
|
||||
chart:
|
||||
spec:
|
||||
chart: vector
|
||||
version: 0.36.1
|
||||
sourceRef:
|
||||
kind: HelmRepository
|
||||
name: vector
|
||||
namespace: flux-system
|
||||
driftDetection:
|
||||
mode: enabled
|
||||
install:
|
||||
remediation:
|
||||
retries: 3
|
||||
upgrade:
|
||||
cleanupOnFail: true
|
||||
remediation:
|
||||
retries: 3
|
||||
values:
|
||||
role: "Stateless-Aggregator"
|
||||
replicas: 1
|
||||
workloadResourceAnnotations:
|
||||
reloader.stakater.com/auto: "true"
|
||||
containerPorts:
|
||||
- name: vector
|
||||
containerPort: 6000
|
||||
- name: prom-exporter
|
||||
containerPort: 9090
|
||||
resources:
|
||||
requests:
|
||||
cpu: 3m
|
||||
limits:
|
||||
memory: 512Mi
|
||||
service:
|
||||
ports:
|
||||
- name: vector
|
||||
port: 6000
|
||||
- name: prom-exporter
|
||||
port: 9090
|
||||
existingConfigMaps: ["vector-aggregator-configmap"]
|
||||
dataDir: /vector-data-dir
|
||||
podMonitor:
|
||||
enabled: true
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ./helmrelease.yaml
|
||||
configMapGenerator:
|
||||
- name: vector-aggregator-configmap
|
||||
files:
|
||||
- vector.yaml=./resources/vector.yaml
|
||||
generatorOptions:
|
||||
disableNameSuffixHash: true
|
|
@ -0,0 +1,41 @@
|
|||
---
|
||||
data_dir: /vector-data-dir
|
||||
api:
|
||||
enabled: true
|
||||
address: 0.0.0.0:8686
|
||||
|
||||
sources:
|
||||
internal_metrics:
|
||||
type: internal_metrics
|
||||
vector:
|
||||
type: vector
|
||||
version: "2"
|
||||
address: 0.0.0.0:6000
|
||||
|
||||
transforms:
|
||||
kubernetes_remap:
|
||||
type: remap
|
||||
inputs: ["vector"]
|
||||
source: |
|
||||
# Standardize 'app' index
|
||||
.custom_app_name = .pod_labels."app.kubernetes.io/name" || .pod_labels.app || .pod_labels."k8s-app" || "unknown"
|
||||
# Drop pod_labels
|
||||
del(.pod_labels)
|
||||
|
||||
sinks:
|
||||
prom_exporter:
|
||||
type: prometheus_exporter
|
||||
inputs: [internal_metrics]
|
||||
address: 0.0.0.0:9090
|
||||
victorialogs:
|
||||
type: elasticsearch
|
||||
inputs: [kubernetes_remap]
|
||||
endpoints: [http://victoria-logs.observability:9428/insert/elasticsearch/]
|
||||
mode: bulk
|
||||
api_version: v8
|
||||
healthcheck:
|
||||
enabled: false
|
||||
query:
|
||||
_msg_field: message
|
||||
_stream_fields: host,container_name
|
||||
_time_field: timestamp
|
20
kubernetes/apps/observability/vector-aggregator/ks.yaml
Normal file
20
kubernetes/apps/observability/vector-aggregator/ks.yaml
Normal file
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
# yaml-language-server: $schema=https://ks.hsn.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json
|
||||
apiVersion: kustomize.toolkit.fluxcd.io/v1
|
||||
kind: Kustomization
|
||||
metadata:
|
||||
name: &app vector-aggregator
|
||||
namespace: flux-system
|
||||
spec:
|
||||
targetNamespace: observability
|
||||
commonMetadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: *app
|
||||
path: ./kubernetes/apps/observability/vector-aggregator/app
|
||||
prune: true
|
||||
sourceRef:
|
||||
kind: GitRepository
|
||||
name: theshire
|
||||
wait: false
|
||||
interval: 30m
|
||||
retryInterval: 1m
|
Loading…
Reference in a new issue