Skip to content

Commit

Permalink
Merge branch 'main' into tempo/add-global-extra-env
Browse files Browse the repository at this point in the history
  • Loading branch information
zanhsieh authored May 2, 2024
2 parents 2e8065e + f073467 commit 9cde7e0
Show file tree
Hide file tree
Showing 130 changed files with 2,167 additions and 7,104 deletions.
18 changes: 10 additions & 8 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
* @grafana/helm-charts-admins

/charts/grafana/ @maorfr @torstenwalter @Xtigyro @zanhsieh
/charts/loki-distributed/ @unguiculus @Whyeasy
/charts/loki-canary/ @unguiculus @Whyeasy
/charts/promtail/ @unguiculus @Whyeasy
/charts/tempo/ @annanay25 @dgzlopes @joe-elliott @mapno @mdisibio @swartz-k @BitProcessor @faustodavid
/charts/tempo-distributed/ @annanay25 @joe-elliott @mapno @mdisibio @swartz-k @BitProcessor @faustodavid @zalegrala
/charts/enterprise-metrics/ @chaudum
/charts/enterprise-logs/ @chaudum
/charts/tempo-vulture/ @Whyeasy @annanay25 @dgzlopes @joe-elliott @mapno @mdisibio
/charts/loki-distributed/ @grafana/loki-squad @unguiculus @Whyeasy
/charts/loki-canary/ @grafana/loki-squad @unguiculus @Whyeasy
/charts/promtail/ @grafana/loki-squad @unguiculus @Whyeasy
/charts/tempo/ @grafana/tempo @dgzlopes @swartz-k @BitProcessor @faustodavid
/charts/tempo-distributed/ @grafana/tempo @mapno @swartz-k @BitProcessor @faustodavid
/charts/enterprise-metrics/ @grafana/mimir-maintainers
/charts/rollout-operator/ @grafana/mimir-maintainers
/charts/enterprise-logs/ @grafana/loki-squad
/charts/tempo-vulture/ @grafana/tempo @Whyeasy @dgzlopes
/charts/synthetic-monitoring-agent/ @torstenwalter @zanhsieh
/charts/agent-operator/ @grafana/grafana-agent-maintainers
14 changes: 9 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ jobs:
helm repo add prometheus https://prometheus-community.github.io/helm-charts
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add hashicorp https://helm.releases.hashicorp.com
helm repo add minio https://helm.min.io
helm repo add minio-new https://charts.min.io
- name: Run chart-releaser
Expand All @@ -48,14 +47,19 @@ jobs:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
CR_SKIP_EXISTING: "true"

