fp/scripts/k8s-metrics.sh

12 lines
387 B
Bash
Raw Normal View History

2024-08-13 21:18:01 +00:00
#!/bin/bash
if [ -z "${ENV}" ]; then \
echo "Error: ENV variable is not defined. Please set to one of development|staging|production"; exit 1; \
fi
if [ "${ENV}" == "development" ]; then \
echo "k8s metrics are not used in development environment. Skipping."
exit 0
fi
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml