Skip to content

Commit

Permalink
Merge branch 'main' into laverya/disable-helmvm-integration-test
Browse files Browse the repository at this point in the history
  • Loading branch information
laverya authored Sep 21, 2024
2 parents e9f4ab8 + 09f5789 commit e35fb02
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 13 deletions.
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,11 @@ pact-consumer:
pact-broker publish ./pacts/consumer \
--auto-detect-version-properties \
--consumer-app-version ${GIT_TAG} || true; \

pact-broker record-release \
--pacticipant kots \
--version ${PACT_VERSION} \
--environment production \
--verbose
--verbose || true; \
fi

.PHONY: e2e
Expand Down
4 changes: 2 additions & 2 deletions e2e/playwright/tests/change-channel/test.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ test('change channel', async ({ page }) => {
await page.getByRole('button', { name: 'Ok, got it!' }).click();

await expect(page.locator('#app')).toContainText('Alternate');
await expect(page.locator('#app')).toContainText('1.0.3', { timeout: 10000 });
await expect(page.locator('#app')).toContainText('v1.0.1', { timeout: 10000 });
await expect(page.locator('#app')).toContainText('Upstream Update', { timeout: 10000 });

await page.getByRole('button', { name: 'Deploy', exact: true }).click();
await page.getByRole('button', { name: 'Yes, Deploy' }).click();

await expect(page.locator('#app')).toContainText('Currently deployed version', { timeout: 15000 });
await expect(page.getByText('v1.0.0')).not.toBeVisible();
await expect(page.getByText('1.0.3')).toBeVisible();
await expect(page.getByText('v1.0.1')).toBeVisible();
});

