Skip to content

Commit

Permalink
Remove DirectPV UI and Handlers (#1510)
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
  • Loading branch information
dvaldivia authored Mar 16, 2023
1 parent 6701b4f commit ce495eb
Show file tree
Hide file tree
Showing 55 changed files with 27 additions and 4,334 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ swagger-operator:
@swagger generate server -A operator --main-package=operator --server-package=api --exclude-main -P models.Principal -f ./swagger.yml -r NOTICE
@echo "Generating typescript api"
@npx swagger-typescript-api -p ./swagger.yml -o ./web-app/src/api -n operatorApi.ts
@(cd web-app && prettier -w .)


swagger-gen: clean-swagger swagger-operator apply-gofmt
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@ default `StorageClass` may use the `Immediate` setting, which can cause complica
strongly recommends creating a custom `StorageClass` for use by `PV` supporting a MinIO Tenant.

The following `StorageClass` object contains the appropriate fields for supporting a MinIO Tenant using
[MinIO DirectCSI-managed drives](https://github.com/minio/direct-csi):
[MinIO DirectPV-managed drives](https://github.com/minio/directpv):

```yaml
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: direct-csi-min-io
name: directpv-min-io
provisioner: kubernetes.io/no-provisioner
volumeBindingMode: WaitForFirstConsumer
```
Expand All @@ -116,10 +116,10 @@ sufficient [Persistent Volumes](https://kubernetes.io/docs/concepts/storage/pers
requirements of each PVC for the tenant to start correctly. For example, deploying a Tenant with 16 volumes requires
18 (16 + 2). If each PVC requests 1TB capacity, then each PV must also provide *at least* 1TB of capacity.
MinIO recommends using the [MinIO DirectCSI Driver](https://github.com/minio/direct-csi) to automatically provision
MinIO recommends using the [MinIO DirectPV Driver](https://github.com/minio/directpv) to automatically provision
Persistent Volumes from locally attached drives. This procedure assumes MinIO DirectCSI is installed and configured.
For clusters which cannot deploy MinIO DirectCSI,
For clusters which cannot deploy MinIO DirectPV,
use [Local Persistent Volumes](https://kubernetes.io/docs/concepts/storage/volumes/#local). The following example YAML
describes a local persistent volume:
Expand Down Expand Up @@ -158,7 +158,7 @@ drives per node. For example, a 4-node Tenant with 4 drives per node requires 16
MinIO *strongly recommends* using the following CSI drivers for creating local PV to ensure best object storage
performance:

- [MinIO DirectCSI](https://github.com/minio/direct-csi)
- [MinIO DirectPV](https://github.com/minio/directpv)
- [Local Persistent Volume](https://kubernetes.io/docs/concepts/storage/volumes/#local)

## Procedure
Expand Down
6 changes: 0 additions & 6 deletions api/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,6 @@ func getMarketplace() string {
return env.Get(Marketplace, "")
}

// Get DirectPVMode
func getDirectPVEnabled() bool {
currentMode := env.Get(DirectPVMode, "off")
return currentMode == "on"
}

// MinIOConfig represents application configuration passed in from the MinIO
// server to the console.
type MinIOConfig struct {
Expand Down
38 changes: 0 additions & 38 deletions api/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ package api
import (
"os"
"testing"

"github.com/stretchr/testify/assert"
)

func Test_getK8sSAToken(t *testing.T) {
Expand Down Expand Up @@ -98,39 +96,3 @@ func Test_getMarketplace(t *testing.T) {
})
}
}

func Test_getDirectPVEnabled(t *testing.T) {
type args struct {
setEnv bool
}
tests := []struct {
name string
want bool
args args
}{
{
name: "DirectPV Mode is Set",
want: true,
args: args{
setEnv: true,
},
},
{
name: "DirectPV Mode is not set",
want: false,
args: args{
setEnv: false,
},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if tt.args.setEnv {
os.Setenv(DirectPVMode, "on")
} else {
os.Unsetenv(DirectPVMode)
}
assert.Equalf(t, tt.want, getDirectPVEnabled(), "getDirectPVEnabled()")
})
}
}
Loading

0 comments on commit ce495eb

Please sign in to comment.