diff --git a/cluster/config.go b/cluster/config.go index 5cc67e071..96ac280ff 100644 --- a/cluster/config.go +++ b/cluster/config.go @@ -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 diff --git a/cluster/const.go b/cluster/const.go index a4fe77fa4..b0f82bf0b 100644 --- a/cluster/const.go +++ b/cluster/const.go @@ -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" ) diff --git a/operatorapi/config.go b/operatorapi/config.go index 0627cd90e..195f26610 100644 --- a/operatorapi/config.go +++ b/operatorapi/config.go @@ -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 diff --git a/pkg/apis/networking.gke.io/v1beta1/register.go b/pkg/apis/networking.gke.io/v1beta1/register.go index 3fdb2e2b3..1affd874a 100644 --- a/pkg/apis/networking.gke.io/v1beta1/register.go +++ b/pkg/apis/networking.gke.io/v1beta1/register.go @@ -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() { diff --git a/restapi/client-admin.go b/restapi/client-admin.go index 33e7c1a50..39b3289dd 100644 --- a/restapi/client-admin.go +++ b/restapi/client-admin.go @@ -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{ diff --git a/restapi/config.go b/restapi/config.go index 70a471a27..6fd274948 100644 --- a/restapi/config.go +++ b/restapi/config.go @@ -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 diff --git a/restapi/consts.go b/restapi/consts.go index c1a0b322d..8a76d5045 100644 --- a/restapi/consts.go +++ b/restapi/consts.go @@ -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" diff --git a/restapi/utils.go b/restapi/utils.go index b376a476d..6a0e853be 100644 --- a/restapi/utils.go +++ b/restapi/utils.go @@ -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{