Compare commits

...

61 Commits

Author SHA1 Message Date
Michel Hollands
1f980f393e Small docs fixes
Signed-off-by: Michel Hollands <michel.hollands@gmail.com>
2024-04-25 15:28:09 +01:00
Michel Hollands
47d9190eda Merge pull request #74 from grafana/add_more_docs
Add docs on how to install dashboards and rules in the cloud
2024-04-25 15:25:26 +01:00
Michel Hollands
5ff9bd16c9 Add docs on how to install dashboards and rules in the cloud
Signed-off-by: Michel Hollands <michel.hollands@gmail.com>
2024-04-25 15:22:18 +01:00
Michel Hollands
2d711f7168 Merge pull request #73 from grafana/update_main_page
Update installation instructions
2024-04-24 10:48:09 +01:00
Michel Hollands
c666bf69c9 Remove whitespace
Signed-off-by: Michel Hollands <michel.hollands@gmail.com>
2024-04-24 10:46:31 +01:00
Michel Hollands
41619b99b1 Update example values.yaml for local mode
Signed-off-by: Michel Hollands <michel.hollands@gmail.com>
2024-04-24 10:45:38 +01:00
Michel Hollands
5923139796 Update installation instructions
Signed-off-by: Michel Hollands <michel.hollands@gmail.com>
2024-04-24 10:40:52 +01:00
Michel Hollands
329d5822ea Merge pull request #71 from grafana/update_installation_instructions
Update installation instructions
2024-04-23 11:12:35 +01:00
Michel Hollands
5498b27ad6 Add repo update step
Signed-off-by: Michel Hollands <michel.hollands@gmail.com>
2024-04-23 11:12:00 +01:00
Michel Hollands
da687315e7 Merge pull request #70 from grafana/chore/update-loki
[dependency] Update the Loki subchart
2024-04-23 11:08:51 +01:00
Michel Hollands
8f20e45c77 Update installation instructions
Signed-off-by: Michel Hollands <michel.hollands@gmail.com>
2024-04-23 09:25:03 +01:00
Michel Hollands
e81b1246f5 Merge pull request #69 from grafana/fix_release_flow
Get Release Helm chart Github action working
2024-04-23 08:51:54 +01:00
MichelHollands
b103fb3434 Update loki 2024-04-23 07:02:51 +00:00
Michel Hollands
9349d2d906 Merge pull request #68 from grafana/chore/update-tempo-distributed
[dependency] Update the Tempo Distributed subchart
2024-04-22 14:02:07 +01:00
Michel Hollands
31536103c8 Add release instructions
Signed-off-by: Michel Hollands <michel.hollands@gmail.com>
2024-04-22 13:52:11 +01:00
Michel Hollands
13c28aa50a Remove repositories
Signed-off-by: Michel Hollands <michel.hollands@gmail.com>
2024-04-22 13:41:38 +01:00
Michel Hollands
385d0dd543 Specify repos
Signed-off-by: Michel Hollands <michel.hollands@gmail.com>
2024-04-22 13:21:08 +01:00
Michel Hollands
458451922d Add owner
Signed-off-by: Michel Hollands <michel.hollands@gmail.com>
2024-04-22 11:21:45 +01:00
Michel Hollands
4b0d457af0 Remove permissions
Signed-off-by: Michel Hollands <michel.hollands@gmail.com>
2024-04-22 11:04:49 +01:00
Michel Hollands
e60b2aecdc Add id-token permission
Signed-off-by: Michel Hollands <michel.hollands@gmail.com>
2024-04-22 10:52:34 +01:00
Michel Hollands
6244de677e Add write permissions for release
Signed-off-by: Michel Hollands <michel.hollands@gmail.com>
2024-04-22 10:49:09 +01:00
Michel Hollands
d14e933e84 Use correct path
Signed-off-by: Michel Hollands <michel.hollands@gmail.com>
2024-04-22 10:37:21 +01:00
Michel Hollands
0210fba39d Use get-vault-secrets action
Signed-off-by: Michel Hollands <michel.hollands@gmail.com>
2024-04-22 10:31:18 +01:00
Michel Hollands
a97fa64880 Use uppercase keys
Signed-off-by: Michel Hollands <michel.hollands@gmail.com>
2024-04-22 10:24:08 +01:00
Michel Hollands
34545e15b4 Merge pull request #66 from grafana/add_ci_to_release_helm_chart
Add CI to publish helm chart
2024-04-22 10:17:37 +01:00
Michel Hollands
33b8e37bed Update helm release and add required files
Signed-off-by: Michel Hollands <michel.hollands@gmail.com>
2024-04-22 09:53:29 +01:00
MichelHollands
0938193982 Update Tempo Distributed 2024-04-22 07:03:00 +00:00
Michel Hollands
b1975505e5 Add CI to publish helm chart
Signed-off-by: Michel Hollands <michel.hollands@gmail.com>
2024-04-16 14:44:41 +01:00
Michel Hollands
c282bf352d Merge pull request #65 from grafana/update_loki_config_for_3_0
Update Loki config to match 3.0
2024-04-16 11:01:17 +01:00
Michel Hollands
60af0b4d19 Update Loki config to match 3.0
Signed-off-by: Michel Hollands <michel.hollands@gmail.com>
2024-04-16 10:00:20 +01:00
Michel Hollands
0980cb2ede Merge pull request #63 from grafana/chore/update-loki
[dependency] Update the Loki subchart
2024-04-16 09:17:42 +01:00
Michel Hollands
75ab1f0d97 Merge pull request #64 from grafana/remove_reviewers
Remove reviewers
2024-04-16 09:16:07 +01:00
Michel Hollands
dd49623508 Remove reviewers
Signed-off-by: Michel Hollands <michel.hollands@gmail.com>
2024-04-16 09:15:45 +01:00
MichelHollands
095fb09d26 Update loki 2024-04-16 08:10:07 +00:00
Michel Hollands
0fc5e2f847 Merge pull request #60 from grafana/chore/update-tempo-distributed
[dependency] Update the Tempo Distributed subchart
2024-04-16 09:08:02 +01:00
Michel Hollands
d04d74cc26 Merge pull request #62 from grafana/use_loki_squad
Use loki-squad, run later
2024-04-16 09:07:26 +01:00
Michel Hollands
b840555522 Use loki-squad, run later
Signed-off-by: Michel Hollands <michel.hollands@gmail.com>
2024-04-16 09:06:59 +01:00
MichelHollands
e1a8495227 Update Tempo Distributed 2024-04-16 08:02:28 +00:00
Michel Hollands
a812b4f63a Merge pull request #56 from grafana/add_reviewers
Add team-reviewers and fix text
2024-04-16 09:01:18 +01:00
Michel Hollands
8dde9642c9 Add team-reviewers and fix text
Signed-off-by: Michel Hollands <michel.hollands@gmail.com>
2024-04-16 08:57:30 +01:00
Michel Hollands
0832bc8e8f Merge pull request #49 from grafana/chore/update-tempo-distributed
[dependency] Update tempo Distributed
2024-04-15 16:57:21 +01:00
Michel Hollands
cbae75acb8 Merge branch 'main' into chore/update-tempo-distributed 2024-04-15 16:57:09 +01:00
Michel Hollands
f5a5472b95 Merge pull request #50 from grafana/chore/update-minio
[dependency] Update minio
2024-04-15 16:53:24 +01:00
MichelHollands
58a4696a6b Update Tempo Distributed 2024-04-15 15:51:05 +00:00
MichelHollands
e31f6b0906 Update minio 2024-04-15 15:51:04 +00:00
Michel Hollands
351f50e238 Merge pull request #47 from grafana/fix_action
Use correct action file
2024-04-15 16:50:23 +01:00
Michel Hollands
170c17b721 Use correct action file
Signed-off-by: Michel Hollands <michel.hollands@gmail.com>
2024-04-15 16:49:47 +01:00
Michel Hollands
b2d06ab8e3 Merge pull request #46 from grafana/fix_tempo_update_filename
Add extension
2024-04-15 16:47:04 +01:00
Michel Hollands
9d63c32d4f Add extension
Signed-off-by: Michel Hollands <michel.hollands@gmail.com>
2024-04-15 16:46:32 +01:00
Michel Hollands
a201cef34c Merge pull request #44 from grafana/update_versions
Update versions
2024-04-15 16:43:25 +01:00
Michel Hollands
ea4d5e278a Add update github actions
Signed-off-by: Michel Hollands <michel.hollands@gmail.com>
2024-04-15 16:43:00 +01:00
Michel Hollands
e3c3f6a094 Add updates for Loki, Tempo and Minio
Signed-off-by: Michel Hollands <michel.hollands@gmail.com>
2024-04-15 16:40:57 +01:00
Michel Hollands
d6da6fec35 Merge pull request #42 from grafana/update_mimir_dependency
Update Mimir subschart
2024-04-15 16:19:07 +01:00
Michel Hollands
5e2ffb222b Merge pull request #43 from grafana/chore/update-mimir-distributed
[dependency] Update Mimir Distributed
2024-04-15 16:18:42 +01:00
MichelHollands
9b12bad16c Update Mimir Distributed 2024-04-15 15:17:35 +00:00
Michel Hollands
ed31bcf345 Update Mimir subschart
Signed-off-by: Michel Hollands <michel.hollands@gmail.com>
2024-04-15 16:15:50 +01:00
Michel Hollands
a0184e27d0 Merge pull request #40 from grafana/fix_workflow
Use correct path
2024-04-15 14:58:50 +01:00
Michel Hollands
3491886311 Merge pull request #41 from grafana/chore/update-grafana-alloy
[dependency] Update Grafana Alloy
2024-04-15 14:58:18 +01:00
MichelHollands
c58b76cfc7 Update Grafana Alloy 2024-04-15 13:56:36 +00:00
Michel Hollands
a72e64327f Use correct path
Signed-off-by: Michel Hollands <michel.hollands@gmail.com>
2024-04-15 14:55:42 +01:00
Michel Hollands
cfdc6b95eb Merge pull request #39 from grafana/add_helm_chart_updater
Add Github workflow to update Alloy chart version
2024-04-15 14:50:56 +01:00
23 changed files with 610 additions and 52 deletions

