Skip to content

Commit 96050da

Browse files
authored
Merge pull request #1280 from elezar/drop-in-demo
Add drop-in file support for containerd and crio
2 parents f49c5dc + abcba21 commit 96050da

File tree

18 files changed

+879
-291
lines changed

18 files changed

+879
-291
lines changed

cmd/nvidia-ctk-installer/container/container.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ const (
3535

3636
// Options defines the shared options for the CLIs to configure containers runtimes.
3737
type Options struct {
38+
DropInConfig string
39+
// TODO: Rename to TopLevelConfig
3840
Config string
3941
Socket string
4042
// ExecutablePath specifies the path to the container runtime executable.
@@ -71,8 +73,12 @@ func (o Options) Unconfigure(cfg engine.Interface) error {
7173

7274
// flush flushes the specified config to disk
7375
func (o Options) flush(cfg engine.Interface) error {
74-
logrus.Infof("Flushing config to %v", o.Config)
75-
n, err := cfg.Save(o.Config)
76+
filepath := o.DropInConfig
77+
if filepath == "" {
78+
filepath = o.Config
79+
}
80+
logrus.Infof("Flushing config to %v", filepath)
81+
n, err := cfg.Save(filepath)
7682
if err != nil {
7783
return fmt.Errorf("unable to flush config: %v", err)
7884
}

0 commit comments

Comments
 (0)