Skip to content

Commit 8e93b19

Browse files
Add renovate workflow to bump fluent-bit version (#1535)
* Introduce renovate bot for bumping fluent-bit version Signed-off-by: Truong Nguyen <[email protected]> * renovate wf: Use default Renovate version from github-action Signed-off-by: Truong Nguyen <[email protected]> * renovate wf: Update repository to point to upstream fluent-operator Signed-off-by: Truong Nguyen <[email protected]> * Apply suggestions from code review Co-authored-by: Marco Franssen <[email protected]> Signed-off-by: truongnht <[email protected]> --------- Signed-off-by: Truong Nguyen <[email protected]> Signed-off-by: truongnht <[email protected]> Co-authored-by: Marco Franssen <[email protected]>
1 parent a28a662 commit 8e93b19

File tree

12 files changed

+90
-2
lines changed

12 files changed

+90
-2
lines changed

.github/renovate-config.js

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
const helmRegex = {
2+
customType: "regex",
3+
datasourceTemplate: "helm",
4+
matchStringsStrategy: "combination",
5+
};
6+
7+
const customRegex = {
8+
customType: "regex",
9+
matchStringsStrategy: "combination",
10+
};
11+
12+
module.exports = {
13+
username: "renovate[bot]",
14+
gitAuthor: "Renovate Bot <[email protected]>",
15+
onboarding: false,
16+
platform: "github",
17+
dryRun: null,
18+
repositories: ["fluent/fluent-operator"],
19+
enabledManagers: ["custom.regex"],
20+
extends: ["config:recommended"],
21+
customManagers: [
22+
{
23+
customType: "regex",
24+
matchStringsStrategy: "any",
25+
fileMatch: [
26+
"charts/fluent-operator/values.yaml",
27+
"config/.*\\.yaml",
28+
"docs/.*\\.yaml",
29+
"manifests/.*\\.yaml",
30+
"cmd/fluent-watcher/fluentbit/VERSION",
31+
],
32+
matchStrings: [
33+
'# renovate:\\s+datasource=(?<datasource>\\S+?)\\s+depName=(?<depName>\\S+?)\\s+tag:\\s+"(?<currentValue>.+?)"\\s+?',
34+
"# renovate:\\s+datasource=(?<datasource>\\S+?)\\s+depName=(?<depName>.+?)\\s+image:\\s*(?:.?)*:(?<currentValue>.*?)\\s+?",
35+
"# renovate:\\s+datasource=(?<datasource>\\S+?)\\s+depName=(?<depName>.+?)\\s+version=\\n(?<currentValue>.+?)\\n",
36+
],
37+
extractVersionTemplate: "^v(?<version>.*)$",
38+
},
39+
],
40+
};

.github/renovate.json5

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
$schema: "https://docs.renovatebot.com/renovate-schema.json",
3+
labels: ["dependencies"],
4+
extends: ["config:best-practices", ":disableDependencyDashboard"],
5+
}

.github/workflows/renovate.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Renovate
2+
on:
3+
push:
4+
paths:
5+
- ".github/workflows/renovate.yaml"
6+
- ".github/renovate-config.js"
7+
schedule:
8+
- cron: "0 7 * * 5"
9+
workflow_dispatch:
10+
11+
env:
12+
ACTIONS_STEP_DEBUG: ${{ secrets.ACTIONS_STEP_DEBUG }}
13+
14+
jobs:
15+
renovate:
16+
runs-on: [self-hosted, linux, x64]
17+
18+
permissions:
19+
contents: write
20+
pull-requests: write
21+
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
25+
26+
- name: Self-hosted Renovate
27+
uses: renovatebot/github-action@e084b5ac6fd201023db6dd7743aec023babb02c8 # v41.0.13
28+
with:
29+
configurationFile: ".github/renovate-config.js"
30+
token: "${{ secrets.GITHUB_TOKEN }}"
31+
env:
32+
LOG_LEVEL: ${{ env.ACTIONS_STEP_DEBUG == 'true' && 'debug' || 'info' }}
33+
RENOVATE_REPOSITORIES: ${{ github.repository }}
34+
RENOVATE_ALLOW_SCRIPTS: true
35+
RENOVATE_SEPARATE_MAJOR_MINOR: false

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ SHELL = /usr/bin/env bash -o pipefail
77
.SHELLFLAGS = -ec
88

99
VERSION ?= $(shell cat VERSION | tr -d " \t\n\r")
10-
FB_VERSION ?= $(shell cat cmd/fluent-watcher/fluentbit/VERSION | tr -d " \t\n\r")
10+
FB_VERSION?=$(shell grep -v '^#' cmd/fluent-watcher/fluentbit/VERSION | tr -d " \t\n\r")
1111
# Image URL to use all building/pushing image targets
1212
FB_IMG ?= ghcr.io/fluent/fluent-operator/fluent-bit:v${FB_VERSION}
1313
FB_IMG_DEBUG ?= ghcr.io/fluent/fluent-operator/fluent-bit:v${FB_VERSION}-debug

charts/fluent-operator/values.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ fluentbit:
9797

9898
image:
9999
repository: "ghcr.io/fluent/fluent-operator/fluent-bit"
100-
tag: "4.0.0"
100+
tag: 4.0.0
101+
# renovate: datasource=docker depName=ghcr.io/fluent/fluent-operator/fluent-bit
101102
# fluentbit resources. If you do want to specify resources, adjust them as necessary
102103
# You can adjust it based on the log volume.
103104
resources:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
# renovate: datasource=docker depName=ghcr.io/fluent/fluent-operator/fluent-bit version=
12
4.0.0

config/samples/fluentbit_v1alpha2_fluentbit.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ metadata:
55
labels:
66
app: fluent-bit
77
spec:
8+
# renovate: datasource=docker depName=ghcr.io/fluent/fluent-operator/fluent-bit
89
image: ghcr.io/fluent/fluent-operator/fluent-bit:4.0.0
910
imagePullPolicy: IfNotPresent
1011
positionDB:

docs/best-practice/forwarding-logs-via-http/deploy/fluentbit-fluentBit.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ metadata:
55
labels:
66
app.kubernetes.io/name: fluent-bit
77
spec:
8+
# renovate: datasource=docker depName=ghcr.io/fluent/fluent-operator/fluent-bit
89
image: ghcr.io/fluent/fluent-operator/fluent-bit:4.0.0
910
positionDB:
1011
hostPath:

manifests/kubeedge/fluentbit-fluentbit-edge.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ metadata:
66
labels:
77
app.kubernetes.io/name: fluent-bit
88
spec:
9+
# renovate: datasource=docker depName=ghcr.io/fluent/fluent-operator/fluent-bit
910
image: ghcr.io/fluent/fluent-operator/fluent-bit:4.0.0
1011
positionDB:
1112
hostPath:

manifests/logging-stack/fluentbit-fluentBit.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ metadata:
66
labels:
77
app.kubernetes.io/name: fluent-bit
88
spec:
9+
# renovate: datasource=docker depName=ghcr.io/fluent/fluent-operator/fluent-bit
910
image: ghcr.io/fluent/fluent-operator/fluent-bit:4.0.0
1011
positionDB:
1112
hostPath:

0 commit comments

Comments
 (0)