This repository has been archived by the owner on Feb 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change permission for product_serial (#162)
* change permission for product_serial - copy to kube-apiserver pre-start - needed to address race condition where product_serial can't be read - moved the cloud-provider permissions checks out to their own common package [#154366287]
- Loading branch information
Showing
9 changed files
with
38 additions
and
33 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
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 |
---|---|---|
|
@@ -10,6 +10,7 @@ templates: | |
packages: | ||
- pid_utils | ||
- kubernetes | ||
- kubo-common | ||
|
||
properties: | ||
api-token: | ||
|
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 |
---|---|---|
|
@@ -13,6 +13,7 @@ templates: | |
config/ca.pem.erb: config/ca.pem | ||
|
||
packages: | ||
- kubo-common | ||
- pid_utils | ||
- kubernetes | ||
- cni | ||
|
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,3 @@ | ||
set -e -x | ||
|
||
cp -a kubo-common/* ${BOSH_INSTALL_TARGET} |
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,4 @@ | ||
--- | ||
name: kubo-common | ||
files: | ||
- kubo-common/utils.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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash -exu | ||
|
||
detect_cloud_config() { | ||
if [ -e /var/vcap/jobs/cloud-provider/bin/cloud-provider_utils ]; then | ||
source /var/vcap/jobs/cloud-provider/bin/cloud-provider_utils | ||
set_cloud_provider | ||
cloud_config="/var/vcap/jobs/cloud-provider/config/cloud-provider.ini" | ||
else | ||
cloud_config="" | ||
cloud_provider="" | ||
fi | ||
} | ||
|
||
check_and_chmod_product_serial() { | ||
local cloud_provider=$1 | ||
if [ "$cloud_provider" != "" ] && [ -f /sys/class/dmi/id/product_serial ]; then | ||
chmod a+r /sys/class/dmi/id/product_serial | ||
fi | ||
} |