diff --git a/Taskfile.yml b/Taskfile.yml index d22ae57f..2bd043c3 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -82,7 +82,6 @@ tasks: - cmd: | if [ "$GITHUB_WORKFLOW" = "ci" ]; then echo "Running tests in Github Actions" - echo "127.0.0.1 portal.dev.local kcp.api.portal.dev.local" | sudo tee -a /etc/hosts PATH=$(pwd)/{{.LOCAL_BIN}}:$PATH go test -timeout 10m -coverprofile=cover.out ./... {{.ADDITIONAL_COMMAND_ARGS}} || { echo "---Listing HelmReleases" kubectl get helmreleases -A @@ -90,16 +89,6 @@ tasks: exit 1 } else - # test if portal.dev.local and kcp.api.portal.dev.local are in /etc/hosts - if ! grep -q "portal.dev.local" /etc/hosts; then - echo "Missing portal.dev.local in /etc/hosts" - exit 1 - fi - if ! grep -q "kcp.api.portal.dev.local" /etc/hosts; - then - echo "Missing kcp.api.portal.dev.local in /etc/hosts" - exit 1 - fi export PATH=$(pwd)/{{.LOCAL_BIN}}:$PATH go test -timeout 10m -coverprofile=cover.out ./... {{.ADDITIONAL_COMMAND_ARGS}} fi diff --git a/manifests/kcp/01-platform-mesh-system/contentconfiguration-account-namespace.yaml b/manifests/kcp/01-platform-mesh-system/contentconfiguration-account-namespace.yaml index db6d4aac..a2be1422 100644 --- a/manifests/kcp/01-platform-mesh-system/contentconfiguration-account-namespace.yaml +++ b/manifests/kcp/01-platform-mesh-system/contentconfiguration-account-namespace.yaml @@ -14,8 +14,8 @@ spec: "data": { "nodes": [ { - "pathSegment": "core_namespaces", - "navigationContext": "core_namespaces", + "pathSegment": "namespaces", + "navigationContext": "namespaces", "label": "Namespaces", "entityType": "main.core_platform-mesh_io_account", "icon": "group-2", @@ -36,7 +36,7 @@ spec: }, "context": { "resourceDefinition": { - "group": "core", + "group": "", "plural": "namespaces", "singular": "namespace", "kind": "Namespace", diff --git a/pkg/subroutines/deployment_test.go b/pkg/subroutines/deployment_test.go index 9048edd3..f7c3b291 100644 --- a/pkg/subroutines/deployment_test.go +++ b/pkg/subroutines/deployment_test.go @@ -86,7 +86,7 @@ func (s *DeployTestSuite) Test_applyReleaseWithValues() { specJSON, ok := specValues.(apiextensionsv1.JSON) s.Require().True(ok, "spec.values should be of type apiextensionsv1.JSON") - expected := `{"baseDomain":"portal.dev.local","baseDomainPort":"portal.dev.local:8443","iamWebhookCA":"","port":"8443","protocol":"https","services":{"services":{"platform-mesh-operator":{"version":"v1.0.0"}}}}` + expected := `{"baseDomain":"portal.localhost","baseDomainPort":"portal.localhost:8443","iamWebhookCA":"","port":"8443","protocol":"https","services":{"services":{"platform-mesh-operator":{"version":"v1.0.0"}}}}` s.Require().Equal(expected, string(specJSON.Raw), "spec.values.Raw should match expected JSON string") return nil @@ -140,7 +140,7 @@ func (s *DeployTestSuite) Test_applyReleaseWithValues() { specJSON, ok := specValues.(apiextensionsv1.JSON) s.Require().True(ok, "spec.values should be of type apiextensionsv1.JSON") - expected := `{"baseDomain":"portal.dev.local","baseDomainPort":"portal.dev.local","iamWebhookCA":"","port":"443","protocol":"https","services":{"services":{"platform-mesh-operator":{"version":"v1.0.0"}}}}` + expected := `{"baseDomain":"portal.localhost","baseDomainPort":"portal.localhost","iamWebhookCA":"","port":"443","protocol":"https","services":{"services":{"platform-mesh-operator":{"version":"v1.0.0"}}}}` s.Require().Equal(expected, string(specJSON.Raw), "spec.values.Raw should match expected JSON string") return nil diff --git a/pkg/subroutines/subroutine_helpers.go b/pkg/subroutines/subroutine_helpers.go index e2f5eb19..47b2265b 100644 --- a/pkg/subroutines/subroutine_helpers.go +++ b/pkg/subroutines/subroutine_helpers.go @@ -304,7 +304,7 @@ func MergeValuesAndInfraValues(inst *v1alpha1.PlatformMesh, templateVars apiexte func baseDomainPortProtocol(inst *v1alpha1.PlatformMesh) (string, string, int, string) { port := 8443 - baseDomain := "portal.dev.local" + baseDomain := "portal.localhost" protocol := "https" baseDomainPort := "" diff --git a/test/e2e/kind/kustomize/components/ocm/component.yaml b/test/e2e/kind/kustomize/components/ocm/component.yaml index d642fe7f..8fd423fa 100644 --- a/test/e2e/kind/kustomize/components/ocm/component.yaml +++ b/test/e2e/kind/kustomize/components/ocm/component.yaml @@ -14,4 +14,4 @@ spec: namespace: default repositoryRef: name: platform-mesh - semver: 0.1.0 \ No newline at end of file + semver: 0.2.0-build.522 \ No newline at end of file diff --git a/test/e2e/kind/suite_kind_test.go b/test/e2e/kind/suite_kind_test.go index 5e95626b..cf28965c 100644 --- a/test/e2e/kind/suite_kind_test.go +++ b/test/e2e/kind/suite_kind_test.go @@ -200,7 +200,7 @@ func (s *KindTestSuite) createCerts() ([]byte, error) { // mkcert _, err := runCommand("mkdir", "-p", "certs") s.Require().NoError(err, "Error creating certs directory") - if _, err = runCommand("../../../bin/mkcert", "-cert-file=certs/cert.crt", "-key-file=certs/cert.key", "*.dev.local", "*.portal.dev.local"); err != nil { + if _, err = runCommand("../../../bin/mkcert", "-cert-file=certs/cert.crt", "-key-file=certs/cert.key", "portal.localhost", "*.portal.localhost", "localhost"); err != nil { return nil, err } dirRootPath, err := runCommand("../../../bin/mkcert", "-CAROOT") @@ -364,10 +364,6 @@ func (s *KindTestSuite) createReleases(ctx context.Context) error { s.logger.Info().Msg("helm resources ready") - if err := ApplyManifestFromFile(ctx, "../../../test/e2e/kind/yaml/virtual-workspaces/vws-cert.yaml", s.client, make(map[string]string)); err != nil { - return err - } - time.Sleep(25 * time.Second) return nil } @@ -537,7 +533,7 @@ func (s *KindTestSuite) runOperator(ctx context.Context) { appConfig.Subroutines.ProviderSecret.Enabled = true appConfig.Subroutines.FeatureToggles.Enabled = true appConfig.WorkspaceDir = "../../../" - appConfig.KCP.Url = "https://kcp.api.portal.dev.local:8443" + appConfig.KCP.Url = "https://localhost:8443" appConfig.KCP.RootShardName = "root" appConfig.KCP.Namespace = "platform-mesh-system" appConfig.KCP.FrontProxyName = "frontproxy" diff --git a/test/e2e/kind/yaml/platform-mesh-resource/platform-mesh.yaml b/test/e2e/kind/yaml/platform-mesh-resource/platform-mesh.yaml index 1a3b06d0..dec9cd62 100644 --- a/test/e2e/kind/yaml/platform-mesh-resource/platform-mesh.yaml +++ b/test/e2e/kind/yaml/platform-mesh-resource/platform-mesh.yaml @@ -46,8 +46,8 @@ spec: - "http://localhost:4300" - "http://*.localhost:4200" - "http://*.localhost:4300" - - "https://portal.dev.local:8443" - - "https://*.portal.dev.local:8443" + - "https://portal.localhost:8443" + - "https://*.portal.localhost:8443" gatewayApi: enabled: true mailpit: @@ -58,7 +58,7 @@ spec: rootShard: extraArgs: - --feature-gates=WorkspaceAuthentication=true - - --shard-virtual-workspace-url=https://kcp.api.portal.dev.local:6443 + - --shard-virtual-workspace-url=https://localhost:8443 webhook: enabled: true frontProxy: @@ -82,14 +82,14 @@ spec: component: infra security-operator: values: - baseDomain: "portal.dev.local:8443" + baseDomain: "portal.localhost:8443" initializer: extraArgs: - --idp-smtp-server=mailpit.platform-mesh-system.svc.cluster.local - --idp-smtp-port=1025 - - --idp-from-address=keycloak@portal.dev.local + - --idp-from-address=keycloak@portal.localhost - --domain-ca-lookup - - --idp-additional-redirect-urls="https://default.portal.dev.local:3000/callback*" + - --idp-additional-redirect-urls="https://default.portal.localhost:3000/callback*" caSecret: domain-certificate-ca hostAliases: enabled: true @@ -105,9 +105,9 @@ spec: kind: Gateway extraEnvVars: - name: OPENMFP_PORTAL_CONTEXT_IAM_SERVICE_API_URL - value: https://${org-subdomain}portal.dev.local:8443/iam/graphql + value: https://${org-subdomain}portal.localhost:8443/iam/graphql - name: OPENMFP_PORTAL_CONTEXT_CRD_GATEWAY_API_URL - value: "https://${org-subdomain}portal.dev.local:8443/api/kubernetes-graphql-gateway/root:orgs:${org-name}/graphql" + value: "https://${org-subdomain}portal.localhost:8443/api/kubernetes-graphql-gateway/root:orgs:${org-name}/graphql" - name: NODE_EXTRA_CA_CERTS value: /etc/ssl/certs/domain-ca.crt extraVolumes: diff --git a/test/e2e/kind/yaml/virtual-workspaces/vws-cert.yaml b/test/e2e/kind/yaml/virtual-workspaces/vws-cert.yaml deleted file mode 100644 index 11a472ae..00000000 --- a/test/e2e/kind/yaml/virtual-workspaces/vws-cert.yaml +++ /dev/null @@ -1,27 +0,0 @@ -#TODO this should be part of the vws chart -apiVersion: cert-manager.io/v1 -kind: Certificate -metadata: - name: virtual-workspaces - namespace: platform-mesh-system -spec: - dnsNames: - - frontproxy-front-proxy - - frontproxy-front-proxy.platform-mesh-system - - frontproxy-front-proxy.platform-mesh-system.svc.cluster.local - - kcp.api.portal.dev.local - - virtual-workspaces - - virtual-workspaces.platform-mesh-system - - virtual-workspaces.platform-mesh-system.svc.cluster.local - duration: 8760h0m0s - issuerRef: - group: cert-manager.io - kind: Issuer - name: root-server-ca - privateKey: - algorithm: RSA - size: 4096 - renewBefore: 168h0m0s - secretName: virtual-workspaces-cert - usages: - - server auth