Skip to content
This repository was archived by the owner on Sep 26, 2025. It is now read-only.

Commit 2f927dd

Browse files
authored
updated Github actions workflow (#81)
* updated ci * removed calico
1 parent 029c3e9 commit 2f927dd

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

.github/workflows/ci_build_test.yaml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
build:
11-
runs-on: ubuntu-latest
11+
runs-on: ubuntu-20.04
1212
steps:
1313
- name: Checkout code
1414
uses: actions/checkout@v2
@@ -35,7 +35,7 @@ jobs:
3535
key: ${{ runner.os }}-build
3636

3737
unit-test:
38-
runs-on: ubuntu-latest
38+
runs-on: ubuntu-20.04
3939
needs:
4040
- build
4141
steps:
@@ -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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ helm install ci-sck --set global.splunk.hec.token=$CI_SPLUNK_HEC_TOKEN \
2525
--set splunk-kubernetes-objects.image.pullPolicy=IfNotPresent \
2626
--set splunk-kubernetes-objects.image.tag=recent \
2727
-f ci_scripts/sck_values.yml helm-chart/splunk-connect-for-kubernetes
28-
#wait for deployment to finish
29-
until kubectl get pod | grep Running | [[ $(wc -l) == 4 ]]; do
28+
29+
kubectl get pod
30+
# wait for deployment to finish
31+
# metric and logging deamon set for each node + aggr + object + splunk
32+
PODS=$((MINIKUBE_NODE_COUNTS*2+2+1))
33+
until kubectl get pod | grep Running | [[ $(wc -l) == $PODS ]]; do
3034
sleep 1;
3135
done

0 commit comments

Comments
 (0)