@@ -35,23 +35,23 @@ var (
3535)
3636
3737func GetK8sAPIServer () string {
38- // if m3 is running inside a k8s pod KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT will contain the k8s api server apiServerAddress
39- // if m3 is not running inside k8s by default will look for the k8s api server on localhost:8001 (kubectl proxy)
38+ // if console is running inside a k8s pod KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT will contain the k8s api server apiServerAddress
39+ // if console is not running inside k8s by default will look for the k8s api server on localhost:8001 (kubectl proxy)
4040 // NOTE: using kubectl proxy is for local development only, since every request send to localhost:8001 will bypass service account authentication
4141 // more info here: https://kubernetes.io/docs/tasks/access-application-cluster/access-cluster/#directly-accessing-the-rest-api
42- // you can override this using M3_K8S_API_SERVER , ie use the k8s cluster from `kubectl config view`
42+ // you can override this using MCS_K8S_API_SERVER , ie use the k8s cluster from `kubectl config view`
4343 host , port := env .Get ("KUBERNETES_SERVICE_HOST" , "" ), env .Get ("KUBERNETES_SERVICE_PORT" , "" )
4444 apiServerAddress := "http://localhost:8001"
4545 if host != "" && port != "" {
4646 apiServerAddress = "https://" + net .JoinHostPort (host , port )
4747 }
48- return env .Get (M3K8sAPIServer , apiServerAddress )
48+ return env .Get (McsK8sAPIServer , apiServerAddress )
4949}
5050
5151// getK8sAPIServerInsecure allow to tell the k8s client to skip TLS certificate verification, ie: when connecting to a k8s cluster
5252// that uses certificate not trusted by your machine
5353func getK8sAPIServerInsecure () bool {
54- return strings .ToLower (env .Get (m3k8SAPIServerInsecure , "off" )) == "on"
54+ return strings .ToLower (env .Get (McsK8SAPIServerInsecure , "off" )) == "on"
5555}
5656
5757// GetNsFromFile assumes console is running inside a k8s pod and extract the current namespace from the
@@ -69,7 +69,7 @@ var namespace = GetNsFromFile()
6969
7070// Returns the namespace in which the controller is installed
7171func GetNs () string {
72- return env .Get (M3Namespace , namespace )
72+ return env .Get (McsNamespace , namespace )
7373}
7474
7575// getLatestMinIOImage returns the latest docker image for MinIO if found on the internet
@@ -106,7 +106,7 @@ var latestMinIOImage, errLatestMinIOImage = getLatestMinIOImage(
106106// a preferred image to be used (configured via ENVIRONMENT VARIABLES) GetMinioImage will return that
107107// if not, GetMinioImage will try to obtain the image URL for the latest version of MinIO and return that
108108func GetMinioImage () (* string , error ) {
109- image := strings .TrimSpace (env .Get (M3MinioImage , "" ))
109+ image := strings .TrimSpace (env .Get (McsMinioImage , "" ))
110110 // if there is a preferred image configured by the user we'll always return that
111111 if image != "" {
112112 return & image , nil
@@ -156,7 +156,7 @@ func getLatestMCImage() (*string, error) {
156156var latestMCImage , errLatestMCImage = getLatestMCImage ()
157157
158158func GetMCImage () (* string , error ) {
159- image := strings .TrimSpace (env .Get (M3MCImage , "" ))
159+ image := strings .TrimSpace (env .Get (McsMCImage , "" ))
160160 // if there is a preferred image configured by the user we'll always return that
161161 if image != "" {
162162 return & image , nil
0 commit comments