aboutsummaryrefslogtreecommitdiffstats
path: root/syz-cluster/series-tracker
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2025-04-24 17:04:38 +0200
committerAleksandr Nogikh <nogikh@google.com>2025-04-30 12:32:14 +0000
commit937aafd76e698830e784cf8af849eaae479a6ace (patch)
tree1cf7050e4136b688fbac482cef6b415d181605bf /syz-cluster/series-tracker
parent7c6d304203f2c91fd2927dc473e0b56379eb0dd5 (diff)
syz-cluster: separate global env from global config
Environment variables are convenient for storing values like DB or GCS bucket names, but structured formats are more convenient for the actual service configuration. Separate global-config from global-config-env and add the functionality that queries and parses the config options.
Diffstat (limited to 'syz-cluster/series-tracker')
-rw-r--r--syz-cluster/series-tracker/deployment.yaml11
-rw-r--r--syz-cluster/series-tracker/main.go19
2 files changed, 11 insertions, 19 deletions
diff --git a/syz-cluster/series-tracker/deployment.yaml b/syz-cluster/series-tracker/deployment.yaml
index 4e4cb7729..53d03a448 100644
--- a/syz-cluster/series-tracker/deployment.yaml
+++ b/syz-cluster/series-tracker/deployment.yaml
@@ -18,15 +18,11 @@ spec:
containers:
- name: series-tracker-image
image: ${IMAGE_PREFIX}series-tracker:${IMAGE_TAG}
- args:
- - "-archives"
- - "$(LORE_ARCHIVES_TO_POLL)"
- envFrom:
- - configMapRef:
- name: global-config
volumeMounts:
- name: series-tracker-repo-disk
mountPath: /git-repo
+ - name: config-volume
+ mountPath: /config
resources:
requests:
cpu: 4
@@ -38,3 +34,6 @@ spec:
- name: series-tracker-repo-disk
persistentVolumeClaim:
claimName: series-tracker-repo-disk-claim
+ - name: config-volume
+ configMap:
+ name: global-config
diff --git a/syz-cluster/series-tracker/main.go b/syz-cluster/series-tracker/main.go
index 63d3ef91e..2b6611798 100644
--- a/syz-cluster/series-tracker/main.go
+++ b/syz-cluster/series-tracker/main.go
@@ -15,7 +15,6 @@ import (
"regexp"
"slices"
"sort"
- "strings"
"time"
"github.com/google/syzkaller/pkg/email"
@@ -26,8 +25,6 @@ import (
)
var (
- flagArchives = flag.String("archives", "",
- "a comma-separated list of the archives to poll")
flagVerbose = flag.Bool("verbose", false, "enable verbose output")
)
@@ -58,18 +55,14 @@ func main() {
}
func archivesToPoll() []string {
- var ret []string
- for _, part := range strings.Split(*flagArchives, ",") {
- part = strings.TrimSpace(part)
- if part == "" {
- app.Fatalf("an empty name in the --archives argument")
- }
- ret = append(ret, part)
+ cfg, err := app.Config()
+ if err != nil {
+ app.Fatalf("failed to fetch the config: %v", err)
}
- if len(ret) == 0 {
- app.Fatalf("--archives must not be empty")
+ if len(cfg.LoreArchives) == 0 {
+ app.Fatalf("the list of archives to poll is empty")
}
- return ret
+ return cfg.LoreArchives
}
type SeriesFetcher struct {