Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 16 additions & 5 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -336,9 +336,10 @@ jobs:
fail-fast: false
matrix:
cases:
- {k8s: "v1.23", manage-controllers: false}
- {k8s: "v1.34", manage-controllers: false}
- {k8s: "v1.34", manage-controllers: true}
- {k8s: "v1.23", manage-controllers: false, install-gwapi: true}
# for v1.34 onwards, gwapi gets installed by Traefik on the target cluster
- {k8s: "v1.34", manage-controllers: false, install-gwapi: false}
- {k8s: "v1.34", manage-controllers: true, install-gwapi: false}
name: "test-multicluster(${{ matrix.cases.k8s }}, ${{ matrix.cases.manage-controllers && 'managed-controllers' || 'unmanaged-controllers' }})"
steps:
- uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff
Expand Down Expand Up @@ -370,11 +371,21 @@ jobs:
done
- run: docker image ls
- run: just mc-test-build
- name: Run just mc-test-load
- name: Run just mc-load
run: |
just linkerd-tag='${{ needs.meta.outputs.tag }}' \
k3d-k8s='${{ matrix.cases.k8s }}' \
mc-test-load
mc-load
- run: just mc-install-gwapi
- name: Run just mc-target-load
run: |
just linkerd-tag='${{ needs.meta.outputs.tag }}' \
k3d-k8s='${{ matrix.cases.k8s }}' \
mc-target-load
- name: Run just mc-install-gwapi
if: ${{ matrix.cases.install-gwapi }}
run: just k3d-name='l5d-test-target' mc-install-gwapi
- run: just mc-flat-network-init
- name: Run just mc-test-run
run: |
just linkerd-tag='${{ needs.meta.outputs.tag }}' \
Expand Down
12 changes: 5 additions & 7 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -490,9 +490,9 @@ mc-target-k3d-delete:
k3d-delete
fi

_mc-load: _k3d-init linkerd-load
mc-load: _k3d-init linkerd-load

_mc-target-load:
mc-target-load:
@{{ just_executable() }} \
k3d-name='{{ k3d-name }}-target' \
k3d-k8s='{{ k3d-k8s }}' \
Expand All @@ -505,17 +505,15 @@ _mc-target-load:
linkerd-exec='{{ linkerd-exec }}' \
linkerd-tag='{{ linkerd-tag }}' \
_pause-load \
_mc-load
mc-load

# Run the multicluster tests with cluster setup
mc-test: mc-test-load mc-test-run
mc-install-gwapi:
{{ _kubectl }} apply -f https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.2.0/experimental-install.yaml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably want to pull this gwapi version into an argument or env var or something so that it's override able and so that this constant is easier to find and update when we want to increase the gwapi version we want to test with.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok will do


mc-test-build:
go build --mod=readonly \
./test/integration/multicluster/...

mc-test-load: _mc-load _mc-target-load mc-flat-network-init

k3d-source-server := "k3d-" + k3d-name + "-server-0"
k3d-target-server := "k3d-" + k3d-name + "-target-server-0"

Expand Down
2 changes: 1 addition & 1 deletion multicluster/charts/linkerd-multicluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ gateway:
tolerations: []

# -- The pause container to use
pauseImage: "gcr.io/google_containers/pause:3.2"
pauseImage: "registry.k8s.io/pause:3.2"

# -- User id under which the gateway shall be ran
UID: 2103
Expand Down
2 changes: 1 addition & 1 deletion multicluster/cmd/testdata/install_default.golden

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion multicluster/cmd/testdata/install_ha.golden

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion multicluster/cmd/testdata/install_psp.golden

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion policy-test/tests/inbound_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,7 @@ fn mk_pause(ns: &str, name: &str) -> k8s::Pod {
spec: Some(k8s::PodSpec {
containers: vec![k8s::api::core::v1::Container {
name: "pause".to_string(),
image: Some("gcr.io/google_containers/pause:3.2".to_string()),
image: Some("registry.k8s.io/pause:3.2".to_string()),
..Default::default()
}],
..Default::default()
Expand Down
5 changes: 0 additions & 5 deletions test/integration/multicluster/install_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,6 @@ func TestInstall(t *testing.T) {
// Global state to keep track of clusters
contexts = TestHelper.GetMulticlusterContexts()
for _, ctx := range contexts {
err = TestHelper.InstallGatewayAPIWithContext(ctx)
if err != nil {
testutil.AnnotatedFatal(t, "failed to install gateway-api", err)
}

// Pipe cmd & args to `linkerd`
cmd := append([]string{"--context=" + ctx}, cmd...)
out, err := TestHelper.LinkerdRun(cmd...)
Expand Down
6 changes: 0 additions & 6 deletions testutil/test_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -749,12 +749,6 @@ func (h *TestHelper) InstallGatewayAPI() error {
return err
}

func (h *TestHelper) InstallGatewayAPIWithContext(ctx string) error {
url := fmt.Sprintf("https://github.com/kubernetes-sigs/gateway-api/releases/download/%s/experimental-install.yaml", GATEWAY_API_VERSION)
_, err := h.KubectlWithContext("", ctx, "apply", "-f", url)
return err
}

// ReadFile reads a file from disk and returns the contents as a string.
func ReadFile(file string) (string, error) {
b, err := os.ReadFile(file)
Expand Down
Loading