Remove un-used code (#1729)

This commit is contained in:
Daniel Valdivia
2022-03-16 21:29:43 -07:00
committed by GitHub
parent bf8db812b8
commit 0c38e93b83
8 changed files with 0 additions and 31 deletions

View File

@@ -58,9 +58,6 @@ func GetNsFromFile() string {
return string(dat)
}
// Namespace will run only once at console startup
var Namespace = GetNsFromFile()
// GetMinioImage returns the image URL to be used when deploying a MinIO instance, if there is
// a preferred image to be used (configured via ENVIRONMENT VARIABLES) GetMinioImage will return that
// if not, GetMinioImage will try to obtain the image URL for the latest version of MinIO and return that

View File

@@ -20,5 +20,4 @@ const (
ConsoleK8sAPIServer = "CONSOLE_K8S_API_SERVER"
ConsoleK8SAPIServerTLSRootCA = "CONSOLE_K8S_API_SERVER_TLS_ROOT_CA"
ConsoleMinioImage = "CONSOLE_MINIO_IMAGE"
ConsoleMCImage = "CONSOLE_MC_IMAGE"
)

View File

@@ -47,7 +47,6 @@ var (
// LicenseKey in memory license key used by console ui
LicenseKey = ""
// GlobalRootCAs is CA root certificates, a nil value means system certs pool will be used
GlobalRootCAs *x509.CertPool
// GlobalPublicCerts has certificates Console will use to serve clients

View File

@@ -34,8 +34,6 @@ var (
// SchemeBuilder points to a list of functions added to Scheme.
SchemeBuilder runtime.SchemeBuilder
localSchemeBuilder = &SchemeBuilder
// AddToScheme applies all stored functions to Scheme.
AddToScheme = localSchemeBuilder.AddToScheme
)
func init() {

View File

@@ -35,11 +35,6 @@ import (
const globalAppName = "MinIO Console"
// NewAdminClient gives a new madmin client interface
func NewAdminClient(url, accessKey, secretKey, sessionToken string) (*madmin.AdminClient, *probe.Error) {
return NewAdminClientWithInsecure(url, accessKey, secretKey, sessionToken, false)
}
// NewAdminClientWithInsecure gives a new madmin client interface either secure or insecure based on parameter
func NewAdminClientWithInsecure(url, accessKey, secretKey, sessionToken string, insecure bool) (*madmin.AdminClient, *probe.Error) {
s3Client, err := s3AdminNew(&mcCmd.Config{

View File

@@ -231,12 +231,6 @@ func getPrometheusJobID() string {
return env.Get(PrometheusJobID, "minio-job")
}
// GetSubnetLicense returns the current subnet jwt license
func GetSubnetLicense() string {
// fallback to console license env variable
return env.Get(ConsoleSubnetLicense, "")
}
var (
// GlobalRootCAs is CA root certificates, a nil value means system certs pool will be used
GlobalRootCAs *x509.CertPool

View File

@@ -24,11 +24,8 @@ const (
ConsoleMinIORegion = "CONSOLE_MINIO_REGION"
ConsoleHostname = "CONSOLE_HOSTNAME"
ConsolePort = "CONSOLE_PORT"
ConsoleTLSHostname = "CONSOLE_TLS_HOSTNAME"
ConsoleTLSPort = "CONSOLE_TLS_PORT"
ConsoleSubnetLicense = "CONSOLE_SUBNET_LICENSE"
MinIOConfigEnvFile = "MINIO_CONFIG_ENV_FILE"
MinIOSubnetLicense = "MINIO_SUBNET_LICENSE"
// Constants for Secure middleware
ConsoleSecureAllowedHosts = "CONSOLE_SECURE_ALLOWED_HOSTS"

View File

@@ -20,7 +20,6 @@ import (
"crypto/rand"
"io"
"net/http"
"os"
"strings"
"time"
@@ -98,15 +97,6 @@ func UniqueKeys(a []string) []string {
return list
}
// FileExists verifies if a file exist on the desired location and its not a folder
func FileExists(filename string) bool {
info, err := os.Stat(filename)
if os.IsNotExist(err) {
return false
}
return !info.IsDir()
}
func NewSessionCookieForConsole(token string) http.Cookie {
sessionDuration := xjwt.GetConsoleSTSDuration()
return http.Cookie{