Documentation
¶
Index ¶
Constants ¶
const ( GCSFuseAppName = "gke-gcs-fuse-csi" TempDir = "/temp-dir" TokenFileName = "token.sock" // #nosec G101 KernelParamsFileConfigFlag = "file-system:kernel-params-file" )
Variables ¶
var DisallowedFlags = map[string]string{ "log-file": "logging:file-path", "log-format": "logging:format", "o": "o", "cache-dir": "cache-dir", "temp-dir": "temp-dir", "config-file": "config-file", "foreground": "foreground", "key-file": "gcs-auth:key-file", "token-url": "gcs-auth:token-url", "reuse-token-from-url": "gcs-auth:reuse-token-from-url", "prometheus-port": "prometheus-port", "kernel-params-file": "file-system:kernel-params-file", KernelParamsFileConfigFlag: KernelParamsFileConfigFlag, }
DisallowedFlags is a map of flags that are disallowed to be passed to sidecar mounter directly. They are mapped to their config file style representation so that they can be passed in config file format as a workaround to bypass the disallowed flags validation. Note: If you add a new disallowed flag here that is needed for integration testing, you should also update the ParseConfigFlags() logic in test/e2e/utils/utils.go to handle it.
Functions ¶
func NewErrorWriter ¶
func NewErrorWriter(errorFile string) stderrWriterInterface
Types ¶
type MountConfig ¶
type MountConfig struct {
FileDescriptor int `json:"-"`
VolumeName string `json:"volumeName,omitempty"`
BucketName string `json:"bucketName,omitempty"`
BufferDir string `json:"-"`
CacheDir string `json:"-"`
TempDir string `json:"-"`
ConfigFile string `json:"-"`
Options []string `json:"options,omitempty"`
ErrWriter stderrWriterInterface `json:"-"`
FlagMap map[string]string `json:"-"`
ConfigFileFlagMap map[string]string `json:"-"`
TokenServerIdentityProvider string `json:"-"`
HostNetworkKSAOptIn bool `json:"-"`
EnableGCSFuseKernelParams bool `json:"-"`
EnableCloudProfilerForSidecar bool `json:"-"`
PodNamespace string `json:"-"`
ServiceAccountName string `json:"-"`
PodName string `json:"-"`
PodUID string `json:"-"`
EnableSidecarBucketAccessCheck bool `json:"-"`
TokenServerIdentityPool string `json:"-"`
SidecarRetryConfig sidecarRetryConfig `json:"-"`
FileCacheMedium string `json:"-"`
GcsFuseNumaNode int `json:"-"`
CustomEndpoint string `json:"-"`
EnableAutoGoMemLimit bool `json:"-"`
AutoGoMemLimitRatio float64 `json:"-"`
StorageEndpoint string `json:"-"`
}
MountConfig contains the information gcsfuse needs.
func NewMountConfig ¶ added in v0.1.14
func NewMountConfig(sp string, flagMapFromDriver map[string]string) *MountConfig
Fetch the following information from a given socket path: 1. Pod volume name 2. The file descriptor 3. GCS bucket name 4. Mount options passing to gcsfuse (passed by the csi mounter).
func (*MountConfig) EnsureErrWriter ¶ added in v1.23.19
func (mc *MountConfig) EnsureErrWriter()
EnsureErrWriter safely initializes ErrWriter to the correct writer if it is nil.
type Mounter ¶
type Mounter struct {
WaitGroup sync.WaitGroup
TokenManager auth.TokenManager
StorageServiceManager storage.ServiceManager
// contains filtered or unexported fields
}
Mounter will be used in the sidecar container to invoke gcsfuse.
func New ¶
New returns a Mounter for the current system. It provides an option to specify the path to gcsfuse binary.