I'd recommend to keep project structure simple and straight forward:
chart-name/
# any static content to include into templates
files/
# all needed dynamic templates
templates/
| import os | |
| import time | |
| import json | |
| import shutil | |
| import argparse | |
| parser = argparse.ArgumentParser(description="VictoriaMetrics indexdb clean-up") | |
| parser.add_argument("--retentionDays",default = 30, help="indexdb parts older than flag value will be removed",type=int ,nargs="?") | |
| parser.add_argument("--dryRun", default = True,help="Whether to perform file deletion",type=bool,nargs="?" ) |
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| name: vlinsert | |
| spec: | |
| type: ClusterIP | |
| ports: | |
| - name: http | |
| protocol: TCP | |
| port: 9428 |
| apiVersion: operator.victoriametrics.com/v1beta1 | |
| kind: VMAgent | |
| metadata: | |
| name: main | |
| spec: | |
| selectAllByDefault: true | |
| replicaCount: 1 | |
| statefulMode: true | |
| shardCount: 2 | |
| extraArgs: |
In education purpose, I'll use single node version of VictoriaMetrics.
Lets say we have 2 zones: zone-a and zone-b. Separate cluster must be deploy to the both zones with commands:
helm upgrade -i zone-a vm/victoria-metrics-cluster -f zone.yaml| serviceMonitor: | |
| enabled: true | |
| alertmanager: | |
| enabled: true | |
| persistentVolume: | |
| enabled: false | |
| replicas: 1 | |
| resources: | |
| limits: |