Skip to content

Commit a414e4a

Browse files
authored
updated Github actions workflow (#217)
1 parent 50c0f20 commit a414e4a

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

.github/workflows/ci_build_test.yaml

+9-5
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,9 @@ jobs:
6767
CI_INDEX_EVENTS: ci_events
6868
CI_INDEX_OBJECTS: ci_objects
6969
CI_INDEX_METRICS: ci_metrics
70-
KUBERNETES_VERSION: v1.15.2
71-
MINIKUBE_VERSION: v1.21.0
70+
KUBERNETES_VERSION: v1.23.2
71+
MINIKUBE_VERSION: v1.24.0
72+
MINIKUBE_NODE_COUNTS: 2
7273
GITHUB_ACTIONS: true
7374

7475
steps:
@@ -121,7 +122,7 @@ jobs:
121122
chmod +x minikube
122123
sudo mv minikube /usr/local/bin/
123124
# Start Minikube and Wait
124-
minikube start --driver=docker --container-runtime=docker --cpus 2 --memory 4096 --kubernetes-version=${KUBERNETES_VERSION} --no-vtx-check
125+
minikube start --driver=docker --container-runtime=docker --cpus 2 --memory 4096 --kubernetes-version=${KUBERNETES_VERSION} --no-vtx-check -n=${MINIKUBE_NODE_COUNTS}
125126
export JSONPATH='{range .items[*]}{@.metadata.name}:{range @.status.conditions[*]}{@.type}={@.status};{end}{end}'
126127
until kubectl get nodes -o jsonpath="$JSONPATH" 2>&1 | grep -q "Ready=True"; do
127128
sleep 1;
@@ -130,13 +131,15 @@ jobs:
130131
- name: Install Splunk
131132
run: |
132133
# Wait until minikube is ready
133-
kubectl apply -f https://docs.projectcalico.org/v3.14/manifests/calico.yaml
134134
export JSONPATH='{range .items[*]}{@.metadata.name}:{range @.status.conditions[*]}{@.type}={@.status};{end}{end}'
135135
until kubectl get nodes -o jsonpath="$JSONPATH" 2>&1 | grep -q "Ready=True"; do
136136
echo "wait for minikube ready ..."
137137
sleep 1;
138138
done
139139
kubectl get nodes
140+
until kubectl get sa | grep -q 'default'; do
141+
sleep 1;
142+
done
140143
# Install Splunk on minikube
141144
kubectl apply -f ci_scripts/k8s-splunk.yml
142145
# Wait until splunk is ready
@@ -189,4 +192,5 @@ jobs:
189192
--splunkd-url https://$CI_SPLUNK_HOST:8089 \
190193
--splunk-user admin \
191194
--splunk-password $CI_SPLUNK_PASSWORD \
192-
-p no:warnings -s
195+
--nodes-count $MINIKUBE_NODE_COUNTS\
196+
-p no:warnings -s -n auto

ci_scripts/deploy_connector.sh

+7-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ helm install ci-sck --set global.splunk.hec.token=$CI_SPLUNK_HEC_TOKEN \
2323
--set splunk-kubernetes-logging.image.tag=recent \
2424
--set splunk-kubernetes-logging.image.pullPolicy=IfNotPresent \
2525
-f ci_scripts/sck_values.yml helm-chart/splunk-connect-for-kubernetes
26-
#wait for deployment to finish
27-
until kubectl get pod | grep Running | [[ $(wc -l) == 4 ]]; do
26+
27+
kubectl get pod
28+
# wait for deployment to finish
29+
# metric and logging deamon set for each node + aggr + object + splunk
30+
PODS=$((MINIKUBE_NODE_COUNTS*2+2+1))
31+
until kubectl get pod | grep Running | [[ $(wc -l) == $PODS ]]; do
2832
sleep 1;
29-
done
33+
done

0 commit comments

Comments
 (0)