Skip to content

Commit b6ca620

Browse files
authored
Merge pull request #141 from Sneha-at/module-update-master
Update dependency go modules for k8s v1.28.0-rc.0
2 parents 8502927 + 0ed3765 commit b6ca620

File tree

507 files changed

+43320
-13718
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

507 files changed

+43320
-13718
lines changed

go.mod

Lines changed: 27 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -5,67 +5,59 @@ go 1.18
55
require (
66
github.com/container-storage-interface/spec v1.8.0
77
github.com/golang/protobuf v1.5.3
8-
github.com/stretchr/testify v1.8.1
9-
golang.org/x/net v0.8.0
10-
google.golang.org/grpc v1.51.0
11-
k8s.io/api v0.27.0
12-
k8s.io/client-go v0.27.0
13-
k8s.io/component-base v0.26.0
14-
k8s.io/klog/v2 v2.90.1
8+
github.com/stretchr/testify v1.8.2
9+
golang.org/x/net v0.12.0
10+
google.golang.org/grpc v1.54.0
11+
k8s.io/api v0.28.0-rc.0
12+
k8s.io/client-go v0.28.0-rc.0
13+
k8s.io/component-base v0.28.0-rc.0
14+
k8s.io/klog/v2 v2.100.1
1515
)
1616

1717
require (
1818
github.com/beorn7/perks v1.0.1 // indirect
1919
github.com/blang/semver/v4 v4.0.0 // indirect
20-
github.com/cespare/xxhash/v2 v2.1.2 // indirect
20+
github.com/cespare/xxhash/v2 v2.2.0 // indirect
2121
github.com/davecgh/go-spew v1.1.1 // indirect
2222
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
23-
github.com/go-logr/logr v1.2.3 // indirect
23+
github.com/go-logr/logr v1.2.4 // indirect
2424
github.com/go-openapi/jsonpointer v0.19.6 // indirect
25-
github.com/go-openapi/jsonreference v0.20.1 // indirect
25+
github.com/go-openapi/jsonreference v0.20.2 // indirect
2626
github.com/go-openapi/swag v0.22.3 // indirect
2727
github.com/gogo/protobuf v1.3.2 // indirect
2828
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
29-
github.com/google/gnostic v0.5.7-v3refs // indirect
29+
github.com/google/gnostic-models v0.6.8 // indirect
3030
github.com/google/go-cmp v0.5.9 // indirect
31-
github.com/google/gofuzz v1.1.0 // indirect
31+
github.com/google/gofuzz v1.2.0 // indirect
3232
github.com/google/uuid v1.3.0 // indirect
3333
github.com/josharian/intern v1.0.0 // indirect
3434
github.com/json-iterator/go v1.1.12 // indirect
3535
github.com/mailru/easyjson v0.7.7 // indirect
36-
github.com/matttproud/golang_protobuf_extensions v1.0.2 // indirect
36+
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
3737
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
3838
github.com/modern-go/reflect2 v1.0.2 // indirect
3939
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
4040
github.com/pmezard/go-difflib v1.0.0 // indirect
41-
github.com/prometheus/client_golang v1.14.0 // indirect
42-
github.com/prometheus/client_model v0.3.0 // indirect
43-
github.com/prometheus/common v0.37.0 // indirect
44-
github.com/prometheus/procfs v0.8.0 // indirect
41+
github.com/prometheus/client_golang v1.16.0 // indirect
42+
github.com/prometheus/client_model v0.4.0 // indirect
43+
github.com/prometheus/common v0.44.0 // indirect
44+
github.com/prometheus/procfs v0.10.1 // indirect
4545
github.com/spf13/pflag v1.0.5 // indirect
46-
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect
47-
golang.org/x/sys v0.6.0 // indirect
48-
golang.org/x/term v0.6.0 // indirect
49-
golang.org/x/text v0.8.0 // indirect
50-
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect
46+
golang.org/x/oauth2 v0.8.0 // indirect
47+
golang.org/x/sys v0.10.0 // indirect
48+
golang.org/x/term v0.10.0 // indirect
49+
golang.org/x/text v0.11.0 // indirect
50+
golang.org/x/time v0.3.0 // indirect
5151
google.golang.org/appengine v1.6.7 // indirect
52-
google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21 // indirect
53-
google.golang.org/protobuf v1.28.1 // indirect
52+
google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 // indirect
53+
google.golang.org/protobuf v1.30.0 // indirect
5454
gopkg.in/inf.v0 v0.9.1 // indirect
5555
gopkg.in/yaml.v2 v2.4.0 // indirect
5656
gopkg.in/yaml.v3 v3.0.1 // indirect
57-
k8s.io/apimachinery v0.27.0 // indirect
58-
k8s.io/kube-openapi v0.0.0-20230308215209-15aac26d736a // indirect
59-
k8s.io/utils v0.0.0-20230209194617-a36077c30491 // indirect
57+
k8s.io/apimachinery v0.28.0-rc.0 // indirect
58+
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect
59+
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect
6060
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
6161
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
6262
sigs.k8s.io/yaml v1.3.0 // indirect
6363
)
64-
65-
replace k8s.io/api => k8s.io/api v0.27.0
66-
67-
replace k8s.io/apimachinery => k8s.io/apimachinery v0.28.0-alpha.0
68-
69-
replace k8s.io/client-go => k8s.io/client-go v0.27.0
70-
71-
replace k8s.io/component-base => k8s.io/component-base v0.27.0

