Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion pkg/driver/efs_watch_dog.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ stunnel_debug_enabled = false
#Uncomment the below option to save all stunnel logs for a file system to the same file
#stunnel_logs_file = /var/log/amazon/efs/{fs_id}.stunnel.log
stunnel_cafile = /etc/amazon/efs/efs-utils.crt
{{if .CsiDriverVersion -}}
csi_driver_version={{.CsiDriverVersion}}
{{else -}}
{{- end}}

# Validate the certificate hostname on mount. This option is not supported by certain stunnel versions.
stunnel_check_cert_hostname = true
Expand Down Expand Up @@ -151,6 +155,7 @@ retention_in_days = 14

efsUtilsConfigFileName = "efs-utils.conf"
efsStateDir = "/var/run/efs"
csiDriverVersion = "v2.1.8"
)

// Watchdog defines the interface for process monitoring and supervising
Expand Down Expand Up @@ -186,6 +191,7 @@ type efsUtilsConfig struct {
Region string
FipsEnabled string
PortRangeUpperBound string
CsiDriverVersion string
}

func newExecWatchdog(efsUtilsCfgPath, efsUtilsStaticFilesPath, cmd string, arg ...string) Watchdog {
Expand Down Expand Up @@ -297,7 +303,13 @@ func (w *execWatchdog) updateConfig(efsClientSource string) error {
if err != nil || val < 21049 {
portRangeUpperBound = "21049"
}
efsCfg := efsUtilsConfig{EfsClientSource: efsClientSource, Region: region, FipsEnabled: fipsEnabled, PortRangeUpperBound: portRangeUpperBound}
efsCfg := efsUtilsConfig{
EfsClientSource: efsClientSource,
Region: region,
FipsEnabled: fipsEnabled,
PortRangeUpperBound: portRangeUpperBound
CsiDriverVersion: csiDriverVersion
}
if err = efsCfgTemplate.Execute(f, efsCfg); err != nil {
return fmt.Errorf("cannot update config %s for efs-utils. Error: %v", w.efsUtilsCfgPath, err)
}
Expand Down