mirror of
https://github.com/dokku/dokku.git
synced 2025-12-29 00:25:08 +01:00
Merge pull request #6579 from dokku/taint-tests
Ensure k3s can be installed with taints
This commit is contained in:
@@ -55,3 +55,26 @@ controller:
|
||||
operator: Exists
|
||||
effect: NoSchedule
|
||||
priorityClassName: system-cluster-critical
|
||||
|
||||
admissionWebhooks:
|
||||
patch:
|
||||
tolerations:
|
||||
- key: CriticalAddonsOnly
|
||||
operator: Exists
|
||||
- key: node-role.kubernetes.io/control-plane
|
||||
operator: Exists
|
||||
effect: NoSchedule
|
||||
- key: node-role.kubernetes.io/master
|
||||
operator: Exists
|
||||
effect: NoSchedule
|
||||
|
||||
defaultBackend:
|
||||
tolerations:
|
||||
- key: CriticalAddonsOnly
|
||||
operator: Exists
|
||||
- key: node-role.kubernetes.io/control-plane
|
||||
operator: Exists
|
||||
effect: NoSchedule
|
||||
- key: node-role.kubernetes.io/master
|
||||
operator: Exists
|
||||
effect: NoSchedule
|
||||
@@ -50,10 +50,17 @@ install_k3s() {
|
||||
assert_output_contains "Login Succeeded"
|
||||
|
||||
INGRESS_CLASS="${INGRESS_CLASS:-traefik}"
|
||||
run /bin/bash -c "dokku scheduler-k3s:initialize --ingress-class $INGRESS_CLASS"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
if [[ "$TAINT_SCHEDULING" == "true" ]]; then
|
||||
run /bin/bash -c "dokku scheduler-k3s:initialize --ingress-class $INGRESS_CLASS --taint-scheduling"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
else
|
||||
run /bin/bash -c "dokku scheduler-k3s:initialize --ingress-class $INGRESS_CLASS"
|
||||
echo "output: $output"
|
||||
echo "status: $status"
|
||||
assert_success
|
||||
fi
|
||||
}
|
||||
|
||||
uninstall_k3s() {
|
||||
@@ -63,7 +70,7 @@ uninstall_k3s() {
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "(scheduler-k3s) install" {
|
||||
@test "(scheduler-k3s) install traefik" {
|
||||
if [[ -z "$DOCKERHUB_USERNAME" ]] || [[ -z "$DOCKERHUB_TOKEN" ]]; then
|
||||
skip "skipping due to missing docker.io credentials DOCKERHUB_USERNAME:DOCKERHUB_TOKEN"
|
||||
fi
|
||||
@@ -71,6 +78,30 @@ uninstall_k3s() {
|
||||
install_k3s
|
||||
}
|
||||
|
||||
@test "(scheduler-k3s) install nginx" {
|
||||
if [[ -z "$DOCKERHUB_USERNAME" ]] || [[ -z "$DOCKERHUB_TOKEN" ]]; then
|
||||
skip "skipping due to missing docker.io credentials DOCKERHUB_USERNAME:DOCKERHUB_TOKEN"
|
||||
fi
|
||||
|
||||
INGRESS_CLASS=nginx install_k3s
|
||||
}
|
||||
|
||||
@test "(scheduler-k3s) install traefik with taint" {
|
||||
if [[ -z "$DOCKERHUB_USERNAME" ]] || [[ -z "$DOCKERHUB_TOKEN" ]]; then
|
||||
skip "skipping due to missing docker.io credentials DOCKERHUB_USERNAME:DOCKERHUB_TOKEN"
|
||||
fi
|
||||
|
||||
TAINT_SCHEDULING=true install_k3s
|
||||
}
|
||||
|
||||
@test "(scheduler-k3s) install nginx with taint" {
|
||||
if [[ -z "$DOCKERHUB_USERNAME" ]] || [[ -z "$DOCKERHUB_TOKEN" ]]; then
|
||||
skip "skipping due to missing docker.io credentials DOCKERHUB_USERNAME:DOCKERHUB_TOKEN"
|
||||
fi
|
||||
|
||||
INGRESS_CLASS=nginx TAINT_SCHEDULING=true install_k3s
|
||||
}
|
||||
|
||||
@test "(scheduler-k3s) deploy traefik" {
|
||||
if [[ -z "$DOCKERHUB_USERNAME" ]] || [[ -z "$DOCKERHUB_TOKEN" ]]; then
|
||||
skip "skipping due to missing docker.io credentials DOCKERHUB_USERNAME:DOCKERHUB_TOKEN"
|
||||
|
||||
Reference in New Issue
Block a user