go.sum

Lines changed: 60 additions & 504 deletions
Large diffs are not rendered by default.
Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
# Copyright 2023 The Kubernetes Authors.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
import argparse
16+
import datetime
17+
import re
18+
from collections import defaultdict
19+
import subprocess
20+
import shutil
21+
from dateutil.relativedelta import relativedelta
22+
23+
def check_gh_command():
24+
"""
25+
Pretty much everything is processed from `gh`
26+
Check that the `gh` command is in the path before anything else
27+
"""
28+
if not shutil.which('gh'):
29+
print("Error: The `gh` command is not available in the PATH.")
30+
print("Please install the GitHub CLI (https://cli.github.com/) and try again.")
31+
exit(1)
32+
33+
def duration_ago(dt):
34+
"""
35+
Humanize duration ouputs
36+
"""
37+
delta = relativedelta(datetime.datetime.now(), dt)
38+
if delta.years > 0:
39+
return f"{delta.years} year{'s' if delta.years > 1 else ''} ago"
40+
elif delta.months > 0:
41+
return f"{delta.months} month{'s' if delta.months > 1 else ''} ago"
42+
elif delta.days > 0:
43+
return f"{delta.days} day{'s' if delta.days > 1 else ''} ago"
44+
elif delta.hours > 0:
45+
return f"{delta.hours} hour{'s' if delta.hours > 1 else ''} ago"
46+
elif delta.minutes > 0:
47+
return f"{delta.minutes} minute{'s' if delta.minutes > 1 else ''} ago"
48+
else:
49+
return "just now"
50+
51+
def parse_version(version):
52+
"""
53+
Parse version assuming it is in the form of v1.2.3
54+
"""
55+
pattern = r"v(\d+)\.(\d+)\.(\d+)"
56+
match = re.match(pattern, version)
57+
if match:
58+
major, minor, patch = map(int, match.groups())
59+
return (major, minor, patch)
60+
61+
def end_of_life_grouped_versions(versions):
62+
"""
63+
Calculate the end of life date for a minor release version according to : https://kubernetes-csi.github.io/docs/project-policies.html#support
64+
65+
The input is an array of tuples of:
66+
* grouped versions (e.g. 1.0, 1.1)
67+
* array of that contains all versions and their release date (e.g. 1.0.0, 01-01-2013)
68+
69+
versions structure example :
70+
[((3, 5), [('v3.5.0', datetime.datetime(2023, 4, 27, 22, 28, 6))]),
71+
((3, 4),
72+
[('v3.4.1', datetime.datetime(2023, 4, 5, 17, 41, 15)),
73+
('v3.4.0', datetime.datetime(2022, 12, 27, 23, 43, 41))])]
74+
"""
75+
supported_versions = []
76+
# Prepare dates for later calculation
77+
now = datetime.datetime.now()
78+
one_year = datetime.timedelta(days=365)
79+
three_months = datetime.timedelta(days=90)
80+
81+
# get the newer versions on top
82+
sorted_versions_list = sorted(versions.items(), key=lambda x: x[0], reverse=True)
83+
84+
# the latest version is always supported no matter the release date
85+
latest = sorted_versions_list.pop(0)
86+
supported_versions.append(latest[1][-1])
87+
88+
for v in sorted_versions_list:
89+
first_release = v[1][-1]
90+
last_release = v[1][0]
91+
# if the release is less than a year old we support the latest patch version
92+
if now - first_release[1] < one_year:
93+
supported_versions.append(last_release)
94+
# if the main release is older than a year and has a recent path, this is supported
95+
elif now - last_release[1] < three_months:
96+
supported_versions.append(last_release)
97+
return supported_versions
98+
99+
def get_release_docker_image(repo, version):
100+
"""
101+
Extract docker image name from the relase page documentation
102+
"""
103+
output = subprocess.check_output(['gh', 'release', '-R', repo, 'view', version], text=True)
104+
#Extract matching image name excluding `
105+
match = re.search(r"docker pull ([\.\/\-\:\w\d]*)", output)
106+
docker_image = match.group(1) if match else ''
107+
return((version, docker_image))
108+
109+
def get_versions_from_releases(repo):
110+
"""
111+
Using `gh` cli get the github releases page details then
112+
create a list of grouped version on major.minor
113+
and for each give all major.minor.patch with release dates
114+
"""
115+
# Run the `gh release` command to get the release list
116+
output = subprocess.check_output(['gh', 'release', '-R', repo, 'list'], text=True)
117+
# Parse the output and group by major and minor version numbers
118+
versions = defaultdict(lambda: [])
119+
for line in output.strip().split('\n'):
120+
parts = line.split('\t')
121+
# pprint.pprint(parts)
122+
version = parts[0]
123+
parsed_version = parse_version(version)
124+
if parsed_version is None:
125+
continue
126+
major, minor, patch = parsed_version
127+
128+
published = datetime.datetime.strptime(parts[3], '%Y-%m-%dT%H:%M:%SZ')
129+
versions[(major, minor)].append((version, published))
130+
return(versions)
131+
132+
133+
def main():
134+
manual = """
135+
This script lists the supported versions Github releases according to https://kubernetes-csi.github.io/docs/project-policies.html#support
136+
It has been designed to help to update the tables from : https://kubernetes-csi.github.io/docs/sidecar-containers.html\n\n
137+
It can take multiple repos as argument, for all CSI sidecars details you can run:
138+
./get_supported_version_csi-sidecar.py -R kubernetes-csi/external-attacher -R kubernetes-csi/external-provisioner -R kubernetes-csi/external-resizer -R kubernetes-csi/external-snapshotter -R kubernetes-csi/livenessprobe -R kubernetes-csi/node-driver-registrar -R kubernetes-csi/external-health-monitor\n
139+
With the output you can then update the documentation manually.
140+
"""
141+
parser = argparse.ArgumentParser(formatter_class=argparse.RawDescriptionHelpFormatter, description=manual)
142+
parser.add_argument('--repo', '-R', required=True, action='append', dest='repos', help='The name of the repository in the format owner/repo.')
143+
parser.add_argument('--display', '-d', action='store_true', help='(default) Display EOL versions with their dates', default=True)
144+
parser.add_argument('--doc', '-D', action='store_true', help='Helper to https://kubernetes-csi.github.io/docs/ that prints Docker image for each EOL version')
145+
146+
args = parser.parse_args()
147+
148+
# Verify pre-reqs
149+
check_gh_command()
150+
151+
# Process all repos
152+
for repo in args.repos:
153+
versions = get_versions_from_releases(repo)
154+
eol_versions = end_of_life_grouped_versions(versions)
155+
156+
if args.display:
157+
print(f"Supported versions with release date and age of `{repo}`:\n")
158+
for version in eol_versions:
159+
print(f"{version[0]}\t{version[1].strftime('%Y-%m-%d')}\t{duration_ago(version[1])}")
160+
161+
# TODO : generate proper doc output for the tables of: https://kubernetes-csi.github.io/docs/sidecar-containers.html
162+
if args.doc:
163+
print("\nSupported Versions with docker images for each end of life version:\n")
164+
for version in eol_versions:
165+
_, image = get_release_docker_image(repo, version[0])
166+
print(f"{version[0]}\t{image}")
167+
print()
168+
169+
if __name__ == '__main__':
170+
main()

