Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.9 CVE fix #6774

Merged
merged 11 commits into from
Jul 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .trivyignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# emicklei/go-restful - Authorization Bypass Through User-Controlled Key
# This should be fixed in v2's 2.16.0, although talks were undergoing about why this still shows up as an issue.
# https://github.com/emicklei/go-restful/pull/503
CVE-2022-1996
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ else
endif
endif

ENVOY_GLOO_IMAGE ?= quay.io/solo-io/envoy-gloo:1.20.4-patch1
ENVOY_GLOO_IMAGE ?= quay.io/solo-io/envoy-gloo:1.20.4-patch2

# The full SHA of the currently checked out commit
CHECKED_OUT_SHA := $(shell git rev-parse HEAD)
Expand Down
19 changes: 19 additions & 0 deletions changelog/v1.9.21/more-bumps.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
changelog:
- type: DEPENDENCY_BUMP
dependencyOwner: golang.org
dependencyRepo: x/net
dependencyTag: v0.0.0-20211209124913-491a49abca63
- type: DEPENDENCY_BUMP
dependencyOwner: prometheus
dependencyRepo: client_golang
dependencyTag: v1.11.1
- type: DEPENDENCY_BUMP
dependencyOwner: linux
dependencyRepo: alpine
dependencyTag: 3.15.4
- type: DEPENDENCY_BUMP
dependencyOwner: solo.io
dependencyRepo: envoy-gloo
dependencyTag: 1.20.4-patch2
- type: NON_USER_FACING
description: Bump cloudbuild's e2e-go-mod-ginkgo to 0.4.15 to user a newer version of go.
4 changes: 3 additions & 1 deletion cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,12 @@ steps:
dir: *dir
id: 'install-go-tools'

- name: 'gcr.io/$PROJECT_ID/e2e-go-mod-ginkgo:0.2.1'
- name: 'gcr.io/$PROJECT_ID/e2e-go-mod-ginkgo:0.4.15'
entrypoint: make
env:
- 'ENVOY_BINARY=/workspace/envoy'
- 'ACK_GINKGO_RC=true'
- 'ACK_GINKGO_DEPRECATIONS=1.16.5'
- 'AWS_SHARED_CREDENTIALS_FILE=/workspace/aws_credentials'
- 'RUN_KUBE_TESTS=1'
- 'RUN_CONSUL_TESTS=1'
Expand Down
2 changes: 1 addition & 1 deletion docs/content/guides/security/tls/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.13.8
FROM alpine:3.15.4

