From 0558e838670384a86330634199ec9fbe159faf64 Mon Sep 17 00:00:00 2001 From: Jordan Liggitt Date: Fri, 30 Aug 2019 12:35:48 -0400 Subject: [PATCH] Add /readyz endpoints to converter/webhook test image --- test/images/agnhost/VERSION | 2 +- test/images/agnhost/agnhost.go | 2 +- test/images/agnhost/crd-conversion-webhook/main.go | 1 + test/images/agnhost/webhook/main.go | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test/images/agnhost/VERSION b/test/images/agnhost/VERSION index 95e3ba81920..5154b3f68e9 100644 --- a/test/images/agnhost/VERSION +++ b/test/images/agnhost/VERSION @@ -1 +1 @@ -2.5 +2.6 diff --git a/test/images/agnhost/agnhost.go b/test/images/agnhost/agnhost.go index b98b4fe018a..ae60526f7a0 100644 --- a/test/images/agnhost/agnhost.go +++ b/test/images/agnhost/agnhost.go @@ -44,7 +44,7 @@ import ( ) func main() { - rootCmd := &cobra.Command{Use: "app", Version: "2.5"} + rootCmd := &cobra.Command{Use: "app", Version: "2.6"} rootCmd.AddCommand(auditproxy.CmdAuditProxy) rootCmd.AddCommand(connect.CmdConnect) diff --git a/test/images/agnhost/crd-conversion-webhook/main.go b/test/images/agnhost/crd-conversion-webhook/main.go index 3d26e589a13..691634e4306 100644 --- a/test/images/agnhost/crd-conversion-webhook/main.go +++ b/test/images/agnhost/crd-conversion-webhook/main.go @@ -64,6 +64,7 @@ func main(cmd *cobra.Command, args []string) { config := Config{CertFile: certFile, KeyFile: keyFile} http.HandleFunc("/crdconvert", converter.ServeExampleConvert) + http.HandleFunc("/readyz", func(w http.ResponseWriter, req *http.Request) { w.Write([]byte("ok")) }) clientset := getClient() server := &http.Server{ Addr: fmt.Sprintf(":%d", port), diff --git a/test/images/agnhost/webhook/main.go b/test/images/agnhost/webhook/main.go index c801df27793..2118e6aad6c 100644 --- a/test/images/agnhost/webhook/main.go +++ b/test/images/agnhost/webhook/main.go @@ -218,6 +218,7 @@ func main(cmd *cobra.Command, args []string) { http.HandleFunc("/custom-resource", serveCustomResource) http.HandleFunc("/mutating-custom-resource", serveMutateCustomResource) http.HandleFunc("/crd", serveCRD) + http.HandleFunc("/readyz", func(w http.ResponseWriter, req *http.Request) { w.Write([]byte("ok")) }) server := &http.Server{ Addr: fmt.Sprintf(":%d", port), TLSConfig: configTLS(config),