diff --git a/pkg/internal/apis/config/encoding/load_test.go b/pkg/internal/apis/config/encoding/load_test.go index 693e5dbb7d..603fddd6d3 100644 --- a/pkg/internal/apis/config/encoding/load_test.go +++ b/pkg/internal/apis/config/encoding/load_test.go @@ -107,6 +107,11 @@ func TestLoadCurrent(t *testing.T) { Path: "./testdata/v1alpha4/valid-kind-workers-patches.yaml", ExpectError: false, }, + { + TestName: "v1alpha4 config with port mapping and mount", + Path: "./testdata/v1alpha4/valid-port-and-mount.yaml", + ExpectError: false, + }, { TestName: "v1alpha4 non-existent field", Path: "./testdata/v1alpha4/invalid-bogus-field.yaml", diff --git a/pkg/internal/apis/config/encoding/testdata/v1alpha4/valid-port-and-mount.yaml b/pkg/internal/apis/config/encoding/testdata/v1alpha4/valid-port-and-mount.yaml new file mode 100644 index 0000000000..40a4a24e33 --- /dev/null +++ b/pkg/internal/apis/config/encoding/testdata/v1alpha4/valid-port-and-mount.yaml @@ -0,0 +1,12 @@ +kind: Cluster +apiVersion: kind.x-k8s.io/v1alpha4 +nodes: +- role: control-plane + # map an extra port + extraPortMappings: + - hostPort: 80 + containerPort: 80 + # mount an extra path from the host + extraMounts: + - hostPath: ./foo + containerPath: /bar \ No newline at end of file