async function changeChannel(channelId: string) {
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ require (
github.com/phayes/freeport v0.0.0-20220201140144-74d24b5ae9f5
github.com/pkg/errors v0.9.1
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2
github.com/replicatedhq/embedded-cluster/kinds v0.0.0-20240911124703-aaa8c0236e21
github.com/replicatedhq/embedded-cluster/kinds v1.14.0
github.com/replicatedhq/kotskinds v0.0.0-20240718194123-1018dd404e95
github.com/replicatedhq/kurlkinds v1.5.0
github.com/replicatedhq/troubleshoot v0.99.0
Expand Down Expand Up @@ -367,9 +367,9 @@ require (
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
golang.org/x/mod v0.20.0 // indirect
golang.org/x/net v0.28.0 // indirect
golang.org/x/sys v0.24.0 // indirect
golang.org/x/sys v0.25.0 // indirect
golang.org/x/term v0.23.0 // indirect
golang.org/x/text v0.17.0 // indirect
golang.org/x/text v0.18.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.24.0 // indirect
google.golang.org/genproto v0.0.0-20240311173647-c811ad7063a7 // indirect
Expand Down
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1337,8 +1337,8 @@ github.com/redis/go-redis/v9 v9.0.5/go.mod h1:WqMKv5vnQbRuZstUwxQI195wHy+t4PuXDO
github.com/redis/go-redis/v9 v9.5.1 h1:H1X4D3yHPaYrkL5X06Wh6xNVM/pX0Ft4RV0vMGvLBh8=
github.com/redis/go-redis/v9 v9.5.1/go.mod h1:hdY0cQFCN4fnSYT6TkisLufl/4W5UIXyv0b/CLO2V2M=
github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uYEyJGbgTkfkS4+E/PavXkNJcbFIpEtjt2B0KDQ5+9M=
github.com/replicatedhq/embedded-cluster/kinds v0.0.0-20240911124703-aaa8c0236e21 h1:WV2ISkxxamW596PMm+YnKEQJ+e+GDaUq5jxbQ1YPcBw=
github.com/replicatedhq/embedded-cluster/kinds v0.0.0-20240911124703-aaa8c0236e21/go.mod h1:W2AQug7u0e9afPL0oUZyHcmn1+5ur6Y0TRcdnI5te2g=
github.com/replicatedhq/embedded-cluster/kinds v1.14.0 h1:+b0as59Dg3GzSguYFe9e5B2yF8uI1k7HVOFOsE0YGHw=
github.com/replicatedhq/embedded-cluster/kinds v1.14.0/go.mod h1:N0N9rI45aib/rBEegDCq6Er2pS9FAtgC5HU9BCpYmvI=
github.com/replicatedhq/kotskinds v0.0.0-20240718194123-1018dd404e95 h1:JhwPz4Bgbz5iYl3UV2EB+HnF9oW/eCRi+hASAz+J6XI=
github.com/replicatedhq/kotskinds v0.0.0-20240718194123-1018dd404e95/go.mod h1:QjhIUu3+OmHZ09u09j3FCoTt8F3BYtQglS+OLmftu9I=
github.com/replicatedhq/kurlkinds v1.5.0 h1:zZ0PKNeh4kXvSzVGkn62DKTo314GxhXg1TSB3azURMc=
Expand Down Expand Up @@ -1925,8 +1925,8 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg=
golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34=
golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
Expand Down Expand Up @@ -1956,8 +1956,8 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc=
golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224=
golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
Expand Down
7 changes: 7 additions & 0 deletions pkg/handlers/embedded_cluster_node_join_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ type GetEmbeddedClusterNodeJoinCommandResponse struct {
IsAirgap bool `json:"isAirgap"`
Proxy *ecv1beta1.ProxySpec `json:"proxy,omitempty"`
Network *ecv1beta1.NetworkSpec `json:"network,omitempty"`
LocalArtifactMirrorPort int `json:"localArtifactMirrorPort,omitempty"`
}

type GenerateEmbeddedClusterNodeJoinCommandRequest struct {
Expand Down Expand Up @@ -188,6 +189,11 @@ func (h *Handler) GetEmbeddedClusterNodeJoinCommand(w http.ResponseWriter, r *ht
}
}

localArtifactMirrorPort := 0
if install.Spec.LocalArtifactMirror != nil {
localArtifactMirrorPort = install.Spec.LocalArtifactMirror.Port
}

JSON(w, http.StatusOK, GetEmbeddedClusterNodeJoinCommandResponse{
ClusterID: install.Spec.ClusterID,
K0sJoinCommand: k0sJoinCommand,
Expand All @@ -200,5 +206,6 @@ func (h *Handler) GetEmbeddedClusterNodeJoinCommand(w http.ResponseWriter, r *ht
IsAirgap: install.Spec.AirGap,
Proxy: proxy,
Network: install.Spec.Network,
LocalArtifactMirrorPort: localArtifactMirrorPort,
})
}
6 changes: 6 additions & 0 deletions pkg/kotsadmsnapshot/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -996,6 +996,12 @@ func ecBackupAnnotations(ctx context.Context, kbClient kbclient.Client, in *embe
annotations["kots.io/embedded-cluster-id"] = util.EmbeddedClusterID()
annotations["kots.io/embedded-cluster-version"] = util.EmbeddedClusterVersion()
annotations["kots.io/embedded-cluster-is-ha"] = strconv.FormatBool(in.Spec.HighAvailability)
if in.Spec.AdminConsole != nil && in.Spec.AdminConsole.Port > 0 {
annotations["kots.io/embedded-cluster-admin-console-port"] = strconv.Itoa(in.Spec.AdminConsole.Port)
}
if in.Spec.LocalArtifactMirror != nil && in.Spec.LocalArtifactMirror.Port > 0 {
annotations["kots.io/embedded-cluster-local-artifact-mirror-port"] = strconv.Itoa(in.Spec.LocalArtifactMirror.Port)
}

if in.Spec.Network != nil {
annotations["kots.io/embedded-cluster-pod-cidr"] = in.Spec.Network.PodCIDR
Expand Down

0 comments on commit e35fb02

Please sign in to comment.