This directory contains helpful scripts for working with deployKF.
This script automatically syncs the ArgoCD applications that make up deployKF.
- Bash
4.4or later (macOS has3.2by default, update withbrew install bash) - The
kubectlCLI is installed (install guide) - The
argocdCLI is installed (install guide) - The
jqCLI is installed (install guide) - A deployKF "app of apps" has been applied to the cluster (example for plugin mode)
- The deployKF version being used is
0.1.2or later (release notes)
By default, the script will:
- Use
kubectlport-forwarding to connect to the ArgoCD API server. - Assume ArgoCD is installed to the
argocdNamespace. - Assume the ArgoCD
adminpassword can be found inSecret/argocd-initial-admin-secret. - Prompt for confirmation before pruning (deleting) resources during a sync.
To run the script with the default settings:
# clone the deploykf repo
# NOTE: we use 'main', as the latest script always lives there
git clone -b main https://github.com/deployKF/deployKF.git ./deploykf
# ensure the script is executable
chmod +x ./deploykf/scripts/sync_argocd_apps.sh
# run the script
bash ./deploykf/scripts/sync_argocd_apps.shNOTE:
- The script can take around 5-10 minutes to run on first install.
- If the script fails or is interrupted, you can safely re-run it, and it will pick up where it left off.
- There are a number of configuration variables at the top of the script which change the default behavior.
This script restarts Pods with Istio sidecar versions that do not match the current Istio version.
- Bash
4.4or later (macOS has3.2by default, update withbrew install bash) - The
istioctlCLI is installed (install guide) - The
kubectlCLI is installed (install guide) - The
jqCLI is installed (install guide)
By default, the script will:
- Use
istioctlto get the current Istio version and sidecar versions. - Prompt for confirmation before restarting Pods.
- For each Pod with an outdated sidecar, it will:
- Use
kubectlto get themetadata.ownerReferencesfor the Pod. - Use
kubectl rollout restartto restart the owner of the Pod (e.g. Deployment, StatefulSet, etc.).
- Use
To run the script with the default settings:
# clone the deploykf repo
# NOTE: we use 'main', as the latest script always lives there
git clone -b main https://github.com/deployKF/deployKF.git ./deploykf
# ensure the script is executable
chmod +x ./deploykf/scripts/update_istio_sidecars.sh
# run the script
bash ./deploykf/scripts/update_istio_sidecars.shWARNING:
- This script will restart Pods in your cluster (if you confirm when prompted).
- It is recommended to run this script during a maintenance window or when you can tolerate downtime.
- When restarting Notebook Pods (which show as StatefulSets), all in-progress and unsaved work will be lost!
- All out-of-date Pods are restarted at the SAME TIME, which may not be suitable for large clusters.