Skip to content

Commit

Permalink
Merge pull request #1740 from loft-sh/thomaskosiewski/eng-3580-sync-r…
Browse files Browse the repository at this point in the history
…bac-permission-into-vcluster
  • Loading branch information
ThomasK33 authored May 3, 2024
2 parents 72b7ee5 + 68c8f7a commit 437b87f
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion cmd/vcluster/cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func ExecuteStart(ctx context.Context, options *StartOptions) error {
if err := pro.ConnectToPlatform(
ctx,
vConfig,
controllerCtx.VirtualManager.GetHTTPClient().Transport,
controllerCtx.VirtualManager,
); err != nil {
return fmt.Errorf("connect to platform: %w", err)
}
Expand Down
46 changes: 23 additions & 23 deletions devspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ vars:
# Make sure vcluster is the default namespace
DEVSPACE_FLAGS: "-n vcluster"
SYNCER_IMAGE: ghcr.io/loft-sh/loft-enterprise/dev-vcluster
COMMON_VALUES: ./test/commonValues.yaml
PRO_VALUES: ./test/proValues.yaml
COMMON_VALUES: ./test/commonValues.yaml
PRO_VALUES: ./test/proValues.yaml
VALUES_FILE: ./test/e2e/values.yaml

# Images DevSpace will build for vcluster
Expand Down Expand Up @@ -37,7 +37,7 @@ deployments:
tag: tag(${SYNCER_IMAGE})
scheduling:
tolerations:
- operator: "Exists"
- operator: "Exists"
service:
spec:
type: NodePort
Expand Down Expand Up @@ -115,21 +115,21 @@ dev:
terminal:
command: "./devspace_start.sh"
ports:
- port: 2346:2345
- port: 2346:2345
sync:
- excludePaths:
- '**'
- '!/pkg'
- 'cmd/vclusterctl/cmd/charts'
- '!/cmd'
- '!/vendor'
- '!/config'
- '!/hack'
- '!/go.mod'
- '!/go.sum'
- '!/devspace_start.sh'
- '!/manifests'
- '/manifests/coredns' # shouldn't sync to this path because it is mounted from a ConfigMap as ReadOnly
- excludePaths:
- "**"
- "!/pkg"
- "cmd/vclusterctl/cmd/charts"
- "!/cmd"
- "!/vendor"
- "!/config"
- "!/hack"
- "!/go.mod"
- "!/go.sum"
- "!/devspace_start.sh"
- "!/manifests"
- "/manifests/coredns" # shouldn't sync to this path because it is mounted from a ConfigMap as ReadOnly

# Pipelines used for vcluster
pipelines:
Expand Down Expand Up @@ -183,26 +183,26 @@ profiles:
path: deployments.vcluster-k3s.helm
value:
valuesFiles:
- ${COMMON_VALUES}
- ${VALUES_FILE}
- ${COMMON_VALUES}
- ${VALUES_FILE}

- name: test-k8s
patches:
- op: add
path: deployments.vcluster-k8s.helm
value:
valuesFiles:
- ${COMMON_VALUES}
- ${VALUES_FILE}
- ${COMMON_VALUES}
- ${VALUES_FILE}

- name: test-k0s
patches:
- op: add
path: deployments.vcluster-k0s.helm
value:
valuesFiles:
- ${COMMON_VALUES}
- ${VALUES_FILE}
- ${COMMON_VALUES}
- ${VALUES_FILE}
- name: test-pro
patches:
- op: add
Expand Down
4 changes: 2 additions & 2 deletions pkg/pro/platform.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package pro

import (
"context"
"net/http"

"github.com/loft-sh/vcluster/pkg/config"
"sigs.k8s.io/controller-runtime/pkg/manager"
)

var ConnectToPlatform = func(context.Context, *config.VirtualClusterConfig, http.RoundTripper) error {
var ConnectToPlatform = func(context.Context, *config.VirtualClusterConfig, manager.Manager) error {
return nil
}
6 changes: 3 additions & 3 deletions pkg/scheme/scheme.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
volumesnapshotv1 "github.com/kubernetes-csi/external-snapshotter/client/v4/apis/volumesnapshot/v1"
agentclusterv1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/cluster/v1"
agentstoragev1 "github.com/loft-sh/agentapi/v3/pkg/apis/loft/storage/v1"
managementv1 "github.com/loft-sh/api/v3/pkg/apis/management/v1"
"github.com/loft-sh/vcluster/pkg/apis"
apidiscoveryv2beta1 "k8s.io/api/apidiscovery/v2beta1"
apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
Expand All @@ -14,9 +15,7 @@ import (
metricsv1beta1 "k8s.io/metrics/pkg/apis/metrics/v1beta1"
)

var (
Scheme = runtime.NewScheme()
)
var Scheme = runtime.NewScheme()

func init() {
_ = clientgoscheme.AddToScheme(Scheme)
Expand All @@ -37,4 +36,5 @@ func init() {
// Register Loft CRDs
_ = agentstoragev1.AddToScheme(Scheme)
_ = agentclusterv1.AddToScheme(Scheme)
_ = managementv1.AddToScheme(Scheme)
}

0 comments on commit 437b87f

Please sign in to comment.