## EKS Distro Consumer Updater Tool The EKS Distro Consumer Updater Tool is intended as a home for all automation used to update consumers of EKS Distro with new releases. It is intentionally flexible, allowing the tool to implement unique update logic for each Consumer, while simplifying the interface and making it easy to invoke. This tool also logically supports 'notifications' for consumers via the Notifier interface. ### Using the Tool use `consumerUpdater --help` for up-to-date usage The tool has an `update` command which, by default, runs all implemented `updaters`. The `update` command accepts a comma-seperated list of EKS Distro release versions via the flag `eksDistroRelease`. Updaters are run for each given release version. For example, to run updaters for the EKS Distro release `1.24.2-3`, you would run the following: ```shell consumerUpdater update --eksDistroReleases=1.24.2-3 -v 4 ``` This will run all implemented updaters for the given version. ### Building the Tool To build the Consumer Updater binary, run the build make target `make build-consumerUpdater` from the root of the Ops Tool. This will produce a binary in `tools/eksDistroBuildToolingOpsTools/bin/$GOOS/$GOARCH/consumerUpdater`. ### Adding a New Consumer to the Tool New EKS Distro consumers can be added to the tool by implementing the [`Consumer` interface](../../pkg/consumerUpdater/types.go) for the given consumer, and adding the generation of the `Consumer` implementation to the [`Factory` method](../../pkg/consumerUpdater/factory.go). The factory method is invoked by the `consumerUpdater` command to generate all the neccessary `Consumers` and the `consumerUpdater` command calls the `UpdateAll` method of any `Consumers` produced by the `Factory`. For example, check out the [Bottlerocket Consumer Updater](../../pkg/consumerUpdater/bottlerocket.go), which implements the `Consumer` and `Updater` interfaces and is generated by the factory. The Bottlerocket consumer has an internal implementation which invokes the updates required for their project based on the given EKS Distro release when `UpdateAll()` is called.