github.com/jingruilea/kubeedge@v1.2.0-beta.0.0.20200410162146-4bb8902b3879/edge/pkg/edged/config/config.go (about)

     1  package config
     2  
     3  import (
     4  	"sync"
     5  
     6  	"github.com/kubeedge/kubeedge/pkg/apis/componentconfig/edgecore/v1alpha1"
     7  )
     8  
     9  const (
    10  	//DockerEndpoint gives the default endpoint for docker engine
    11  	DockerEndpoint = "unix:///var/run/docker.sock"
    12  
    13  	//RemoteRuntimeEndpoint gives the default endpoint for CRI runtime
    14  	RemoteRuntimeEndpoint = "unix:///var/run/dockershim.sock"
    15  
    16  	//RemoteContainerRuntime give Remote container runtime name
    17  	RemoteContainerRuntime = "remote"
    18  
    19  	//MinimumEdgedMemoryCapacity gives the minimum default memory (2G) of edge
    20  	MinimumEdgedMemoryCapacity = 2147483647
    21  
    22  	//PodSandboxImage gives the default pause container image
    23  	PodSandboxImage = "k8s.gcr.io/pause"
    24  
    25  	// ImagePullProgressDeadlineDefault gives the default image pull progress deadline
    26  	ImagePullProgressDeadlineDefault = 60
    27  
    28  	// KubeletPort is the default port for the kubelet server on each host machine.
    29  	// May be overridden by a flag at startup in the future.
    30  	KubeletPort = 10350
    31  )
    32  
    33  var Config Configure
    34  var once sync.Once
    35  
    36  type Configure struct {
    37  	v1alpha1.Edged
    38  }
    39  
    40  func InitConfigure(e *v1alpha1.Edged) {
    41  	once.Do(func() {
    42  		Config = Configure{
    43  			Edged: *e,
    44  		}
    45  	})
    46  }