mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 18:53:35 +00:00
vendor update for CSI 0.3.0
This commit is contained in:
15
vendor/k8s.io/kubernetes/cluster/gce/config-common.sh
generated
vendored
15
vendor/k8s.io/kubernetes/cluster/gce/config-common.sh
generated
vendored
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright 2016 The Kubernetes Authors.
|
||||
#
|
||||
@ -98,6 +98,19 @@ function get-cluster-ip-range {
|
||||
echo "${suggested_range}"
|
||||
}
|
||||
|
||||
# Calculate ip alias range based on max number of pods.
|
||||
# Let pow be the smallest integer which is bigger or equal to log2($1 * 2).
|
||||
# (32 - pow) will be returned.
|
||||
#
|
||||
# $1: The number of max pods limitation.
|
||||
function get-alias-range-size() {
|
||||
for pow in {0..31}; do
|
||||
if (( 1 << $pow >= $1 * 2 )); then
|
||||
echo $((32 - pow))
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
}
|
||||
# NOTE: Avoid giving nodes empty scopes, because kubelet needs a service account
|
||||
# in order to initialize properly.
|
||||
NODE_SCOPES="${NODE_SCOPES:-monitoring,logging-write,storage-ro}"
|
||||
|
Reference in New Issue
Block a user