You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cluster/gce/gci/configure-kubeapiserver.sh
+42-27Lines changed: 42 additions & 27 deletions
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,43 @@
13
13
# See the License for the specific language governing permissions and
14
14
# limitations under the License.
15
15
16
+
17
+
# Configures etcd related flags of kube-apiserver.
18
+
functionconfigure-etcd-params {
19
+
local -n params_ref=$1
20
+
21
+
if [[ -n"${ETCD_APISERVER_CA_KEY:-}"&&-n"${ETCD_APISERVER_CA_CERT:-}"&&-n"${ETCD_APISERVER_SERVER_KEY:-}"&&-n"${ETCD_APISERVER_SERVER_CERT:-}"&&-n"${ETCD_APISERVER_CLIENT_KEY:-}"&&-n"${ETCD_APISERVER_CLIENT_CERT:-}" ]];then
echo"WARNING: ALL of ETCD_APISERVER_CA_KEY, ETCD_APISERVER_CA_CERT, ETCD_APISERVER_SERVER_KEY, ETCD_APISERVER_SERVER_CERT, ETCD_APISERVER_CLIENT_KEY and ETCD_APISERVER_CLIENT_CERT are missing, mTLS between etcd server and kube-apiserver is not enabled."
29
+
else
30
+
echo"ERROR: Some of ETCD_APISERVER_CA_KEY, ETCD_APISERVER_CA_CERT, ETCD_APISERVER_SERVER_KEY, ETCD_APISERVER_SERVER_CERT, ETCD_APISERVER_CLIENT_KEY and ETCD_APISERVER_CLIENT_CERT are missing, mTLS between etcd server and kube-apiserver cannot be enabled. Please provide all mTLS credential."
if [[ -n"${ETCD_APISERVER_CA_KEY:-}"&&-n"${ETCD_APISERVER_CA_CERT:-}"&&-n"${ETCD_APISERVER_SERVER_KEY:-}"&&-n"${ETCD_APISERVER_SERVER_CERT:-}"&&-n"${ETCD_APISERVER_CLIENT_KEY:-}"&&-n"${ETCD_APISERVER_CLIENT_CERT:-}" ]];then
echo"WARNING: ALL of ETCD_APISERVER_CA_KEY, ETCD_APISERVER_CA_CERT, ETCD_APISERVER_SERVER_KEY, ETCD_APISERVER_SERVER_CERT, ETCD_APISERVER_CLIENT_KEY and ETCD_APISERVER_CLIENT_CERT are missing, mTLS between etcd server and kube-apiserver is not enabled."
45
-
else
46
-
echo"ERROR: Some of ETCD_APISERVER_CA_KEY, ETCD_APISERVER_CA_CERT, ETCD_APISERVER_SERVER_KEY, ETCD_APISERVER_SERVER_CERT, ETCD_APISERVER_CLIENT_KEY and ETCD_APISERVER_CLIENT_CERT are missing, mTLS between etcd server and kube-apiserver cannot be enabled. Please provide all mTLS credential."
0 commit comments