Skip to content

Commit

Permalink
feat bootstrap fixes (#424)
Browse files Browse the repository at this point in the history
* fix: config-merge only if config.toml or app.toml exist

* fix: select node container for image check
  • Loading branch information
AntiTyping authored Jun 17, 2024
1 parent 95b6586 commit 8eb22e7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
7 changes: 6 additions & 1 deletion cmd/versioncheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,12 @@ func checkVersion(
image = v.Image
}

thisPodImage := thisPod.Spec.Containers[0].Image
var thisPodImage string
for _, c := range thisPod.Spec.Containers {
if c.Name == "node" {
thisPodImage = c.Image
}
}
if thisPodImage != image {
return fmt.Errorf("image mismatch for height %d: %s != %s", height, thisPodImage, image)
}
Expand Down
9 changes: 7 additions & 2 deletions internal/fullnode/pod_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -425,8 +425,13 @@ rm -rf "$CONFIG_DIR/node_key.json"
echo "Merging config..."
set -x
config-merge -f toml "$TMP_DIR/config.toml" "$OVERLAY_DIR/config-overlay.toml" > "$CONFIG_DIR/config.toml"
config-merge -f toml "$TMP_DIR/app.toml" "$OVERLAY_DIR/app-overlay.toml" > "$CONFIG_DIR/app.toml"
if [ -f "$TMP_DIR/config.toml" ]; then
config-merge -f toml "$TMP_DIR/config.toml" "$OVERLAY_DIR/config-overlay.toml" > "$CONFIG_DIR/config.toml"
fi
if [ -f "$TMP_DIR/app.toml" ]; then
config-merge -f toml "$TMP_DIR/app.toml" "$OVERLAY_DIR/app-overlay.toml" > "$CONFIG_DIR/app.toml"
fi
`,
},
Env: env,
Expand Down

0 comments on commit 8eb22e7

Please sign in to comment.