From 7a552b3acdb991f46bc8d927fd9757e8b9cde404 Mon Sep 17 00:00:00 2001 From: Jahziel Villasana-Espinoza Date: Thu, 13 Jun 2024 12:08:44 -0400 Subject: [PATCH] fix: check old config val for full backwards compat (#19717) # Checklist for submitter If some of the following don't apply, delete the relevant line. - [x] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. See [Changes files](https://fleetdm.com/docs/contributing/committing-changes#changes-files) for more information. - [x] Manual QA for all new/changed functionality --- changes/fix-s3-back-compat | 1 + cmd/fleet/serve.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changes/fix-s3-back-compat diff --git a/changes/fix-s3-back-compat b/changes/fix-s3-back-compat new file mode 100644 index 0000000000..ef24c2a980 --- /dev/null +++ b/changes/fix-s3-back-compat @@ -0,0 +1 @@ +- Fixes an issue with backwards compatibility with the deprecated `FLEET_S3_*` environment variables. \ No newline at end of file diff --git a/cmd/fleet/serve.go b/cmd/fleet/serve.go index c669a43199..dd330d2e43 100644 --- a/cmd/fleet/serve.go +++ b/cmd/fleet/serve.go @@ -196,7 +196,7 @@ the way that the Fleet server works. } ds = mds - if config.S3.CarvesBucket != "" { + if config.S3.CarvesBucket != "" || config.S3.Bucket != "" { carveStore, err = s3.NewCarveStore(config.S3, ds) if err != nil { initFatal(err, "initializing S3 carvestore")