3
.github/configs/cr.yaml vendored Normal file
View File

@@ -0,0 +1,3 @@
owner: grafana
git-repo: helm-charts
skip-existing: true

15
.github/configs/ct.yaml vendored Normal file
View File

@@ -0,0 +1,15 @@
## Reference: https://github.com/helm/chart-testing/blob/master/doc/ct_lint-and-install.md
remote: origin
target-branch: main
chart-dirs:
- charts
chart-repos:
- grafana=https://grafana.github.io/helm-charts
- minio=https://charts.min.io
validate-chart-schema: true
validate-maintainers: true
validate-yaml: true
exclude-deprecated: true
excluded-charts: []
namespace: meta-monitoring # Need to set the namespace because we create the secret there
release-label: app.kubernetes.io/instance

View File

@@ -1,4 +1,4 @@
ame: Bump dependency "alloy" for Helm chart "meta-monitoring"
name: Bump dependency "alloy" for Helm chart "meta-monitoring"
sources:
alloy:
name: Get latest "alloy" Helm chart version

30
.github/configs/updatecli.d/loki.yaml vendored Normal file
View File

@@ -0,0 +1,30 @@
name: Bump dependency "loki" for Helm chart "meta-monitoring"
sources:
loki:
name: Get latest "loki" Helm chart version
kind: helmchart
spec:
name: loki
url: https://grafana.github.io/helm-charts
versionfilter:
kind: semver
pattern: '*'
conditions:
loki:
name: Ensure Helm chart dependency "loki" is specified
kind: yaml
spec:
file: charts/meta-monitoring/Chart.yaml
key: $.dependencies[0].name
value: loki
disablesourceinput: true
targets:
loki:
name: Bump Helm chart dependency "loki" for Helm chart "meta-monitoring"
kind: helmchart
spec:
file: Chart.yaml
key: $.dependencies[0].version
name: charts/meta-monitoring
versionincrement: none
sourceid: loki

