Skip to content

Commit a185527

Browse files
authored
Added copyrights and updated notice (#291)
1 parent 9bdf582 commit a185527

File tree

82 files changed

+1323
-5
lines changed

Some content is hidden

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

82 files changed

+1323
-5
lines changed

NOTICE

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8733,7 +8733,10 @@ Licensed under the MIT License
87338733
Copyright (c) 2016 Titus Wormer <[email protected]>
87348734
Grand Total
87358735

8736-
This project includes components from kube-batch, which is licensed under the Apache License, Version 2.0.
8736+
This project was originally forked from kube-batch in 2019, therefore it includes components from kube-batch which are licensed under the Apache License, Version 2.0.
87378737
Copyright (c) The Kubernetes Authors.
87388738
This project includes components derived from kube-batch, originally developed by The Kubernetes Authors.
87398739

8740+
pkg/common/k8s_utils/framework_handle.go file was forked from volcano-sh/volcano, which is licensed under the Apache License, Version 2.0.
8741+
Copyright 2020 The Volcano Authors.
8742+
This file was originally developed by the Volcano Authors.

cmd/scheduler/app/options/options.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
Copyright 2017 The Kubernetes Authors.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
117
// Copyright 2025 NVIDIA CORPORATION
218
// SPDX-License-Identifier: Apache-2.0
319

cmd/scheduler/app/options/options_test.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
Copyright 2019 The Kubernetes Authors.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
117
// Copyright 2025 NVIDIA CORPORATION
218
// SPDX-License-Identifier: Apache-2.0
319

cmd/scheduler/app/server.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
Copyright 2017 The Kubernetes Authors.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
117
// Copyright 2025 NVIDIA CORPORATION
218
// SPDX-License-Identifier: Apache-2.0
319

hack/boilerplate.go.kb.txt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
Copyright The Kubernetes Authors.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
/*
18+
Copyright 2025 NVIDIA CORPORATION
19+
SPDX-License-Identifier: Apache-2.0
20+
*/

hack/replace_headers.sh

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#!/usr/bin/env bash
2+
# Copyright 2025 NVIDIA CORPORATION
3+
# SPDX-License-Identifier: Apache-2.0
4+
set -e
5+
6+
if [ "$#" -lt 2 ]; then
7+
echo "Usage: $0 <header_template_file> <file1.go> [file2.go ...]"
8+
exit 1
9+
fi
10+
11+
header_file="$1"
12+
shift
13+
14+
if [ ! -f "$header_file" ]; then
15+
echo "Error: Header file '$header_file' not found."
16+
exit 1
17+
fi
18+
19+
header_content=$(cat "$header_file")
20+
21+
replace_header_in_file() {
22+
local file="$1"
23+
local tmp_file
24+
tmp_file=$(mktemp)
25+
26+
awk '
27+
BEGIN { removing=1 }
28+
removing && /DO NOT EDIT/ { removing=0 }
29+
!removing { print }
30+
' "$file" > "$tmp_file"
31+
32+
{
33+
echo "$header_content"
34+
cat "$tmp_file"
35+
} > "$file"
36+
37+
rm "$tmp_file"
38+
echo "Replaced header in: $file"
39+
}
40+
41+
for file in "$@"; do
42+
replace_header_in_file "$file"
43+
done

hack/update-client.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,15 @@ go mod vendor
1818
SDK_HACK_DIR="$(cd "$(dirname "$(readlink "$0" || echo "$0")")"; pwd)"
1919
source ${SDK_HACK_DIR}/../vendor/k8s.io/code-generator/kube_codegen.sh
2020
kube::codegen::gen_client \
21-
--boilerplate ${SDK_HACK_DIR}/boilerplate.go.txt --with-watch \
22-
--output-dir ${SDK_HACK_DIR}/../pkg/apis/client --output-pkg github.com/NVIDIA/KAI-scheduler/pkg/apis/client \
21+
--boilerplate ${SDK_HACK_DIR}/boilerplate.go.kb.txt \
22+
--with-watch \
23+
--output-dir ${SDK_HACK_DIR}/../pkg/apis/client \
24+
--output-pkg github.com/NVIDIA/KAI-scheduler/pkg/apis/client \
2325
${SDK_HACK_DIR}/../pkg/apis
2426

2527
rm -f generate-dep.go && rm -r vendor && go mod tidy
28+
29+
changed_files=$(git diff --name-only | grep v1alpha2)
30+
${SDK_HACK_DIR}/replace_headers.sh \
31+
${SDK_HACK_DIR}/boilerplate.go.txt \
32+
${changed_files}

pkg/apis/client/clientset/versioned/clientset.go

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

pkg/apis/client/clientset/versioned/fake/clientset_generated.go

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

pkg/apis/client/clientset/versioned/fake/doc.go

Lines changed: 16 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)