-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Use explicit targets for module imports * Removing the default config store; for current semantics the CWD default seems better than assuming a URL. * Did a lint pass; dealt with some unused variables, including turning off the 'hint' messages for stuff we want to keep around * Add in some of the new configs. * A tiny bit of polishing * tweak * Some beautification * Initial untested param work done * fixing missing quote from the wrap_entrypoints.c4m * ionly downloading chalk binaries when doing docker build * bumping con4m which fixes is_file path resolution * Have the arch binary updating happen any time an update happens. * Add dumping for cached config modules too * Get rid of old configs * Incorporate new versions of con4m / nimu with ability to get an external IP associated w/ the host portably. Used it in the reporting server to make it not be hacky, and added PUBLIC_IPV4_ADDR_WHEN_CHALKED and _OP_PUBLIC_IPV4_ADDR. * Clean up a bit * Update release notes; integrate Mark's change in tag-line * Update autocomplete. * Fixed circular imports * Remove the chalk report from `chalk load`. It isn't needed and is too much for good intros to the product. * bump nimu * fix(docgen): add con4m defintions to fix docgen cmd regression * docs(typos): fixing various typos found via vale.sh (#46) * fix(docker): wrap_entrypoint honors command args As chalk exec would parse the full command, if it had any arguments chalk was not familiar with, chalk would not parse it correctly and therefore will call command incorrectly. By adding -- after the command name, chalk ignores rest of the args and passes them as-is to the command. For example this now works: ``` ENTRYPOINT ["ls", "-la"] ``` As chalk will end up calling it as: ``` /chalk exec --exec-command-name=ls -- -la ``` * Updated two of the howtos * reverting dockerfile change * Re-add in the ability to dump to a file * fix(docs): fix doc/link regressions * fix(docs): link fix * fix(docs): more reformatting / regression fixing * fix(docs): shockingly, more formatting fixes * fix(docs): reverting the multiple regression fixes because there wasn't a regression * Don't let docgen output static docs * fix(docs) formatting * fix(README): fix link to docker howto * ansi fix --------- Co-authored-by: Miroslav Shubernetskiy <miroslav@miki725.com> Co-authored-by: Rich Smith <rich@crashoverride.com>
- Loading branch information
1 parent
5b9ad7a
commit f9b8e22
Showing
58 changed files
with
942 additions
and
635 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
use reporting_server from "https://chalkdust.io" | ||
use wrap_entrypoints from "https://chalkdust.io" | ||
use impersonate_docker from "https://chalkdust.io" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
use reporting_server from "https://chalkdust.io" | ||
run_sbom_tools: true |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
use impersonate_docker from "https://chalkdust.io" | ||
use basic_compliance from "https://chalkdust.io" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
run_sbom_tools: true | ||
# Embed sboms in chalk marks. | ||
|
||
# `chalk insert` uses the mark_default template. | ||
mark_template.mark_default.key.SBOM.use: true | ||
|
||
# `chalk docker build` uses the `minimal` template. | ||
mark_template.minimal.key.SBOM.use: true | ||
|
||
default_command: "docker" | ||
mark_template.minimal.key.SBOM.use: true |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# We use a con4m duration field for the actual `heartbeat_rate` field, | ||
# But I don't want people to have to worry about that. | ||
|
||
func validate_heartbeat_freq(f: float) { | ||
if (f <= 0.0) { | ||
return "Value must be greater than 0" | ||
} else { | ||
return "" | ||
} | ||
} | ||
|
||
parameter var heartbeat_minute_frequency { | ||
default: 30.0 | ||
validator: func validate_heartbeat_freq(float) -> string | ||
shortdoc: "Heartbeat Frequency (minutes)" | ||
doc: """ | ||
This value sets how many minutes to wait between heartbeats. Fractions | ||
of a minute are okay. | ||
""" | ||
} | ||
var heartbeat_minute_frequency: float | ||
|
||
minutes := int(heartbeat_minute_frequency) | ||
sec_as_f := (heartbeat_minute_frequency - float(minutes)) * 60.0 | ||
sec := int(sec_as_f) | ||
|
||
duration := Duration($(minutes) + " min " + $(sec) + " sec") | ||
exec.heartbeat: true | ||
exec.heartbeat_rate: duration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Ensures entrypoint wrapping is enabled in the config" | ||
docker.wrap_entrypoint: true | ||
|
||
myarch := arch() | ||
binary_dir := "~/.local/chalk/bin/linux-" + myarch + "/" | ||
|
||
if osname() == "macosx" { | ||
if not is_dir(binary_dir) { | ||
mkdir(binary_dir) | ||
} | ||
|
||
linux_chalk_location := binary_dir + "chalk" | ||
docker.arch_binary_locations = { "linux/" + myarch : linux_chalk_location } | ||
|
||
if not is_file(linux_chalk_location) { | ||
echo("MacOS requires downloading a Linux binary to wrap " + | ||
"docker entry points.") | ||
chalk_url_base := "https://crashoverride.com/dl/chalk/chalk-" | ||
chalk_url := chalk_url_base + version() + "-linux-" + myarch | ||
|
||
info("Downloading chalk from: " + chalk_url) | ||
|
||
bits := url_get(chalk_url) | ||
|
||
info("Writing to: " + linux_chalk_location) | ||
write_file(linux_chalk_location, bits) | ||
config := run(program_path() + " dump") | ||
write_file(binary_dir + "config.c4m", config) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.