Skip to content

Commit c246693

Browse files
committed
Merge upstream
Signed-off-by: Jonas De Gendt <[email protected]>
2 parents dcc3657 + e87ede5 commit c246693

File tree

32 files changed

+162
-63
lines changed

32 files changed

+162
-63
lines changed

.github/workflows/update-helm-repo.yaml

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ on:
3030
github_app_pem:
3131
description: GitHub APP pem to authenticate with
3232
required: false
33+
vault_repo_secret_name:
34+
description: Vault secret name that holds repository's GitHub App credentials to authenticate with
35+
required: false
3336
helm_repo_token:
3437
description: GitHub api token to use against the helm-charts repository
3538
required: false
@@ -96,37 +99,51 @@ jobs:
9699
needs: [setup]
97100
runs-on: ubuntu-latest
98101
permissions:
102+
id-token: write # allows GitHub App to generate id-token from Github's OIDC
99103
contents: write # allows GITHUB_TOKEN to push chart release, create release, and push tags to github
100104
packages: write # allows GITHUB_TOKEN to push package to ghcr
101105
env:
102-
github_app_id: ${{ secrets.github_app_id }}
106+
# APP_ID and PRIVATE_KEY are overwritten by credentials from vault, if configured
107+
GITHUB_APP_ID: ${{ secrets.github_app_id }}
108+
PRIVATE_KEY: ${{ secrets.github_app_pem }}
109+
VAULT_REPO_SECRET_NAME: ${{ secrets.vault_repo_secret_name }}
103110
if: needs.setup.outputs.changed == 'true'
104111
steps:
105-
- name: Create a GitHub App installation access token
106-
if: env.github_app_id != ''
107-
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
112+
- name: Retrieve GitHub App credentials from Vault
113+
if: env.VAULT_REPO_SECRET_NAME != ''
114+
id: get-secrets
115+
uses: grafana/shared-workflows/actions/get-vault-secrets@28361cdb22223e5f1e34358c86c20908e7248760 # v1.1.0
116+
with:
117+
repo_secrets: |
118+
GITHUB_APP_ID=${{ env.VAULT_REPO_SECRET_NAME }}:app-id
119+
PRIVATE_KEY=${{ env.VAULT_REPO_SECRET_NAME }}:private-key
120+
121+
- name: Generate GitHub App Token
122+
if: env.GITHUB_APP_ID != ''
108123
id: app-token
124+
uses: actions/create-github-app-token@v1
109125
with:
110-
app_id: ${github_app_id}
111-
private_key: ${{ secrets.github_app_pem }}
126+
# Variables generated by the previous step get-secrets
127+
app-id: ${{ env.GITHUB_APP_ID }}
128+
private-key: ${{ env.PRIVATE_KEY }}
129+
owner: ${{ github.repository_owner }}
112130

113131
- name: Set the correct token (Github App or PAT)
114132
env:
115133
HELM_REPO_TOKEN: ${{ secrets.helm_repo_token }}
116134
APP_TOKEN: ${{ steps.app-token.outputs.token }}
117135
run: |
118-
if [[ "${github_app_id}" == '' ]]; then
136+
if [[ "${GITHUB_APP_ID}" == '' ]]; then
119137
echo "AUTHTOKEN=${HELM_REPO_TOKEN}" >> $GITHUB_ENV
120138
else
121139
echo "AUTHTOKEN=${APP_TOKEN}" >> $GITHUB_ENV
122140
fi
123141
124142
- name: Checkout
125-
uses: actions/checkout@v4
143+
uses: actions/checkout@v4 # zizmor: ignore[artipacked] without this ignore comment, zizmor would complain that persist-credentials is not explicitly set to false. We need it set to true (default) to be able to push the release tags later on in this workflow
126144
with:
127145
fetch-depth: 0
128146
path: source
129-
persist-credentials: false
130147

131148
- name: Configure Git
132149
run: |
@@ -136,13 +153,12 @@ jobs:
136153
137154
- name: Checkout helm-charts
138155
# The cr tool only works if the target repository is already checked out
139-
uses: actions/checkout@v4
156+
uses: actions/checkout@v4 # zizmor: ignore[artipacked] without this ignore comment, zizmor would complain that persist-credentials is not explicitly set to false. We need it set to true (default) to be able to push the release tags later on in this workflow
140157
with:
141158
fetch-depth: 0
142159
repository: grafana/helm-charts
143160
path: helm-charts
144-
token: ${{ env.AUTHTOKEN }}
145-
persist-credentials: false
161+
token: ${{ env.AUTHTOKEN }}
146162

147163
- name: Configure Git for helm-charts
148164
run: |
@@ -218,7 +234,7 @@ jobs:
218234
git tag "${TAGNAME}"
219235
220236
- name: Make github release
221-
uses: softprops/action-gh-release@b21b43df682dab285bf5146c1955e7f3560805f8 # tags/v1
237+
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # tags/v1
222238
with:
223239
body: |
224240
${{ steps.parse-chart.outputs.desc }}

