Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
63e1c554b7 | ||
|
|
a9d8f3fc41 | ||
|
|
59bf546b4a |
@@ -23,6 +23,33 @@ builds:
|
||||
goarch:
|
||||
- amd64
|
||||
- arm64
|
||||
|
||||
ignore:
|
||||
- goos: darwin
|
||||
goarch: arm64
|
||||
- goos: darwin
|
||||
goarch: arm
|
||||
- goos: darwin
|
||||
goarch: ppc64le
|
||||
- goos: darwin
|
||||
goarch: s390x
|
||||
- goos: windows
|
||||
goarch: arm64
|
||||
- goos: windows
|
||||
goarch: arm
|
||||
- goos: windows
|
||||
goarch: ppc64le
|
||||
- goos: windows
|
||||
goarch: s390x
|
||||
- goos: freebsd
|
||||
goarch: arm
|
||||
- goos: freebsd
|
||||
goarch: arm64
|
||||
- goos: freebsd
|
||||
goarch: ppc64le
|
||||
- goos: freebsd
|
||||
goarch: s390x
|
||||
|
||||
env:
|
||||
- CGO_ENABLED=0
|
||||
main: ./cmd/console/
|
||||
|
||||
@@ -15,7 +15,7 @@ spec:
|
||||
serviceAccountName: console-sa
|
||||
containers:
|
||||
- name: console
|
||||
image: minio/console:v0.3.4
|
||||
image: minio/console:v0.3.6
|
||||
imagePullPolicy: "IfNotPresent"
|
||||
args:
|
||||
- server
|
||||
|
||||
@@ -15,7 +15,7 @@ spec:
|
||||
serviceAccountName: console-sa
|
||||
containers:
|
||||
- name: console
|
||||
image: minio/console:v0.3.4
|
||||
image: minio/console:v0.3.6
|
||||
imagePullPolicy: "IfNotPresent"
|
||||
env:
|
||||
- name: CONSOLE_OPERATOR_MODE
|
||||
|
||||
@@ -1,115 +0,0 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// This file is part of MinIO Console Server
|
||||
// Copyright (c) 2020 MinIO, Inc.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
|
||||
package models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
"github.com/go-openapi/validate"
|
||||
)
|
||||
|
||||
// EncryptionKesConfig encryption kes config
|
||||
//
|
||||
// swagger:model encryptionKesConfig
|
||||
type EncryptionKesConfig struct {
|
||||
|
||||
// server cert
|
||||
// Required: true
|
||||
ServerCert *string `json:"server_cert"`
|
||||
|
||||
// server config
|
||||
// Required: true
|
||||
ServerConfig *string `json:"server_config"`
|
||||
|
||||
// server key
|
||||
// Required: true
|
||||
ServerKey *string `json:"server_key"`
|
||||
}
|
||||
|
||||
// Validate validates this encryption kes config
|
||||
func (m *EncryptionKesConfig) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateServerCert(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateServerConfig(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateServerKey(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *EncryptionKesConfig) validateServerCert(formats strfmt.Registry) error {
|
||||
|
||||
if err := validate.Required("server_cert", "body", m.ServerCert); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *EncryptionKesConfig) validateServerConfig(formats strfmt.Registry) error {
|
||||
|
||||
if err := validate.Required("server_config", "body", m.ServerConfig); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *EncryptionKesConfig) validateServerKey(formats strfmt.Registry) error {
|
||||
|
||||
if err := validate.Required("server_key", "body", m.ServerKey); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *EncryptionKesConfig) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *EncryptionKesConfig) UnmarshalBinary(b []byte) error {
|
||||
var res EncryptionKesConfig
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
||||
@@ -1,269 +0,0 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// This file is part of MinIO Console Server
|
||||
// Copyright (c) 2020 MinIO, Inc.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
|
||||
package models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
"github.com/go-openapi/validate"
|
||||
)
|
||||
|
||||
// KesConfiguration kes configuration
|
||||
//
|
||||
// swagger:model kesConfiguration
|
||||
type KesConfiguration struct {
|
||||
|
||||
// client
|
||||
// Required: true
|
||||
Client *KesConfigurationClient `json:"client"`
|
||||
|
||||
// server
|
||||
// Required: true
|
||||
Server *KesConfigurationServer `json:"server"`
|
||||
|
||||
// server config yaml
|
||||
// Required: true
|
||||
ServerConfigYaml *string `json:"server-config.yaml"`
|
||||
}
|
||||
|
||||
// Validate validates this kes configuration
|
||||
func (m *KesConfiguration) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateClient(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateServer(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateServerConfigYaml(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *KesConfiguration) validateClient(formats strfmt.Registry) error {
|
||||
|
||||
if err := validate.Required("client", "body", m.Client); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if m.Client != nil {
|
||||
if err := m.Client.Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("client")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *KesConfiguration) validateServer(formats strfmt.Registry) error {
|
||||
|
||||
if err := validate.Required("server", "body", m.Server); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if m.Server != nil {
|
||||
if err := m.Server.Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("server")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *KesConfiguration) validateServerConfigYaml(formats strfmt.Registry) error {
|
||||
|
||||
if err := validate.Required("server-config.yaml", "body", m.ServerConfigYaml); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *KesConfiguration) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *KesConfiguration) UnmarshalBinary(b []byte) error {
|
||||
var res KesConfiguration
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
||||
|
||||
// KesConfigurationClient kes configuration client
|
||||
//
|
||||
// swagger:model KesConfigurationClient
|
||||
type KesConfigurationClient struct {
|
||||
|
||||
// tls crt
|
||||
// Required: true
|
||||
TLSCrt *string `json:"tls.crt"`
|
||||
|
||||
// tls key
|
||||
// Required: true
|
||||
TLSKey *string `json:"tls.key"`
|
||||
}
|
||||
|
||||
// Validate validates this kes configuration client
|
||||
func (m *KesConfigurationClient) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateTLSCrt(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateTLSKey(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *KesConfigurationClient) validateTLSCrt(formats strfmt.Registry) error {
|
||||
|
||||
if err := validate.Required("client"+"."+"tls.crt", "body", m.TLSCrt); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *KesConfigurationClient) validateTLSKey(formats strfmt.Registry) error {
|
||||
|
||||
if err := validate.Required("client"+"."+"tls.key", "body", m.TLSKey); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *KesConfigurationClient) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *KesConfigurationClient) UnmarshalBinary(b []byte) error {
|
||||
var res KesConfigurationClient
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
||||
|
||||
// KesConfigurationServer kes configuration server
|
||||
//
|
||||
// swagger:model KesConfigurationServer
|
||||
type KesConfigurationServer struct {
|
||||
|
||||
// tls crt
|
||||
// Required: true
|
||||
TLSCrt *string `json:"tls.crt"`
|
||||
|
||||
// tls key
|
||||
// Required: true
|
||||
TLSKey *string `json:"tls.key"`
|
||||
}
|
||||
|
||||
// Validate validates this kes configuration server
|
||||
func (m *KesConfigurationServer) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateTLSCrt(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateTLSKey(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *KesConfigurationServer) validateTLSCrt(formats strfmt.Registry) error {
|
||||
|
||||
if err := validate.Required("server"+"."+"tls.crt", "body", m.TLSCrt); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *KesConfigurationServer) validateTLSKey(formats strfmt.Registry) error {
|
||||
|
||||
if err := validate.Required("server"+"."+"tls.key", "body", m.TLSKey); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *KesConfigurationServer) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *KesConfigurationServer) UnmarshalBinary(b []byte) error {
|
||||
var res KesConfigurationServer
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
||||
@@ -32,8 +32,11 @@ import (
|
||||
// swagger:model tenantUsage
|
||||
type TenantUsage struct {
|
||||
|
||||
// used size
|
||||
UsedSize int64 `json:"used_size,omitempty"`
|
||||
// disk used
|
||||
DiskUsed int64 `json:"disk_used,omitempty"`
|
||||
|
||||
// used
|
||||
Used int64 `json:"used,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this tenant usage
|
||||
|
||||
@@ -250,7 +250,10 @@ const Login = ({ classes, userLoggedIn }: ILoginProps) => {
|
||||
</Typography>
|
||||
<Button
|
||||
component={"a"}
|
||||
href={loginStrategy.redirect.replace("%5BHOSTNAME%5D", window.location.hostname)}
|
||||
href={loginStrategy.redirect.replace(
|
||||
"%5BHOSTNAME%5D",
|
||||
window.location.hostname
|
||||
)}
|
||||
type="submit"
|
||||
fullWidth
|
||||
variant="contained"
|
||||
|
||||
@@ -768,7 +768,7 @@ func getTenantCreatedResponse(session *models.Principal, params admin_api.Create
|
||||
return nil, err
|
||||
}
|
||||
|
||||
const consoleVersion = "minio/console:v0.3.4"
|
||||
const consoleVersion = "minio/console:v0.3.6"
|
||||
minInst.Spec.Console = &operator.ConsoleConfiguration{
|
||||
Replicas: 2,
|
||||
Image: consoleVersion,
|
||||
@@ -939,6 +939,7 @@ func getTenantUsageResponse(session *models.Principal, params admin_api.GetTenan
|
||||
|
||||
opClientClientSet, err := cluster.OperatorClient(session.SessionToken)
|
||||
if err != nil {
|
||||
log.Println("error operator client", err)
|
||||
return nil, err
|
||||
}
|
||||
clientset, err := cluster.K8sClient(session.SessionToken)
|
||||
@@ -989,7 +990,7 @@ func getTenantUsageResponse(session *models.Principal, params admin_api.GetTenan
|
||||
log.Println("error getting admin info:", err)
|
||||
return nil, err
|
||||
}
|
||||
info := &models.TenantUsage{UsedSize: adminInfo.Usage}
|
||||
info := &models.TenantUsage{Used: adminInfo.Usage, DiskUsed: adminInfo.DisksUsage}
|
||||
return info, nil
|
||||
}
|
||||
|
||||
|
||||
@@ -3000,7 +3000,11 @@ func init() {
|
||||
"tenantUsage": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"used_size": {
|
||||
"disk_used": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"used": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
}
|
||||
@@ -6821,7 +6825,11 @@ func init() {
|
||||
"tenantUsage": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"used_size": {
|
||||
"disk_used": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"used": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
}
|
||||
|
||||
@@ -1733,7 +1733,10 @@ definitions:
|
||||
tenantUsage:
|
||||
type: object
|
||||
properties:
|
||||
used_size:
|
||||
used:
|
||||
type: integer
|
||||
format: int64
|
||||
disk_used:
|
||||
type: integer
|
||||
format: int64
|
||||
|
||||
|
||||
Reference in New Issue
Block a user