From 19ab7a41b0216c30f6dba992d611ed7d90f11f6c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 23 Jan 2026 03:23:58 +0000 Subject: [PATCH] Address code review nitpicks: improve POSIX compliance and maintainability Co-authored-by: rchincha <45800463+rchincha@users.noreply.github.com> --- examples/kind/kind-oidc.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/kind/kind-oidc.sh b/examples/kind/kind-oidc.sh index 293d908f..5e7a6b14 100755 --- a/examples/kind/kind-oidc.sh +++ b/examples/kind/kind-oidc.sh @@ -3,6 +3,7 @@ set -o errexit ROOT_DIR=$(git rev-parse --show-toplevel) KIND="${ROOT_DIR}"/hack/tools/bin/kind +DEX_VERSION="v2.41.1" # Reference: https://github.com/int128/kind-oidc # This test validates Kubernetes OIDC authentication with zot registry @@ -14,7 +15,7 @@ if [ "$1" = "--interactive" ]; then fi # set no_proxy if applicable -if [ ! -z "${no_proxy}" ]; then +if [ -n "${no_proxy}" ]; then echo "Updating no_proxy env var"; export no_proxy=${no_proxy},dex-server,kind-registry; export NO_PROXY=${no_proxy}; @@ -83,7 +84,7 @@ docker run -d --name dex-server \ -v /tmp/kind-oidc/dex-config.yaml:/dex-config.yaml:ro \ -v /tmp/kind-oidc/dex-server.crt:/dex-server.crt:ro \ -v /tmp/kind-oidc/dex-server.key:/dex-server.key:ro \ - ghcr.io/dexidp/dex:v2.41.1 \ + ghcr.io/dexidp/dex:${DEX_VERSION} \ serve /dex-config.yaml # Wait for Dex to start @@ -115,7 +116,7 @@ fi CLUSTER_NAME=kind-oidc # Delete the cluster if it already exists -"${KIND}" get clusters | grep ${CLUSTER_NAME} && "${KIND}" delete cluster --name ${CLUSTER_NAME} +"${KIND}" get clusters | grep "${CLUSTER_NAME}" && "${KIND}" delete cluster --name "${CLUSTER_NAME}" # Get Dex server IP address DEX_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' dex-server)