diff --git a/Makefile b/Makefile index 8af0f0f74180..52187f36b303 100644 --- a/Makefile +++ b/Makefile @@ -101,15 +101,15 @@ clientset: ## Generate a typed clientset cd ./vendor/k8s.io/code-generator/cmd && go install ./client-gen ./lister-gen ./informer-gen $$GOPATH/bin/client-gen --clientset-name clientset --input-base sigs.k8s.io/cluster-api/pkg/apis \ --input cluster/v1alpha1 --output-package sigs.k8s.io/cluster-api/pkg/client/clientset_generated \ - --go-header-file=./hack/boilerplate.go.txt + --go-header-file=./hack/boilerplate/boilerplate.generatego.txt $$GOPATH/bin/lister-gen --input-dirs sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1 \ --output-package sigs.k8s.io/cluster-api/pkg/client/listers_generated \ - --go-header-file=./hack/boilerplate.go.txt + --go-header-file=./hack/boilerplate/boilerplate.generatego.txt $$GOPATH/bin/informer-gen --input-dirs sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1 \ --versioned-clientset-package sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset \ --listers-package sigs.k8s.io/cluster-api/pkg/client/listers_generated \ --output-package sigs.k8s.io/cluster-api/pkg/client/informers_generated \ - --go-header-file=./hack/boilerplate.go.txt + --go-header-file=./hack/boilerplate/boilerplate.generatego.txt $(MAKE) gazelle .PHONY: clean @@ -162,6 +162,6 @@ docker-push-ci: docker-build-ci ## Build the docker image for ci .PHONY: verify verify: - ./hack/verify_boilerplate.py + ./hack/verify-boilerplate.sh ./hack/verify_clientset.sh ./hack/verify-bazel.sh diff --git a/cmd/clusterctl/clusterdeployer/bootstrap/kind/BUILD.bazel b/cmd/clusterctl/clusterdeployer/bootstrap/kind/BUILD.bazel index d38c05ba34b3..b85d865ac8a0 100644 --- a/cmd/clusterctl/clusterdeployer/bootstrap/kind/BUILD.bazel +++ b/cmd/clusterctl/clusterdeployer/bootstrap/kind/BUILD.bazel @@ -6,6 +6,7 @@ go_library( importpath = "sigs.k8s.io/cluster-api/cmd/clusterctl/clusterdeployer/bootstrap/kind", visibility = ["//visibility:public"], deps = [ + "//pkg/util:go_default_library", "//vendor/github.com/pkg/errors:go_default_library", "//vendor/k8s.io/klog:go_default_library", ], diff --git a/cmd/clusterctl/clusterdeployer/bootstrap/minikube/BUILD.bazel b/cmd/clusterctl/clusterdeployer/bootstrap/minikube/BUILD.bazel index 81a56cbfb9b4..dcc5bb0905ed 100644 --- a/cmd/clusterctl/clusterdeployer/bootstrap/minikube/BUILD.bazel +++ b/cmd/clusterctl/clusterdeployer/bootstrap/minikube/BUILD.bazel @@ -6,6 +6,7 @@ go_library( importpath = "sigs.k8s.io/cluster-api/cmd/clusterctl/clusterdeployer/bootstrap/minikube", visibility = ["//visibility:public"], deps = [ + "//pkg/util:go_default_library", "//vendor/github.com/pkg/errors:go_default_library", "//vendor/k8s.io/klog:go_default_library", ], diff --git a/hack/boilerplate/BUILD b/hack/boilerplate/BUILD new file mode 100644 index 000000000000..20e91a3060d3 --- /dev/null +++ b/hack/boilerplate/BUILD @@ -0,0 +1,31 @@ +package(default_visibility = ["//visibility:public"]) + +exports_files(glob(["*.txt"])) + +py_test( + name = "boilerplate_test", + srcs = [ + "boilerplate.py", + "boilerplate_test.py", + ], + data = glob([ + "*.txt", + "test/*", + ]), +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [ + ":package-srcs", + "//hack/boilerplate/test:all-srcs", + ], + tags = ["automanaged"], +) diff --git a/hack/boilerplate/boilerplate.Dockerfile.txt b/hack/boilerplate/boilerplate.Dockerfile.txt index 34cb349c40cc..384f325abf32 100644 --- a/hack/boilerplate/boilerplate.Dockerfile.txt +++ b/hack/boilerplate/boilerplate.Dockerfile.txt @@ -11,3 +11,4 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + diff --git a/hack/boilerplate/boilerplate.Makefile.txt b/hack/boilerplate/boilerplate.Makefile.txt index 34cb349c40cc..384f325abf32 100644 --- a/hack/boilerplate/boilerplate.Makefile.txt +++ b/hack/boilerplate/boilerplate.Makefile.txt @@ -11,3 +11,4 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + diff --git a/hack/boilerplate/boilerplate.bzl.txt b/hack/boilerplate/boilerplate.bzl.txt index 34cb349c40cc..384f325abf32 100644 --- a/hack/boilerplate/boilerplate.bzl.txt +++ b/hack/boilerplate/boilerplate.bzl.txt @@ -11,3 +11,4 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + diff --git a/hack/boilerplate/boilerplate.generatebzl.txt b/hack/boilerplate/boilerplate.generatebzl.txt new file mode 100644 index 000000000000..069e282bc855 --- /dev/null +++ b/hack/boilerplate/boilerplate.generatebzl.txt @@ -0,0 +1,14 @@ +# Copyright The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/hack/boilerplate.go.txt b/hack/boilerplate/boilerplate.generatego.txt similarity index 93% rename from hack/boilerplate.go.txt rename to hack/boilerplate/boilerplate.generatego.txt index 8a0dbd55013c..b7c650da4701 100644 --- a/hack/boilerplate.go.txt +++ b/hack/boilerplate/boilerplate.generatego.txt @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -13,3 +13,4 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ + diff --git a/hack/boilerplate/boilerplate.py b/hack/boilerplate/boilerplate.py new file mode 100755 index 000000000000..cabbaa71e880 --- /dev/null +++ b/hack/boilerplate/boilerplate.py @@ -0,0 +1,226 @@ +#!/usr/bin/env python + +# Copyright 2015 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from __future__ import print_function + +import argparse +import datetime +import difflib +import glob +import os +import re +import sys + +parser = argparse.ArgumentParser() +parser.add_argument( + "filenames", + help="list of files to check, all files if unspecified", + nargs='*') + +rootdir = os.path.dirname(__file__) + "/../../" +rootdir = os.path.abspath(rootdir) +parser.add_argument( + "--rootdir", default=rootdir, help="root directory to examine") + +default_boilerplate_dir = os.path.join(rootdir, "hack/boilerplate") +parser.add_argument( + "--boilerplate-dir", default=default_boilerplate_dir) + +parser.add_argument( + "-v", "--verbose", + help="give verbose output regarding why a file does not pass", + action="store_true") + +args = parser.parse_args() + +verbose_out = sys.stderr if args.verbose else open("/dev/null", "w") + +def get_refs(): + refs = {} + + for path in glob.glob(os.path.join(args.boilerplate_dir, "boilerplate.*.txt")): + extension = os.path.basename(path).split(".")[1] + + ref_file = open(path, 'r') + ref = ref_file.read().splitlines() + ref_file.close() + refs[extension] = ref + + return refs + +def is_generated_file(filename, data, regexs): + for d in skipped_ungenerated_files: + if d in filename: + return False + + p = regexs["generated"] + return p.search(data) + +def file_passes(filename, refs, regexs): + try: + f = open(filename, 'r') + except Exception as exc: + print("Unable to open %s: %s" % (filename, exc), file=verbose_out) + return False + + data = f.read() + f.close() + + # determine if the file is automatically generated + generated = is_generated_file(filename, data, regexs) + + basename = os.path.basename(filename) + extension = file_extension(filename) + if generated: + if extension == "go": + extension = "generatego" + elif extension == "bzl": + extension = "generatebzl" + + if extension != "": + ref = refs[extension] + else: + ref = refs[basename] + + # remove extra content from the top of files + if extension == "go" or extension == "generatego": + p = regexs["go_build_constraints"] + (data, found) = p.subn("", data, 1) + elif extension == "sh": + p = regexs["shebang"] + (data, found) = p.subn("", data, 1) + + data = data.splitlines() + + # if our test file is smaller than the reference it surely fails! + if len(ref) > len(data): + print('File %s smaller than reference (%d < %d)' % + (filename, len(data), len(ref)), + file=verbose_out) + return False + + # trim our file to the same number of lines as the reference file + data = data[:len(ref)] + + p = regexs["year"] + for d in data: + if p.search(d): + if generated: + print('File %s has the YEAR field, but it should not be in generated file' % filename, file=verbose_out) + else: + print('File %s has the YEAR field, but missing the year of date' % filename, file=verbose_out) + return False + + if not generated: + # Replace all occurrences of the regex "2014|2015|2016|2017|2018" with "YEAR" + p = regexs["date"] + for i, d in enumerate(data): + (data[i], found) = p.subn('YEAR', d) + if found != 0: + break + + # if we don't match the reference at this point, fail + if ref != data: + print("Header in %s does not match reference, diff:" % filename, file=verbose_out) + if args.verbose: + print(file=verbose_out) + for line in difflib.unified_diff(ref, data, 'reference', filename, lineterm=''): + print(line, file=verbose_out) + print(file=verbose_out) + return False + + return True + +def file_extension(filename): + return os.path.splitext(filename)[1].split(".")[-1].lower() + +skipped_dirs = ['Godeps', 'third_party', '_gopath', '_output', '.git', 'cluster/env.sh', + "vendor", "test/e2e/generated/bindata.go", "hack/boilerplate/test", + "pkg/kubectl/generated/bindata.go"] + +# list all the files contain 'DO NOT EDIT', but are not generated +skipped_ungenerated_files = ['hack/lib/swagger.sh', 'hack/boilerplate/boilerplate.py'] + +def normalize_files(files): + newfiles = [] + for pathname in files: + if any(x in pathname for x in skipped_dirs): + continue + newfiles.append(pathname) + for i, pathname in enumerate(newfiles): + if not os.path.isabs(pathname): + newfiles[i] = os.path.join(args.rootdir, pathname) + return newfiles + +def get_files(extensions): + files = [] + if len(args.filenames) > 0: + files = args.filenames + else: + for root, dirs, walkfiles in os.walk(args.rootdir): + # don't visit certain dirs. This is just a performance improvement + # as we would prune these later in normalize_files(). But doing it + # cuts down the amount of filesystem walking we do and cuts down + # the size of the file list + for d in skipped_dirs: + if d in dirs: + dirs.remove(d) + + for name in walkfiles: + pathname = os.path.join(root, name) + files.append(pathname) + + files = normalize_files(files) + outfiles = [] + for pathname in files: + basename = os.path.basename(pathname) + extension = file_extension(pathname) + if extension in extensions or basename in extensions: + outfiles.append(pathname) + return outfiles + +def get_dates(): + years = datetime.datetime.now().year + return '(%s)' % '|'.join((str(year) for year in range(2014, years+1))) + +def get_regexs(): + regexs = {} + # Search for "YEAR" which exists in the boilerplate, but shouldn't in the real thing + regexs["year"] = re.compile( 'YEAR' ) + # get_dates return 2014, 2015, 2016, 2017, or 2018 until the current year as a regex like: "(2014|2015|2016|2017|2018)"; + # company holder names can be anything + regexs["date"] = re.compile(get_dates()) + # strip // +build \n\n build constraints + regexs["go_build_constraints"] = re.compile(r"^(// \+build.*\n)+\n", re.MULTILINE) + # strip #!.* from shell scripts + regexs["shebang"] = re.compile(r"^(#!.*\n)\n*", re.MULTILINE) + # Search for generated files + regexs["generated"] = re.compile( 'DO NOT EDIT' ) + return regexs + +def main(): + regexs = get_regexs() + refs = get_refs() + filenames = get_files(refs.keys()) + + for filename in filenames: + if not file_passes(filename, refs, regexs): + print(filename, file=sys.stdout) + + return 0 + +if __name__ == "__main__": + sys.exit(main()) diff --git a/hack/boilerplate/boilerplate.py.txt b/hack/boilerplate/boilerplate.py.txt index 34cb349c40cc..a2e72e5988e7 100644 --- a/hack/boilerplate/boilerplate.py.txt +++ b/hack/boilerplate/boilerplate.py.txt @@ -1,3 +1,5 @@ +#!/usr/bin/env python + # Copyright YEAR The Kubernetes Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -11,3 +13,4 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + diff --git a/hack/boilerplate/boilerplate.sh.txt b/hack/boilerplate/boilerplate.sh.txt index 34cb349c40cc..384f325abf32 100644 --- a/hack/boilerplate/boilerplate.sh.txt +++ b/hack/boilerplate/boilerplate.sh.txt @@ -11,3 +11,4 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + diff --git a/hack/boilerplate/boilerplate_test.py b/hack/boilerplate/boilerplate_test.py new file mode 100644 index 000000000000..b8d5b8e9e0f4 --- /dev/null +++ b/hack/boilerplate/boilerplate_test.py @@ -0,0 +1,52 @@ +#!/usr/bin/env python + +# Copyright 2016 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import boilerplate +import unittest +import StringIO +import os +import sys + +class TestBoilerplate(unittest.TestCase): + """ + Note: run this test from the hack/boilerplate directory. + + $ python -m unittest boilerplate_test + """ + + def test_boilerplate(self): + os.chdir("test/") + + class Args(object): + def __init__(self): + self.filenames = [] + self.rootdir = "." + self.boilerplate_dir = "../" + self.verbose = True + + # capture stdout + old_stdout = sys.stdout + sys.stdout = StringIO.StringIO() + + boilerplate.args = Args() + ret = boilerplate.main() + + output = sorted(sys.stdout.getvalue().split()) + + sys.stdout = old_stdout + + self.assertEquals( + output, ['././fail.go', '././fail.py']) diff --git a/hack/boilerplate/test/BUILD b/hack/boilerplate/test/BUILD new file mode 100644 index 000000000000..3d2a1dd5098d --- /dev/null +++ b/hack/boilerplate/test/BUILD @@ -0,0 +1,28 @@ +package(default_visibility = ["//visibility:public"]) + +load( + "@io_bazel_rules_go//go:def.bzl", + "go_library", +) + +go_library( + name = "go_default_library", + srcs = [ + "fail.go", + "pass.go", + ], + importpath = "sigs.k8s.io/cluster-api/hack/boilerplate/test", +) + +filegroup( + name = "package-srcs", + srcs = glob(["**"]), + tags = ["automanaged"], + visibility = ["//visibility:private"], +) + +filegroup( + name = "all-srcs", + srcs = [":package-srcs"], + tags = ["automanaged"], +) diff --git a/hack/boilerplate/test/fail.go b/hack/boilerplate/test/fail.go new file mode 100644 index 000000000000..16159c5ac0d9 --- /dev/null +++ b/hack/boilerplate/test/fail.go @@ -0,0 +1,19 @@ +/* +Copyright 2014 The Kubernetes Authors. + +fail + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package test diff --git a/hack/boilerplate/test/fail.py b/hack/boilerplate/test/fail.py new file mode 100644 index 000000000000..cbdd06ff8a1a --- /dev/null +++ b/hack/boilerplate/test/fail.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python + +# Copyright 2015 The Kubernetes Authors. +# +# failed +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/hack/boilerplate/test/pass.go b/hack/boilerplate/test/pass.go new file mode 100644 index 000000000000..7508448aae69 --- /dev/null +++ b/hack/boilerplate/test/pass.go @@ -0,0 +1,17 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package test diff --git a/hack/boilerplate/test/pass.py b/hack/boilerplate/test/pass.py new file mode 100644 index 000000000000..5b7ce29a25c2 --- /dev/null +++ b/hack/boilerplate/test/pass.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python + +# Copyright 2015 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +True diff --git a/hack/verify-boilerplate.sh b/hack/verify-boilerplate.sh new file mode 100755 index 000000000000..19283371ce67 --- /dev/null +++ b/hack/verify-boilerplate.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash + +# Copyright 2014 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -o errexit +set -o nounset +set -o pipefail + +KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. + +boilerDir="${KUBE_ROOT}/hack/boilerplate" +boiler="${boilerDir}/boilerplate.py" + +files_need_boilerplate=() +while IFS=$'\n' read -r line; do + files_need_boilerplate+=( "$line" ) +done < <("${boiler}" "$@") + +# Run boilerplate check +if [[ ${#files_need_boilerplate[@]} -gt 0 ]]; then + for file in "${files_need_boilerplate[@]}"; do + echo "Boilerplate header is wrong for: ${file}" >&2 + done + + exit 1 +fi diff --git a/hack/verify_boilerplate.py b/hack/verify_boilerplate.py deleted file mode 100755 index 22490fa89c69..000000000000 --- a/hack/verify_boilerplate.py +++ /dev/null @@ -1,187 +0,0 @@ -#!/usr/bin/env python - -# Copyright 2015 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Verifies that all source files contain the necessary copyright boilerplate -# snippet. - -from __future__ import print_function - -import argparse -import glob -import os -import re -import sys - -def get_args(): - parser = argparse.ArgumentParser() - parser.add_argument( - "filenames", help="list of files to check, all files if unspecified", nargs='*') - - rootdir = os.path.dirname(__file__) + "/../" - rootdir = os.path.abspath(rootdir) - parser.add_argument("--rootdir", default=rootdir, help="root directory to examine") - - default_boilerplate_dir = os.path.join(rootdir, "hack/boilerplate") - parser.add_argument("--boilerplate-dir", default=default_boilerplate_dir) - return parser.parse_args() - - -def get_refs(): - refs = {} - - for path in glob.glob(os.path.join(ARGS.boilerplate_dir, "boilerplate.*.txt")): - extension = os.path.basename(path).split(".")[1] - - ref_file = open(path, 'r') - ref = ref_file.read().splitlines() - ref_file.close() - refs[extension] = ref - - return refs - - -def file_passes(filename, refs, regexs): # pylint: disable=too-many-locals - try: - with open(filename, 'r') as fp: - data = fp.read() - except IOError: - return False - - basename = os.path.basename(filename) - extension = file_extension(filename) - if extension != "": - ref = refs[extension] - else: - ref = refs[basename] - - # remove build tags from the top of Go files - if extension == "go": - con = regexs["go_build_constraints"] - (data, found) = con.subn("", data, 1) - - # remove shebang from the top of shell files - if extension == "sh" or extension == "py": - she = regexs["shebang"] - (data, found) = she.subn("", data, 1) - - data = data.splitlines() - - # if our test file is smaller than the reference it surely fails! - if len(ref) > len(data): - return False - - # trim our file to the same number of lines as the reference file - data = data[:len(ref)] - - year = regexs["year"] - for datum in data: - if year.search(datum): - return False - - # Replace all occurrences of the regex "2017|2016|2015|2014" with "YEAR" - when = regexs["date"] - for idx, datum in enumerate(data): - (data[idx], found) = when.subn('YEAR', datum) - if found != 0: - break - - # if we don't match the reference at this point, fail - if ref != data: - return False - - return True - -def file_extension(filename): - return os.path.splitext(filename)[1].split(".")[-1].lower() - -SKIPPED_DIRS = [ - 'Godeps', 'third_party', '_gopath', '_output', - '.git', 'vendor', '__init__.py', 'node_modules' -] - -def normalize_files(files): - newfiles = [] - for pathname in files: - if any(x in pathname for x in SKIPPED_DIRS): - continue - newfiles.append(pathname) - for idx, pathname in enumerate(newfiles): - if not os.path.isabs(pathname): - newfiles[idx] = os.path.join(ARGS.rootdir, pathname) - return newfiles - - -def get_files(extensions): - files = [] - if ARGS.filenames: - files = ARGS.filenames - else: - for root, dirs, walkfiles in os.walk(ARGS.rootdir): - # don't visit certain dirs. This is just a performance improvement - # as we would prune these later in normalize_files(). But doing it - # cuts down the amount of filesystem walking we do and cuts down - # the size of the file list - for dpath in SKIPPED_DIRS: - if dpath in dirs: - dirs.remove(dpath) - - for name in walkfiles: - pathname = os.path.join(root, name) - files.append(pathname) - - files = normalize_files(files) - outfiles = [] - for pathname in files: - basename = os.path.basename(pathname) - extension = file_extension(pathname) - if extension in extensions or basename in extensions: - outfiles.append(pathname) - return outfiles - - -def get_regexs(): - regexs = {} - # Search for "YEAR" which exists in the boilerplate, but shouldn't in the real thing - regexs["year"] = re.compile('YEAR') - # dates can be 2014, 2015, 2016, 2017 or 2018, company holder names can be anything - regexs["date"] = re.compile('(2014|2015|2016|2017|2018|2019)') - # strip // +build \n\n build constraints - regexs["go_build_constraints"] = re.compile(r"^(// \+build.*\n)+\n", re.MULTILINE) - # strip #!.* from shell/python scripts - regexs["shebang"] = re.compile(r"^(#!.*\n)\n*", re.MULTILINE) - return regexs - - -def main(): - regexs = get_regexs() - refs = get_refs() - filenames = get_files(refs.keys()) - nonconforming_files = [] - for filename in filenames: - if not file_passes(filename, refs, regexs): - nonconforming_files.append(filename) - - if nonconforming_files: - print('%d files have incorrect boilerplate headers:' % - len(nonconforming_files)) - for filename in sorted(nonconforming_files): - print(os.path.relpath(filename, ARGS.rootdir)) - sys.exit(1) - - -if __name__ == "__main__": - ARGS = get_args() - main() diff --git a/pkg/apis/apis.go b/pkg/apis/apis.go index cc8034a1cdc4..b8b48e9c8b01 100644 --- a/pkg/apis/apis.go +++ b/pkg/apis/apis.go @@ -15,7 +15,7 @@ limitations under the License. */ // Generate deepcopy for apis -//go:generate go run ../../vendor/k8s.io/code-generator/cmd/deepcopy-gen/main.go -O zz_generated.deepcopy -i ./... -h ../../hack/boilerplate.go.txt +//go:generate go run ../../vendor/k8s.io/code-generator/cmd/deepcopy-gen/main.go -O zz_generated.deepcopy -i ./... -h ../../hack/boilerplate/boilerplate.generatego.txt // Package apis contains Kubernetes API groups. package apis diff --git a/pkg/apis/cluster/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/cluster/v1alpha1/zz_generated.deepcopy.go index 643a51be65c5..0f670f073844 100644 --- a/pkg/apis/cluster/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/cluster/v1alpha1/zz_generated.deepcopy.go @@ -1,7 +1,7 @@ // +build !ignore_autogenerated /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/clientset/clientset.go b/pkg/client/clientset_generated/clientset/clientset.go index 1d5483d3f61e..4c43c131a135 100644 --- a/pkg/client/clientset_generated/clientset/clientset.go +++ b/pkg/client/clientset_generated/clientset/clientset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/clientset/doc.go b/pkg/client/clientset_generated/clientset/doc.go index 3421911a75a9..ee865e56d1dd 100644 --- a/pkg/client/clientset_generated/clientset/doc.go +++ b/pkg/client/clientset_generated/clientset/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/clientset/fake/clientset_generated.go b/pkg/client/clientset_generated/clientset/fake/clientset_generated.go index 5d9e34e78eca..4c8feaedae66 100644 --- a/pkg/client/clientset_generated/clientset/fake/clientset_generated.go +++ b/pkg/client/clientset_generated/clientset/fake/clientset_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/clientset/fake/doc.go b/pkg/client/clientset_generated/clientset/fake/doc.go index 0bc260bcaa22..9b99e7167091 100644 --- a/pkg/client/clientset_generated/clientset/fake/doc.go +++ b/pkg/client/clientset_generated/clientset/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/clientset/fake/register.go b/pkg/client/clientset_generated/clientset/fake/register.go index 47efc4e89a3d..76b5cf7a8f66 100644 --- a/pkg/client/clientset_generated/clientset/fake/register.go +++ b/pkg/client/clientset_generated/clientset/fake/register.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/clientset/scheme/doc.go b/pkg/client/clientset_generated/clientset/scheme/doc.go index 5c5c8debb6b4..7dc3756168fa 100644 --- a/pkg/client/clientset_generated/clientset/scheme/doc.go +++ b/pkg/client/clientset_generated/clientset/scheme/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/clientset/scheme/register.go b/pkg/client/clientset_generated/clientset/scheme/register.go index ecb609f771ae..f9b985262cc0 100644 --- a/pkg/client/clientset_generated/clientset/scheme/register.go +++ b/pkg/client/clientset_generated/clientset/scheme/register.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/cluster.go b/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/cluster.go index 38d7c5ff56f9..b5f95edc18e6 100644 --- a/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/cluster.go +++ b/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/cluster.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/cluster_client.go b/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/cluster_client.go index 85c29d2fb7a7..fe439fda99de 100644 --- a/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/cluster_client.go +++ b/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/cluster_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/doc.go b/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/doc.go index 69ca30111b4c..df51baa4d4c1 100644 --- a/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/doc.go +++ b/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/doc.go b/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/doc.go index 87a1873edccb..16f44399065e 100644 --- a/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/doc.go +++ b/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/doc.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/fake_cluster.go b/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/fake_cluster.go index 812852007694..1d9430a0c073 100644 --- a/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/fake_cluster.go +++ b/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/fake_cluster.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/fake_cluster_client.go b/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/fake_cluster_client.go index 9e08c5d5b4ab..bcef2b1542f8 100644 --- a/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/fake_cluster_client.go +++ b/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/fake_cluster_client.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/fake_machine.go b/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/fake_machine.go index c52911033055..a4629ed60f39 100644 --- a/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/fake_machine.go +++ b/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/fake_machine.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/fake_machineclass.go b/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/fake_machineclass.go index f1a942f78634..c6bbc3c5e481 100644 --- a/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/fake_machineclass.go +++ b/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/fake_machineclass.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/fake_machinedeployment.go b/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/fake_machinedeployment.go index d3349fe42ccd..6d0d271029d4 100644 --- a/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/fake_machinedeployment.go +++ b/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/fake_machinedeployment.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/fake_machineset.go b/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/fake_machineset.go index 620421ff93c1..29b7dc9e63a8 100644 --- a/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/fake_machineset.go +++ b/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake/fake_machineset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/generated_expansion.go b/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/generated_expansion.go index 2bb55c714f03..fe1acdd0d8c0 100644 --- a/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/generated_expansion.go +++ b/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/generated_expansion.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/machine.go b/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/machine.go index 12fbc0af329a..5b479833c659 100644 --- a/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/machine.go +++ b/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/machine.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/machineclass.go b/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/machineclass.go index 7ba1432ce3e9..d1cca051786e 100644 --- a/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/machineclass.go +++ b/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/machineclass.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/machinedeployment.go b/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/machinedeployment.go index 484eec240cc6..7fd953042cd6 100644 --- a/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/machinedeployment.go +++ b/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/machinedeployment.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/machineset.go b/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/machineset.go index 7c7965aa5077..1b6d1f192654 100644 --- a/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/machineset.go +++ b/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/machineset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/informers_generated/externalversions/cluster/interface.go b/pkg/client/informers_generated/externalversions/cluster/interface.go index 945aef05d6d1..fe64976bcb4f 100644 --- a/pkg/client/informers_generated/externalversions/cluster/interface.go +++ b/pkg/client/informers_generated/externalversions/cluster/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/informers_generated/externalversions/cluster/v1alpha1/cluster.go b/pkg/client/informers_generated/externalversions/cluster/v1alpha1/cluster.go index e5c750411c0a..69378ad45cf9 100644 --- a/pkg/client/informers_generated/externalversions/cluster/v1alpha1/cluster.go +++ b/pkg/client/informers_generated/externalversions/cluster/v1alpha1/cluster.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/informers_generated/externalversions/cluster/v1alpha1/interface.go b/pkg/client/informers_generated/externalversions/cluster/v1alpha1/interface.go index 40562f0dfb23..c1d72eb2d356 100644 --- a/pkg/client/informers_generated/externalversions/cluster/v1alpha1/interface.go +++ b/pkg/client/informers_generated/externalversions/cluster/v1alpha1/interface.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/informers_generated/externalversions/cluster/v1alpha1/machine.go b/pkg/client/informers_generated/externalversions/cluster/v1alpha1/machine.go index c0be887be8b8..d3ba8d0a4b7e 100644 --- a/pkg/client/informers_generated/externalversions/cluster/v1alpha1/machine.go +++ b/pkg/client/informers_generated/externalversions/cluster/v1alpha1/machine.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/informers_generated/externalversions/cluster/v1alpha1/machineclass.go b/pkg/client/informers_generated/externalversions/cluster/v1alpha1/machineclass.go index d224d5516f7c..bcd3c4480ccd 100644 --- a/pkg/client/informers_generated/externalversions/cluster/v1alpha1/machineclass.go +++ b/pkg/client/informers_generated/externalversions/cluster/v1alpha1/machineclass.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/informers_generated/externalversions/cluster/v1alpha1/machinedeployment.go b/pkg/client/informers_generated/externalversions/cluster/v1alpha1/machinedeployment.go index 5c574e7cdecc..c32da260e342 100644 --- a/pkg/client/informers_generated/externalversions/cluster/v1alpha1/machinedeployment.go +++ b/pkg/client/informers_generated/externalversions/cluster/v1alpha1/machinedeployment.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/informers_generated/externalversions/cluster/v1alpha1/machineset.go b/pkg/client/informers_generated/externalversions/cluster/v1alpha1/machineset.go index b24fc14a5fdf..31b05122bcda 100644 --- a/pkg/client/informers_generated/externalversions/cluster/v1alpha1/machineset.go +++ b/pkg/client/informers_generated/externalversions/cluster/v1alpha1/machineset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/informers_generated/externalversions/factory.go b/pkg/client/informers_generated/externalversions/factory.go index 29dfc9a45c89..fa18f49b89b1 100644 --- a/pkg/client/informers_generated/externalversions/factory.go +++ b/pkg/client/informers_generated/externalversions/factory.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/informers_generated/externalversions/generic.go b/pkg/client/informers_generated/externalversions/generic.go index a51e0ed76bdc..ce442847042f 100644 --- a/pkg/client/informers_generated/externalversions/generic.go +++ b/pkg/client/informers_generated/externalversions/generic.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/informers_generated/externalversions/internalinterfaces/factory_interfaces.go b/pkg/client/informers_generated/externalversions/internalinterfaces/factory_interfaces.go index b89e571e993e..92c2887f6927 100644 --- a/pkg/client/informers_generated/externalversions/internalinterfaces/factory_interfaces.go +++ b/pkg/client/informers_generated/externalversions/internalinterfaces/factory_interfaces.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/listers_generated/cluster/v1alpha1/cluster.go b/pkg/client/listers_generated/cluster/v1alpha1/cluster.go index e7d199083b9d..1ed56f8f7ca7 100644 --- a/pkg/client/listers_generated/cluster/v1alpha1/cluster.go +++ b/pkg/client/listers_generated/cluster/v1alpha1/cluster.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/listers_generated/cluster/v1alpha1/expansion_generated.go b/pkg/client/listers_generated/cluster/v1alpha1/expansion_generated.go index 8daf52835ef8..37f03c9c2d58 100644 --- a/pkg/client/listers_generated/cluster/v1alpha1/expansion_generated.go +++ b/pkg/client/listers_generated/cluster/v1alpha1/expansion_generated.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/listers_generated/cluster/v1alpha1/machine.go b/pkg/client/listers_generated/cluster/v1alpha1/machine.go index 408a2a9837cb..4a947d1b043c 100644 --- a/pkg/client/listers_generated/cluster/v1alpha1/machine.go +++ b/pkg/client/listers_generated/cluster/v1alpha1/machine.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/listers_generated/cluster/v1alpha1/machineclass.go b/pkg/client/listers_generated/cluster/v1alpha1/machineclass.go index 61dde88f2168..5e7bd68e52b5 100644 --- a/pkg/client/listers_generated/cluster/v1alpha1/machineclass.go +++ b/pkg/client/listers_generated/cluster/v1alpha1/machineclass.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/listers_generated/cluster/v1alpha1/machinedeployment.go b/pkg/client/listers_generated/cluster/v1alpha1/machinedeployment.go index 265e4358e772..a51fb3b60b86 100644 --- a/pkg/client/listers_generated/cluster/v1alpha1/machinedeployment.go +++ b/pkg/client/listers_generated/cluster/v1alpha1/machinedeployment.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/pkg/client/listers_generated/cluster/v1alpha1/machineset.go b/pkg/client/listers_generated/cluster/v1alpha1/machineset.go index da73376fa2c5..783ad250d3cf 100644 --- a/pkg/client/listers_generated/cluster/v1alpha1/machineset.go +++ b/pkg/client/listers_generated/cluster/v1alpha1/machineset.go @@ -1,5 +1,5 @@ /* -Copyright 2018 The Kubernetes Authors. +Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.