diff --git a/go.mod b/go.mod index 8cfba0f9f44..b3a0a203aeb 100644 --- a/go.mod +++ b/go.mod @@ -1,14 +1,14 @@ module github.com/openshift/api -go 1.15 +go 1.16 require ( github.com/gogo/protobuf v1.3.2 - github.com/openshift/build-machinery-go v0.0.0-20210209125900-0da259a2c359 + github.com/openshift/build-machinery-go v0.0.0-20210423112049-9415d7ebd33e github.com/spf13/pflag v1.0.5 golang.org/x/tools v0.1.0 - k8s.io/api v0.21.0-rc.0 - k8s.io/apimachinery v0.21.0-rc.0 - k8s.io/code-generator v0.21.0-rc.0 + k8s.io/api v0.21.1 + k8s.io/apimachinery v0.21.1 + k8s.io/code-generator v0.21.1 k8s.io/klog/v2 v2.8.0 ) diff --git a/go.sum b/go.sum index 0d3268d5f30..496a65f549d 100644 --- a/go.sum +++ b/go.sum @@ -102,8 +102,8 @@ github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+W github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/openshift/build-machinery-go v0.0.0-20210209125900-0da259a2c359 h1:ehSDsWQiUVzJZrSEXMC7ceV9JIPEyTYqrpqu3m4Wa08= -github.com/openshift/build-machinery-go v0.0.0-20210209125900-0da259a2c359/go.mod h1:b1BuldmJlbA/xYtdZvKi+7j5YGB44qJUJDZ9zwiNCfE= +github.com/openshift/build-machinery-go v0.0.0-20210423112049-9415d7ebd33e h1:F7rBobgSjtYL3/zsgDUjlTVx3Z06hdgpoldpDcn7jzc= +github.com/openshift/build-machinery-go v0.0.0-20210423112049-9415d7ebd33e/go.mod h1:b1BuldmJlbA/xYtdZvKi+7j5YGB44qJUJDZ9zwiNCfE= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -221,12 +221,12 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -k8s.io/api v0.21.0-rc.0 h1:t/kW96KdNJNamYNqxaxRirahK+FaWJQ6BJPbXm5Jb+o= -k8s.io/api v0.21.0-rc.0/go.mod h1:Dkc/ZauWJrgZhjOjeBgW89xZQiTBJA2RaBKYHXPsi2Y= -k8s.io/apimachinery v0.21.0-rc.0 h1:m9dyzHb8QZAHOZKIz2SiabSif1oLsfgrnwiago/9xJA= -k8s.io/apimachinery v0.21.0-rc.0/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -k8s.io/code-generator v0.21.0-rc.0 h1:5XqZwy0dHr3LssJ9ImpO8dCjdTvZ8Bw84b90dZ46kPk= -k8s.io/code-generator v0.21.0-rc.0/go.mod h1:hUlps5+9QaTrKx+jiM4rmq7YmH8wPOIko64uZCHDh6Q= +k8s.io/api v0.21.1 h1:94bbZ5NTjdINJEdzOkpS4vdPhkb1VFpTYC9zh43f75c= +k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= +k8s.io/apimachinery v0.21.1 h1:Q6XuHGlj2xc+hlMCvqyYfbv3H7SRGn2c8NycxJquDVs= +k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= +k8s.io/code-generator v0.21.1 h1:jvcxHpVu5dm/LMXr3GOj/jroiP8+v2YnJE9i2OVRenk= +k8s.io/code-generator v0.21.1/go.mod h1:hUlps5+9QaTrKx+jiM4rmq7YmH8wPOIko64uZCHDh6Q= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027 h1:Uusb3oh8XcdzDF/ndlI4ToKTYVlkCSJP39SRY2mfRAw= k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= diff --git a/vendor/github.com/openshift/build-machinery-go/Makefile b/vendor/github.com/openshift/build-machinery-go/Makefile index aa131b622e5..7b69ea411d6 100644 --- a/vendor/github.com/openshift/build-machinery-go/Makefile +++ b/vendor/github.com/openshift/build-machinery-go/Makefile @@ -19,7 +19,7 @@ define update-makefile-log mkdir -p "$(3)" set -o pipefail; $(MAKE) -j 1 -C "$(dir $(1))" -f "$(notdir $(1))" --no-print-directory --warn-undefined-variables $(2) 2>&1 | \ sed 's/\.\(buildDate\|versionFromGit\|commitFromGit\|gitTreeState\)="[^"]*" /.\1="" /g' | \ - sed -E 's~/.*/(github.com/openshift/build-machinery-go/.*)~/\1~g' | \ + sed -E 's~/[^ ]*/(github.com/openshift/build-machinery-go/[^ ]*)~/\1~g' | \ sed '/\/tmp\/tmp./d' | \ sed '/git checkout -b/d' | \ sed -E 's~^[<> ]*((\+\+\+|\-\-\-) \./(testing/)?manifests/.*.yaml).*~\1~' | \ diff --git a/vendor/github.com/openshift/build-machinery-go/README.md b/vendor/github.com/openshift/build-machinery-go/README.md index bd37d734660..66862f61a22 100644 --- a/vendor/github.com/openshift/build-machinery-go/README.md +++ b/vendor/github.com/openshift/build-machinery-go/README.md @@ -40,5 +40,5 @@ Extends [#Default](). ### Updating generated files We track the log output from the makefile tests to make sure any change is visible and can be audited. Unfortunately due to subtle linux tooling differences in distributions and versions, `make update` may not get you the exact output as the CI. To avoid it, just run the command in the same container as CI: ``` -podman run -it --rm --pull=always -v $( pwd ):/go/src/$( go list -m ) --workdir=/go/src/$( go list -m ) registry.svc.ci.openshift.org/openshift/release:rhel-8-release-golang-1.15-openshift-4.7 make update +podman run -it --rm --pull=always -v $( pwd ):/go/src/$( go list -m ) --workdir=/go/src/$( go list -m ) registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.15-openshift-4.7 make update ``` diff --git a/vendor/github.com/openshift/build-machinery-go/make/default.example.mk.help.log b/vendor/github.com/openshift/build-machinery-go/make/default.example.mk.help.log index 05285660d51..39b69793745 100644 --- a/vendor/github.com/openshift/build-machinery-go/make/default.example.mk.help.log +++ b/vendor/github.com/openshift/build-machinery-go/make/default.example.mk.help.log @@ -20,5 +20,6 @@ verify-codegen verify-deps verify-generated verify-gofmt +verify-golang-versions verify-golint verify-govet diff --git a/vendor/github.com/openshift/build-machinery-go/make/golang.example.mk.help.log b/vendor/github.com/openshift/build-machinery-go/make/golang.example.mk.help.log index a5cc906ddf6..2a908b01337 100644 --- a/vendor/github.com/openshift/build-machinery-go/make/golang.example.mk.help.log +++ b/vendor/github.com/openshift/build-machinery-go/make/golang.example.mk.help.log @@ -10,5 +10,6 @@ update update-gofmt verify verify-gofmt +verify-golang-versions verify-golint verify-govet diff --git a/vendor/github.com/openshift/build-machinery-go/make/golang.mk b/vendor/github.com/openshift/build-machinery-go/make/golang.mk index 15a0b49bcb0..2c16ccafc7e 100644 --- a/vendor/github.com/openshift/build-machinery-go/make/golang.mk +++ b/vendor/github.com/openshift/build-machinery-go/make/golang.mk @@ -6,6 +6,7 @@ self_dir := $(dir $(lastword $(MAKEFILE_LIST))) verify: verify-gofmt verify: verify-govet +verify: verify-golang-versions .PHONY: verify update: update-gofmt diff --git a/vendor/github.com/openshift/build-machinery-go/make/operator.example.mk.help.log b/vendor/github.com/openshift/build-machinery-go/make/operator.example.mk.help.log index 42a5fd5a308..834cfbb9019 100644 --- a/vendor/github.com/openshift/build-machinery-go/make/operator.example.mk.help.log +++ b/vendor/github.com/openshift/build-machinery-go/make/operator.example.mk.help.log @@ -26,6 +26,7 @@ verify-codegen verify-deps verify-generated verify-gofmt +verify-golang-versions verify-golint verify-govet verify-profile-manifests diff --git a/vendor/github.com/openshift/build-machinery-go/make/targets/golang/version.mk b/vendor/github.com/openshift/build-machinery-go/make/targets/golang/version.mk new file mode 100644 index 00000000000..7532dfcf989 --- /dev/null +++ b/vendor/github.com/openshift/build-machinery-go/make/targets/golang/version.mk @@ -0,0 +1,65 @@ +self_dir :=$(dir $(lastword $(MAKEFILE_LIST))) + +.empty-golang-versions-files: + @rm -f "$(PERMANENT_TMP)/golang-versions" "$(PERMANENT_TMP)/named-golang-versions" +.PHONE: .empty-golang-versions-files + +verify-golang-versions: + @if [ -f "$(PERMANENT_TMP)/golang-versions" ]; then \ + LINES=$$(cat "$(PERMANENT_TMP)/golang-versions" | sort | uniq | wc -l); \ + if [ $${LINES} -gt 1 ]; then \ + echo "Golang version mismatch:"; \ + cat "$(PERMANENT_TMP)/named-golang-versions" | sort | sed 's/^/- /'; \ + false; \ + fi; \ + fi +.PHONY: verify-golang-versions + +# $1 - filename (symbolic, used as postfix in Makefile target) +# $2 - golang version +define verify-golang-version-reference-internal +verify-golang-versions-$(1): .empty-golang-versions-files +verify-golang-versions-$(1): + @mkdir -p "$(PERMANENT_TMP)" + @echo "$(1): $(2)" >> "$(PERMANENT_TMP)/named-golang-versions" + @echo "$(2)" >> "$(PERMANENT_TMP)/golang-versions" +.PHONY: verify-golang-versions-$(1) + +verify-golang-versions: verify-golang-versions-$(1) +endef + +# $1 - filename (symbolic, used as postfix in Makefile target) +# $2 - golang version +define verify-golang-version-reference +$(eval $(call verify-golang-version-reference-internal,$(1),$(2))) +endef + +# $1 - Dockerfile filename (symbolic, used as postfix in Makefile target) +define verify-Dockerfile-builder-golang-version +$(call verify-golang-version-reference,$(1),$(shell grep "AS builder" "$(1)" | sed 's/.*golang-\([[:digit:]][[:digit:]]*.[[:digit:]][[:digit:]]*\).*/\1/')) +endef + +define verify-go-mod-golang-version +$(call verify-golang-version-reference,go.mod,$(shell grep -e 'go [[:digit:]]*\.[[:digit:]]*' go.mod 2>/dev/null | sed 's/go //')) +endef + +define verify-buildroot-golang-version +$(call verify-golang-version-reference,.ci-operator.yaml,$(shell grep -e 'tag: .*golang-[[:digit:]]*\.[[:digit:]]' .ci-operator.yaml 2>/dev/null | sed 's/.*golang-\([[:digit:]][[:digit:]]*.[[:digit:]][[:digit:]]*\).*/\1/')) +endef + +# $1 - optional Dockerfile filename (symbolic, used as postfix in Makefile target) +define verify-golang-versions +$(if $(1),$(call verify-Dockerfile-builder-golang-version,$(1))) \ +$(if $(wildcard ./.ci-operator.yaml),$(if $(shell grep 'build_root_image:' .ci-operator.yaml 2>/dev/null),$(call verify-buildroot-golang-version))) \ +$(if $(wildcard ./go.mod),$(call verify-go-mod-golang-version)) +endef + +# We need to be careful to expand all the paths before any include is done +# or self_dir could be modified for the next include by the included file. +# Also doing this at the end of the file allows us to use self_dir before it could be modified. +include $(addprefix $(self_dir), \ + ../../lib/golang.mk \ +) +include $(addprefix $(self_dir), \ + ../../lib/tmp.mk \ +) \ No newline at end of file diff --git a/vendor/github.com/openshift/build-machinery-go/make/targets/openshift/operator/profile-manifests.mk b/vendor/github.com/openshift/build-machinery-go/make/targets/openshift/operator/profile-manifests.mk index b57ecd5ea87..a338831a98c 100644 --- a/vendor/github.com/openshift/build-machinery-go/make/targets/openshift/operator/profile-manifests.mk +++ b/vendor/github.com/openshift/build-machinery-go/make/targets/openshift/operator/profile-manifests.mk @@ -6,6 +6,7 @@ self_dir :=$(dir $(lastword $(MAKEFILE_LIST))) # $3 - output file define patch-manifest-yq $(YQ) m -x '$(2)' '$(1)' > '$(3)' + sed -i '$(3)' -e '1s/^/# *** AUTOMATICALLY GENERATED FILE - DO NOT EDIT ***\n/' endef @@ -15,6 +16,7 @@ endef # $3 - output file define patch-manifest-yaml-patch $(YAML_PATCH) -o '$(1)' < '$(2)' > '$(3)' + sed -i '$(3)' -e '1s/^/# *** AUTOMATICALLY GENERATED FILE - DO NOT EDIT ***\n/' endef diff --git a/vendor/k8s.io/api/core/v1/annotation_key_constants.go b/vendor/k8s.io/api/core/v1/annotation_key_constants.go index 612f6aa747a..22476b2bd92 100644 --- a/vendor/k8s.io/api/core/v1/annotation_key_constants.go +++ b/vendor/k8s.io/api/core/v1/annotation_key_constants.go @@ -148,7 +148,7 @@ const ( PodDeletionCost = "controller.kubernetes.io/pod-deletion-cost" // AnnotationTopologyAwareHints can be used to enable or disable Topology - // Aware Hints for a Service. This may be set to "auto" or "disabled". Any - // other value is treated as "disabled". + // Aware Hints for a Service. This may be set to "Auto" or "Disabled". Any + // other value is treated as "Disabled". AnnotationTopologyAwareHints = "service.kubernetes.io/topology-aware-hints" ) diff --git a/vendor/k8s.io/apimachinery/pkg/api/resource/quantity_proto.go b/vendor/k8s.io/apimachinery/pkg/api/resource/quantity_proto.go index f89ca163cd3..3e0cdb10d40 100644 --- a/vendor/k8s.io/apimachinery/pkg/api/resource/quantity_proto.go +++ b/vendor/k8s.io/apimachinery/pkg/api/resource/quantity_proto.go @@ -166,7 +166,7 @@ func (m *Quantity) Unmarshal(data []byte) error { if err != nil { return err } - if skippy < 0 { + if (skippy < 0) || (iNdEx+skippy) < 0 { return ErrInvalidLengthGenerated } if (iNdEx + skippy) > l { diff --git a/vendor/modules.txt b/vendor/modules.txt index efe909f077e..5c402e26745 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -65,7 +65,7 @@ github.com/mailru/easyjson/jwriter github.com/modern-go/concurrent # github.com/modern-go/reflect2 v1.0.1 github.com/modern-go/reflect2 -# github.com/openshift/build-machinery-go v0.0.0-20210209125900-0da259a2c359 +# github.com/openshift/build-machinery-go v0.0.0-20210423112049-9415d7ebd33e ## explicit github.com/openshift/build-machinery-go github.com/openshift/build-machinery-go/make @@ -146,7 +146,7 @@ google.golang.org/protobuf/runtime/protoimpl gopkg.in/inf.v0 # gopkg.in/yaml.v2 v2.4.0 gopkg.in/yaml.v2 -# k8s.io/api v0.21.0-rc.0 +# k8s.io/api v0.21.1 ## explicit k8s.io/api/admission/v1beta1 k8s.io/api/admissionregistration/v1beta1 @@ -176,7 +176,7 @@ k8s.io/api/scheduling/v1beta1 k8s.io/api/storage/v1 k8s.io/api/storage/v1alpha1 k8s.io/api/storage/v1beta1 -# k8s.io/apimachinery v0.21.0-rc.0 +# k8s.io/apimachinery v0.21.1 ## explicit k8s.io/apimachinery/pkg/api/apitesting k8s.io/apimachinery/pkg/api/apitesting/fuzzer @@ -215,7 +215,7 @@ k8s.io/apimachinery/pkg/util/validation/field k8s.io/apimachinery/pkg/util/yaml k8s.io/apimachinery/pkg/watch k8s.io/apimachinery/third_party/forked/golang/reflect -# k8s.io/code-generator v0.21.0-rc.0 +# k8s.io/code-generator v0.21.1 ## explicit k8s.io/code-generator k8s.io/code-generator/cmd/client-gen