charts/cloudcost-exporter/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ type: application
55

66
# This is the chart version. This version number should be incremented each time you make changes
77
# to the chart and its templates, including the app version.
8-
version: 1.0.3
8+
version: 1.0.4
99

1010
# This is the version of cloudcost-exporter to be deployed, which should be incremented
1111
# with each release.
12-
appVersion: "0.8.0"
12+
appVersion: "0.8.1"
1313

1414
home: https://github.com/grafana/cloudcost-exporter

charts/cloudcost-exporter/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Cloud Cost Exporter exports cloud provider agnostic cost metrics to Prometheus.
44

5-
![Version: 1.0.3](https://img.shields.io/badge/Version-1.0.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.8.0](https://img.shields.io/badge/AppVersion-0.8.0-informational?style=flat-square)
5+
![Version: 1.0.4](https://img.shields.io/badge/Version-1.0.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.8.1](https://img.shields.io/badge/AppVersion-0.8.1-informational?style=flat-square)
66

77
## Installing the Chart
88

charts/grafana/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v2
22
name: grafana
3-
version: 8.14.0
4-
appVersion: 11.6.1
3+
version: 9.0.0
4+
appVersion: 12.0.0
55
kubeVersion: "^1.8.0-0"
66
description: The leading tool for querying and visualizing time series and metrics.
77
home: https://grafana.com

charts/grafana/README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ need to instead set `global.imageRegistry`.
130130
| `initChownData.image.sha` | init-chown-data container image sha (optional)| `""` |
131131
| `initChownData.image.pullPolicy` | init-chown-data container image pull policy | `IfNotPresent` |
132132
| `initChownData.resources` | init-chown-data pod resource requests & limits | `{}` |
133+
| `initChownData.securityContext` | init-chown-data pod securityContext | `{"readOnlyRootFilesystem": false, "runAsNonRoot": false}`, "runAsUser": 0, "seccompProfile": {"type": "RuntimeDefault"}, "capabilities": {"add": ["CHOWN"], "drop": ["ALL"]}}` |
133134
| `schedulerName` | Alternate scheduler name | `nil` |
134135
| `env` | Extra environment variables passed to pods | `{}` |
135136
| `envValueFrom` | Environment variables from alternate sources. See the API docs on [EnvVarSource](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#envvarsource-v1-core) for format details. Can be templated | `{}` |
@@ -150,6 +151,7 @@ need to instead set `global.imageRegistry`.
150151
| `alerting` | Configure grafana alerting (passed through tpl) | `{}` |
151152
| `notifiers` | Configure grafana notifiers | `{}` |
152153
| `dashboardProviders` | Configure grafana dashboard providers | `{}` |
154+
| `defaultCurlOptions` | Configure default curl short options for all dashboards, the beginning dash is required | `-skf` |
153155
| `dashboards` | Dashboards to import | `{}` |
154156
| `dashboardsConfigMaps` | ConfigMaps reference that contains dashboards | `{}` |
155157
| `grafana.ini` | Grafana's primary configuration | `{}` |
@@ -395,7 +397,16 @@ dashboards:
395397
- name: DS_LOKI
396398
value: Loki
397399
local-dashboard:
398-
url: https://raw.githubusercontent.com/user/repository/master/dashboards/dashboard.json
400+
url: https://github.com/cloudnative-pg/grafana-dashboards/blob/main/charts/cluster/grafana-dashboard.json
401+
# redirects to:
402+
# https://raw.githubusercontent.com/cloudnative-pg/grafana-dashboards/refs/heads/main/charts/cluster/grafana-dashboard.json
403+
404+
# default: -skf
405+
# -s - silent mode
406+
# -k - allow insecure (eg: non-TLS) connections
407+
# -f - fail fast
408+
# -L - follow HTTP redirects
409+
curlOptions: -Lf
399410
```
400411

401412
## BASE64 dashboards

charts/grafana/templates/_config.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ download_dashboards.sh: |
8585
{{- range $provider, $dashboards := .Values.dashboards }}
8686
{{- range $key, $value := $dashboards }}
8787
{{- if (or (hasKey $value "gnetId") (hasKey $value "url")) }}
88-
curl -skf \
88+
curl {{ get $value "curlOptions" | default $.Values.defaultCurlOptions }} \
8989
--connect-timeout 60 \
9090
--max-time 60 \
9191
{{- if not $value.b64content }}

charts/grafana/values.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,13 +475,16 @@ initChownData:
475475
# cpu: 100m
476476
# memory: 128Mi
477477
securityContext:
478+
readOnlyRootFilesystem: false
478479
runAsNonRoot: false
479480
runAsUser: 0
480481
seccompProfile:
481482
type: RuntimeDefault
482483
capabilities:
483484
add:
484485
- CHOWN
486+
drop:
487+
- ALL
485488

486489
# Administrator credentials when not using an existing secret (see below)
487490
adminUser: admin
@@ -806,6 +809,18 @@ dashboardProviders: {}
806809
# options:
807810
# path: /var/lib/grafana/dashboards/default
808811

812+
## Configure how curl fetches remote dashboards. The beginning dash is required.
813+
## NOTE: This sets the default short flags for all dashboards, but these
814+
## defaults can be overridden individually for each dashboard by setting
815+
## curlOptions. See the example dashboards section below.
816+
##
817+
## -s - silent mode
818+
## -k - allow insecure (eg: non-TLS) connections
819+
## -f - fail fast
820+
## See the curl documentation for additional options
821+
##
822+
defaultCurlOptions: "-skf"
823+
809824
## Configure grafana dashboard to import
810825
## NOTE: To use dashboards you must also enable/configure dashboardProviders
811826
## ref: https://grafana.com/dashboards
@@ -825,6 +840,7 @@ dashboards: {}
825840
# datasource: Prometheus
826841
# local-dashboard:
827842
# url: https://example.com/repository/test.json
843+
# curlOptions: "-sLf"
828844
# token: ''
829845
# local-dashboard-base64:
830846
# url: https://example.com/repository/test-b64.json

charts/loki-distributed/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: loki-distributed
33
description: Helm chart for Grafana Loki in microservices mode
44
type: application
55
appVersion: 2.9.13
6-
version: 0.80.3
6+
version: 0.80.5
77
home: https://grafana.github.io/helm-charts
88
sources:
99
- https://github.com/grafana/loki

charts/loki-distributed/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# loki-distributed
22

3-
![Version: 0.80.3](https://img.shields.io/badge/Version-0.80.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.9.13](https://img.shields.io/badge/AppVersion-2.9.13-informational?style=flat-square)
3+
![Version: 0.80.5](https://img.shields.io/badge/Version-0.80.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.9.13](https://img.shields.io/badge/AppVersion-2.9.13-informational?style=flat-square)
44

55
Helm chart for Grafana Loki in microservices mode
66

@@ -205,6 +205,7 @@ kubectl delete statefulset RELEASE_NAME-loki-distributed-querier -n LOKI_NAMESPA
205205
| gateway.ingress.enabled | bool | `false` | Specifies whether an ingress for the gateway should be created |
206206
| gateway.ingress.hosts | list | `[{"host":"gateway.loki.example.com","paths":[{"path":"/"}]}]` | Hosts configuration for the gateway ingress |
207207
| gateway.ingress.ingressClassName | string | `""` | Ingress Class Name. MAY be required for Kubernetes versions >= 1.18 For example: `ingressClassName: nginx` |
208+
| gateway.ingress.labels | object | `{}` | Custom labels for the gateway ingress |
208209
| gateway.ingress.tls | list | `[]` | TLS configuration for the gateway ingress |
209210
| gateway.livenessProbe.httpGet.path | string | `"/"` | |
210211
| gateway.livenessProbe.httpGet.port | string | `"http"` | |
@@ -324,12 +325,14 @@ kubectl delete statefulset RELEASE_NAME-loki-distributed-querier -n LOKI_NAMESPA
324325
| ingester.replicas | int | `1` | Number of replicas for the ingester |
325326
| ingester.resources | object | `{}` | Resource requests and limits for the ingester |
326327
| ingester.serviceLabels | object | `{}` | Labels for ingester service |
328+
| ingester.statefulStrategy | object | `{"rollingUpdate":{"partition":0}}` | updateStrategy of the ingester statefulset. |
327329
| ingester.terminationGracePeriodSeconds | int | `300` | Grace period to allow the ingester to shutdown before it is killed. Especially for the ingester, this must be increased. It must be long enough so ingesters can be gracefully shutdown flushing/transferring all data and to successfully leave the member ring on shutdown. |
328330
| ingester.tolerations | list | `[]` | Tolerations for ingester pods |
329331
| ingester.topologySpreadConstraints | string | Defaults to allow skew no more then 1 node per AZ | topologySpread for ingester pods. Passed through `tpl` and, thus, to be configured as string |
330332
| ingress.annotations | object | `{}` | |
331333
| ingress.enabled | bool | `false` | |
332334
| ingress.hosts[0] | string | `"loki.example.com"` | |
335+
| ingress.labels | object | `{}` | Custom labels for the ingress |
333336
| ingress.paths.distributor[0] | string | `"/api/prom/push"` | |
334337
| ingress.paths.distributor[1] | string | `"/loki/api/v1/push"` | |
335338
| ingress.paths.querier[0] | string | `"/api/prom/tail"` | |

charts/loki-distributed/templates/gateway/ingress-gateway.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ metadata:
99
name: {{ include "loki.gatewayFullname" . }}
1010
labels:
1111
{{- include "loki.gatewayLabels" . | nindent 4 }}
12+
{{- with .Values.gateway.ingress.labels }}
13+
{{- toYaml . | nindent 4 }}
14+
{{- end }}
1215
{{- with .Values.gateway.ingress.annotations }}
1316
annotations:
1417
{{- toYaml . | nindent 4 }}

0 commit comments

Comments
 (0)