Boundary Plugin MinIO (#4621)

feat(storage): Add storage support for MinIO via new built-in plugin
This commit is contained in:
dani authored and GitHub committed 2024-04-12 11:28:40 -04:00
1 parent a79e35da54
commit 1a77e4da86
11 files changed
+517

No files matched your search

+6
View File
@@ -37,8 +37,12 @@ const (
EnabledPluginLoopback
EnabledPluginAws
EnabledPluginHostAzure
EnabledPluginMinio
)
// MinioEnabled controls if the Minio storage plugin should be initiated or not
var MinioEnabled bool
func (e EnabledPlugin) String() string {
switch e {
case EnabledPluginLoopback:
@@ -47,6 +51,8 @@ func (e EnabledPlugin) String() string {
return "AWS"
case EnabledPluginHostAzure:
return "Azure"
case EnabledPluginMinio:
return "MinIO"
default:
return ""
}
+11
View File
@@ -0,0 +1,11 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
//go:build !netbsd
// +build !netbsd
package base
func init() {
MinioEnabled = true
}
+3
View File
@@ -825,6 +825,9 @@ func (c *Command) Run(args []string) int {
{
c.EnabledPlugins = append(c.EnabledPlugins, base.EnabledPluginAws, base.EnabledPluginHostAzure)
if base.MinioEnabled {
c.EnabledPlugins = append(c.EnabledPlugins, base.EnabledPluginMinio)
}
conf := &controller.Config{
RawConfig: c.Config,
Server: c.Server,
+5
View File
@@ -496,8 +496,13 @@ func (c *Command) Run(args []string) int {
}
}
// append storage-enabled plugins
c.EnabledPlugins = append(c.EnabledPlugins, base.EnabledPluginAws)
if base.MinioEnabled {
c.EnabledPlugins = append(c.EnabledPlugins, base.EnabledPluginMinio)
}
if c.Config.Controller != nil {
// append host-only plugins
c.EnabledPlugins = append(c.EnabledPlugins, base.EnabledPluginHostAzure)
if err := c.StartController(c.Context); err != nil {
c.UI.Error(err.Error())