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-helper.sh
+91-28Lines changed: 91 additions & 28 deletions
Original file line number
Diff line number
Diff line change
@@ -758,9 +758,55 @@ contexts:
758
758
EOF
759
759
fi
760
760
761
-
if [[ -n"${GCP_IMAGE_VERIFICATION_URL:-}" ]];then
762
-
# This is the config file for the image review webhook.
763
-
cat <<EOF >/etc/gcp_image_review.config
761
+
if [[ -n"${WEBHOOK_GKE_EXEC_AUTH:-}" ]];then
762
+
if [[ -z"${EXEC_AUTH_PLUGIN_URL:-}" ]];then
763
+
1>&2echo"You requested GKE exec auth support for webhooks, but EXEC_AUTH_PLUGIN_URL was not specified. This configuration depends on gke-exec-auth-plugin for authenticating to the webhook endpoint."
764
+
exit 1
765
+
fi
766
+
767
+
if [[ -z"${TOKEN_URL:-}"||-z"${TOKEN_BODY:-}"||-z"${TOKEN_BODY_UNQUOTED:-}" ]];then
768
+
1>&2echo"You requested GKE exec auth support for webhooks, but TOKEN_URL, TOKEN_BODY, and TOKEN_BODY_UNQUOTED were not provided. gke-exec-auth-plugin requires these values for its configuration."
769
+
exit 1
770
+
fi
771
+
772
+
# kubeconfig to be used by webhooks with GKE exec auth support. Note that
773
+
# the path to gke-exec-auth-plugin is the path when mounted inside the
# If GKE exec auth for webhooks has been requested, then
842
+
# ValidatingAdmissionWebhook should use it. Otherwise, run with the default
843
+
# config.
844
+
if [[ "${ADMISSION_CONTROL:-}"==*"ValidatingAdmissionWebhook"*&&-n"${WEBHOOK_GKE_EXEC_AUTH:-}" ]];then
845
+
1>&2echo"ValidatingAdmissionWebhook requested, and WEBHOOK_GKE_EXEC_AUTH specified. Configuring ValidatingAdmissionWebhook to use gke-exec-auth-plugin."
846
+
847
+
# Append config for ValidatingAdmissionWebhook to the shared admission
0 commit comments