COPY cert.pem /cert.pem
COPY key.pem /key.pem
Expand Down
2 changes: 1 addition & 1 deletion docs/content/static/content/osa_provided.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Name|Version|License
[onsi/gomega](https://github.com/onsi/gomega)|v1.10.5|MIT License
[opencontainers/go-digest](https://github.com/opencontainers/go-digest)|v1.0.0-rc1|Apache License 2.0
[pkg/browser](https://github.com/pkg/browser)|v0.0.0-20180916011732-0a3d74bf9ce4|BSD 2-clause "Simplified" License
[prometheus/client_golang](https://github.com/prometheus/client_golang)|v1.9.0|Apache License 2.0
[prometheus/client_golang](https://github.com/prometheus/client_golang)|v1.11.1|Apache License 2.0
[prometheus/prometheus](https://github.com/prometheus/prometheus)|v2.5.0+incompatible|Apache License 2.0
[rotisserie/eris](https://github.com/rotisserie/eris)|v0.4.0|MIT License
[saiskee/gettercheck](https://github.com/saiskee/gettercheck)|v0.0.0-20210820204958-38443d06ebe0|MIT License
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/session-affinity/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.13.8
FROM alpine:3.15.4

RUN apk upgrade --update-cache \
&& apk add ca-certificates \
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/xslt-guide/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.13.8
FROM alpine:3.15.4

RUN apk upgrade --update-cache \
&& apk add ca-certificates curl \
Expand Down
2 changes: 1 addition & 1 deletion example/proxycontroller/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.13.8
FROM alpine:3.15.4

COPY proxycontroller-linux-amd64 /usr/local/bin/proxycontroller

Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ require (
github.com/opencontainers/image-spec v1.0.2-0.20190823105129-775207bd45b6 // indirect
github.com/pelletier/go-toml v1.8.1 // indirect
github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4
github.com/prometheus/client_golang v1.9.0
github.com/prometheus/client_golang v1.11.1
github.com/prometheus/prometheus v2.5.0+incompatible
github.com/rotisserie/eris v0.4.0
github.com/russross/blackfriday/v2 v2.1.0 // indirect
Expand All @@ -81,7 +81,7 @@ require (
github.com/smartystreets/assertions v1.2.0 // indirect
github.com/solo-io/anyvendor v0.0.4 // indirect
github.com/solo-io/go-list-licenses v0.1.0
github.com/solo-io/go-utils v0.21.25
github.com/solo-io/go-utils v0.22.0
github.com/solo-io/k8s-utils v0.1.0
github.com/solo-io/protoc-gen-ext v0.0.16
github.com/solo-io/protoc-gen-openapi v0.0.1
Expand Down Expand Up @@ -141,7 +141,7 @@ replace (
github.com/pseudomuto/protoc-gen-doc => github.com/pseudomuto/protoc-gen-doc v1.0.0
// Required for proper serialization of CRDs
github.com/renstrom/dedent => github.com/lithammer/dedent v1.0.0
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 => golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 => golang.org/x/net v0.0.0-20211209124913-491a49abca63

golang/x/text => golang/x/text v0.3.7

Expand Down
21 changes: 14 additions & 7 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,7 @@ github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2
github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-kit/kit v0.10.0 h1:dXFJfIHVvUcpSgDOV+Ne6t7jXri8Tfv2uOLHUZ2XNuo=
github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o=
github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY=
github.com/go-ldap/ldap/v3 v3.1.3/go.mod h1:3rbOH3jRS2u6jg2rJnKAMLE/xQyCKIveG2Sa/Cohzb8=
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
Expand Down Expand Up @@ -901,8 +902,9 @@ github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68=
github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/json-iterator/go v1.1.11 h1:uVUAXhF2To8cbw/3xN3pxj6kk7TYKs98NIrTqPlMWAQ=
github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=
Expand Down Expand Up @@ -1230,8 +1232,9 @@ github.com/prometheus/client_golang v1.2.1/go.mod h1:XMU6Z2MjaRKVu/dC1qupJI9SiNk
github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og=
github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M=
github.com/prometheus/client_golang v1.8.0/go.mod h1:O9VU6huf47PktckDQfMTX0Y8tY0/7TSWwj+ITvv0TnM=
github.com/prometheus/client_golang v1.9.0 h1:Rrch9mh17XcxvEu9D9DEpb4isxjGBtcevQjKvxPRQIU=
github.com/prometheus/client_golang v1.9.0/go.mod h1:FqZLKOZnGdFAhOK4nqGHa7D66IdsO+O441Eve7ptJDU=
github.com/prometheus/client_golang v1.11.1 h1:+4eQaD7vAZ6DsfsxB15hbE0odUjGI5ARs9yskGu1v4s=
github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0=
github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
Expand All @@ -1250,8 +1253,9 @@ github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+
github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA=
github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=
github.com/prometheus/common v0.14.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s=
github.com/prometheus/common v0.15.0 h1:4fgOnadei3EZvgRwxJ7RMpG1k1pOZth5Pc13tyspaKM=
github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s=
github.com/prometheus/common v0.26.0 h1:iMAkS2TDoNWnKM+Kopnx/8tnEStIfpYA0ur0xQzzhMQ=
github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc=
github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
Expand All @@ -1265,8 +1269,9 @@ github.com/prometheus/procfs v0.0.6/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+Gx
github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A=
github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
github.com/prometheus/procfs v0.2.0 h1:wH4vA7pcjKuZzjF7lM8awk4fnuJO6idemZXoKnULUx4=
github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4=
github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
github.com/prometheus/prometheus v2.5.0+incompatible h1:7QPitgO2kOFG8ecuRn9O/4L9+10He72rVRJvMXrE9Hg=
github.com/prometheus/prometheus v2.5.0+incompatible/go.mod h1:oAIUtOny2rjMX0OWN5vPR5/q/twIROJvdqnQKDdil/s=
github.com/prometheus/statsd_exporter v0.15.0 h1:UiwC1L5HkxEPeapXdm2Ye0u1vUJfTj7uwT5yydYpa1E=
Expand Down Expand Up @@ -1370,8 +1375,8 @@ github.com/solo-io/go-utils v0.19.0/go.mod h1:If8NiehXROCFU65PGeDTrrZCNA5gJXvbcV
github.com/solo-io/go-utils v0.20.2/go.mod h1:6e8K1spnMWwlnJRSNp/J84GEyJbrcK4Gm7i+ehzCi8c=
github.com/solo-io/go-utils v0.21.4/go.mod h1:6e8K1spnMWwlnJRSNp/J84GEyJbrcK4Gm7i+ehzCi8c=
github.com/solo-io/go-utils v0.21.6/go.mod h1:N6jeYnrAKq5uGv6m/hBkJ+g6i3AwgkyfVoaDlQ/z64o=
github.com/solo-io/go-utils v0.21.25 h1:ASgOS/Hp2sfBkzXdA2qpN14b4K39UHiwtlAcVYTN0uI=
github.com/solo-io/go-utils v0.21.25/go.mod h1:0gLjjgdtI5diEgdMvtGtceAdL/5z4C0NcotRqQdhlu0=
github.com/solo-io/go-utils v0.22.0 h1:ialc+Yu6xaXFx6rOZykvadEELI8NZqxODkxHqju8gRA=
github.com/solo-io/go-utils v0.22.0/go.mod h1:0gLjjgdtI5diEgdMvtGtceAdL/5z4C0NcotRqQdhlu0=
github.com/solo-io/k8s-utils v0.0.1/go.mod h1:53N9+9Gl2MwqIZJ7/ocA9gKvWt+6z7MPD2qKQix7oFE=
github.com/solo-io/k8s-utils v0.0.8/go.mod h1:Cg2ymG0xhLdyS3NJ0D98yxiSWjAKYPNopzPTwVDl7e4=
github.com/solo-io/k8s-utils v0.1.0 h1:podyELsbIkkdmu5xx6+y1dd6OUIt8Tv2XqAttUPI1VI=
Expand Down Expand Up @@ -1704,8 +1709,9 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v
golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k=
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f h1:OfiFi4JbukWwe3lzw+xunroH1mnC1e2Gy5cxNJApiSY=
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211209124913-491a49abca63 h1:iocB37TsdFuN6IBRZ+ry36wrkoV51/tl5vOWqkcPGvY=
golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
Expand Down Expand Up @@ -1831,6 +1837,7 @@ golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210502180810-71e4cd670f79/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
Expand Down
2 changes: 1 addition & 1 deletion jobs/certgen/cmd/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.13.8
FROM alpine:3.15.4

ARG GOARCH=amd64

Expand Down
2 changes: 1 addition & 1 deletion projects/accesslogger/cmd/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.13.8
FROM alpine:3.15.4

ARG GOARCH=amd64
RUN apk -U upgrade && apk add ca-certificates && rm -rf /var/cache/apk/*
Expand Down
2 changes: 1 addition & 1 deletion projects/discovery/cmd/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.13.8
FROM alpine:3.15.4

ARG GOARCH=amd64

Expand Down
2 changes: 1 addition & 1 deletion projects/examples/services/sleeper/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.13.8
FROM alpine:3.15.4

RUN apk upgrade --update-cache \
&& apk add ca-certificates \
Expand Down
2 changes: 1 addition & 1 deletion projects/gateway/cmd/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.13.8
FROM alpine:3.15.4

ARG GOARCH=amd64

Expand Down
2 changes: 1 addition & 1 deletion projects/ingress/cmd/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.13.8
FROM alpine:3.15.4

ARG GOARCH=amd64

Expand Down
2 changes: 1 addition & 1 deletion projects/sds/cmd/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.13.8
FROM alpine:3.15.4

ARG GOARCH=amd64

Expand Down
34 changes: 29 additions & 5 deletions test/kube2e/util.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package kube2e

import (
"bytes"
"context"
"fmt"
"io/ioutil"
"net/http"
"os"
Expand All @@ -10,7 +12,10 @@ import (
"strconv"
"time"

"go.uber.org/zap/zapcore"

"github.com/golang/protobuf/proto"
"github.com/solo-io/go-utils/testutils/goimpl"

"github.com/golang/protobuf/ptypes/wrappers"
"github.com/solo-io/gloo/projects/gloo/cli/pkg/cmd/check"
Expand Down Expand Up @@ -86,9 +91,10 @@ gatewayProxies:
}

func EventuallyReachesConsistentState(installNamespace string) {
metricsPort := strconv.Itoa(9091)
metricsPort := 9091
metricsPortString := strconv.Itoa(metricsPort)
portFwd := exec.Command("kubectl", "port-forward", "-n", installNamespace,
"deployment/gloo", metricsPort)
"deployment/gloo", metricsPortString)
portFwd.Stdout = os.Stderr
portFwd.Stderr = os.Stderr
err := portFwd.Start()
Expand All @@ -101,22 +107,25 @@ func EventuallyReachesConsistentState(installNamespace string) {
}()

// make sure we eventually reach an eventually consistent state
lastSnapOut := getSnapOut(metricsPort)
lastSnapOut := getSnapOut(metricsPortString)

eventuallyConsistentPollingInterval := 7 * time.Second // >= 5s for metrics reporting, which happens every 5s
time.Sleep(eventuallyConsistentPollingInterval)

Eventually(func() bool {
currentSnapOut := getSnapOut(metricsPort)
currentSnapOut := getSnapOut(metricsPortString)
consistent := lastSnapOut == currentSnapOut
lastSnapOut = currentSnapOut
return consistent
}, "30s", eventuallyConsistentPollingInterval).Should(Equal(true))

Consistently(func() string {
currentSnapOut := getSnapOut(metricsPort)
currentSnapOut := getSnapOut(metricsPortString)
return currentSnapOut
}, "30s", eventuallyConsistentPollingInterval).Should(Equal(lastSnapOut))

// Gloo components are configured to log to the Info level by default
EventuallyLogLevel(metricsPort, zapcore.InfoLevel)
}

// Copied from: https://github.com/solo-io/go-utils/blob/176c4c008b4d7cde836269c7a817f657b6981236/testutils/assertions.go#L20
Expand Down Expand Up @@ -151,6 +160,21 @@ func getSnapOut(metricsPort string) string {
return snapOut
}

// EventuallyLogLevel ensures that we can query the endpoint responsible for getting the current
// log level of a gloo component, and updating the log level dynamically
func EventuallyLogLevel(port int, logLevel zapcore.Level) {
url := fmt.Sprintf("http://localhost:%d/logging", port)
body := bytes.NewReader([]byte(url))

request, err := http.NewRequest(http.MethodGet, url, body)
ExpectWithOffset(1, err).NotTo(HaveOccurred())

expectedResponse := fmt.Sprintf("{\"level\":\"%s\"}\n", logLevel.String())
EventuallyWithOffset(1, func() (string, error) {
return goimpl.ExecuteRequest(request)
}, time.Second*5, time.Millisecond*100).Should(Equal(expectedResponse))
}

func UpdateDisableTransformationValidationSetting(ctx context.Context, shouldDisable bool, installNamespace string) {
UpdateSettings(func(settings *v1.Settings) {
Expect(settings.GetGateway().GetValidation()).NotTo(BeNil())
Expand Down