Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: GlueOps/codespaces
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.33.0
Choose a base ref
...
head repository: GlueOps/codespaces
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref

Commits on Jan 2, 2024

  1. Verified

    This commit was signed with the committer’s verified signature.
    giuseppe Giuseppe Scrivano
    Copy the full SHA
    a1ab637 View commit details

Commits on Jan 30, 2024

  1. Verified

    This commit was signed with the committer’s verified signature.
    giuseppe Giuseppe Scrivano
    Copy the full SHA
    22dae91 View commit details

Commits on Feb 13, 2024

  1. Chore/updates (#40)

    * chore(VERSION_HELM): 3.13.3 -> 3.14.0
    
    * chore(VERSION_GCLOUD_SDK): 461.0.0 -> 463.0.0
    
    * chore(VERSION_TASKFILE): 3.33.0 -> 3.34.1
    
    * chore(VERSION_KIND): 0.20.0 -> 0.21.0
    
    * chore(VERSION_K9S): 0.30.6 -> 0.31.8
    
    * chore(VERSION_HELM_DIFF): 3.8.1 -> 3.9.4
    
    * chore(VERSION_ARGO_CD_CLI): 2.8.7 -> 2.8.10
    
    * chore(python): 3.11.7 -> 3.11.8
    
    * chore(kubectl): 1.27.9 -> 1.27.10
    
    * major: remove github copilot extension
    
    * chore(node): remove node, it's unused
    
    ---------
    
    Co-authored-by: Venkata Mutyala <venkata@venkatamutyala.com>
    fernandoataoldotcom and venkatamutyala authored Feb 13, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    giuseppe Giuseppe Scrivano
    Copy the full SHA
    80e57ca View commit details

Commits on Feb 15, 2024

  1. Copy the full SHA
    4a7f18b View commit details

Commits on Mar 1, 2024

  1. Feature/tools/cordon drain (#43)

    * feat(tools): tool to cordon and drain old nodes
    fernandoataoldotcom authored Mar 1, 2024
    Copy the full SHA
    3f645ad View commit details

Commits on Mar 6, 2024

  1. Copy the full SHA
    d160053 View commit details

Commits on Mar 18, 2024

  1. Copy the full SHA
    9a54bc2 View commit details

Commits on Mar 20, 2024

  1. Copy the full SHA
    416fe83 View commit details

Commits on Mar 27, 2024

  1. Copy the full SHA
    5286439 View commit details
  2. chore(deps): update actions/checkout action to v4 (#47)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Mar 27, 2024
    Copy the full SHA
    20138f3 View commit details
  3. chore(deps): update docker/login-action action to v3 (#49)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Mar 27, 2024
    Copy the full SHA
    f65534b View commit details
  4. chore(deps): pin dependencies (#46)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Mar 27, 2024
    Copy the full SHA
    d2ba9dd View commit details

Commits on Apr 2, 2024

  1. Copy the full SHA
    980e995 View commit details

Commits on Apr 3, 2024

  1. Copy the full SHA
    559e1d1 View commit details
  2. Copy the full SHA
    cd06e66 View commit details
  3. Copy the full SHA
    ce79b84 View commit details
  4. Copy the full SHA
    3c0727d View commit details
  5. Copy the full SHA
    dbeeaee View commit details
  6. Copy the full SHA
    c84d1c6 View commit details
  7. Copy the full SHA
    a5c23dd View commit details
  8. Copy the full SHA
    2e459a3 View commit details
  9. Copy the full SHA
    51af921 View commit details
  10. Copy the full SHA
    d80a1ef View commit details
  11. Copy the full SHA
    300c560 View commit details
  12. Copy the full SHA
    47fd3d8 View commit details

Commits on Apr 4, 2024

  1. Copy the full SHA
    7c07974 View commit details
  2. Copy the full SHA
    5f619e3 View commit details
  3. Copy the full SHA
    2431a88 View commit details
  4. Copy the full SHA
    d7bbb42 View commit details
  5. Copy the full SHA
    573666b View commit details
  6. Copy the full SHA
    a798963 View commit details
  7. Copy the full SHA
    767a456 View commit details
  8. Copy the full SHA
    4cac851 View commit details

Commits on Apr 5, 2024

  1. Copy the full SHA
    c4491c0 View commit details
  2. Copy the full SHA
    c81d72f View commit details

Commits on Apr 9, 2024

  1. Copy the full SHA
    6cfcd10 View commit details
  2. Copy the full SHA
    770d3a3 View commit details
  3. Copy the full SHA
    1a28145 View commit details
  4. Copy the full SHA
    6174109 View commit details
  5. chore(deps): point to ubuntu base image (#55)

    * chore(deps): point to ubuntu base image
    
    * chore(devcontainer): remove variant arg since it's hardcoded in dockerfile
    venkatamutyala authored Apr 9, 2024
    Copy the full SHA
    e454d2a View commit details
  6. chore(deps): update mcr.microsoft.com/vscode/devcontainers/base docke…

    …r tag to v1 (#57)
    
    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Apr 9, 2024
    Copy the full SHA
    0132192 View commit details
  7. chore(deps): update dependency argoproj/argo-cd to v2.9.11 (#54)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Apr 9, 2024
    Copy the full SHA
    7e748e6 View commit details
  8. chore(deps): update dependency google-cloud-sdk-unofficial/google-clo…

    …ud-sdk to v470 (#66)
    
    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Apr 9, 2024
    Copy the full SHA
    a0a21ff View commit details
  9. chore(deps): update dependency kubernetes/kubectl to v1.27.12 (#60)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Apr 9, 2024
    Copy the full SHA
    043e87c View commit details
  10. chore(deps): update dependency go-task/task to v3.36.0 (#62)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Apr 9, 2024
    Copy the full SHA
    fa4b94a View commit details
  11. chore(deps): update dependency k3d-io/k3d to v5.6.2 (#59)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Apr 9, 2024
    Copy the full SHA
    460b4c9 View commit details
  12. chore(deps): update dependency derailed/k9s to v0.32.4 (#58)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Apr 9, 2024
    Copy the full SHA
    5491609 View commit details
  13. Copy the full SHA
    92d013d View commit details
  14. Copy the full SHA
    c4972af View commit details

Commits on Apr 10, 2024

  1. Copy the full SHA
    cf54399 View commit details
114 changes: 67 additions & 47 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,50 +1,79 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.233.0/containers/ubuntu/.devcontainer/base.Dockerfile

# [Choice] Ubuntu version (use ubuntu-22.04 or ubuntu-18.04 on local arm64/Apple Silicon): ubuntu-22.04, ubuntu-20.04, ubuntu-18.04
ARG VARIANT="jammy"
#https://mcr.microsoft.com/v2/devcontainers/base/tags/list
#https://github.com/devcontainers/images/tree/main/src/base-ubuntu
FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT}
FROM mcr.microsoft.com/vscode/devcontainers/base:1-ubuntu-22.04@sha256:8e6762ffc190e651180923b40a157c8dc21e2b1eb4438369860eee749b30f3cb

# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>

ARG VERSION_KUBECTL=1.27.8
ARG VERSION_TERRAFORM=1.5.5
ARG VERSION_HELM=3.13.3
ARG VERSION_TASKFILE=3.30.1
ARG VERSION_KIND=0.20.0
ARG VERSION_K9S=0.29.1
ARG VERSION_TERRAFORM_DOCS=0.16.0
ARG VERSION_KUBENT=0.7.0
ARG VERSION_HELM_DIFF=3.8.1
ARG VERSION_CHARM_GUM=0.13.0
ARG VERSION_ARGO_CD_CLI=2.8.7
ARG VERSION_K3D=5.6.0
ARG VERSION_KUBECTL=1.30.9
ARG VERSION_OPENTOFU=1.7.7
ARG VERSION_HELM=3.16.4
ARG VERSION_GCLOUD_SDK=505.0.0
ARG VERSION_KIND=0.26.0
ARG VERSION_K9S=0.32.7
ARG VERSION_TERRAFORM_DOCS=0.19.0
ARG VERSION_KUBENT=0.7.3
ARG VERSION_HELM_DIFF=3.9.14
ARG VERSION_CHARM_GUM=0.14.5
ARG VERSION_ARGO_CD_CLI=2.13.3
ARG VERSION_K3D=5.7.5
ARG VERSION_HASHICORP_PACKER=1.11.2

# https://developer.hashicorp.com/vault/docs/commands#vault_skip_verify
# https://github.com/GlueOps/terraform-module-kubernetes-hashicorp-vault-configuration/wiki
ENV VAULT_SKIP_VERIFY true
COPY tools/ /etc/tools
RUN chmod +x /etc/tools/add-tools-to-shells.sh && ./etc/tools/add-tools-to-shells.sh
ENV CLOUDSDK_INSTALL_DIR /usr/local/gcloud/

COPY tools/ /etc/tools/

# Install tools to /usr/local/bin
RUN for file in /etc/tools/*; do \
if [ -f "$file" ]; then \
new_name=$(basename "$file" .sh); \
cp "$file" "/usr/local/bin/$new_name"; \
chmod +x "/usr/local/bin/$new_name"; \
echo "Copied and made executable: $new_name"; \
fi; \
done && \
rm -rf /etc/tools

RUN curl -Lo /usr/local/bin/kubectl https://dl.k8s.io/release/v${VERSION_KUBECTL}/bin/linux/amd64/kubectl \
&& chmod +x /usr/local/bin/kubectl \
&& curl -Lo terraform_${VERSION_TERRAFORM}_linux_amd64.zip https://releases.hashicorp.com/terraform/${VERSION_TERRAFORM}/terraform_${VERSION_TERRAFORM}_linux_amd64.zip \
&& unzip terraform_${VERSION_TERRAFORM}_linux_amd64.zip \
&& mv terraform /usr/local/bin \
&& rm terraform_${VERSION_TERRAFORM}_linux_amd64.zip \
&& curl -Lo tofu_${VERSION_OPENTOFU}_linux_amd64.zip https://github.com/opentofu/opentofu/releases/download/v${VERSION_OPENTOFU}/tofu_${VERSION_OPENTOFU}_linux_amd64.zip \
&& unzip tofu_${VERSION_OPENTOFU}_linux_amd64.zip \
&& mv tofu /usr/local/bin \
&& rm tofu_${VERSION_OPENTOFU}_linux_amd64.zip \
&& ln -s /usr/local/bin/tofu /usr/local/bin/terraform \
&& curl -Lo helm.tar.gz https://get.helm.sh/helm-v${VERSION_HELM}-linux-amd64.tar.gz \
&& tar -xvf helm.tar.gz \
&& mv linux-amd64/helm /usr/local/bin \
&& rm -rf linux-amd64 helm.tar.gz \
&& curl -s https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | TAG=v${VERSION_K3D} bash


ENV CLOUDSDK_COMPONENT_MANAGER_FIXED_SDK_VERSION=${VERSION_GCLOUD_SDK}
# Below includes cleanup to save space after the gcloud install: https://stackoverflow.com/questions/60827959/how-to-stop-gcloud-component-update-from-keeping-a-backup
RUN curl -sSL https://sdk.cloud.google.com | bash \
&& export PATH=$PATH:/usr/local/gcloud/google-cloud-sdk/bin \
&& gcloud components install gke-gcloud-auth-plugin --quiet \
&& gcloud components install alpha --quiet \
&& gcloud components install beta --quiet \
&& rm -rf $(find /usr/local/gcloud/google-cloud-sdk/ -regex ".*/__pycache__") \
&& rm -rf /usr/local/gcloud/google-cloud-sdk/.install/.backup \
&& rm -rf /usr/local/gcloud/google-cloud-sdk/lib/third_party/apis \
&& rm -rf /usr/local/gcloud/google-cloud-sdk/bin/anthoscli \
&& apt update \
&& apt install tmux dnsutils telnet iputils-ping jq certbot nethogs nload vim -y \
&& apt clean -y
ENV PATH $PATH:/usr/local/gcloud/google-cloud-sdk/bin

RUN apt update \
&& apt install tmux dnsutils telnet iputils-ping jq certbot -y \
&& apt clean -y
RUN sh -c "$(curl --location https://raw.githubusercontent.com/go-task/task/v${VERSION_TASKFILE}/install-task.sh)" -- -d -b /usr/local/bin/
RUN curl -Lo /usr/local/bin/kind https://kind.sigs.k8s.io/dl/v${VERSION_KIND}/kind-linux-amd64 \
&& chmod +x /usr/local/bin/kind
RUN wget https://github.com/derailed/k9s/releases/download/v${VERSION_K9S}/k9s_Linux_amd64.tar.gz \
@@ -62,13 +91,19 @@ RUN curl -Lo ./kubent-${VERSION_KUBENT}-linux-amd64.tar.gz https://github.com/do
&& mv kubent /usr/local/bin \
&& rm kubent-${VERSION_KUBENT}-linux-amd64.tar.gz
RUN curl -Lo ./gum_${VERSION_CHARM_GUM}_Linux_x86_64.tar.gz https://github.com/charmbracelet/gum/releases/download/v${VERSION_CHARM_GUM}/gum_${VERSION_CHARM_GUM}_Linux_x86_64.tar.gz \
&& tar --extract --file=gum_${VERSION_CHARM_GUM}_Linux_x86_64.tar.gz gum \
&& tar -xzvf gum_${VERSION_CHARM_GUM}_Linux_x86_64.tar.gz && mv gum_*/gum gum \
&& chmod +x gum \
&& mv gum /usr/local/bin \
&& rm gum_${VERSION_CHARM_GUM}_Linux_x86_64.tar.gz
&& rm gum_${VERSION_CHARM_GUM}_Linux_x86_64.tar.gz \
&& rm -rf gum_${VERSION_CHARM_GUM}_Linux_x86_64
RUN curl -sSL -o argocd-linux-amd64 https://github.com/argoproj/argo-cd/releases/download/v${VERSION_ARGO_CD_CLI}/argocd-linux-amd64 \
&& sudo install -m 555 argocd-linux-amd64 /usr/local/bin/argocd \
&& rm argocd-linux-amd64
RUN wget "https://releases.hashicorp.com/packer/${VERSION_HASHICORP_PACKER}/packer_${VERSION_HASHICORP_PACKER}_linux_amd64.zip" \
&& unzip packer_${VERSION_HASHICORP_PACKER}_linux_amd64.zip \
&& mv packer /usr/local/bin \
&& rm packer_${VERSION_HASHICORP_PACKER}_linux_amd64.zip \
&& rm LICENSE.txt

# Install code tunnel so we can run outside of github codespaces easily
RUN wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg \
@@ -82,7 +117,8 @@ RUN wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor
&& tar -xf vscode_cli.tar.gz \
&& rm vscode_cli.tar.gz


#AWS Debian has a user of admin that uses the UID of 1000. THis is to try and fix that. We are also using UID of 1337 on the system/host level here: https://github.com/GlueOps/development-only-utilities/blob/main/tools/developer-setup/linux-setup.sh#L8
RUN usermod --uid 1337 vscode --shell /bin/zsh

ARG NONROOT_USER=vscode
RUN echo "#!/bin/sh\n\
@@ -102,33 +138,17 @@ RUN echo "#!/bin/sh\n\

USER vscode

RUN code --install-extension DavidAnson.vscode-markdownlint --extensions-dir /home/vscode/.vscode-remote/extensions
RUN code --install-extension dbaeumer.vscode-eslint --extensions-dir /home/vscode/.vscode-remote/extensions
RUN code --install-extension donjayamanne.python-extension-pack --extensions-dir /home/vscode/.vscode-remote/extensions
RUN code --install-extension esbenp.prettier-vscode --extensions-dir /home/vscode/.vscode-remote/extensions
RUN code --install-extension foxundermoon.shell-format --extensions-dir /home/vscode/.vscode-remote/extensions
RUN code --install-extension MS-vsliveshare.vsliveshare --extensions-dir /home/vscode/.vscode-remote/extensions
RUN code --install-extension GitHub.codespaces --extensions-dir /home/vscode/.vscode-remote/extensions
RUN code --install-extension GitHub.copilot --extensions-dir /home/vscode/.vscode-remote/extensions
RUN code --install-extension GitHub.github-vscode-theme --extensions-dir /home/vscode/.vscode-remote/extensions
RUN code --install-extension GitHub.vscode-pull-request-github --extensions-dir /home/vscode/.vscode-remote/extensions
RUN code --install-extension golang.go --extensions-dir /home/vscode/.vscode-remote/extensions
RUN code --install-extension hashicorp.terraform --extensions-dir /home/vscode/.vscode-remote/extensions
RUN code --install-extension KevinRose.vsc-python-indent --extensions-dir /home/vscode/.vscode-remote/extensions
RUN code --install-extension magicstack.MagicPython --extensions-dir /home/vscode/.vscode-remote/extensions
RUN code --install-extension mohsen1.prettify-json --extensions-dir /home/vscode/.vscode-remote/extensions
RUN code --install-extension ms-azuretools.vscode-docker --extensions-dir /home/vscode/.vscode-remote/extensions
RUN code --install-extension ms-python.python --extensions-dir /home/vscode/.vscode-remote/extensions
RUN code --install-extension ms-python.vscode-pylance --extensions-dir /home/vscode/.vscode-remote/extensions
RUN code --install-extension ms-vscode.makefile-tools --extensions-dir /home/vscode/.vscode-remote/extensions
RUN code --install-extension mtxr.sqltools --extensions-dir /home/vscode/.vscode-remote/extensions
RUN code --install-extension mtxr.sqltools-driver-mysql --extensions-dir /home/vscode/.vscode-remote/extensions
RUN code --install-extension mtxr.sqltools-driver-pg --extensions-dir /home/vscode/.vscode-remote/extensions
RUN code --install-extension smoore.yaml-path --extensions-dir /home/vscode/.vscode-remote/extensions
RUN code --install-extension yzhang.markdown-all-in-one --extensions-dir /home/vscode/.vscode-remote/extensions

RUN curl -L https://nixos.org/nix/install | bash -s -- --no-daemon
RUN curl -fsSL https://get.jetify.com/devbox | bash -s -- -f


RUN mkdir -p /home/vscode/.vscode-server
RUN ln -s /home/vscode/.vscode-remote/extensions /home/vscode/.vscode-server/extensions

ADD ../tools/helm-repositories.yaml /home/vscode/.config/helm/repositories.yaml
ADD ../misc-configs/helm-repositories.yaml /home/vscode/.config/helm/repositories.yaml
RUN mkdir -p /home/vscode/.local/share/helm/plugins \
&& curl -L https://github.com/databus23/helm-diff/releases/download/v${VERSION_HELM_DIFF}/helm-diff-linux-amd64.tgz | tar -C /home/vscode/.local/share/helm/plugins -xzv
RUN git config --global --add --bool push.autoSetupRemote true
16 changes: 6 additions & 10 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -3,10 +3,10 @@
{
"name": "Ubuntu",
"build": {
"dockerfile": "Dockerfile",
"dockerfile": "Dockerfile"
// Update 'VARIANT' to pick an Ubuntu version: jammy / ubuntu-22.04, focal / ubuntu-20.04, bionic /ubuntu-18.04
// Use ubuntu-22.04 or ubuntu-18.04 on local arm64/Apple Silicon.
"args": { "VARIANT": "ubuntu-22.04" }

},

// Set *default* container specific settings.json values on container create.
@@ -15,19 +15,15 @@
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode",
"features": {
"ghcr.io/tailscale/codespace/tailscale": {
"version": "latest"
},
"docker-in-docker": "latest",
"docker-from-docker": "latest",
"git": "latest",
"git-lfs": "latest",
"github-cli": "latest",
"aws-cli": "latest",
"sshd": "latest",
"node": "18.19.0",
"python": {
"version" : "3.11.7",
"installTools" : true,
"installJupyterlab" : true
},
"golang": "1.21.3"
"sshd": "latest"
}
}
File renamed without changes.
17 changes: 0 additions & 17 deletions .devcontainer/tools/add-tools-to-shells.sh

This file was deleted.

85 changes: 85 additions & 0 deletions .devcontainer/tools/cordon-drain-nodes-older-than-minutes.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
#!/bin/bash

threshold_minutes=""

while [[ $# -gt 0 ]]; do
key="$1"
case $key in
(-m|--threshold-minutes)
threshold_minutes="$2"
shift
shift
;;
(--help)
echo "Usage: cordon-drain-nodes-older-than-minutes [options]"
echo ""
echo "Options:"
echo " -m, --threshold-minutes VALUE Target nodes older than this many minutes."
echo " --help Show this help message and exit"
exit 0
;;
(*)
echo "Unknown option: $key"
echo "Run 'cordon-drain-nodes-older-than-minutes --help' for usage information."
exit 1
;;
esac
done

if [ -z "$threshold_minutes" ]; then
echo "Error: --threshold-minutes is required."
echo "Run 'cordon-drain-nodes-older-than-minutes --help' for usage information."
exit 1
fi

CURRENT_DATE=$(date +%s)

NODES=$(kubectl get nodes -o json | jq --arg CURRENT_DATE "$CURRENT_DATE" --arg THRESHOLD_MINUTES "$threshold_minutes" -r '
.items[] |
select(
.metadata.creationTimestamp | fromdateiso8601 < ($CURRENT_DATE | tonumber) - ($THRESHOLD_MINUTES | tonumber * 60)
) | .metadata.name')

if [ -z "$NODES" ]; then
echo "No nodes older than $threshold_minutes minutes found."
exit 0
fi

echo "Nodes found older than $threshold_minutes minutes:"
echo "$NODES"
echo ""

echo -n "Cordon the listed nodes? (y/N) "
read -r response
if [[ "$response" =~ ^([yY][eE][sS]|[yY])$ ]]; then
echo "$NODES" | while IFS= read -r node; do
echo "Cordoning node: $node"
kubectl cordon "$node"
echo ""
done
else
echo "Cordoning skipped. Will not attempt to drain."
exit 0
fi

echo -n "Drain the cordoned nodes? (y/N) "
read -r response
if [[ "$response" =~ ^([yY][eE][sS]|[yY])$ ]]; then
pids=()
while IFS= read -r node; do # Process substitution to avoid subshell
echo "Draining node: $node"
kubectl drain "$node" --ignore-daemonsets --delete-emptydir-data > "drain-${node}.log" 2>&1 &
printf "PID: %s\n" "$!"
pids+=($!)
done < <(echo "$NODES") # Process substitution
# Wait for all PIDs
for pid in "${pids[@]}"; do
printf "Waiting on: %s\n" "$pid" # Debugging output (optional)
wait "$pid"
printf "Finished: %s\n" "$pid" # Debugging output (optional)

done
echo "All nodes drained."
else
echo "Draining skipped."
fi
Loading