Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple updates in hack/quick-install.sh #185

Merged
merged 2 commits into from
Dec 16, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions hack/quick-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@ set -eu -o pipefail
main() {
local command=${1:-'--apply'}
if [[ $command = "--apply" ]]; then
echo "Installing Karpenter & dependencies.."
apply
echo "Installation complete!"
elif [[ $command = "--delete" ]]; then
echo "Uninstalling Karpenter & dependencies.."
delete
echo "Uninstallation complete!"
else
echo "Error: invalid argument: $command" >&2
usage
exit 22 # EINVAL
exit 22 # EINVAL
fi
}

Expand All @@ -27,9 +29,9 @@ EOF
}

delete() {
helm delete karpenter || true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch! I'm a bit shocked that kube-prometheus-stack doesn't delete child resources via k8s garbage collection.

helm delete cert-manager --namespace cert-manager || true
helm delete kube-prometheus-stack --namespace monitoring || true
helm delete karpenter || true

kubectl delete namespace cert-manager monitoring || true
}
Expand Down Expand Up @@ -67,7 +69,7 @@ apply() {
--set nodeExporter.enabled=false \
--set prometheus.enabled=false

helm upgrade --install karpenter charts/karpenter
helm upgrade --install karpenter karpenter/karpenter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 nice catch

}

usage
Expand Down