release-tools/prow.sh

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,10 @@ configvar CSI_PROW_GINKGO_VERSION v1.7.0 "Ginkgo"
101101

102102
# Ginkgo runs the E2E test in parallel. The default is based on the number
103103
# of CPUs, but typically this can be set to something higher in the job.
104-
configvar CSI_PROW_GINKO_PARALLEL "-p" "Ginko parallelism parameter(s)"
104+
configvar CSI_PROW_GINKGO_PARALLEL "-p" "Ginkgo parallelism parameter(s)"
105+
106+
# Timeout value for the overall ginkgo test suite.
107+
configvar CSI_PROW_GINKGO_TIMEOUT "1h" "Ginkgo timeout"
105108

106109
# Enables building the code in the repository. On by default, can be
107110
# disabled in jobs which only use pre-built components.
@@ -1018,10 +1021,10 @@ run_e2e () (
10181021
10191022
if [ "${name}" == "local" ]; then
10201023
cd "${GOPATH}/src/${CSI_PROW_SIDECAR_E2E_IMPORT_PATH}" &&
1021-
run_with_loggers env KUBECONFIG="$KUBECONFIG" KUBE_TEST_REPO_LIST="$(if [ -e "${CSI_PROW_WORK}/e2e-repo-list" ]; then echo "${CSI_PROW_WORK}/e2e-repo-list"; fi)" ginkgo -v "$@" "${CSI_PROW_WORK}/e2e-local.test" -- -report-dir "${ARTIFACTS}" -report-prefix local
1024+
run_with_loggers env KUBECONFIG="$KUBECONFIG" KUBE_TEST_REPO_LIST="$(if [ -e "${CSI_PROW_WORK}/e2e-repo-list" ]; then echo "${CSI_PROW_WORK}/e2e-repo-list"; fi)" ginkgo --timeout="${CSI_PROW_GINKGO_TIMEOUT}" -v "$@" "${CSI_PROW_WORK}/e2e-local.test" -- -report-dir "${ARTIFACTS}" -report-prefix local
10221025
else
10231026
cd "${GOPATH}/src/${CSI_PROW_E2E_IMPORT_PATH}" &&
1024-
run_with_loggers env KUBECONFIG="$KUBECONFIG" KUBE_TEST_REPO_LIST="$(if [ -e "${CSI_PROW_WORK}/e2e-repo-list" ]; then echo "${CSI_PROW_WORK}/e2e-repo-list"; fi)" ginkgo -v "$@" "${CSI_PROW_WORK}/e2e.test" -- -report-dir "${ARTIFACTS}" -storage.testdriver="${CSI_PROW_WORK}/test-driver.yaml"
1027+
run_with_loggers env KUBECONFIG="$KUBECONFIG" KUBE_TEST_REPO_LIST="$(if [ -e "${CSI_PROW_WORK}/e2e-repo-list" ]; then echo "${CSI_PROW_WORK}/e2e-repo-list"; fi)" ginkgo --timeout="${CSI_PROW_GINKGO_TIMEOUT}" -v "$@" "${CSI_PROW_WORK}/e2e.test" -- -report-dir "${ARTIFACTS}" -storage.testdriver="${CSI_PROW_WORK}/test-driver.yaml"
10251028
fi
10261029
)
10271030
@@ -1310,7 +1313,7 @@ main () {
13101313
if tests_enabled "parallel"; then
13111314
# Ignore: Double quote to prevent globbing and word splitting.
13121315
# shellcheck disable=SC2086
1313-
if ! run_e2e parallel ${CSI_PROW_GINKO_PARALLEL} \
1316+
if ! run_e2e parallel ${CSI_PROW_GINKGO_PARALLEL} \
13141317
-focus="$focus" \
13151318
-skip="$(regex_join "${CSI_PROW_E2E_SERIAL}" "${CSI_PROW_E2E_ALPHA}" "${CSI_PROW_E2E_SKIP}")"; then
13161319
warn "E2E parallel failed"
@@ -1320,7 +1323,7 @@ main () {
13201323
# Run tests that are feature tagged, but non-alpha
13211324
# Ignore: Double quote to prevent globbing and word splitting.
13221325
# shellcheck disable=SC2086
1323-
if ! run_e2e parallel-features ${CSI_PROW_GINKO_PARALLEL} \
1326+
if ! run_e2e parallel-features ${CSI_PROW_GINKGO_PARALLEL} \
13241327
-focus="$focus.*($(regex_join "${CSI_PROW_E2E_FOCUS}"))" \
13251328
-skip="$(regex_join "${CSI_PROW_E2E_SERIAL}")"; then
13261329
warn "E2E parallel features failed"
@@ -1368,7 +1371,7 @@ main () {
13681371
if tests_enabled "parallel-alpha"; then
13691372
# Ignore: Double quote to prevent globbing and word splitting.
13701373
# shellcheck disable=SC2086
1371-
if ! run_e2e parallel-alpha ${CSI_PROW_GINKO_PARALLEL} \
1374+
if ! run_e2e parallel-alpha ${CSI_PROW_GINKGO_PARALLEL} \
13721375
-focus="$focus.*($(regex_join "${CSI_PROW_E2E_ALPHA}"))" \
13731376
-skip="$(regex_join "${CSI_PROW_E2E_SERIAL}" "${CSI_PROW_E2E_SKIP}")"; then
13741377
warn "E2E parallel alpha failed"

vendor/github.com/cespare/xxhash/v2/README.md

Lines changed: 17 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/cespare/xxhash/v2/testall.sh

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)