Skip to content

Commit

Permalink
Remove feature flag
Browse files Browse the repository at this point in the history
  • Loading branch information
ravicious committed Aug 1, 2024
1 parent 9f8a7f1 commit 15187ea
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 22 deletions.
6 changes: 0 additions & 6 deletions lib/teleterm/vnet/service_daemon_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,14 @@ package vnet

import (
"context"
"os"

"github.com/gravitational/trace"

api "github.com/gravitational/teleport/gen/proto/go/teleport/lib/teleterm/vnet/v1"
"github.com/gravitational/teleport/lib/vnet"
vnetdaemon "github.com/gravitational/teleport/lib/vnet/daemon"
)

func (s *Service) GetBackgroundItemStatus(ctx context.Context, req *api.GetBackgroundItemStatusRequest) (*api.GetBackgroundItemStatusResponse, error) {
if os.Getenv(vnet.EnvFeatureFlag) != "yes" {
return nil, trace.NotImplemented("tsh was built with VNet daemon support, but the feature flag is not enabled")
}

status, err := vnetdaemon.DaemonStatus()
if err != nil {
return nil, trace.Wrap(err)
Expand Down
10 changes: 1 addition & 9 deletions lib/vnet/setup_daemon_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,14 @@ package vnet

import (
"context"
"os"

"github.com/gravitational/trace"

"github.com/gravitational/teleport/lib/vnet/daemon"
)

const EnvFeatureFlag = "VNETDAEMON"

func execAdminProcess(ctx context.Context, config daemon.Config) error {
// TODO(ravicious): Remove the feature env var after the daemon gets implemented.
if os.Getenv(EnvFeatureFlag) == "yes" {
return trace.Wrap(daemon.RegisterAndCall(ctx, config))
}

return trace.Wrap(execAdminSubcommand(ctx, config))
return trace.Wrap(daemon.RegisterAndCall(ctx, config))
}

func DaemonSubcommand(ctx context.Context) error {
Expand Down
3 changes: 0 additions & 3 deletions web/packages/teleterm/src/mainProcess/mainProcess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,6 @@ export default class MainProcess {
env: {
...process.env,
TELEPORT_HOME: homeDir,
VNETDAEMON: this.configService.get('feature.vnetDaemon').value
? 'yes'
: undefined,
},
}
);
Expand Down
4 changes: 0 additions & 4 deletions web/packages/teleterm/src/services/config/appConfigSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,6 @@ export const createAppConfigSchema = (platform: Platform) => {
.boolean()
.default(false)
.describe('Disables SSH connection resumption.'),
'feature.vnetDaemon': z
.boolean()
.default(false)
.describe('Use daemon instead of osascript for VNet'),
});
};

Expand Down

0 comments on commit 15187ea

Please sign in to comment.