Skip to content

Commit 24ee05f

Browse files
committed
Merge remote-tracking branch 'origin/main' into k0s-1-29
2 parents f24137d + bff8d72 commit 24ee05f

File tree

19 files changed

+354
-97
lines changed

19 files changed

+354
-97
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ create-node%:
306306
-v $(shell pwd):/replicatedhq/embedded-cluster \
307307
-v $(shell dirname $(shell pwd))/kots:/replicatedhq/kots \
308308
$(if $(filter node0,node$*),-p $(NODE_PORT):$(NODE_PORT)) \
309+
$(if $(filter node0,node$*),-p 30003:30003) \
309310
replicated/ec-distro:$(DISTRO)
310311

311312
@$(MAKE) ssh-node$*

cmd/local-artifact-mirror/pull.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ import (
2424
// These constant define the expected names of the files in the registry.
2525
const (
2626
EmbeddedClusterBinaryArtifactName = "embedded-cluster-amd64"
27-
ImagesArtifactName = "images-amd64.tar"
27+
ImagesSrcArtifactName = "images-amd64.tar"
28+
ImagesDstArtifactName = "ec-images-amd64.tar"
2829
HelmChartsArtifactName = "charts.tar.gz"
2930
)
3031

@@ -86,8 +87,8 @@ var imagesCommand = &cli.Command{
8687
os.RemoveAll(location)
8788
}()
8889

89-
dst := filepath.Join(provider.EmbeddedClusterImagesSubDir(), ImagesArtifactName)
90-
src := filepath.Join(location, ImagesArtifactName)
90+
dst := filepath.Join(provider.EmbeddedClusterImagesSubDir(), ImagesDstArtifactName)
91+
src := filepath.Join(location, ImagesSrcArtifactName)
9192
logrus.Infof("%s > %s", src, dst)
9293
if err := helpers.MoveFile(src, dst); err != nil {
9394
return fmt.Errorf("unable to move images bundle: %w", err)

e2e/cluster/lxd/cluster.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,7 @@ func PullImage(in *ClusterInput, image string) {
864864
in.T.Fatalf("Failed to connect to image server: %v", err)
865865
}
866866

867-
alias, _, err := remote.GetImageAlias(image)
867+
alias, _, err := remote.GetImageAliasType("container", image)
868868
if err != nil {
869869
in.T.Logf("Failed to get image alias %s on %s: %v", image, server, err)
870870
continue

e2e/kots-release-install/kots-app.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ metadata:
66
spec:
77
title: Embedded Cluster Smoke Test Staging App
88
icon: https://raw.githubusercontent.com/cncf/artwork/master/projects/kubernetes/icon/color/kubernetes-icon-color.png
9+
allowRollback: true
910
statusInformers:
1011
- deployment/nginx
1112
ports:

e2e/kots-release-upgrade/kots-app.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ metadata:
66
spec:
77
title: Embedded Cluster Smoke Test Staging App
88
icon: https://raw.githubusercontent.com/cncf/artwork/master/projects/kubernetes/icon/color/kubernetes-icon-color.png
9+
allowRollback: true
910
statusInformers:
1011
- deployment/nginx
1112
ports:

e2e/playwright/README.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
## Running Tests Against the Development Environment
2+
3+
1. Install deps on your Mac
4+
5+
```bash
6+
npm ci
7+
npx playwright install --with-deps
8+
code --install-extension ms-playwright.playwright
9+
```
10+
11+
1. Build the release and run the development environment
12+
13+
```bash
14+
make initial-release
15+
make create-node0
16+
output/bin/embedded-cluster install --license local-dev/license.yaml
17+
```
18+
19+
1. Create a nodeport service directly to kotsadm
20+
21+
```bash
22+
cat <<EOF | k0s kubectl apply -f -
23+
apiVersion: v1
24+
kind: Service
25+
metadata:
26+
name: kotsadm-nodeport
27+
namespace: kotsadm
28+
labels:
29+
replicated.com/disaster-recovery: infra
30+
replicated.com/disaster-recovery-chart: admin-console
31+
spec:
32+
type: NodePort
33+
ports:
34+
- port: 30003
35+
targetPort: 3000
36+
nodePort: 30003
37+
selector:
38+
app: kotsadm
39+
EOF
40+
```
41+
42+
1. Configure the base URL (default is `http://localhost:30000`) on your Mac
43+
44+
```bash
45+
export BASE_URL=http://localhost:30003
46+
```
47+
48+
1. Run the test on your Mac
49+
50+
```bash
51+
npx playwright test --ui deploy-app
52+
```
53+
54+
Don't forget to press the play button in the browser to run the test.

e2e/playwright/tests/deploy-upgrade/test.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ test('deploy upgrade', async ({ page }) => {
1515
await iframe.locator('input[type="password"]').fill('updated password');
1616
await iframe.getByRole('button', { name: 'Next', exact: true }).click();
1717
await expect(iframe.getByText('Preflight checks', { exact: true })).toBeVisible({ timeout: 10 * 1000 });
18-
await expect(iframe.getByRole('button', { name: 'Re-run' })).toBeVisible({ timeout: 10 * 1000 });
18+
await expect(iframe.getByRole('button', { name: 'Rerun' })).toBeVisible({ timeout: 10 * 1000 });
1919
await expect(iframe.locator('#app')).toContainText('Embedded Cluster Installation CRD exists');
2020
await expect(iframe.locator('#app')).toContainText('Embedded Cluster Config CRD exists');
2121
await expect(iframe.getByRole('button', { name: 'Back: Config' })).toBeVisible();

e2e/playwright/tests/get-restore-join-controller-command/test.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { login } from '../shared';
33

44
test('get restore join controller command', async ({ page }) => {
55
await login(page);
6+
await page.getByRole('button', { name: 'Add node', exact: true }).click();
67
await expect(page.locator('#controller-testNodeType')).toBeChecked();
78
await expect(page.locator('.CodeSnippet-copy')).toBeVisible();
89
const joinCommand = await page.locator('.react-prism.language-bash').first().textContent();

e2e/playwright/tests/shared/deploy-app.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ export const deployApp = async (page, expect) => {
1010
await page.locator('input[type="password"]').click();
1111
await page.locator('input[type="password"]').fill('password');
1212
await page.getByRole('button', { name: 'Continue' }).click();
13-
await expect(page.getByText('Preflight checks', { exact: true })).toBeVisible({ timeout: 10 * 1000 });
14-
await expect(page.getByRole('button', { name: 'Re-run' })).toBeVisible({ timeout: 10 * 1000 });
13+
await expect(page.getByText('Validate the environment')).toBeVisible({ timeout: 10 * 1000 });
14+
await expect(page.getByRole('button', { name: 'Rerun' })).toBeVisible({ timeout: 10 * 1000 });
1515
await expect(page.locator('#app')).toContainText('Embedded Cluster Installation CRD exists');
1616
await expect(page.locator('#app')).toContainText('Embedded Cluster Config CRD exists');
1717
await page.getByRole('button', { name: 'Deploy' }).click();

go.mod

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ require (
1111
github.com/aws/aws-sdk-go-v2/credentials v1.17.41
1212
github.com/aws/aws-sdk-go-v2/service/s3 v1.66.1
1313
github.com/bombsimon/logrusr/v4 v4.1.0
14-
github.com/canonical/lxd v0.0.0-20240927232348-ef33aea98aec
14+
github.com/canonical/lxd v0.0.0-20241030172432-dee0d04b56ee
1515
github.com/containers/image/v5 v5.32.2
1616
github.com/coreos/go-systemd/v22 v22.5.0
1717
github.com/creack/pty v1.1.23
@@ -48,7 +48,7 @@ require (
4848
k8s.io/apimachinery v0.31.2
4949
k8s.io/client-go v0.31.2
5050
k8s.io/kubectl v0.31.2
51-
k8s.io/utils v0.0.0-20240902221715-702e33fdd3c3
51+
k8s.io/utils v0.0.0-20240921022957-49e7df575cb6
5252
oras.land/oras-go/v2 v2.5.0
5353
sigs.k8s.io/controller-runtime v0.19.1
5454
sigs.k8s.io/yaml v1.4.0
@@ -61,7 +61,7 @@ replace (
6161

6262
require (
6363
cloud.google.com/go v0.112.1 // indirect
64-
cloud.google.com/go/compute/metadata v0.3.0 // indirect
64+
cloud.google.com/go/compute/metadata v0.5.0 // indirect
6565
cloud.google.com/go/iam v1.1.7 // indirect
6666
cloud.google.com/go/storage v1.40.0 // indirect
6767
dario.cat/mergo v1.0.1 // indirect
@@ -166,7 +166,7 @@ require (
166166
github.com/jmespath/go-jmespath v0.4.0 // indirect
167167
github.com/jmoiron/sqlx v1.4.0 // indirect
168168
github.com/k0sproject/version v0.6.0 // indirect
169-
github.com/klauspost/compress v1.17.9 // indirect
169+
github.com/klauspost/compress v1.17.11 // indirect
170170
github.com/klauspost/pgzip v1.2.6 // indirect
171171
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
172172
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
@@ -201,11 +201,12 @@ require (
201201
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
202202
github.com/pierrec/lz4/v4 v4.1.2 // indirect
203203
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
204-
github.com/prometheus/client_golang v1.20.3 // indirect
204+
github.com/prometheus/client_golang v1.20.4 // indirect
205205
github.com/prometheus/client_model v0.6.1 // indirect
206-
github.com/prometheus/common v0.59.1 // indirect
206+
github.com/prometheus/common v0.60.0 // indirect
207207
github.com/prometheus/procfs v0.15.1 // indirect
208208
github.com/redis/go-redis/v9 v9.5.2 // indirect
209+
github.com/rogpeppe/go-internal v1.13.1 // indirect
209210
github.com/rubenv/sql-migrate v1.7.0 // indirect
210211
github.com/sagikazarmark/locafero v0.6.0 // indirect
211212
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
@@ -234,8 +235,8 @@ require (
234235
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect
235236
github.com/xlab/treeprint v1.2.0 // indirect
236237
github.com/yusufpapurcu/wmi v1.2.4 // indirect
237-
github.com/zitadel/logging v0.6.0 // indirect
238-
github.com/zitadel/oidc/v3 v3.30.0 // indirect
238+
github.com/zitadel/logging v0.6.1 // indirect
239+
github.com/zitadel/oidc/v3 v3.31.0 // indirect
239240
github.com/zitadel/schema v1.3.0 // indirect
240241
go.etcd.io/etcd/api/v3 v3.5.16 // indirect
241242
go.etcd.io/etcd/client/pkg/v3 v3.5.16 // indirect
@@ -250,17 +251,17 @@ require (
250251
go.opentelemetry.io/otel/metric v1.31.0 // indirect
251252
go.opentelemetry.io/otel/sdk v1.31.0 // indirect
252253
go.opentelemetry.io/otel/trace v1.31.0 // indirect
253-
go.starlark.net v0.0.0-20240725214946-42030a7cedce // indirect
254-
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect
254+
go.starlark.net v0.0.0-20240925182052-1207426daebd // indirect
255+
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c // indirect
255256
golang.org/x/mod v0.21.0 // indirect
256257
golang.org/x/sync v0.8.0 // indirect
257-
golang.org/x/tools v0.25.0 // indirect
258+
golang.org/x/tools v0.26.0 // indirect
258259
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
259260
google.golang.org/api v0.172.0 // indirect
260261
google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect
261-
google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 // indirect
262-
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect
263-
google.golang.org/grpc v1.66.2 // indirect
262+
google.golang.org/genproto/googleapis/api v0.0.0-20241007155032-5fefd90f89a9 // indirect
263+
google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9 // indirect
264+
google.golang.org/grpc v1.67.1 // indirect
264265
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
265266
gopkg.in/ini.v1 v1.67.0 // indirect
266267
k8s.io/apiserver v0.31.2 // indirect
@@ -312,7 +313,7 @@ require (
312313
github.com/muhlemmer/gu v0.3.1 // indirect
313314
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
314315
github.com/pkg/errors v0.9.1
315-
github.com/pkg/sftp v1.13.6 // indirect
316+
github.com/pkg/sftp v1.13.7 // indirect
316317
github.com/pkg/xattr v0.4.10 // indirect
317318
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
318319
github.com/rivo/uniseg v0.4.7 // indirect
@@ -325,7 +326,7 @@ require (
325326
golang.org/x/sys v0.26.0 // indirect
326327
golang.org/x/text v0.19.0 // indirect
327328
golang.org/x/time v0.6.0 // indirect
328-
google.golang.org/protobuf v1.34.2 // indirect
329+
google.golang.org/protobuf v1.35.1 // indirect
329330
gopkg.in/inf.v0 v0.9.1 // indirect
330331
k8s.io/apiextensions-apiserver v0.31.2
331332
k8s.io/klog/v2 v2.130.1 // indirect

0 commit comments

Comments
 (0)