Skip to content

Commit

Permalink
Merge pull request kubernetes#81008 from bclau/test-images/agnhost-en…
Browse files Browse the repository at this point in the history
…hancements

test images: Adds version and bind-tools to agnhost
  • Loading branch information
k8s-ci-robot authored Aug 17, 2019
2 parents d2b5530 + 103498f commit fb64b76
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/images/agnhost/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ CROSS_BUILD_COPY qemu-QEMUARCH-static /usr/bin/
# - iproute2: includes ss used in NodePort tests
# from iperf image
# 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 \
&& ls -altrh /usr/local/bin/iperf

Expand Down
9 changes: 9 additions & 0 deletions test/images/agnhost/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
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

The `agnhost` binary has several subcommands which are can be used to test different
Expand Down
3 changes: 2 additions & 1 deletion test/images/agnhost/agnhost.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ import (
)

func main() {
rootCmd := &cobra.Command{Use: "app"}
rootCmd := &cobra.Command{Use: "app", Version: "2.5"}

rootCmd.AddCommand(auditproxy.CmdAuditProxy)
rootCmd.AddCommand(connect.CmdConnect)
rootCmd.AddCommand(crdconvwebhook.CmdCrdConversionWebhook)
Expand Down

0 comments on commit fb64b76

Please sign in to comment.