-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2938 from bobbypage/cri-proto
Add kubernetes/cri-api to cAdvisor
- Loading branch information
Showing
18 changed files
with
73,348 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Copyright 2021 Google Inc. All rights reserved. | ||
# | ||
# 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. | ||
|
||
# Presubmit script that ensures that https://github.com/kubernetes/cri-api | ||
# definitions that are copied into cAdvisor codebase exactly match the ones upstream. | ||
|
||
set -e | ||
|
||
function check_git_dirty() { | ||
if ! [ -z "$(git status --porcelain)" ]; then | ||
echo ">>> working tree is not clean" | ||
echo ">>> git status:" | ||
echo "$(git status)" | ||
exit 1 | ||
fi | ||
} | ||
|
||
GIT_ROOT=$(dirname "${BASH_SOURCE}")/.. | ||
|
||
check_git_dirty | ||
|
||
echo ">>> updating k8s CRI definitions..." | ||
"${GIT_ROOT}/build/update_cri_defs.sh" | ||
|
||
# If k8s CRI definitions were manually modified or don't match the ones | ||
# upstream, git tree will be unclean. | ||
echo ">>> checking git tree clean after updating k8s CRI definitions..." | ||
check_git_dirty |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Copyright 2021 Google Inc. All rights reserved. | ||
# | ||
# 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 -e | ||
|
||
CRI_VERSION="release-1.22" | ||
GIT_ROOT=$(dirname "${BASH_SOURCE}")/.. | ||
|
||
TMP_DIR="$(mktemp -d)" | ||
git clone --depth=1 https://github.com/kubernetes/cri-api.git --branch="${CRI_VERSION}" "${TMP_DIR}" | ||
|
||
# rewrite import paths | ||
find "${TMP_DIR}" -type f -name "*.go" -exec sed -i 's:k8s.io/cri-api:github.com/google/cadvisor/cri-api:g' {} + | ||
|
||
mkdir -p "${GIT_ROOT}/cri-api" | ||
cp -r "${TMP_DIR}/pkg" "${GIT_ROOT}/cri-api" | ||
rm -rf "${TMP_DIR}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# See the OWNERS docs at https://go.k8s.io/owners | ||
|
||
# Disable inheritance as this is owned by sig-node (should mirror same contents as pkg/kubelet/OWNERS) | ||
options: | ||
no_parent_owners: true | ||
|
||
approvers: | ||
- sig-node-approvers # see https://github.com/kubernetes/kubernetes/blob/master/OWNERS_ALIASES#LC220:~:text=sig%2Dnode%2Dapprovers | ||
|
||
reviewers: | ||
- sig-node-reviewers # see https://github.com/kubernetes/kubernetes/blob/master/OWNERS_ALIASES#LC220:~:text=sig%2Dnode%2Dreviewers | ||
|
||
labels: | ||
- area/kubelet | ||
- sig/node |
Oops, something went wrong.