Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
9 changes: 1 addition & 8 deletions cli/internal/cmd/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ marblerun install --dcap-pccs-url https://pccs.example.com/sgx/certification/v4/
cmd.Flags().String("dcap-secure-cert", "TRUE", "To accept insecure HTTPS certificate from the PCCS, set this option to FALSE. Mutually exclusive with \"--dcap-qcnl-config-file\"")
cmd.Flags().Bool("simulation", false, "Set MarbleRun to start in simulation mode")
cmd.Flags().Bool("disable-auto-injection", false, "Install MarbleRun without auto-injection webhook")
cmd.Flags().Bool("wait", false, "Wait for MarbleRun installation to complete before returning")
cmd.Flags().Int("mesh-server-port", 2001, "Set the mesh server port. Needs to be configured to the same port as in the data-plane marbles")
cmd.Flags().Int("client-server-port", 4433, "Set the client server port. Needs to be configured to the same port as in your client tool stack")

Expand Down Expand Up @@ -138,7 +137,7 @@ func cliInstall(cmd *cobra.Command, helmClient *helm.Client, kubeClient kubernet
return errorAndCleanup(cmd.Context(), fmt.Errorf("generating helm values: %w", err), kubeClient, namespace)
}

if err := helmClient.Install(cmd.Context(), flags.wait, chart, values); err != nil {
if err := helmClient.Install(cmd.Context(), chart, values); err != nil {
return errorAndCleanup(cmd.Context(), fmt.Errorf("installing MarbleRun: %w", err), kubeClient, namespace)
}

Expand Down Expand Up @@ -288,7 +287,6 @@ type installFlags struct {
distributedDeployment bool
simulation bool
disableInjection bool
wait bool
clientPort int
meshPort int
}
Expand Down Expand Up @@ -334,10 +332,6 @@ func parseInstallFlags(cmd *cobra.Command) (installFlags, error) {
if err != nil {
return installFlags{}, err
}
wait, err := cmd.Flags().GetBool("wait")
if err != nil {
return installFlags{}, err
}
clientPort, err := cmd.Flags().GetInt("client-server-port")
if err != nil {
return installFlags{}, err
Expand All @@ -358,7 +352,6 @@ func parseInstallFlags(cmd *cobra.Command) (installFlags, error) {
distributedDeployment: distributedDeployment,
simulation: simulation,
disableInjection: disableInjection,
wait: wait,
clientPort: clientPort,
meshPort: meshPort,
}, nil
Expand Down
9 changes: 1 addition & 8 deletions cli/internal/cmd/uninstall.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ func NewUninstallCmd() *cobra.Command {
Args: cobra.NoArgs,
RunE: runUninstall,
}

cmd.Flags().Bool("wait", false, "Wait for the uninstallation to complete before returning")

return cmd
}

Expand All @@ -53,11 +50,7 @@ func runUninstall(cmd *cobra.Command, _ []string) error {
func cliUninstall(
cmd *cobra.Command, helmClient *helm.Client, kubeClient kubernetes.Interface, namespace string,
) error {
wait, err := cmd.Flags().GetBool("wait")
if err != nil {
return err
}
if err := helmClient.Uninstall(wait); err != nil {
if err := helmClient.Uninstall(); err != nil {
return err
}

Expand Down
13 changes: 4 additions & 9 deletions cli/internal/helm/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,15 +190,12 @@ func UpdateValues(options Options, chartValues map[string]any) (map[string]any,
}

// Install installs MarbleRun using the provided chart and values.
func (c *Client) Install(ctx context.Context, wait bool, chart *chart.Chart, values map[string]any) error {
func (c *Client) Install(ctx context.Context, chart *chart.Chart, values map[string]any) error {
installer := action.NewInstall(c.config)
installer.Namespace = c.namespace
installer.ReleaseName = release
installer.CreateNamespace = true
if wait {
installer.WaitStrategy = kube.StatusWatcherStrategy
installer.WaitForJobs = true
}
installer.WaitStrategy = kube.StatusWatcherStrategy
installer.Timeout = time.Minute * 5

if err := util.ValidateAgainstSchema(chart, values); err != nil {
Expand All @@ -210,11 +207,9 @@ func (c *Client) Install(ctx context.Context, wait bool, chart *chart.Chart, val
}

// Uninstall removes the MarbleRun deployment from the cluster.
func (c *Client) Uninstall(wait bool) error {
func (c *Client) Uninstall() error {
uninstaller := action.NewUninstall(c.config)
if wait {
uninstaller.WaitStrategy = kube.StatusWatcherStrategy
}
uninstaller.WaitStrategy = kube.StatusWatcherStrategy
uninstaller.Timeout = time.Minute * 5

_, err := uninstaller.Run(release)
Expand Down
2 changes: 0 additions & 2 deletions docs/docs/reference/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ marblerun install --dcap-pccs-url https://pccs.example.com/sgx/certification/v4/
--resource-key string Resource providing SGX, different depending on used device plugin. Use this to set tolerations/resources if your device plugin is not supported by MarbleRun
--simulation Set MarbleRun to start in simulation mode
--version string Version of the Coordinator to install, latest by default
--wait Wait for MarbleRun installation to complete before returning
```

### Options inherited from parent commands
Expand Down Expand Up @@ -112,7 +111,6 @@ marblerun uninstall [flags]

```
-h, --help help for uninstall
--wait Wait for the uninstallation to complete before returning
```

### Options inherited from parent commands
Expand Down