Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
aos
GitHub Repository: aos/grafana-agent
Path: blob/main/production/kubernetes/install-bare.sh
4094 views
1
#!/usr/bin/env bash
2
# shellcheck shell=bash
3
4
#
5
# install-bare.sh is an installer for the Agent without a ConfigMap. It is
6
# used during the Grafana Cloud integrations wizard and is not recommended
7
# to be used directly. Instead of calling this script directly, please
8
# make a copy of ./agent-bare.yaml and modify it for your needs.
9
#
10
# Note that agent-bare.yaml does not have a ConfigMap, so the Grafana Agent
11
# will not launch until one is created. For more information on setting up
12
# a ConfigMap, please refer to:
13
#
14
# Metrics quickstart: https://grafana.com/docs/grafana-cloud/quickstart/agent-k8s/k8s_agent_metrics/
15
# Logs quickstart: https://grafana.com/docs/grafana-cloud/quickstart/agent-k8s/k8s_agent_logs/
16
#
17
18
check_installed() {
19
if ! type "$1" >/dev/null 2>&1; then
20
echo "error: $1 not installed" >&2
21
exit 1
22
fi
23
}
24
25
check_installed curl
26
check_installed envsubst
27
28
MANIFEST_BRANCH=v0.33.2
29
MANIFEST_URL=${MANIFEST_URL:-https://raw.githubusercontent.com/grafana/agent/${MANIFEST_BRANCH}/production/kubernetes/agent-bare.yaml}
30
NAMESPACE=${NAMESPACE:-default}
31
32
export NAMESPACE
33
34
curl -fsSL "$MANIFEST_URL" | envsubst
35
36