fn: remove tini option & env variable (#1301)

This commit is contained in:
Tolga Ceylan
2018-11-07 12:35:19 -08:00
committed by GitHub
parent 46c25215f4
commit 25afb2f478
4 changed files with 1 additions and 6 deletions

View File

@@ -226,7 +226,6 @@ func NewDockerDriver(cfg *Config) (drivers.Driver, error) {
PreForkNetworks: cfg.PreForkNetworks, PreForkNetworks: cfg.PreForkNetworks,
MaxTmpFsInodes: cfg.MaxTmpFsInodes, MaxTmpFsInodes: cfg.MaxTmpFsInodes,
EnableReadOnlyRootFs: !cfg.DisableReadOnlyRootFs, EnableReadOnlyRootFs: !cfg.DisableReadOnlyRootFs,
EnableTini: !cfg.DisableTini,
MaxRetries: cfg.MaxDockerRetries, MaxRetries: cfg.MaxDockerRetries,
}) })
} }

View File

@@ -31,7 +31,6 @@ type Config struct {
EnableNBResourceTracker bool `json:"enable_nb_resource_tracker"` EnableNBResourceTracker bool `json:"enable_nb_resource_tracker"`
MaxTmpFsInodes uint64 `json:"max_tmpfs_inodes"` MaxTmpFsInodes uint64 `json:"max_tmpfs_inodes"`
DisableReadOnlyRootFs bool `json:"disable_readonly_rootfs"` DisableReadOnlyRootFs bool `json:"disable_readonly_rootfs"`
DisableTini bool `json:"disable_tini"`
DisableDebugUserLogs bool `json:"disable_debug_user_logs"` DisableDebugUserLogs bool `json:"disable_debug_user_logs"`
IOFSEnableTmpfs bool `json:"iofs_enable_tmpfs"` IOFSEnableTmpfs bool `json:"iofs_enable_tmpfs"`
IOFSAgentPath string `json:"iofs_path"` IOFSAgentPath string `json:"iofs_path"`
@@ -83,8 +82,6 @@ const (
EnvMaxTmpFsInodes = "FN_MAX_TMPFS_INODES" EnvMaxTmpFsInodes = "FN_MAX_TMPFS_INODES"
// EnvDisableReadOnlyRootFs makes the root fs for a container have rw permissions, by default it is read only // EnvDisableReadOnlyRootFs makes the root fs for a container have rw permissions, by default it is read only
EnvDisableReadOnlyRootFs = "FN_DISABLE_READONLY_ROOTFS" EnvDisableReadOnlyRootFs = "FN_DISABLE_READONLY_ROOTFS"
// EnvDisableTini runs containers without using the --init option, for tini pid 1 action
EnvDisableTini = "FN_DISABLE_TINI"
// EnvDisableDebugUserLogs disables user function logs being logged at level debug. wise to enable for production. // EnvDisableDebugUserLogs disables user function logs being logged at level debug. wise to enable for production.
EnvDisableDebugUserLogs = "FN_DISABLE_DEBUG_USER_LOGS" EnvDisableDebugUserLogs = "FN_DISABLE_DEBUG_USER_LOGS"

View File

@@ -231,7 +231,7 @@ func (drv *DockerDriver) CreateCookie(ctx context.Context, task drivers.Containe
}, },
HostConfig: &docker.HostConfig{ HostConfig: &docker.HostConfig{
ReadonlyRootfs: drv.conf.EnableReadOnlyRootFs, ReadonlyRootfs: drv.conf.EnableReadOnlyRootFs,
Init: drv.conf.EnableTini, Init: true,
}, },
} }

View File

@@ -251,7 +251,6 @@ type Config struct {
PreForkNetworks string `json:"pre_fork_networks"` PreForkNetworks string `json:"pre_fork_networks"`
MaxTmpFsInodes uint64 `json:"max_tmpfs_inodes"` MaxTmpFsInodes uint64 `json:"max_tmpfs_inodes"`
EnableReadOnlyRootFs bool `json:"enable_readonly_rootfs"` EnableReadOnlyRootFs bool `json:"enable_readonly_rootfs"`
EnableTini bool `json:"enable_tini"`
MaxRetries uint64 `json:"max_retries"` MaxRetries uint64 `json:"max_retries"`
} }