mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 21:17:23 +00:00
document KUBE_ROOT in util.sh
This commit is contained in:
parent
7e96be30ca
commit
4aaa7b4da2
@ -171,6 +171,8 @@ kube::util::host_platform() {
|
|||||||
echo "$(kube::util::host_os)/$(kube::util::host_arch)"
|
echo "$(kube::util::host_os)/$(kube::util::host_arch)"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# looks for $1 in well-known output locations for the platform ($2)
|
||||||
|
# $KUBE_ROOT must be set
|
||||||
kube::util::find-binary-for-platform() {
|
kube::util::find-binary-for-platform() {
|
||||||
local -r lookfor="$1"
|
local -r lookfor="$1"
|
||||||
local -r platform="$2"
|
local -r platform="$2"
|
||||||
@ -194,6 +196,8 @@ kube::util::find-binary-for-platform() {
|
|||||||
echo -n "${bin}"
|
echo -n "${bin}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# looks for $1 in well-known output locations for the host platform
|
||||||
|
# $KUBE_ROOT must be set
|
||||||
kube::util::find-binary() {
|
kube::util::find-binary() {
|
||||||
kube::util::find-binary-for-platform "$1" "$(kube::util::host_platform)"
|
kube::util::find-binary-for-platform "$1" "$(kube::util::host_platform)"
|
||||||
}
|
}
|
||||||
@ -265,6 +269,8 @@ kube::util::remove-gen-docs() {
|
|||||||
# * Special handling for empty group: v1 -> api/v1, unversioned -> api/unversioned
|
# * Special handling for empty group: v1 -> api/v1, unversioned -> api/unversioned
|
||||||
# * Special handling for groups suffixed with ".k8s.io": foo.k8s.io/v1 -> apis/foo/v1
|
# * Special handling for groups suffixed with ".k8s.io": foo.k8s.io/v1 -> apis/foo/v1
|
||||||
# * Very special handling for when both group and version are "": / -> api
|
# * Very special handling for when both group and version are "": / -> api
|
||||||
|
#
|
||||||
|
# $KUBE_ROOT must be set.
|
||||||
kube::util::group-version-to-pkg-path() {
|
kube::util::group-version-to-pkg-path() {
|
||||||
local group_version="$1"
|
local group_version="$1"
|
||||||
|
|
||||||
@ -533,6 +539,7 @@ EOF
|
|||||||
|
|
||||||
# list_staging_repos outputs a sorted list of repos in staging/src/k8s.io
|
# list_staging_repos outputs a sorted list of repos in staging/src/k8s.io
|
||||||
# each entry will just be the $repo portion of staging/src/k8s.io/$repo/...
|
# each entry will just be the $repo portion of staging/src/k8s.io/$repo/...
|
||||||
|
# $KUBE_ROOT must be set.
|
||||||
function kube::util::list_staging_repos() {
|
function kube::util::list_staging_repos() {
|
||||||
(
|
(
|
||||||
cd "${KUBE_ROOT}/staging/src/k8s.io" && \
|
cd "${KUBE_ROOT}/staging/src/k8s.io" && \
|
||||||
|
Loading…
Reference in New Issue
Block a user