From cddce8ed5b7e1ef65e4c38ff64de39fa8015b424 Mon Sep 17 00:00:00 2001 From: Joseph Hanson Date: Fri, 18 Oct 2024 17:18:23 -0500 Subject: [PATCH] add victoria logs --- .../observability/victoria-metrics/ks.yaml | 22 +++++++ .../victoria-metrics/logs/helmrelease.yaml | 58 +++++++++++++++++++ .../victoria-metrics/logs/kustomization.yaml | 6 ++ 3 files changed, 86 insertions(+) create mode 100644 kubernetes/apps/observability/victoria-metrics/logs/helmrelease.yaml create mode 100644 kubernetes/apps/observability/victoria-metrics/logs/kustomization.yaml diff --git a/kubernetes/apps/observability/victoria-metrics/ks.yaml b/kubernetes/apps/observability/victoria-metrics/ks.yaml index 9c99edce..1a3394a8 100644 --- a/kubernetes/apps/observability/victoria-metrics/ks.yaml +++ b/kubernetes/apps/observability/victoria-metrics/ks.yaml @@ -39,3 +39,25 @@ spec: name: theshire wait: false interval: 30m +--- +# 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 victoria-logs + namespace: flux-system +spec: + targetNamespace: observability + commonMetadata: + labels: + app.kubernetes.io/name: *app + dependsOn: + - name: openebs + path: ./kubernetes/apps/observability/victoria-metrics/logs + prune: true + sourceRef: + kind: GitRepository + name: home-kubernetes + wait: false + interval: 30m + retryInterval: 1m diff --git a/kubernetes/apps/observability/victoria-metrics/logs/helmrelease.yaml b/kubernetes/apps/observability/victoria-metrics/logs/helmrelease.yaml new file mode 100644 index 00000000..ee71e3e1 --- /dev/null +++ b/kubernetes/apps/observability/victoria-metrics/logs/helmrelease.yaml @@ -0,0 +1,58 @@ +--- +# 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: victoria-logs +spec: + interval: 30m + chart: + spec: + chart: victoria-logs-single + version: 0.6.6 + sourceRef: + kind: HelmRepository + name: victoria-metrics + namespace: flux-system + driftDetection: + mode: enabled + install: + crds: CreateReplace + remediation: + retries: 3 + upgrade: + cleanupOnFail: true + crds: CreateReplace + remediation: + strategy: rollback + retries: 3 + values: + global: + victoriaLogs: + server: + fullnameOverride: victoria-logs + server: + persistentVolume: + enabled: true + storageClassName: openebs-hostpath + size: 10Gi + resources: + requests: + cpu: 5m + limits: + memory: 1Gi + ingress: + enabled: true + ingressClassName: internal-nginx + hosts: + - host: &host "logs.jahanson.tech" + paths: + - path: / + service: + identifier: app + port: http + tls: + - hosts: + - *host + serviceMonitor: + enabled: true diff --git a/kubernetes/apps/observability/victoria-metrics/logs/kustomization.yaml b/kubernetes/apps/observability/victoria-metrics/logs/kustomization.yaml new file mode 100644 index 00000000..904bfa24 --- /dev/null +++ b/kubernetes/apps/observability/victoria-metrics/logs/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