View File

@@ -0,0 +1,30 @@
name: Bump dependency "mimir-distributed" for Helm chart "meta-monitoring"
sources:
mimir-distributed:
name: Get latest "mimir-distributed" Helm chart version
kind: helmchart
spec:
name: mimir-distributed
url: https://grafana.github.io/helm-charts
versionfilter:
kind: semver
pattern: '*'
conditions:
mimir-distributed:
name: Ensure Helm chart dependency "mimir-distributed" is specified
kind: yaml
spec:
file: charts/meta-monitoring/Chart.yaml
key: $.dependencies[2].name
value: mimir-distributed
disablesourceinput: true
targets:
mimir-distributed:
name: Bump Helm chart dependency "mimir-distributed" for Helm chart "meta-monitoring"
kind: helmchart
spec:
file: Chart.yaml
key: $.dependencies[2].version
name: charts/meta-monitoring
versionincrement: none
sourceid: mimir-distributed

30
.github/configs/updatecli.d/minio.yaml vendored Normal file
View File

@@ -0,0 +1,30 @@
name: Bump dependency "minio" for Helm chart "meta-monitoring"
sources:
minio:
name: Get latest "minio" Helm chart version
kind: helmchart
spec:
name: minio
url: https://charts.min.io
versionfilter:
kind: semver
pattern: '*'
conditions:
minio:
name: Ensure Helm chart dependency "minio" is specified
kind: yaml
spec:
file: charts/meta-monitoring/Chart.yaml
key: $.dependencies[4].name
value: minio
disablesourceinput: true
targets:
minio:
name: Bump Helm chart dependency "minio" for Helm chart "meta-monitoring"
kind: helmchart
spec:
file: Chart.yaml
key: $.dependencies[4].version
name: charts/meta-monitoring
versionincrement: none
sourceid: minio

