Path: blob/main/production/kubernetes/install-bare.sh
4094 views
#!/usr/bin/env bash1# shellcheck shell=bash23#4# install-bare.sh is an installer for the Agent without a ConfigMap. It is5# used during the Grafana Cloud integrations wizard and is not recommended6# to be used directly. Instead of calling this script directly, please7# make a copy of ./agent-bare.yaml and modify it for your needs.8#9# Note that agent-bare.yaml does not have a ConfigMap, so the Grafana Agent10# will not launch until one is created. For more information on setting up11# a ConfigMap, please refer to:12#13# Metrics quickstart: https://grafana.com/docs/grafana-cloud/quickstart/agent-k8s/k8s_agent_metrics/14# Logs quickstart: https://grafana.com/docs/grafana-cloud/quickstart/agent-k8s/k8s_agent_logs/15#1617check_installed() {18if ! type "$1" >/dev/null 2>&1; then19echo "error: $1 not installed" >&220exit 121fi22}2324check_installed curl25check_installed envsubst2627MANIFEST_BRANCH=v0.33.228MANIFEST_URL=${MANIFEST_URL:-https://raw.githubusercontent.com/grafana/agent/${MANIFEST_BRANCH}/production/kubernetes/agent-bare.yaml}29NAMESPACE=${NAMESPACE:-default}3031export NAMESPACE3233curl -fsSL "$MANIFEST_URL" | envsubst343536