Skip to content

Commit ce495eb

Browse files
authored
Remove DirectPV UI and Handlers (#1510)
Signed-off-by: Daniel Valdivia <[email protected]>
1 parent 6701b4f commit ce495eb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+27
-4334
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ swagger-operator:
107107
@swagger generate server -A operator --main-package=operator --server-package=api --exclude-main -P models.Principal -f ./swagger.yml -r NOTICE
108108
@echo "Generating typescript api"
109109
@npx swagger-typescript-api -p ./swagger.yml -o ./web-app/src/api -n operatorApi.ts
110+
@(cd web-app && prettier -w .)
110111

111112

112113
swagger-gen: clean-swagger swagger-operator apply-gofmt

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,13 @@ default `StorageClass` may use the `Immediate` setting, which can cause complica
9797
strongly recommends creating a custom `StorageClass` for use by `PV` supporting a MinIO Tenant.
9898

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

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

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

164164
## Procedure

api/config.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,6 @@ func getMarketplace() string {
7575
return env.Get(Marketplace, "")
7676
}
7777

78-
// Get DirectPVMode
79-
func getDirectPVEnabled() bool {
80-
currentMode := env.Get(DirectPVMode, "off")
81-
return currentMode == "on"
82-
}
83-
8478
// MinIOConfig represents application configuration passed in from the MinIO
8579
// server to the console.
8680
type MinIOConfig struct {

api/config_test.go

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ package api
1919
import (
2020
"os"
2121
"testing"
22-
23-
"github.com/stretchr/testify/assert"
2422
)
2523

2624
func Test_getK8sSAToken(t *testing.T) {
@@ -98,39 +96,3 @@ func Test_getMarketplace(t *testing.T) {
9896
})
9997
}
10098
}
101-
102-
func Test_getDirectPVEnabled(t *testing.T) {
103-
type args struct {
104-
setEnv bool
105-
}
106-
tests := []struct {
107-
name string
108-
want bool
109-
args args
110-
}{
111-
{
112-
name: "DirectPV Mode is Set",
113-
want: true,
114-
args: args{
115-
setEnv: true,
116-
},
117-
},
118-
{
119-
name: "DirectPV Mode is not set",
120-
want: false,
121-
args: args{
122-
setEnv: false,
123-
},
124-
},
125-
}
126-
for _, tt := range tests {
127-
t.Run(tt.name, func(t *testing.T) {
128-
if tt.args.setEnv {
129-
os.Setenv(DirectPVMode, "on")
130-
} else {
131-
os.Unsetenv(DirectPVMode)
132-
}
133-
assert.Equalf(t, tt.want, getDirectPVEnabled(), "getDirectPVEnabled()")
134-
})
135-
}
136-
}

0 commit comments

Comments
 (0)