View File

@@ -0,0 +1,30 @@
name: Bump dependency "tempo-distributed" for Helm chart "meta-monitoring"
sources:
tempo-distributed:
name: Get latest "tempo-distributed" Helm chart version
kind: helmchart
spec:
name: tempo-distributed
url: https://grafana.github.io/helm-charts
versionfilter:
kind: semver
pattern: '*'
conditions:
tempo-distributed:
name: Ensure Helm chart dependency "tempo-distributed" is specified
kind: yaml
spec:
file: charts/meta-monitoring/Chart.yaml
key: $.dependencies[3].name
value: tempo-distributed
disablesourceinput: true
targets:
tempo-distributed:
name: Bump Helm chart dependency "tempo-distributed" for Helm chart "meta-monitoring"
kind: helmchart
spec:
file: Chart.yaml
key: $.dependencies[3].version
name: charts/meta-monitoring
versionincrement: none
sourceid: tempo-distributed

View File

@@ -5,7 +5,7 @@ on:
workflow_dispatch:
schedule:
# Run once a day
- cron: '0 0 * * *'
- cron: '0 7 * * *'
permissions:
contents: "write"
@@ -16,8 +16,40 @@ env:
UPDATECLI_GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
jobs:
updateLoki:
name: Update the Loki subchart
runs-on: "ubuntu-latest"
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Updatecli
uses: updatecli/updatecli-action@v2
- name: Run Updatecli
id: update-loki
run: |
updatecli apply --config ${UPDATECLI_CONFIG_DIR}/loki.yaml
if ! git diff --exit-code > /dev/null; then
echo "changed=true" >> "${GITHUB_OUTPUT}"
fi
- name: Create pull request
if: steps.update-loki.outputs.changed == 'true'
uses: peter-evans/create-pull-request@v5
with:
title: "[dependency] Update the Loki subchart"
body: "Updates the Loki subchart"
base: main
author: "${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>"
committer: "GitHub <noreply@github.com>"
commit-message: Update loki
labels: dependencies
branch: chore/update-loki
delete-branch: true
updateGrafanaAlloy:
name: Update Grafana Alloy
name: Update the Grafana Alloy subchart
runs-on: "ubuntu-latest"
steps:
- name: Checkout
@@ -29,20 +61,16 @@ jobs:
- name: Run Updatecli
id: update-grafana-alloy
run: |
updatecli apply --config ${UPDATECLI_CONFIG_DIR}/grafana-alloy.yaml
updatecli apply --config ${UPDATECLI_CONFIG_DIR}/alloy.yaml
if ! git diff --exit-code > /dev/null; then
echo "changed=true" >> "${GITHUB_OUTPUT}"
fi
- name: Install Helm
if: steps.update-grafana-alloy.outputs.changed == 'true'
uses: azure/setup-helm@v3
- name: Create pull request
if: steps.update-grafana-alloy.outputs.changed == 'true'
uses: peter-evans/create-pull-request@v5
with:
title: "[dependency] Update Grafana Alloy"
title: "[dependency] Update the Grafana Alloy subchart"
body: "Updates the Grafana Alloy subchart"
base: main
author: "${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>"
@@ -51,3 +79,99 @@ jobs:
labels: dependencies
branch: chore/update-grafana-alloy
delete-branch: true
updateMimirDistributed:
name: Update the Mimir Distributed subchart
runs-on: "ubuntu-latest"
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Updatecli
uses: updatecli/updatecli-action@v2
- name: Run Updatecli
id: update-mimir-distributed
run: |
updatecli apply --config ${UPDATECLI_CONFIG_DIR}/mimir-distributed.yaml
if ! git diff --exit-code > /dev/null; then
echo "changed=true" >> "${GITHUB_OUTPUT}"
fi
- name: Create pull request
if: steps.update-mimir-distributed.outputs.changed == 'true'
uses: peter-evans/create-pull-request@v5
with:
title: "[dependency] Update the Mimir Distributed subchart"
body: "Updates the Mimir Distributed subchart"
base: main
author: "${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>"
committer: "GitHub <noreply@github.com>"
commit-message: Update Mimir Distributed
labels: dependencies
branch: chore/update-mimir-distributed
delete-branch: true
updateTempoDistributed:
name: Update the Tempo Distributed subchart
runs-on: "ubuntu-latest"
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Updatecli
uses: updatecli/updatecli-action@v2
- name: Run Updatecli
id: update-tempo-distributed
run: |
updatecli apply --config ${UPDATECLI_CONFIG_DIR}/tempo-distributed.yaml
if ! git diff --exit-code > /dev/null; then
echo "changed=true" >> "${GITHUB_OUTPUT}"
fi
- name: Create pull request
if: steps.update-tempo-distributed.outputs.changed == 'true'
uses: peter-evans/create-pull-request@v5
with:
title: "[dependency] Update the Tempo Distributed subchart"
body: "Updates the tempo Distributed subchart"
base: main
author: "${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>"
committer: "GitHub <noreply@github.com>"
commit-message: Update Tempo Distributed
labels: dependencies
branch: chore/update-tempo-distributed
delete-branch: true
updateMinio:
name: Update the Minio subchart
runs-on: "ubuntu-latest"
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Updatecli
uses: updatecli/updatecli-action@v2
- name: Run Updatecli
id: update-minio
run: |
updatecli apply --config ${UPDATECLI_CONFIG_DIR}/minio.yaml
if ! git diff --exit-code > /dev/null; then
echo "changed=true" >> "${GITHUB_OUTPUT}"
fi
- name: Create pull request
if: steps.update-minio.outputs.changed == 'true'
uses: peter-evans/create-pull-request@v5
with:
title: "[dependency] Update the Minio subchart"
body: "Updates the Minio subchart"
base: main
author: "${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>"
committer: "GitHub <noreply@github.com>"
commit-message: Update minio
labels: dependencies
branch: chore/update-minio
delete-branch: true

