Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
drivebyer committed Sep 16, 2024
1 parent b96a9e7 commit 46f73b5
Show file tree
Hide file tree
Showing 12 changed files with 116 additions and 116 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,75 +43,75 @@ spec:
kubectl exec --namespace ${NAMESPACE} --container redis-cluster-v1beta2-leader redis-cluster-v1beta2-leader-0 --
redis-cli -c -p 6379 ping
check:
($stdout=='PONG'): true
(contains($stdout, 'PONG')): true
- script:
content: >
kubectl exec --namespace ${NAMESPACE} --container redis-cluster-v1beta2-leader redis-cluster-v1beta2-leader-1 --
redis-cli -c -p 6379 ping
check:
($stdout=='PONG'): true
(contains($stdout, 'PONG')): true
- script:
content: >
kubectl exec --namespace ${NAMESPACE} --container redis-cluster-v1beta2-leader redis-cluster-v1beta2-leader-2 --
redis-cli -c -p 6379 ping
check:
($stdout=='PONG'): true
(contains($stdout, 'PONG')): true
- script:
content: >
kubectl exec --namespace ${NAMESPACE} --container redis-cluster-v1beta2-follower redis-cluster-v1beta2-follower-0 --
redis-cli -c -p 6379 ping
check:
($stdout=='PONG'): true
(contains($stdout, 'PONG')): true
- script:
content: >
kubectl exec --namespace ${NAMESPACE} --container redis-cluster-v1beta2-follower redis-cluster-v1beta2-follower-1 --
redis-cli -c -p 6379 ping
check:
($stdout=='PONG'): true
(contains($stdout, 'PONG')): true
- script:
content: >
kubectl exec --namespace ${NAMESPACE} --container redis-cluster-v1beta2-follower redis-cluster-v1beta2-follower-2 --
redis-cli -c -p 6379 ping
check:
($stdout=='PONG'): true
(contains($stdout, 'PONG')): true
- name: Check Cluster Slots Coverage
try:
- script:
content: >
kubectl exec --namespace ${NAMESPACE} --container redis-cluster-v1beta2-leader redis-cluster-v1beta2-leader-0 --
redis-cli --cluster check 127.0.0.1:6379 | grep 'All 16384 slots covered.'
check:
($stdout=='[OK] All 16384 slots covered.'): true
(contains($stdout, '[OK] All 16384 slots covered')): true
- script:
content: >
kubectl exec --namespace ${NAMESPACE} --container redis-cluster-v1beta2-leader redis-cluster-v1beta2-leader-1 --
redis-cli --cluster check 127.0.0.1:6379 | grep 'All 16384 slots covered'
check:
($stdout=='[OK] All 16384 slots covered.'): true
(contains($stdout, '[OK] All 16384 slots covered')): true
- script:
content: >
kubectl exec --namespace ${NAMESPACE} --container redis-cluster-v1beta2-leader redis-cluster-v1beta2-leader-2 --
redis-cli --cluster check 127.0.0.1:6379 | grep 'All 16384 slots covered'
check:
($stdout=='[OK] All 16384 slots covered.'): true
(contains($stdout, '[OK] All 16384 slots covered')): true
- script:
content: >
kubectl exec --namespace ${NAMESPACE} --container redis-cluster-v1beta2-follower redis-cluster-v1beta2-follower-0 --
redis-cli --cluster check 127.0.0.1:6379 | grep 'All 16384 slots covered'
check:
($stdout=='[OK] All 16384 slots covered.'): true
(contains($stdout, '[OK] All 16384 slots covered')): true
- script:
content: >
kubectl exec --namespace ${NAMESPACE} --container redis-cluster-v1beta2-follower redis-cluster-v1beta2-follower-1 --
redis-cli --cluster check 127.0.0.1:6379 | grep 'All 16384 slots covered'
check:
($stdout=='[OK] All 16384 slots covered.'): true
(contains($stdout, '[OK] All 16384 slots covered')): true
- script:
content: >
kubectl exec --namespace ${NAMESPACE} --container redis-cluster-v1beta2-follower redis-cluster-v1beta2-follower-2 --
redis-cli --cluster check 127.0.0.1:6379 | grep 'All 16384 slots covered'
check:
($stdout=='[OK] All 16384 slots covered.'): true
(contains($stdout, '[OK] All 16384 slots covered')): true
- name: Try saving a key With Password
try:
- script:
Expand All @@ -120,39 +120,39 @@ spec:
kubectl exec --namespace ${NAMESPACE} --container redis-cluster-v1beta2-leader redis-cluster-v1beta2-leader-0 --
redis-cli -c -p 6379 --user opstree --pass abc@123 set foo-0 bar-0
check:
($stdout=='OK'): true
(contains($stdout, 'OK')): true
- script:
timeout: 30s
content: >
kubectl exec --namespace ${NAMESPACE} --container redis-cluster-v1beta2-leader redis-cluster-v1beta2-leader-1 --
redis-cli -c -p 6379 --user opstree --pass abc@123 set foo-1 bar-1
check:
($stdout=='OK'): true
(contains($stdout, 'OK')): true
- script:
timeout: 30s
content: >
kubectl exec --namespace ${NAMESPACE} --container redis-cluster-v1beta2-leader redis-cluster-v1beta2-leader-2 --
redis-cli -c -p 6379 --user opstree --pass abc@123 set foo-2 bar-2
check:
($stdout=='OK'): true
(contains($stdout, 'OK')): true
- script:
timeout: 30s
content: >
kubectl exec --namespace ${NAMESPACE} --container redis-cluster-v1beta2-follower redis-cluster-v1beta2-follower-0 --
redis-cli -c -p 6379 --user opstree --pass abc@123 set foo-3 bar-3
check:
($stdout=='OK'): true
(contains($stdout, 'OK')): true
- script:
timeout: 30s
content: >
kubectl exec --namespace ${NAMESPACE} --container redis-cluster-v1beta2-follower redis-cluster-v1beta2-follower-1 --
redis-cli -c -p 6379 --user opstree --pass abc@123 set foo-4 bar-4
check:
($stdout=='OK'): true
(contains($stdout, 'OK')): true
- script:
timeout: 30s
content: >
kubectl exec --namespace ${NAMESPACE} --container redis-cluster-v1beta2-follower redis-cluster-v1beta2-follower-2 --
redis-cli -c -p 6379 --user opstree --pass abc@123 set foo-5 bar-5
check:
($stdout=='OK'): true
(contains($stdout, 'OK')): true
4 changes: 2 additions & 2 deletions tests/e2e-chainsaw/v1beta2/ha-failover/chainsaw-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ spec:
export MASTER_IP_FROM_LABEL=$(kubectl -n ${NAMESPACE} get pod -l app=redis-replication,redis-role=master,redis_setup_type=replication -o jsonpath='{.items[0].status.podIP}');
if [ "$MASTER_IP_FROM_SENTINEL" = "$MASTER_IP_FROM_LABEL" ]; then echo "OK"; else echo "FAIL"; fi
check:
($stdout=='OK'): true
(contains($stdout, 'OK')): true
catch:
- description: Redis Operator Logs
podLogs:
Expand Down Expand Up @@ -65,7 +65,7 @@ spec:
export MASTER_IP_FROM_LABEL=$(kubectl -n ${NAMESPACE} get pod -l app=redis-replication,redis-role=master,redis_setup_type=replication -o jsonpath='{.items[0].status.podIP}');
if [ $MASTER_IP_FROM_SENTINEL = $MASTER_IP_FROM_LABEL ]; then echo "OK"; else echo "FAIL"; fi
check:
($stdout=='OK'): true
(contains($stdout, 'OK')): true
catch:
- description: Redis Operator Logs
podLogs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ spec:
content: |
kubectl exec --namespace ${NAMESPACE} redis -- redis-cli -h redis-replication.${NAMESPACE}.svc -p 6379 -a Opstree@1234 ping
check:
($stdout=='PONG'): true
(contains($stdout, 'PONG')): true
- name: Ping Sentinel Service from Cli Pod
try:
- script:
timeout: 10s
content: |
kubectl exec --namespace ${NAMESPACE} redis -- redis-cli -h redis-sentinel-sentinel.${NAMESPACE}.svc -p 26379 ping
check:
($stdout=='PONG'): true
(contains($stdout, 'PONG')): true
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,20 @@ spec:
content: |
kubectl exec --namespace ${NAMESPACE} redis -- redis-cli -h redis-replication.${NAMESPACE}.svc -p 6379 ping
check:
($stdout=='PONG'): true
(contains($stdout, 'PONG')): true
- name: Ping Sentinel Service from Cli Pod With password
try:
- script:
timeout: 10s
content: |
kubectl exec --namespace ${NAMESPACE} redis -- redis-cli -h redis-sentinel-sentinel.${NAMESPACE}.svc -p 26379 -a Opstree@1234 ping
check:
($stdout=='PONG'): true
(contains($stdout, 'PONG')): true
- name: Ping Sentinel Service from Cli Pod Without password
try:
- script:
timeout: 10s
content: |
kubectl exec --namespace ${NAMESPACE} redis -- redis-cli -h redis-sentinel-sentinel.${NAMESPACE}.svc -p 26379 ping
check:
($stdout=='NOAUTH Authentication required.'): true
(contains($stdout, 'NOAUTH Authentication required')): true
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ spec:
content: |
kubectl exec --namespace ${NAMESPACE} redis -- redis-cli -h redis-replication.${NAMESPACE}.svc -p 6379 ping
check:
($stdout=='PONG'): true
(contains($stdout, 'PONG')): true
- name: Ping Sentinel Service from Cli Pod
try:
- script:
timeout: 10s
content: |
kubectl exec --namespace ${NAMESPACE} redis -- redis-cli -h redis-sentinel-sentinel.${NAMESPACE}.svc -p 26379 ping
check:
($stdout=='PONG'): true
(contains($stdout, 'PONG')): true
Original file line number Diff line number Diff line change
Expand Up @@ -37,37 +37,37 @@ spec:
content: |
kubectl get node -o wide | grep 'worker' | awk '{print $6}' | head -n 1 | tail -n 1 | xargs -I {} redis-cli -h {} -c -p 6380 ping
check:
($stdout=='PONG'): true
(contains($stdout, 'PONG')): true
- script:
timeout: 30s
content: |
kubectl get node -o wide | grep 'worker' | awk '{print $6}' | head -n 2 | tail -n 1 | xargs -I {} redis-cli -h {} -c -p 6380 ping
check:
($stdout=='PONG'): true
(contains($stdout, 'PONG')): true
- script:
timeout: 30s
content: |
kubectl get node -o wide | grep 'worker' | awk '{print $6}' | head -n 3 | tail -n 1 | xargs -I {} redis-cli -h {} -c -p 6380 ping
check:
($stdout=='PONG'): true
(contains($stdout, 'PONG')): true
- script:
timeout: 30s
content: |
kubectl get node -o wide | grep 'worker' | awk '{print $6}' | head -n 4 | tail -n 1 | xargs -I {} redis-cli -h {} -c -p 6380 ping
check:
($stdout=='PONG'): true
(contains($stdout, 'PONG')): true
- script:
timeout: 30s
content: |
kubectl get node -o wide | grep 'worker' | awk '{print $6}' | head -n 5 | tail -n 1 | xargs -I {} redis-cli -h {} -c -p 6380 ping
check:
($stdout=='PONG'): true
(contains($stdout, 'PONG')): true
- script:
timeout: 30s
content: |
kubectl get node -o wide | grep 'worker' | awk '{print $6}' | head -n 6 | tail -n 1 | xargs -I {} redis-cli -h {} -c -p 6380 ping
check:
($stdout=='PONG'): true
(contains($stdout, 'PONG')): true
- name: Curl Exporter from every node
try:
- script:
Expand All @@ -76,77 +76,77 @@ spec:
kubectl get node -o wide | grep 'worker' | awk '{print $6}' | head -n 1 | tail -n 1 |
xargs -I {} curl -s http://{}:9122/metrics | grep -v '^#' | grep -E '\bredis_up\b' | awk '{print $2}'
check:
($stdout=='1'): true
(contains($stdout, '1')): true
- script:
timeout: 30s
content: >
kubectl get node -o wide | grep 'worker' | awk '{print $6}' | head -n 2 | tail -n 1 |
xargs -I {} curl -s http://{}:9122/metrics | grep -v '^#' | grep -E '\bredis_up\b' | awk '{print $2}'
check:
($stdout=='1'): true
(contains($stdout, '1')): true
- script:
timeout: 30s
content: >
kubectl get node -o wide | grep 'worker' | awk '{print $6}' | head -n 3 | tail -n 1 |
xargs -I {} curl -s http://{}:9122/metrics | grep -v '^#' | grep -E '\bredis_up\b' | awk '{print $2}'
check:
($stdout=='1'): true
(contains($stdout, '1')): true
- script:
timeout: 30s
content: >
kubectl get node -o wide | grep 'worker' | awk '{print $6}' | head -n 4 | tail -n 1 |
xargs -I {} curl -s http://{}:9122/metrics | grep -v '^#' | grep -E '\bredis_up\b' | awk '{print $2}'
check:
($stdout=='1'): true
(contains($stdout, '1')): true
- script:
timeout: 30s
content: >
kubectl get node -o wide | grep 'worker' | awk '{print $6}' | head -n 5 | tail -n 1 |
xargs -I {} curl -s http://{}:9122/metrics | grep -v '^#' | grep -E '\bredis_up\b' | awk '{print $2}'
check:
($stdout=='1'): true
(contains($stdout, '1')): true
- script:
timeout: 30s
content: >
kubectl get node -o wide | grep 'worker' | awk '{print $6}' | head -n 6 | tail -n 1 |
xargs -I {} curl -s http://{}:9122/metrics | grep -v '^#' | grep -E '\bredis_up\b' | awk '{print $2}'
check:
($stdout=='1'): true
(contains($stdout, '1')): true
- name: Try saving a key from every node
try:
- script:
timeout: 30s
content: |
kubectl get node -o wide | grep 'worker' | awk '{print $6}' | head -n 1 | tail -n 1 | xargs -I {} redis-cli -h {} -c -p 6380 set foo-0 bar-0
check:
($stdout=='OK'): true
(contains($stdout, 'OK')): true
- script:
timeout: 30s
content: |
kubectl get node -o wide | grep 'worker' | awk '{print $6}' | head -n 2 | tail -n 1 | xargs -I {} redis-cli -h {} -c -p 6380 set foo-1 bar-1
check:
($stdout=='OK'): true
(contains($stdout, 'OK')): true
- script:
timeout: 30s
content: |
kubectl get node -o wide | grep 'worker' | awk '{print $6}' | head -n 3 | tail -n 1 | xargs -I {} redis-cli -h {} -c -p 6380 set foo-2 bar-2
check:
($stdout=='OK'): true
(contains($stdout, 'OK')): true
- script:
timeout: 30s
content: |
kubectl get node -o wide | grep 'worker' | awk '{print $6}' | head -n 4 | tail -n 1 | xargs -I {} redis-cli -h {} -c -p 6380 set foo-3 bar-3
check:
($stdout=='OK'): true
(contains($stdout, 'OK')): true
- script:
timeout: 30s
content: |
kubectl get node -o wide | grep 'worker' | awk '{print $6}' | head -n 5 | tail -n 1 | xargs -I {} redis-cli -h {} -c -p 6380 set foo-4 bar-4
check:
($stdout=='OK'): true
(contains($stdout, 'OK')): true
- script:
timeout: 30s
content: |
kubectl get node -o wide | grep 'worker' | awk '{print $6}' | head -n 6 | tail -n 1 | xargs -I {} redis-cli -h {} -c -p 6380 set foo-5 bar-5
check:
($stdout=='OK'): true
(contains($stdout, 'OK')): true
Loading

0 comments on commit 46f73b5

Please sign in to comment.