From 6713a0b6a8d9ed43633995212a586fe6c11e4d9f Mon Sep 17 00:00:00 2001 From: Stefan Reimer Date: Wed, 23 Aug 2023 11:51:34 +0000 Subject: [PATCH] Prepare logging module for renovate, use update lib --- charts/kubezero-logging/Chart.yaml | 6 ++++-- charts/kubezero-logging/update.sh | 21 ++++++--------------- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/charts/kubezero-logging/Chart.yaml b/charts/kubezero-logging/Chart.yaml index f82e9577..9790175e 100644 --- a/charts/kubezero-logging/Chart.yaml +++ b/charts/kubezero-logging/Chart.yaml @@ -21,12 +21,14 @@ dependencies: repository: https://cdn.zero-downtime.net/charts/ - name: eck-operator version: 2.4.0 - # repository: https://helm.elastic.co + repository: https://helm.elastic.co condition: eck-operator.enabled - name: fluentd version: 0.3.9 + repository: https://fluent.github.io/helm-charts condition: fluentd.enabled - name: fluent-bit version: 0.24.0 + repository: https://fluent.github.io/helm-charts condition: fluent-bit.enabled -kubeVersion: ">= 1.24.0" +kubeVersion: ">= 1.26.0" diff --git a/charts/kubezero-logging/update.sh b/charts/kubezero-logging/update.sh index d955b459..7f648f54 100755 --- a/charts/kubezero-logging/update.sh +++ b/charts/kubezero-logging/update.sh @@ -1,32 +1,23 @@ #!/bin/bash set -ex +. ../../scripts/lib-update.sh + ECK_VERSION=$(yq eval '.dependencies[] | select(.name=="eck-operator") | .version' Chart.yaml) FLUENT_BIT_VERSION=$(yq eval '.dependencies[] | select(.name=="fluent-bit") | .version' Chart.yaml) FLUENTD_VERSION=$(yq eval '.dependencies[] | select(.name=="fluentd") | .version' Chart.yaml) +patch_chart eck-operator + # fix ECK crds handling to adhere to proper helm v3 support which also fixes ArgoCD applying updates on upgrades -helm repo list | grep elastic -qc || { helm repo add elastic https://helm.elastic.co; helm repo update; } - -rm -rf charts/eck-operator && helm pull elastic/eck-operator --untar --untardir charts --version $ECK_VERSION - mkdir charts/eck-operator/crds helm template charts/eck-operator/charts/eck-operator-crds --name-template logging > charts/eck-operator/crds/all-crds.yaml + rm -rf charts/eck-operator/charts yq eval -Mi 'del(.dependencies)' charts/eck-operator/Chart.yaml -# Fluent Bit -rm -rf charts/fluent-bit -curl -L -s -o - https://github.com/fluent/helm-charts/releases/download/fluent-bit-${FLUENT_BIT_VERSION}/fluent-bit-${FLUENT_BIT_VERSION}.tgz | tar xfz - -C charts - -# patch -i fluent-bit.patch -p0 --no-backup-if-mismatch - - # FluentD -rm -rf charts/fluentd -curl -L -s -o - https://github.com/fluent/helm-charts/releases/download/fluentd-${FLUENTD_VERSION}/fluentd-${FLUENTD_VERSION}.tgz | tar xfz - -C charts - -patch -i fluentd.patch -p0 --no-backup-if-mismatch +patch_chart fluentd # Fetch dashboards from Grafana.com and update ZDT CM ../kubezero-metrics/sync_grafana_dashboards.py dashboards.yaml templates/fluent-bit/grafana-dashboards.yaml