From 9a41a3ef76d2d2fae01232e24db75b73e3cce117 Mon Sep 17 00:00:00 2001 From: Joseph Hanson Date: Thu, 8 Aug 2024 16:07:47 -0500 Subject: [PATCH] Add Victoria Metrics --- .../victoria-metrics/app/helmrelease.yaml | 22 +++++++++++++++++++ .../victoria-metrics/app/kustomization.yaml | 6 +++++ .../apps/victoria-metrics/kustomization.yaml | 8 +++++++ .../apps/victoria-metrics/namespace.yaml | 8 +++++++ .../flux/repositories/helm/kustomization.yaml | 7 +++--- .../repositories/helm/victoria-metrics.yaml | 10 +++++++++ 6 files changed, 58 insertions(+), 3 deletions(-) create mode 100644 kubernetes/apps/victoria-metrics/app/helmrelease.yaml create mode 100644 kubernetes/apps/victoria-metrics/app/kustomization.yaml create mode 100644 kubernetes/apps/victoria-metrics/kustomization.yaml create mode 100644 kubernetes/apps/victoria-metrics/namespace.yaml create mode 100644 kubernetes/flux/repositories/helm/victoria-metrics.yaml diff --git a/kubernetes/apps/victoria-metrics/app/helmrelease.yaml b/kubernetes/apps/victoria-metrics/app/helmrelease.yaml new file mode 100644 index 00000000..26d2447d --- /dev/null +++ b/kubernetes/apps/victoria-metrics/app/helmrelease.yaml @@ -0,0 +1,22 @@ +--- +# yaml-language-server: $schema=https://raw.githubusercontent.com/bjw-s/helm-charts/main/charts/other/app-template/schemas/helmrelease-helm-v2beta2.schema.json +apiVersion: helm.toolkit.fluxcd.io/v2beta1 +kind: HelmRelease +metadata: + name: victoria-metrics-operator + namespace: monitoring +spec: + interval: 30m + chart: + spec: + chart: victoria-metrics-k8s-stack + version: 0.23.2 + sourceRef: + kind: HelmRepository + name: victoria-metrics + values: + fullnameOverride: victoria-metrics + + # VM Operator deployment + victoria-metrics-operator: + enabled: true diff --git a/kubernetes/apps/victoria-metrics/app/kustomization.yaml b/kubernetes/apps/victoria-metrics/app/kustomization.yaml new file mode 100644 index 00000000..17cbc72b --- /dev/null +++ b/kubernetes/apps/victoria-metrics/app/kustomization.yaml @@ -0,0 +1,6 @@ +--- +# yaml-language-server: $schema=https://json.schemastore.org/kustomization +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - ./helmrelease.yaml diff --git a/kubernetes/apps/victoria-metrics/kustomization.yaml b/kubernetes/apps/victoria-metrics/kustomization.yaml new file mode 100644 index 00000000..44843b5e --- /dev/null +++ b/kubernetes/apps/victoria-metrics/kustomization.yaml @@ -0,0 +1,8 @@ +--- +# yaml-language-server: $schema=https://json.schemastore.org/kustomization +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + # Pre Flux-Kustomizations + - ./namespace.yaml + # Flux-Kustomizations diff --git a/kubernetes/apps/victoria-metrics/namespace.yaml b/kubernetes/apps/victoria-metrics/namespace.yaml new file mode 100644 index 00000000..42fe39d2 --- /dev/null +++ b/kubernetes/apps/victoria-metrics/namespace.yaml @@ -0,0 +1,8 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: victoria-metrics + labels: + kustomize.toolkit.fluxcd.io/prune: disabled + pgo-enabled-hsn.dev: "true" diff --git a/kubernetes/flux/repositories/helm/kustomization.yaml b/kubernetes/flux/repositories/helm/kustomization.yaml index 0a52c46e..ce9cd4e5 100644 --- a/kubernetes/flux/repositories/helm/kustomization.yaml +++ b/kubernetes/flux/repositories/helm/kustomization.yaml @@ -21,16 +21,17 @@ resources: - ingress-nginx.yaml - intel.yaml - jetstack.yaml + - kubernetes-sigs-external-dns.yaml + - kubernetes-sigs-metrics-server.yaml - kubernetes-sigs-nfd.yaml - kyverno.yaml - - kubernetes-sigs-metrics-server.yaml - - kubernetes-sigs-external-dns.yaml - nvidia.yaml - openebs.yaml - piraeus.yaml - postfinance.yaml - prometheus-community.yaml - rook-ceph.yaml + - spegel-org.yaml - stakater.yaml - stevehipwell.yaml - - spegel-org.yaml + - victoria-metrics.yaml diff --git a/kubernetes/flux/repositories/helm/victoria-metrics.yaml b/kubernetes/flux/repositories/helm/victoria-metrics.yaml new file mode 100644 index 00000000..89bc7ed9 --- /dev/null +++ b/kubernetes/flux/repositories/helm/victoria-metrics.yaml @@ -0,0 +1,10 @@ +--- +# yaml-language-server: $schema=https://ks.hsn.dev/source.toolkit.fluxcd.io/helmrepository_v1beta2.json +apiVersion: source.toolkit.fluxcd.io/v1 +kind: HelmRepository +metadata: + name: victoria-metrics +spec: + interval: 30m + url: https://victoriametrics.github.io/helm-charts/ + timeout: 3m -- 2.47.0