Skip to content

Commit 0037abc

Browse files
committed
Remove use of busybox to remove unnecessary deps
Signed-off-by: Dom Del Nano <ddelnano@gmail.com>
1 parent e2ef231 commit 0037abc

3 files changed

Lines changed: 10 additions & 7 deletions

File tree

k8s/cloud/overlays/plugin_job/plugin_job.yaml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,7 @@ spec:
1616
containers:
1717
- name: updater
1818
image: cloud-plugin-load_db:latest
19-
command: ["/bin/busybox", "sh", "-c"]
20-
args:
21-
- |
22-
trap "touch /tmp/pod/terminated" EXIT
23-
src/cloud/plugin/load_db/load_db_/load_db
19+
command: ["src/cloud/plugin/load_db/load_db_/load_db"]
2420
envFrom:
2521
- configMapRef:
2622
name: pl-db-config

src/cloud/plugin/load_db/BUILD.bazel

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ pl_go_binary(
5454

5555
container_image(
5656
name = "db_base_image",
57-
# We need a debug image because the plugin_updater calls busybox to set a TRAP.
58-
base = "//:pl_cc_base_debug_image",
57+
base = "//:pl_cc_base_image",
5958
)
6059

6160
pl_go_image(

src/cloud/plugin/load_db/main.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import (
2626
"fmt"
2727
"io"
2828
"net/http"
29+
"os"
2930
"path/filepath"
3031

3132
"github.com/blang/semver"
@@ -320,6 +321,13 @@ func UpdatePlugins(db *sqlx.DB, pClient pluginpb.DataRetentionPluginServiceClien
320321
}
321322

322323
func main() {
324+
defer func() {
325+
// Signal sidecar containers that this job has finished.
326+
if err := os.WriteFile("/tmp/pod/terminated", nil, 0644); err != nil {
327+
log.WithError(err).Warn("Failed to write termination file")
328+
}
329+
}()
330+
323331
log.Info("Starting load_plugins...")
324332
pflag.Parse()
325333

0 commit comments

Comments
 (0)