Skip to content

Commit 7b0ec6c

Browse files
authored
deploy admin console without minio (#431)
1 parent 8c1623f commit 7b0ec6c

File tree

11 files changed

+349
-20
lines changed

11 files changed

+349
-20
lines changed

.github/workflows/pull-request.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Pull request
22
on:
33
- pull_request
4+
concurrency:
5+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
6+
cancel-in-progress: true
47
jobs:
58
sanitize:
69
name: Sanitize
@@ -71,6 +74,9 @@ jobs:
7174
sed -i "s/__version_string__/${SHORT_SHA}/g" e2e/kots-release-install/cluster-config.yaml
7275
sed -i "s/__version_string__/${SHORT_SHA}-upgrade/g" e2e/kots-release-upgrade/cluster-config.yaml
7376
77+
# re-promote a release containing an old version of embedded-cluster to test upgrades
78+
replicated release promote 807 2cHXb1RCttzpR0xvnNWyaZCgDBP --version "${SHORT_SHA}-pre-minio-removal"
79+
7480
replicated release create --yaml-dir e2e/kots-release-install --promote CI --version "${SHORT_SHA}"
7581
replicated release create --yaml-dir e2e/kots-release-upgrade --promote CI --version "${SHORT_SHA}-upgrade"
7682
- name: Build CI binary
@@ -125,6 +131,7 @@ jobs:
125131
- TestInstallWithoutEmbed
126132
- TestResetAndReinstall
127133
- TestCollectSupportBundle
134+
- TestOldVersionUpgrade
128135
steps:
129136
- name: Checkout
130137
uses: actions/checkout@v4

.github/workflows/release-dev.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ jobs:
106106
- TestInstallFromReplicatedApp
107107
- TestResetAndReinstall
108108
- TestCollectSupportBundle
109+
- TestOldVersionUpgrade
109110
steps:
110111
- name: Checkout
111112
uses: actions/checkout@v4

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ARCH := $(shell uname -m)
44
APP_NAME = embedded-cluster
55
ADMIN_CONSOLE_CHART_URL = oci://registry.replicated.com/library
66
ADMIN_CONSOLE_CHART_NAME = admin-console
7-
ADMIN_CONSOLE_CHART_VERSION = 1.108.0
7+
ADMIN_CONSOLE_CHART_VERSION = 1.108.0-build.1
88
ADMIN_CONSOLE_IMAGE_OVERRIDE =
99
ADMIN_CONSOLE_MIGRATIONS_IMAGE_OVERRIDE =
1010
EMBEDDED_OPERATOR_CHART_URL = oci://registry.replicated.com/library

e2e/install_test.go

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package e2e
22

33
import (
44
"encoding/json"
5+
"fmt"
56
"os"
67
"strings"
78
"testing"
@@ -452,6 +453,51 @@ func TestResetAndReinstall(t *testing.T) {
452453
t.Logf("%s: test complete", time.Now().Format(time.RFC3339))
453454
}
454455

456+
func TestOldVersionUpgrade(t *testing.T) {
457+
t.Parallel()
458+
tc := cluster.NewTestCluster(&cluster.Input{
459+
T: t,
460+
Nodes: 1,
461+
Image: "ubuntu/jammy",
462+
})
463+
defer tc.Destroy()
464+
t.Logf("%s: downloading embedded-cluster on node 0", time.Now().Format(time.RFC3339))
465+
line := []string{"vandoor-prepare.sh", fmt.Sprintf("%s-pre-minio-removal", os.Getenv("SHORT_SHA")), os.Getenv("LICENSE_ID")}
466+
if stdout, stderr, err := RunCommandOnNode(t, tc, 0, line); err != nil {
467+
t.Log("stdout:", stdout)
468+
t.Log("stderr:", stderr)
469+
t.Fatalf("fail to download embedded-cluster on node 0 %s: %v", tc.Nodes[0], err)
470+
}
471+
472+
t.Logf("%s: installing embedded-cluster on node 0", time.Now().Format(time.RFC3339))
473+
line = []string{"pre-minio-removal-install.sh", "cli"}
474+
if stdout, stderr, err := RunCommandOnNode(t, tc, 0, line); err != nil {
475+
t.Log("install stdout:", stdout)
476+
t.Log("install stderr:", stderr)
477+
t.Fatalf("fail to install embedded-cluster on node %s: %v", tc.Nodes[0], err)
478+
}
479+
480+
t.Logf("%s: checking installation state", time.Now().Format(time.RFC3339))
481+
line = []string{"check-installation-state.sh", fmt.Sprintf("%s-pre-minio-removal", os.Getenv("SHORT_SHA"))}
482+
stdout, stderr, err := RunCommandOnNode(t, tc, 0, line)
483+
if err != nil {
484+
t.Log("stdout:", stdout)
485+
t.Log("stderr:", stderr)
486+
t.Fatalf("fail to check installation state: %v", err)
487+
}
488+
489+
t.Logf("%s: checking installation state after upgrade", time.Now().Format(time.RFC3339))
490+
line = []string{"check-postupgrade-state.sh", os.Getenv("SHORT_SHA")}
491+
stdout, stderr, err = RunCommandOnNode(t, tc, 0, line)
492+
if err != nil {
493+
t.Log("stdout:", stdout)
494+
t.Log("stderr:", stderr)
495+
t.Fatalf("fail to check postupgrade state: %v", err)
496+
}
497+
498+
t.Logf("%s: test complete", time.Now().Format(time.RFC3339))
499+
}
500+
455501
func runPuppeteerAppStatusCheck(t *testing.T, node int, tc *cluster.Output) {
456502
t.Logf("%s: installing puppeteer on node %d", time.Now().Format(time.RFC3339), node)
457503
line := []string{"install-puppeteer.sh"}

e2e/scripts/check-installation-state.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ ensure_app_deployed() {
5050

5151
kubectl kots get versions -n kotsadm embedded-cluster-smoke-test-staging-app
5252
if ! kubectl kots get versions -n kotsadm embedded-cluster-smoke-test-staging-app | grep -q "${version}\W*[01]\W*deployed"; then
53-
echo "application not deployed"
53+
echo "application version ${version} not deployed"
5454
return 1
5555
fi
5656
}

e2e/scripts/check-postupgrade-state.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ wait_for_installation() {
55
ready=$(kubectl get installations --no-headers | grep -c "Installed" || true)
66
counter=0
77
while [ "$ready" -lt "1" ]; do
8-
if [ "$counter" -gt 36 ]; then
8+
if [ "$counter" -gt 84 ]; then
99
echo "installation did not become ready"
1010
kubectl get installations 2>&1 || true
1111
kubectl describe installations 2>&1 || true
@@ -95,6 +95,16 @@ main() {
9595
echo "ensure that the admin console branding is available"
9696
kubectl get cm -n kotsadm kotsadm-application-metadata
9797

98+
echo "ensure that the kotsadm statefulset exists"
99+
kubectl get statefulset -n kotsadm kotsadm
100+
101+
echo "ensure the kotsadm-minio statefulset does not exist"
102+
if kubectl get statefulset -n kotsadm kotsadm-minio; then
103+
echo "kotsadm-minio statefulset found"
104+
kubectl get statefulset -n kotsadm kotsadm-minio
105+
exit 1
106+
fi
107+
98108
echo "ensure that the default chart order remained 110"
99109
if ! kubectl describe clusterconfig -n kube-system k0s | grep -q -e 'Order:\W*110' ; then
100110
kubectl describe clusterconfig -n kube-system k0s

0 commit comments

Comments
 (0)