175
.github/workflows/helm-release.yml vendored Normal file
View File

@@ -0,0 +1,175 @@
name: Release Helm chart
on:
workflow_dispatch:
env:
CR_CONFIGFILE: "${{ github.workspace }}/source/.github/configs/cr.yaml"
CT_CONFIGFILE: "${{ github.workspace }}/source/.github/configs/ct.yaml"
CR_INDEX_PATH: "${{ github.workspace }}/.cr-index"
CR_PACKAGE_PATH: "${{ github.workspace }}/.cr-release-packages"
CR_TOOL_PATH: "${{ github.workspace }}/.cr-tool"
CR_VERSION: "1.5.0"
jobs:
setup:
runs-on: ubuntu-latest
outputs:
changed: ${{ steps.list-changed.outputs.changed }}
chartpath: ${{ steps.list-changed.outputs.chartpath }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
path: source
- name: Install chart-testing
uses: helm/chart-testing-action@v2
- name: List changed charts
id: list-changed
run: |
cd source
latest_tag=$( if ! git describe --tags --abbrev=0 --match='helm-chart/*' 2> /dev/null ; then git rev-list --max-parents=0 --first-parent HEAD; fi )
echo "Running: ct list-changed --config ${CT_CONFIGFILE} --since ${latest_tag} --target-branch ${{ github.ref_name }}"
changed=$(ct list-changed --config "${CT_CONFIGFILE}" --since "${latest_tag}" --target-branch "${{ github.ref_name }}")
echo "${changed}"
num_changed=$(wc -l <<< ${changed})
if [[ "${num_changed}" -gt "1" ]] ; then
echo "More than one chart changed, exiting"
exit 1
fi
if [[ -n "${changed}" ]]; then
name=$(yq ".name" < ${changed}/Chart.yaml)
version=$(yq ".version" < ${changed}/Chart.yaml)
tagname="v${version}"
if [ $(git tag -l "${tagname}") ]; then
echo "Tag ${tagname} already exists, skipping release"
echo "changed=false" >> $GITHUB_OUTPUT
else
echo "Releasing ${changed}"
echo "changed=true" >> $GITHUB_OUTPUT
echo "chartpath=${changed}" >> $GITHUB_OUTPUT
fi
else
echo "No charts have changed, skipping release"
echo "changed=false" >> $GITHUB_OUTPUT
fi
release:
needs: [setup]
runs-on: ubuntu-latest
if: needs.setup.outputs.changed == 'true'
permissions:
contents: write
id-token: write
steps:
- id: get-secrets
uses: grafana/shared-workflows/actions/get-vault-secrets@main
with:
# Secrets placed in the ci/repo/grafana/<repo>/<path> path in Vault
repo_secrets: |
APP_ID=github-app:app-id
PRIVATE_KEY=github-app:private-key
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ env.APP_ID }}
private-key: ${{ env.PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
path: source
- name: Configure Git
run: |
cd source
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Checkout helm-charts
uses: actions/checkout@v4
with:
fetch-depth: 0
repository: grafana/helm-charts
path: helm-charts
token: "${{ steps.app-token.outputs.token }}"
- name: Configure Git for helm-charts
run: |
cd helm-charts
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Set up Helm
uses: azure/setup-helm@v4
- name: Parse Chart.yaml
id: parse-chart
run: |
cd source
changed="${{ needs.setup.outputs.chartpath }}"
description=$(yq ".description" < ${changed}/Chart.yaml)
name=$(yq ".name" < ${changed}/Chart.yaml)
version=$(yq ".version" < ${changed}/Chart.yaml)
echo "chartpath=${changed}" >> $GITHUB_OUTPUT
echo "desc=${description}" >> $GITHUB_OUTPUT
echo "tagname=v${version}" >> $GITHUB_OUTPUT
echo "packagename=${name}-${version}" >> $GITHUB_OUTPUT
- name: Install CR tool
run: |
mkdir "${CR_TOOL_PATH}"
mkdir "${CR_PACKAGE_PATH}"
mkdir "${CR_INDEX_PATH}"
curl -sSLo cr.tar.gz "https://github.com/helm/chart-releaser/releases/download/v${CR_VERSION}/chart-releaser_${CR_VERSION}_linux_amd64.tar.gz"
tar -xzf cr.tar.gz -C "${CR_TOOL_PATH}"
rm -f cr.tar.gz
- name: Create Helm package
run: |
cd source
helm repo add grafana https://grafana.github.io/helm-charts
helm repo add minio https://charts.min.io
"${CR_TOOL_PATH}/cr" package "${{ steps.parse-chart.outputs.chartpath }}" --config "${CR_CONFIGFILE}" --package-path "${CR_PACKAGE_PATH}"
- name: Make a release on this repo
uses: softprops/action-gh-release@v2
with:
name: ${{ steps.parse-chart.outputs.tagname }}
repository: grafana/meta-monitoring-chart
tag_name: ${{ steps.parse-chart.outputs.tagname }}
token: ${{ steps.app-token.outputs.token }}
generate_release_notes: true
files: |
${{ env.CR_PACKAGE_PATH }}/${{ steps.parse-chart.outputs.packagename }}.tgz
# Note that this creates a release in grafana/helm-charts with a new tag.
# The tag name in grafana/helm-charts is <package>-<version>, while the
# tag name for grafana/meta-monitoring-chart is <version>.
- name: Make release on Helm Charts
uses: softprops/action-gh-release@v2
with:
name: ${{ steps.parse-chart.outputs.packagename }}
repository: grafana/helm-charts
tag_name: ${{ steps.parse-chart.outputs.packagename }}
token: ${{ steps.app-token.outputs.token }}
body: |
${{ steps.parse-chart.outputs.desc }}
Source commit: https://github.com/${{ github.repository }}/commit/${{ github.sha }}
Tag on source: https://github.com/${{ github.repository }}/releases/tag/${{ steps.parse-chart.outputs.tagname }}
files: |
${{ env.CR_PACKAGE_PATH }}/${{ steps.parse-chart.outputs.packagename }}.tgz
- name: Update helm-charts index.yaml
run: |
cd helm-charts
"${CR_TOOL_PATH}/cr" index --config "${CR_CONFIGFILE}" --token "${{ steps.app-token.outputs.token }}" --index-path "${CR_INDEX_PATH}" --package-path "${CR_PACKAGE_PATH}" --push

View File

@@ -1,20 +1,9 @@
# meta-monitoring-chart
This is a meta-monitoring chart for GEL, GEM and GET. It should be installed in a
separate namespace next to GEM, GEL or GET installations.
This is a meta-monitoring chart for Loki.
Note that this is pre-production software at the moment.
## Preparation
Create a values.yaml file based on the [default one](../charts/meta-monitoring/values.yaml).
1. Add or remove the namespaces to monitor in the `namespacesToMonitor` setting
1. Set the cluster name in the `clusterName` setting. This will be added as a label to all logs, metrics and traces.
1. Create a `meta` namespace.
## Local and cloud modes
The chart has 2 modes: local and cloud. In the local mode logs, metrics and/or traces are sent
@@ -34,12 +23,6 @@ Both modes can be enabled at the same time.
## Installation
```
helm install -n meta --skip-crds -f values.yaml meta ./charts/meta-monitoring
```
If the platform supports CRDs the `--skip-crds` option can be removed. However the CRDs are not used by this chart.
For more instructions including how to update the chart go to the [installation](docs/installation.md) page.
## Supported features
@@ -59,7 +42,6 @@ Most of these features are enabled by default. See the values.yaml file for how
## Caveats
- The [loki.source.kubernetes](https://grafana.com/docs/agent/latest/flow/reference/components/loki.source.kubernetes/) component of the Grafana Agent is used to scrape Kubernetes log files. This component is marked experimental at the moment.
- This has not been tested on Openshift yet.
- The underlying Loki, Mimir and Tempo are at the default size installed by the Helm chart. This might need changing when monitoring bigger Loki, Mimir or Tempo installations.
- MinIO is used as storage at the moment with a limited retention. At the moment this chart cannot be used for monitoring over longer periods.

View File

@@ -1,18 +1,18 @@
dependencies:
- name: loki
repository: https://grafana.github.io/helm-charts
version: 5.47.2
version: 6.3.4
- name: alloy
repository: https://grafana.github.io/helm-charts
version: 0.1.1
- name: mimir-distributed
repository: https://grafana.github.io/helm-charts
version: 5.2.0
version: 5.3.0
- name: tempo-distributed
repository: https://grafana.github.io/helm-charts
version: 1.9.1
version: 1.9.3
- name: minio
repository: https://charts.min.io
version: 5.0.11
digest: sha256:14d19ff9b9d96f535a3f32b8d1f7050143209a004720c98903bc94d03af5cee0
generated: "2024-04-15T10:10:57.690716+01:00"
version: 5.1.0
digest: sha256:3a47359025acb478698760e2f27b1608fab95174508e32f86e31a06d7856fe32
generated: "2024-04-23T07:02:48.466787696Z"

View File

@@ -1,7 +1,6 @@
apiVersion: v2
name: meta-monitoring
description: A Helm chart for meta monitoring Grafana Loki, Mimir and Tempo
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
@@ -11,35 +10,32 @@ description: A Helm chart for meta monitoring Grafana Loki, Mimir and Tempo
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.0.1
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.0.1"
dependencies:
- name: loki
repository: https://grafana.github.io/helm-charts
version: "5.47.2"
version: 6.3.4
condition: local.logs.enabled
- name: alloy
repository: https://grafana.github.io/helm-charts
version: "0.1.1"
version: 0.1.1
- name: mimir-distributed
repository: https://grafana.github.io/helm-charts
version: "5.2.0"
version: 5.3.0
condition: local.metrics.enabled
- name: tempo-distributed
repository: https://grafana.github.io/helm-charts
version: "1.9.1"
version: 1.9.3
condition: local.traces.enabled
- name: minio
repository: https://charts.min.io
version: "5.0.11"
version: 5.1.0
condition: local.minio.enabled

Binary file not shown.

Binary file not shown.

View File

@@ -1,12 +1,11 @@
# Specify the namespaces to monitor here
namespacesToMonitor:
- loki
- mimir
- tempo
# The name of the cluster where this will be installed
clusterLabelValue: "meta-monitoring"
# Set to true to write logs, metrics or traces to Grafana Cloud
# The secrets have to be created first
cloud:
logs:
enabled: true
@@ -202,6 +201,15 @@ kubeStateMetrics:
loki:
loki:
auth_enabled: false
schemaConfig:
configs:
- from: 2024-03-29
store: tsdb
object_store: s3
schema: v13
index:
prefix: index_
period: 24h
storage:
type: "s3"
s3:
@@ -219,8 +227,13 @@ loki:
secret_access_key: "{{ .Values.global.minio.rootPassword }}"
compactor:
retention_enabled: true
delete_request_store: s3
limits_config:
retention_period: 30d
lokiCanary:
enabled: false
test:
enabled: false
monitoring:
dashboards:
enabled: false

View File

@@ -0,0 +1,10 @@
# Create a new release
1. Update the version field in charts/meta-monitoring/Chart.yaml in a new PR. Merge this PR if approved.
2. On the [Actions tab](https://github.com/grafana/meta-monitoring-chart/actions):
- Select `Release Helm chart` in the workflows on the left
- Click the `Run workflow` button
- Leave the `main` branch as is
- Click the green `Run workflow` button

View File

@@ -1,5 +1,19 @@
# Install this chart
## Preparation for Cloud mode (preferred)
1. Use an existing Grafana Cloud account or setup a new one. Then create an access token:
1. In Grafana go to Administration -> Users and Access -> Cloud access policies.
1. Click `Create access policy`.
1. Fill in the `Display name` field and check the `Write` check box for metrics, logs and traces. Then click `Create`.
1. On the newly created access policy click `Add token`.
1. Fill in the `Token name` field and click `Create`. Make a copy of the token as it will be used later on.
1. Create the meta namespace
```
@@ -11,36 +25,142 @@
```
kubectl create secret generic logs -n meta \
--from-literal=username=<logs username> \
--from-literal=password=<logs password>
--from-literal=password=<token>
--from-literal=endpoint='https://logs-prod-us-central1.grafana.net/loki/api/v1/push'
kubectl create secret generic metrics -n meta \
--from-literal=username=<metrics username> \
--from-literal=password=<metrics password>
--from-literal=password=<token>
--from-literal=endpoint='https://prometheus-us-central1.grafana.net/api/prom/push'
kubectl create secret generic traces -n meta \
--from-literal=username=<traces username> \
--from-literal=password=<traces password>
--from-literal=password=<token>
--from-literal=endpoint='https://tempo-us-central1.grafana.net/tempo'
```
1. Create a values.yaml file based on the [default one](../charts/meta-monitoring/values.yaml). Fill in the names of the secrets created above as needed.
The logs, metrics and traces usernames are the `User / Username / Instance IDs` of the Loki, Prometheus/Mimir and Tempo instances in Grafana Cloud. From `Home` in Grafana click on `Stacks`. Then go to the `Details` pages of Loki, Prometheus/Mimir and Tempo.
1. Create a values.yaml file based on the [default one](../charts/meta-monitoring/values.yaml). Fill in the names of the secrets created above as needed. An example minimal values.yaml looks like this:
```
namespacesToMonitor:
- loki
cloud:
logs:
enabled: true
secret: "logs"
metrics:
enabled: true
secret: "metrics"
traces:
enabled: true
secret: "traces"
```
## Preparation for Local mode
1. Create the meta namespace
```
kubectl create namespace meta
```
1. Create a values.yaml file based on the [default one](../charts/meta-monitoring/values.yaml). An example minimal values.yaml looks like this:
```
namespacesToMonitor:
- loki
cloud:
logs:
enabled: false
metrics:
enabled: false
traces:
enabled: false
local:
grafana:
enabled:true
logs:
enabled: true
metrics:
enabled: true
traces:
enabled: true
minio:
enabled: true
```
## Installing the chart
1. Add the repo
```
helm repo add grafana https://grafana.github.io/helm-charts
```
1. Fetch the latest charts from the grafana repo
```
helm repo update grafana
```
1. Install this helm chart
```
helm install -n meta -f values.yaml meta ./charts/meta-monitoring
helm install -n meta -f values.yaml meta grafana/meta-monitoring
```
1. Upgrade
```
helm upgrade --install -f values.yaml -n meta meta ./charts/meta-monitoring
helm upgrade --install -f values.yaml -n meta meta grafana/meta-monitoring
```
1. Delete this chart:
```
helm delete -n meta meta
```
```
## Installing the dashboards and rules on Grafana Cloud
## Installing the dashboards on Grafana Cloud
Only the files for the application monitored have to be copied. When monitoring Loki import dashboard files starting with 'loki-'.
For each of the dashboard files in charts/meta-monitoring/src/dashboards folder do the following:
1. Click on 'Dashboards' in Grafana
1. Click on the 'New` button and select 'Import'
1. Drop the dashboard file to the 'Upload dashboard JSON file' drop area
1. Click 'Import'
## Installing the rules on Grafana Cloud
1. Select the rules files in charts/meta-monitoring/src/rules for the application to monitor. When monitoring Loki use loki-rules.yaml.
1. Install mimirtool as per the [instructions](https://grafana.com/docs/mimir/latest/manage/tools/mimirtool/)
1. Create an access policy with Read and Write permission for Rules. Also create a token and record the token.
1. Get your cloud Prometheus endpoint and Instance ID from the `Prometheus` page in `Stacks`.
1. Use them to load the rules using mimirtool as follows:
```
mimirtool rules load --address=<your_cloud_prometheus_endpoint> --id=<your_instance_id> --key=<your_cloud_access_policy_token> *.yaml
```
1. To check the rules you have uploaded run:
```
mimirtool rules print --address=<your_cloud_prometheus_endpoint> --id=<your_instance_id> --key=<your_cloud_access_policy_token>
```