-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathdeploy_connector.sh
executable file
·36 lines (30 loc) · 1.13 KB
/
deploy_connector.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env bash
set -e
#Make sure to check and clean previously failed deployment
echo "Checking if previous deployment exist..."
if [ "`helm ls --short`" == "" ]; then
echo "Nothing to clean, ready for deployment"
else
helm delete $(helm ls --short)
fi
# Clone splunk-connect-for-kubernetes repo
cd /opt
git clone https://github.com/splunk/splunk-connect-for-kubernetes.git
cd splunk-connect-for-kubernetes
cat ci_scripts/sck_values.yml
minikube image load splunk/kube-objects:recent
echo "Deploying k8s-connect with latest changes"
helm install ci-sck --set global.splunk.hec.token=$CI_SPLUNK_HEC_TOKEN \
--set global.splunk.hec.host=$CI_SPLUNK_HOST \
--set kubelet.serviceMonitor.https=true \
--set splunk-kubernetes-objects.image.pullPolicy=IfNotPresent \
--set splunk-kubernetes-objects.image.tag=recent \
-f ci_scripts/sck_values.yml helm-chart/splunk-connect-for-kubernetes
kubectl get pod
# wait for deployment to finish
# metric and logging deamon set for each node + aggr + object + splunk
PODS=$((MINIKUBE_NODE_COUNTS*2+2+1))
until kubectl get pod | grep Running | [[ $(wc -l) == $PODS ]]; do
kubectl get pod
sleep 2;
done