Unverified Commit 968f0fe5 authored by Konstantinos Tsakalozos's avatar Konstantinos Tsakalozos Committed by GitHub
Browse files

Fix ingress and monitoring on arm64 (#307)

* Fix ingress on arm64
* Do not test monitoring on arm64
parent c1819194
......@@ -8,13 +8,16 @@ echo "Disabling Ingress"
ARCH=$(arch)
TAG="0.15.0"
EXTRA_ARGS="- --publish-status-address=127.0.0.1"
if [ "${ARCH}" = arm64 ]
then
TAG="0.11.0"
EXTRA_ARGS=""
fi
declare -A map
map[\$TAG]="$TAG"
map[\$EXTRA_ARGS]="$EXTRA_ARGS"
use_manifest ingress delete "$(declare -p map)"
echo "Ingress is disabled"
......@@ -8,13 +8,16 @@ echo "Enabling Ingress"
ARCH=$(arch)
TAG="0.15.0"
EXTRA_ARGS="- --publish-status-address=127.0.0.1"
if [ "${ARCH}" = arm64 ]
then
TAG="0.11.0"
EXTRA_ARGS=""
fi
declare -A map
map[\$TAG]="$TAG"
map[\$EXTRA_ARGS]="$EXTRA_ARGS"
use_manifest ingress apply "$(declare -p map)"
echo "Ingress is enabled"
......@@ -110,4 +110,4 @@ spec:
- /nginx-ingress-controller
- --default-backend-service=$(POD_NAMESPACE)/default-http-backend
- --configmap=$(POD_NAMESPACE)/nginx-load-balancer-conf
- --publish-status-address=127.0.0.1
$EXTRA_ARGS
\ No newline at end of file
......@@ -194,6 +194,14 @@ parts:
rm "actions/enable.prometheus.sh"
rm "actions/disable.prometheus.sh"
rm -rf "actions/prometheus"
# Fluentd support
rm "actions/enable.fluentd.sh"
rm "actions/disable.fluentd.sh"
rm -rf "actions/fluentd"
# Jeager support
rm "actions/enable.jaeger.sh"
rm "actions/disable.jaeger.sh"
rm -rf "actions/jaeger"
else
# Istio addon
echo "Preparing istio"
......
......@@ -121,11 +121,15 @@ class TestAddons(object):
print("Disabling metrics-server")
microk8s_disable("metrics-server")
def test_monitorin_addons(self):
def test_monitoring_addons(self):
"""
Test jaeger, prometheus and fluentd.
"""
if platform.machine() != 'x86_64':
print("Fluentd, prometheus, jaeger tests are only relevant in x86 architectures")
return
print("Enabling fluentd")
microk8s_enable("fluentd")
print("Enabling prometheus")
......
import os
import platform
import time
from validators import (
validate_dns_dashboard,
......@@ -108,29 +109,31 @@ class TestUpgrade(object):
except:
print('Will not test the metrics server')
try:
enable = microk8s_enable("prometheus", timeout_insec=30)
assert "Nothing to do for" not in enable
validate_prometheus()
test_matrix['prometheus'] = validate_prometheus
except:
print('Will not test the prometheus')
try:
enable = microk8s_enable("fluentd", timeout_insec=30)
assert "Nothing to do for" not in enable
validate_fluentd()
test_matrix['fluentd'] = validate_fluentd
except:
print('Will not test the fluentd')
try:
enable = microk8s_enable("jaeger", timeout_insec=30)
assert "Nothing to do for" not in enable
validate_jaeger()
test_matrix['jaeger'] = validate_jaeger
except:
print('Will not test the jaeger addon')
# AMD64 only tests
if platform.machine() == 'x86_64':
try:
enable = microk8s_enable("prometheus", timeout_insec=30)
assert "Nothing to do for" not in enable
validate_prometheus()
test_matrix['prometheus'] = validate_prometheus
except:
print('Will not test the prometheus')
try:
enable = microk8s_enable("fluentd", timeout_insec=30)
assert "Nothing to do for" not in enable
validate_fluentd()
test_matrix['fluentd'] = validate_fluentd
except:
print('Will not test the fluentd')
try:
enable = microk8s_enable("jaeger", timeout_insec=30)
assert "Nothing to do for" not in enable
validate_jaeger()
test_matrix['jaeger'] = validate_jaeger
except:
print('Will not test the jaeger addon')
# Refresh the snap to the target
if upgrade_to.endswith('.snap'):
......
......@@ -138,7 +138,7 @@ def validate_istio():
Validate istio by deploying the bookinfo app.
"""
if platform.machine() != 'x86_64':
print("GPU tests are only relevant in x86 architectures")
print("Istio tests are only relevant in x86 architectures")
return
wait_for_installation()
......@@ -248,6 +248,10 @@ def validate_jaeger():
"""
Validate the jaeger operator
"""
if platform.machine() != 'x86_64':
print("Jaeger tests are only relevant in x86 architectures")
return
wait_for_pod_state("", "default", "running", label="name=jaeger-operator")
attempt = 30
while attempt > 0:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment