Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,14 @@ RUN CGO_ENABLED=0 GOOS=linux \
-o stress-tester cmd/stress-tester/main.go

FROM rust:1.51.0-alpine3.13 as rust-builder
COPY ./src/rust/receiver-mock /build
WORKDIR /build
RUN apk update && apk upgrade && apk add g++

WORKDIR /receiver-mock
COPY ./src/rust/receiver-mock .
RUN cargo build --release

WORKDIR /logs-generator
COPY ./src/rust/logs-generator .
RUN cargo build --release

FROM alpine:3.13.5
Expand Down Expand Up @@ -45,7 +50,8 @@ RUN set -ex \
&& curl -LJ https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl -o /usr/bin/kubectl \
&& chmod +x /usr/bin/kubectl \
&& curl -LJ "${UPGRADE_2_0_SCRIPT_URL}" -o /usr/local/bin/upgrade-2.0.0.sh \
&& chmod +x /usr/local/bin/upgrade-2.0.0.sh
&& chmod +x /usr/local/bin/upgrade-2.0.0.sh \
&& curl -LJ https://raw.githubusercontent.com/dwyl/english-words/master/words.txt -o /usr/local/wordlist.txt

COPY \
./src/ssh/motd \
Expand All @@ -72,7 +78,8 @@ COPY --from=go-builder \
/usr/bin/

COPY --from=rust-builder \
/build/target/release/receiver-mock \
/receiver-mock/target/release/receiver-mock \
/logs-generator/target/release/logs-generator \
/usr/bin/

CMD ["/usr/bin/tools-usage"]
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,21 @@ You can add additional parameters (like `--version=1.0.0`) at the end of the com
List of supported arguments is compatible with
[`helm show values`](https://helm.sh/docs/helm/helm_show_values/).

### Logs generator

Logs generator is a tool for generating logs (text lines) using patterns,
which can specify changing parts (words, digits).

```bash
kubectl run template-dependency \
-it --quiet --rm \
--restart=Never -n sumologic \
--image sumologic/kubernetes-tools \
-- logs-generator --help
```

[More information](src/rust/logs-generator/README.md)

### Interactive mode

The pod can be also run in interactive mode:
Expand Down
1 change: 1 addition & 0 deletions scripts/test-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ function test_image() {
template
template-dependency
template-prometheus-mixin
logs-generator
"
readonly apps
local tag="${1}"
Expand Down
File renamed without changes.
3 changes: 3 additions & 0 deletions src/rust/logs-generator/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/target
**/*.rs.bk
tmp
Loading