- name: Login to GHCR
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push charts to GHCR
run: |
shopt -s nullglob
for pkg in .cr-release-packages/*; do
for pkg in .cr-release-packages/*.tgz; do
if [ -z "${pkg:-}" ]; then
break
fi
if ! helm push "${pkg}" "oci://ghcr.io/${GITHUB_REPOSITORY_OWNER}/charts"; then
echo '::warning:: helm push failed!'
fi
helm push "${pkg}" "oci://ghcr.io/${GITHUB_REPOSITORY_OWNER}/helm-charts"
done
51 changes: 37 additions & 14 deletions .github/workflows/update-helm-repo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,15 @@ on:
required: false
type: string
secrets:
github_app_id:
description: Github App ID to authenticate with
required: false
github_app_pem:
description: GitHub APP pem to authenticate with
required: false
helm_repo_token:
description: GitHub api token to use against the helm-charts repository
required: true
required: false

env:
CR_CONFIGFILE: "${{ github.workspace }}/source/${{ inputs.cr_configfile }}"
Expand Down Expand Up @@ -73,22 +79,40 @@ jobs:
if [ $(git tag -l "${name}-${version}") ]; then
echo "Tag ${tagname} already exists, skipping release"
echo "::set-output name=changed::false"
echo "changed=false" >> $GITHUB_OUTPUT
else
echo "Releasing ${changed}"
echo "::set-output name=changed::true"
echo "::set-output name=chartpath::${changed}"
echo "changed=true" >> $GITHUB_OUTPUT
echo "chartpath=${changed}" >> $GITHUB_OUTPUT
fi
else
echo "No charts have changed, skipping release"
echo "::set-output name=changed::false"
echo "changed=false" >> $GITHUB_OUTPUT
fi
release:
needs: [ setup ]
runs-on: ubuntu-latest
env:
github_app_id: ${{ secrets.github_app_id }}
if: needs.setup.outputs.changed == 'true'
steps:
- name: Create a GitHub App installation access token
if: env.github_app_id != ''
uses: tibdex/github-app-token@v2
id: app-token
with:
app_id: ${{ secrets.github_app_id }}
private_key: ${{ secrets.github_app_pem }}

- name: Set the correct token (Github App or PAT)
run: |
if [[ "${{ env.github_app_id }}" == '' ]]; then
echo "AUTHTOKEN=${{ secrets.helm_repo_token }}" >> $GITHUB_ENV
else
echo "AUTHTOKEN=${{ steps.app-token.outputs.token }}" >> $GITHUB_ENV
fi
- name: Checkout
uses: actions/checkout@v2
with:
Expand All @@ -108,7 +132,7 @@ jobs:
fetch-depth: 0
repository: grafana/helm-charts
path: helm-charts
token: ${{ secrets.helm_repo_token }}
token: ${{ env.AUTHTOKEN }}

- name: Configure Git for helm-charts
run: |
Expand All @@ -130,7 +154,6 @@ jobs:
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add bitnami-pre-2022 https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami
helm repo add hashicorp https://helm.releases.hashicorp.com
helm repo add minio https://helm.min.io
helm repo add minio-new https://charts.min.io
helm repo add jetstack https://charts.jetstack.io
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
Expand All @@ -143,14 +166,14 @@ jobs:
description=$(yq ".description" < ${changed}/Chart.yaml)
name=$(yq ".name" < ${changed}/Chart.yaml)
version=$(yq ".version" < ${changed}/Chart.yaml)
echo "::set-output name=chartpath::${changed}"
echo "::set-output name=desc::${description}"
echo "chartpath=${changed}" >> $GITHUB_OUTPUT
echo "desc=${description}" >> $GITHUB_OUTPUT
if [[ -n "${HELM_TAG_PREFIX}" ]]; then
echo "::set-output name=tagname::${HELM_TAG_PREFIX}-${name}-${version}"
echo "tagname=${HELM_TAG_PREFIX}-${name}-${version}" >> $GITHUB_OUTPUT
else
echo "::set-output name=tagname::${name}-${version}"
echo "tagname=${name}-${version}" >> $GITHUB_OUTPUT
fi
echo "::set-output name=packagename::${name}-${version}"
echo "packagename=${name}-${version}" >> $GITHUB_OUTPUT
- name: Install CR tool
run: |
Expand Down Expand Up @@ -188,7 +211,7 @@ jobs:
${{ env.CR_PACKAGE_PATH }}/${{ steps.parse-chart.outputs.packagename }}.tgz.prov
repository: grafana/helm-charts
tag_name: ${{ steps.parse-chart.outputs.tagname }}
token: ${{ secrets.helm_repo_token }}
token: ${{ env.AUTHTOKEN }}

- name: Push release tag on origin
run: |
Expand All @@ -199,4 +222,4 @@ jobs:
- name: Update helm repo index.yaml
run: |
cd helm-charts
"${CR_TOOL_PATH}/cr" index --config "${CR_CONFIGFILE}" --token "${{ secrets.helm_repo_token }}" --index-path "${CR_INDEX_PATH}" --package-path "${CR_PACKAGE_PATH}" --push
"${CR_TOOL_PATH}/cr" index --config "${CR_CONFIGFILE}" --token "${{ env.AUTHTOKEN }}" --index-path "${CR_INDEX_PATH}" --package-path "${CR_PACKAGE_PATH}" --push
10 changes: 5 additions & 5 deletions charts/agent-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ apiVersion: v2
name: grafana-agent-operator
description: A Helm chart for Grafana Agent Operator
type: application
version: 0.3.8
appVersion: "0.37.2"
home: https://grafana.com/docs/agent/v0.37/
icon: https://raw.githubusercontent.com/grafana/agent/v0.37.2/docs/sources/assets/logo_and_name.png
version: 0.3.21
appVersion: "0.40.4"
home: https://grafana.com/docs/agent/v0.40/
icon: https://raw.githubusercontent.com/grafana/agent/v0.40.4/docs/sources/assets/logo_and_name.png
sources:
- https://github.com/grafana/agent/tree/v0.37.2/pkg/operator
- https://github.com/grafana/agent/tree/v0.40.4/pkg/operator
maintainers:
- name: Grafana Agent Team
email: [email protected]
11 changes: 7 additions & 4 deletions charts/agent-operator/README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# grafana-agent-operator

![Version: 0.3.8](https://img.shields.io/badge/Version-0.3.8-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.37.2](https://img.shields.io/badge/AppVersion-0.37.2-informational?style=flat-square)
![Version: 0.3.21](https://img.shields.io/badge/Version-0.3.21-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.40.4](https://img.shields.io/badge/AppVersion-0.40.4-informational?style=flat-square)

A Helm chart for Grafana Agent Operator

⚠️ **Please create issues relating to this Helm chart in the [Agent](https://github.com/grafana/agent/issues) repo.**

## Source Code

* <https://github.com/grafana/agent/tree/v0.37.2/pkg/operator>
* <https://github.com/grafana/agent/tree/v0.40.4/pkg/operator>

Note that this chart does not provision custom resources like `GrafanaAgent` and `MetricsInstance` (formerly `PrometheusInstance`) or any `*Monitor` resources.

To learn how to deploy these resources, please see Grafana's [Agent Operator getting started guide](https://grafana.com/docs/agent/latest/operator/getting-started/).

## CRDs

The CRDs are synced into this chart manually (for now) from the Grafana Agent [GitHub repo](https://github.com/grafana/agent/tree/main/production/operator/crds). To learn more about how Helm manages CRDs, please see [Custom Resource Definitions](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/) from the Helm docs.
The CRDs are synced into this chart manually (for now) from the Grafana Agent [GitHub repo](https://github.com/grafana/agent/tree/main/operations/agent-static-operator/crds). To learn more about how Helm manages CRDs, please see [Custom Resource Definitions](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/) from the Helm docs.

## Get Repo Info

Expand Down Expand Up @@ -63,7 +63,7 @@ A major chart version change (like v1.2.3 -> v2.0.0) indicates that there is an
| image.pullSecrets | list | `[]` | Image pull secrets |
| image.registry | string | `"docker.io"` | Image registry |
| image.repository | string | `"grafana/agent-operator"` | Image repo |
| image.tag | string | `"v0.37.2"` | Image tag |
| image.tag | string | `"v0.40.4"` | Image tag |
| kubeletService | object | `{"namespace":"default","serviceName":"kubelet"}` | If both are set, Agent Operator will create and maintain a service for scraping kubelets https://grafana.com/docs/agent/latest/operator/getting-started/#monitor-kubelets |
| nameOverride | string | `""` | Overrides the chart's name |
| nodeSelector | object | `{}` | nodeSelector configuration |
Expand All @@ -75,4 +75,7 @@ A major chart version change (like v1.2.3 -> v2.0.0) indicates that there is an
| resources | object | `{}` | Resource limits and requests config |
| serviceAccount.create | bool | `true` | Toggle to create ServiceAccount |
| serviceAccount.name | string | `nil` | Service account name |
| test.image.registry | string | `"docker.io"` | Test image registry |
| test.image.repository | string | `"library/busybox"` | Test image repo |
| test.image.tag | string | `"latest"` | Test image tag |
| tolerations | list | `[]` | Tolerations applied to Pods |
2 changes: 1 addition & 1 deletion charts/agent-operator/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ To learn how to deploy these resources, please see Grafana's [Agent Operator get

## CRDs

The CRDs are synced into this chart manually (for now) from the Grafana Agent [GitHub repo](https://github.com/grafana/agent/tree/main/production/operator/crds). To learn more about how Helm manages CRDs, please see [Custom Resource Definitions](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/) from the Helm docs.
The CRDs are synced into this chart manually (for now) from the Grafana Agent [GitHub repo](https://github.com/grafana/agent/tree/main/operations/agent-static-operator/crds). To learn more about how Helm manages CRDs, please see [Custom Resource Definitions](https://helm.sh/docs/chart_best_practices/custom_resource_definitions/) from the Helm docs.

## Get Repo Info

Expand Down
Loading

0 comments on commit 9cde7e0

Please sign in to comment.