-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/observability playground (#20)
* Extra functions for automating playground installation Signed-off-by: Jeroen van Erp <[email protected]> * Strip trailing slash if present Signed-off-by: Jeroen van Erp <[email protected]> * Add extra cluster functions to ease multiple downstream cluster creation Signed-off-by: Jeroen van Erp <[email protected]> * Fix code linting Signed-off-by: Jeroen van Erp <[email protected]> --------- Signed-off-by: Jeroen van Erp <[email protected]> Co-authored-by: Jeroen van Erp <[email protected]>
- Loading branch information
1 parent
ff6c452
commit 616d7d4
Showing
3 changed files
with
120 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
|
||
####################################### | ||
# Install the Observability agent in the cluster | ||
# Arguments: | ||
# url (SUSE Observability) | ||
# cluster_name | ||
# ingestion_api_key | ||
# Examples: | ||
# observability_agent_install https://obs.suse.com demo xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | ||
####################################### | ||
observability_agent_install() { | ||
local url=$1 | ||
local cluster_name=$2 | ||
local ingestion_api_key=$3 | ||
echo "Installing Observability agent..." | ||
helm repo add suse-observability https://charts.rancher.com/server-charts/prime/suse-observability | ||
helm repo update | ||
|
||
helm upgrade --install suse-observability-agent suse-observability/suse-observability-agent \ | ||
--namespace suse-observability --create-namespace \ | ||
--set stackstate.apiKey=${ingestion_api_key} \ | ||
--set stackstate.url="${url%/}/receiver/stsAgent" \ | ||
--set stackstate.cluster.name=${cluster_name} | ||
|
||
kubectl wait pods -n suse-observability -l app.kubernetes.io/instance=suse-observability-agent --for condition=Ready 2>/dev/null | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters