diff --git a/README.md b/README.md index ae610801..373905fc 100644 --- a/README.md +++ b/README.md @@ -149,6 +149,9 @@ FLAGS -tink-server [http] IP:Port for the Tink server -tink-server-tls [http] use TLS for Tink server (default "false") -trusted-proxies [http] comma separated list of trusted proxies in CIDR notation + -iso-enabled [iso] enable serving Hook as an iso (default "false") + -iso-magic-string [iso] the string pattern to match for in the source iso, if not set the default from HookOS is used + -iso-url [iso] the url for source iso before binary patching -otel-endpoint [otel] OpenTelemetry collector endpoint -otel-insecure [otel] OpenTelemetry collector insecure (default "true") -syslog-addr [syslog] local IP to listen on for Syslog messages (default "172.17.0.3") diff --git a/go.mod b/go.mod index 91bf991d..ec9172e3 100644 --- a/go.mod +++ b/go.mod @@ -30,7 +30,7 @@ require ( google.golang.org/grpc v1.68.0 k8s.io/apimachinery v0.31.3 k8s.io/client-go v0.31.3 - sigs.k8s.io/controller-runtime v0.19.1 + sigs.k8s.io/controller-runtime v0.19.2 ) require ( diff --git a/go.sum b/go.sum index caaac963..c7ebdb5e 100644 --- a/go.sum +++ b/go.sum @@ -299,8 +299,8 @@ k8s.io/kube-openapi v0.0.0-20240808142205-8e686545bdb8 h1:1Wof1cGQgA5pqgo8MxKPtf k8s.io/kube-openapi v0.0.0-20240808142205-8e686545bdb8/go.mod h1:Os6V6dZwLNii3vxFpxcNaTmH8LJJBkOTg1N0tOA0fvA= k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A= k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= -sigs.k8s.io/controller-runtime v0.19.1 h1:Son+Q40+Be3QWb+niBXAg2vFiYWolDjjRfO8hn/cxOk= -sigs.k8s.io/controller-runtime v0.19.1/go.mod h1:iRmWllt8IlaLjvTTDLhRBXIEtkCK6hwVBJJsYS9Ajf4= +sigs.k8s.io/controller-runtime v0.19.2 h1:3sPrF58XQEPzbE8T81TN6selQIMGbtYwuaJ6eDssDF8= +sigs.k8s.io/controller-runtime v0.19.2/go.mod h1:iRmWllt8IlaLjvTTDLhRBXIEtkCK6hwVBJJsYS9Ajf4= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= diff --git a/internal/iso/iso.go b/internal/iso/iso.go index 5ce49453..69fbb5bb 100644 --- a/internal/iso/iso.go +++ b/internal/iso/iso.go @@ -96,7 +96,7 @@ func (h *Handler) RoundTrip(req *http.Request) (*http.Response, error) { f, err := getFacility(req.Context(), ha, h.Backend) if err != nil { - log.Error(err, "unable to get the hardware object", "mac", ha) + log.Info("unable to get the hardware object", "error", err, "mac", ha) if apierrors.IsNotFound(err) { return &http.Response{ Status: fmt.Sprintf("%d %s", http.StatusNotFound, http.StatusText(http.StatusNotFound)), @@ -122,7 +122,7 @@ func (h *Handler) RoundTrip(req *http.Request) (*http.Response, error) { // For our use case the default transport will suffice. resp, err := http.DefaultTransport.RoundTrip(req) if err != nil { - log.Info("issue getting the source ISO", "sourceIso", h.SourceISO, "error", err) + log.Error(err, "issue getting the source ISO", "sourceIso", h.SourceISO) return nil, err } // by setting this header we are telling the logging middleware to not log its default log message. @@ -179,7 +179,7 @@ func (h *Handler) RoundTrip(req *http.Request) (*http.Response, error) { var b []byte respBuf := new(bytes.Buffer) if _, err := io.CopyN(respBuf, resp.Body, resp.ContentLength); err != nil { - log.Error(err, "issue reading response bytes") + log.Info("unable to read response bytes", "error", err) return &http.Response{ Status: fmt.Sprintf("%d %s", http.StatusInternalServerError, http.StatusText(http.StatusInternalServerError)), StatusCode: http.StatusInternalServerError, @@ -190,7 +190,7 @@ func (h *Handler) RoundTrip(req *http.Request) (*http.Response, error) { } b = respBuf.Bytes() if err := resp.Body.Close(); err != nil { - log.Error(err, "issue closing response body") + log.Info("unable to close response body", "error", err) return &http.Response{ Status: fmt.Sprintf("%d %s", http.StatusInternalServerError, http.StatusText(http.StatusInternalServerError)), StatusCode: http.StatusInternalServerError,