-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
- Loading branch information
1 parent
e768903
commit a2be29b
Showing
8 changed files
with
45 additions
and
25 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
#!/bin/bash | ||
|
||
# Copyright (C) 2024 Intel Corporation | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
sudo apt install jq | ||
sudo mkdir -p /etc/containers/oci/hooks.d/ | ||
sudo cp plugin/etc/containers/oci/hooks.d/* /etc/containers/oci/hooks.d/ | ||
sudo cp plugin/usr/local/sbin/* /usr/local/sbin/ | ||
sudo cp plugin/usr/local/sbin/* /usr/local/sbin/ |
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
5 changes: 4 additions & 1 deletion
5
kubernetes-addons/memory-bandwidth-exporter/config/prometheus/prometheus.yml
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 |
---|---|---|
@@ -1,7 +1,10 @@ | ||
# Copyright (C) 2024 Intel Corporation | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
global: | ||
scrape_interval: 15s | ||
|
||
scrape_configs: | ||
- job_name: memory-bandwidth-exporter | ||
static_configs: | ||
- targets: ['localhost:9100'] | ||
- targets: ['localhost:9100'] |
16 changes: 8 additions & 8 deletions
16
...es-addons/memory-bandwidth-exporter/plugin/etc/containers/oci/hooks.d/create-runtime.json
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
{ | ||
"version": "1.0.0", | ||
"hook": { | ||
"path": "/usr/local/sbin/create-runtime.sh" | ||
}, | ||
"when": { | ||
"always": true | ||
}, | ||
"stages": ["createRuntime"] | ||
"version": "1.0.0", | ||
"hook": { | ||
"path": "/usr/local/sbin/create-runtime.sh" | ||
}, | ||
"when": { | ||
"always": true | ||
}, | ||
"stages": ["createRuntime"] | ||
} |
18 changes: 9 additions & 9 deletions
18
kubernetes-addons/memory-bandwidth-exporter/plugin/etc/containers/oci/hooks.d/post-stop.json
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
{ | ||
"version": "1.0.0", | ||
"hook": { | ||
"path": "/usr/local/sbin/post-stop.sh" | ||
}, | ||
"when": { | ||
"always": true | ||
}, | ||
"stages": ["poststop"] | ||
} | ||
"version": "1.0.0", | ||
"hook": { | ||
"path": "/usr/local/sbin/post-stop.sh" | ||
}, | ||
"when": { | ||
"always": true | ||
}, | ||
"stages": ["poststop"] | ||
} |
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
5 changes: 4 additions & 1 deletion
5
kubernetes-addons/memory-bandwidth-exporter/plugin/usr/local/sbin/post-stop.sh
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 |
---|---|---|
@@ -1,7 +1,10 @@ | ||
#!/bin/bash | ||
|
||
# Copyright (C) 2024 Intel Corporation | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
container_state=$(cat) | ||
container_id=$(echo "$container_state" | jq -r '.id') | ||
mon_group_dir="/sys/fs/resctrl/mon_groups/container-$container_id" | ||
echo "DELETE Container: $container_id" >> /var/log/container_pids.log | ||
sudo rmdir $mon_group_dir | ||
sudo rmdir $mon_group_dir |