Skip to content

Commit f4887d6

Browse files
authored
Merge pull request kubernetes#82185 from liggitt/agnhost-readyz
agnhost: add /readyz endpoints to converter/webhook commands
2 parents c86da8e + 0558e83 commit f4887d6

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed

test/images/agnhost/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.5
1+
2.6

test/images/agnhost/agnhost.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ import (
4444
)
4545

4646
func main() {
47-
rootCmd := &cobra.Command{Use: "app", Version: "2.5"}
47+
rootCmd := &cobra.Command{Use: "app", Version: "2.6"}
4848

4949
rootCmd.AddCommand(auditproxy.CmdAuditProxy)
5050
rootCmd.AddCommand(connect.CmdConnect)

test/images/agnhost/crd-conversion-webhook/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ func main(cmd *cobra.Command, args []string) {
6464
config := Config{CertFile: certFile, KeyFile: keyFile}
6565

6666
http.HandleFunc("/crdconvert", converter.ServeExampleConvert)
67+
http.HandleFunc("/readyz", func(w http.ResponseWriter, req *http.Request) { w.Write([]byte("ok")) })
6768
clientset := getClient()
6869
server := &http.Server{
6970
Addr: fmt.Sprintf(":%d", port),

test/images/agnhost/webhook/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ func main(cmd *cobra.Command, args []string) {
218218
http.HandleFunc("/custom-resource", serveCustomResource)
219219
http.HandleFunc("/mutating-custom-resource", serveMutateCustomResource)
220220
http.HandleFunc("/crd", serveCRD)
221+
http.HandleFunc("/readyz", func(w http.ResponseWriter, req *http.Request) { w.Write([]byte("ok")) })
221222
server := &http.Server{
222223
Addr: fmt.Sprintf(":%d", port),
223224
TLSConfig: configTLS(config),

0 commit comments

Comments
 (0)