From 46c6767dd34aec334c11c3dd587d0cc8c6b7a14d Mon Sep 17 00:00:00 2001 From: Danny Rehelis Date: Fri, 19 May 2023 14:57:43 +0300 Subject: [PATCH 1/3] Update devcontainer-feature.json --- src/google-cloud-cli/devcontainer-feature.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/google-cloud-cli/devcontainer-feature.json b/src/google-cloud-cli/devcontainer-feature.json index 76b1b16..2eec52f 100644 --- a/src/google-cloud-cli/devcontainer-feature.json +++ b/src/google-cloud-cli/devcontainer-feature.json @@ -12,6 +12,11 @@ ], "default": "latest", "description": "Select or enter a gcloud CLI version" + }, + "installGkeGcloudAuthPlugin": { + "type": "boolean", + "default": true, + "description": "Install 'gke-gcloud-auth-plugin' plugin?" } }, "installsAfter": [ From feda744cc013c47c0a0218b781557ca49ba194da Mon Sep 17 00:00:00 2001 From: Danny Rehelis Date: Fri, 19 May 2023 15:06:21 +0300 Subject: [PATCH 2/3] Update install.sh --- src/google-cloud-cli/install.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/google-cloud-cli/install.sh b/src/google-cloud-cli/install.sh index b1c3041..6092492 100644 --- a/src/google-cloud-cli/install.sh +++ b/src/google-cloud-cli/install.sh @@ -6,6 +6,7 @@ set -e rm -rf /var/lib/apt/lists/* GCLOUD_VERSION=${VERSION:-"latest"} +INSTALL_GKEGCLOUDAUTH_PLUGIN="${INSTALL_GKEGCLOUDAUTH_PLUGIN:-"false"}" if [ "$(id -u)" -ne 0 ]; then echo -e 'Script must be run as root. Use sudo, su, or add "USER root" to your Dockerfile before running this script.' @@ -87,6 +88,12 @@ install_using_apt() { rm -f /etc/apt/sources.list.d/google-cloud-sdk.list return 1 fi + + # Install zsh (and recommended packages) if needed + if [ "${INSTALL_GKEGCLOUDAUTH_PLUGIN}" = "true" ]; then + echo "(*) Installing 'gke-gcloud-auth-plugin' plugin..." + check_packages google-cloud-sdk-gke-gcloud-auth-plugin + fi } echo "(*) Installing google-cloud CLI..." @@ -98,4 +105,4 @@ install_using_apt # Clean up rm -rf /var/lib/apt/lists/* -echo "Done!" \ No newline at end of file +echo "Done!" From ba4690184c979e1d0259dc2f71b770bcf15cbe66 Mon Sep 17 00:00:00 2001 From: Danny Rehelis Date: Fri, 19 May 2023 15:15:37 +0300 Subject: [PATCH 3/3] Update install.sh --- src/google-cloud-cli/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/google-cloud-cli/install.sh b/src/google-cloud-cli/install.sh index 6092492..e5f182a 100644 --- a/src/google-cloud-cli/install.sh +++ b/src/google-cloud-cli/install.sh @@ -89,7 +89,7 @@ install_using_apt() { return 1 fi - # Install zsh (and recommended packages) if needed + # Install gke-gcloud-auth-plugin if needed if [ "${INSTALL_GKEGCLOUDAUTH_PLUGIN}" = "true" ]; then echo "(*) Installing 'gke-gcloud-auth-plugin' plugin..." check_packages google-cloud-sdk-gke-gcloud-auth-plugin