test images: Adds version and bind-tools to agnhost

Adds bind-tools to the agnhost image. With this, dig will available
in the agnhost image, which can be used in DNS related tests.

Adds the --version flag to the agnhost binary, which will be useful for
debugging purposes (e.g.: when the image version does not match the binary
version).

Bumps version to 2.5.
This commit is contained in:
Claudiu Belu 2019-08-01 12:18:56 -07:00
parent df0a99ad35
commit 103498f538
4 changed files with 13 additions and 3 deletions

View File

@ -22,7 +22,7 @@ CROSS_BUILD_COPY qemu-QEMUARCH-static /usr/bin/
# - iproute2: includes ss used in NodePort tests # - iproute2: includes ss used in NodePort tests
# from iperf image # from iperf image
# install necessary packages: iperf, bash # install necessary packages: iperf, bash
RUN apk --update add curl netcat-openbsd iproute2 iperf bash && rm -rf /var/cache/apk/* \ RUN apk --update add bind-tools curl netcat-openbsd iproute2 iperf bash && rm -rf /var/cache/apk/* \
&& ln -s /usr/bin/iperf /usr/local/bin/iperf \ && ln -s /usr/bin/iperf /usr/local/bin/iperf \
&& ls -altrh /usr/local/bin/iperf && ls -altrh /usr/local/bin/iperf

View File

@ -15,6 +15,15 @@ word of the words agnostic and host.
The image was created for testing purposes, reducing the need for having different test The image was created for testing purposes, reducing the need for having different test
cases for the same tested behaviour. cases for the same tested behaviour.
## Developer notes
We've introduced versioning into the `agnhost` binary for debugging purposes (e.g.: if the
image and binary versions do not match, see [here](https://github.com/kubernetes/kubernetes/pull/79667#discussion_r304198370)).
Whenever the image `VERSION` is bumped, the `Version` in `agnhost.go` will also have to be bumped.
## Usage ## Usage
The `agnhost` binary has several subcommands which are can be used to test different The `agnhost` binary has several subcommands which are can be used to test different

View File

@ -1 +1 @@
2.4 2.5

View File

@ -44,7 +44,8 @@ import (
) )
func main() { func main() {
rootCmd := &cobra.Command{Use: "app"} rootCmd := &cobra.Command{Use: "app", Version: "2.5"}
rootCmd.AddCommand(auditproxy.CmdAuditProxy) rootCmd.AddCommand(auditproxy.CmdAuditProxy)
rootCmd.AddCommand(connect.CmdConnect) rootCmd.AddCommand(connect.CmdConnect)
rootCmd.AddCommand(crdconvwebhook.CmdCrdConversionWebhook) rootCmd.AddCommand(crdconvwebhook.CmdCrdConversionWebhook)