From d4a683f77f0d48a8b01a94666cd00ed5bf20a94f Mon Sep 17 00:00:00 2001 From: Paul Crooks Date: Thu, 30 Jan 2025 10:22:20 +0000 Subject: [PATCH] chore(docs): Update READMEs --- README.md | 7 ++--- runtimes/cloudformation/README.md | 14 +++++++--- runtimes/cloudformation/cmd/handler/README.md | 28 +++++++++++++++++++ 3 files changed, 40 insertions(+), 9 deletions(-) create mode 100644 runtimes/cloudformation/cmd/handler/README.md diff --git a/README.md b/README.md index 301a8e5..019b515 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,6 @@ `agent-kilt` provides a convenient way to add additional software to containers by patching ECS TaskDefinitions. - - Kilt is a definition on how to include additional software inside containers. It was created to run falco in userspace along other software. It leverages different runtimes to perform modifications to the container @@ -29,6 +27,7 @@ is not running yet. Run time is well, you get it. * **build.mount.image** `str` - the image that contains the volume of the mount * **build.mount.volumes** `List(str)` - List of paths to be mounted on the target image * **build.mount.entry_point** `List(str)` - The entry point of the image (needed for patching runtimes) + ### Example ``` build { @@ -49,13 +48,11 @@ build { } ``` - - # Release To make a new release push a new tag. -It will trigger the [release-runtime.yml](.github/workflows/release-runtimes.yml) workflow. +It will trigger the [release](.github/workflows/release.yml) workflow. For tags, use [semver](https://semver.org/). diff --git a/runtimes/cloudformation/README.md b/runtimes/cloudformation/README.md index 011a786..b45f641 100644 --- a/runtimes/cloudformation/README.md +++ b/runtimes/cloudformation/README.md @@ -4,11 +4,17 @@ It installs a Cloud Formation Macro that will alter the incoming template. ## Components -* `installer` - installer for the macro +### Commands + * `cmd/handler` - the golang lambda functions powering the Macro -* `cmd/cfn-apply-kilt` - applies kilt transformation to a CFN template -* `cmd/cfn-image-info` - gets configuration for the image from repository +* `cmd/cfn-apply-kilt` - test application that applies kilt transformation to a CFN template +* `cmd/cfn-image-info` - test application that gets configuration for an image from repository + +The `handler` is the main deliverable and the other applications exist to test and demo the functionality. + +### Patcher +The `cfnpatcher` is a general library to apply migrations to a template. # Usage The installer will create a CFN macro that you can use to apply automatically @@ -24,4 +30,4 @@ task definition: * `"kilt-include-containers": "containerA:ContainerB"` - value is a colon separated list of container names. Will include only some contaiers in opt-in mode * `"kilt-ignore-containers": "containerA:containerB"` - will exclude some containers in - opt-out mode \ No newline at end of file + opt-out mode diff --git a/runtimes/cloudformation/cmd/handler/README.md b/runtimes/cloudformation/cmd/handler/README.md new file mode 100644 index 0000000..9a0c7af --- /dev/null +++ b/runtimes/cloudformation/cmd/handler/README.md @@ -0,0 +1,28 @@ +# Handler + +The `handler` is designed to be deployed as an AWS lambda to apply transformations to a task definition. + +## Build + +The `handler` uses `goreleaser` for builds and releases. The defintion can be found in `runtimes/cloudformation/.goreleaser.yml`. + +*Note* to build the FIPS variant, you need to have [zig](https://github.com/ziglang/zig/wiki/Install-Zig-from-a-Package-Manager) installed. + +```bash +$ cd runtimes/cloudformation +$ GORELEASER_CURRENT_TAG=0.0.1 goreleaser build --skip=validate --clean +... +$ ls -R dist/ +dist/: +artifacts.json config.yaml handler metadata.json + +dist/handler: +handler-fips-linux-amd64 handler-fips-linux-arm64 handler-linux-amd64 handler-linux-arm64 +``` + +## Test + +```bash +$ cd runtimes/cloudformation +$ go test -race -mod=readonly ./... +```