Repository: moby/moby
File: daemon/config/config.go (Go)

Code before:
	defaultMinAPIVersion = "1.44"
	// MinAPIVersion is the minimum API version supported by the daemon.
	MinAPIVersion = "1.24"
	// SeccompProfileDefault is the built-in default seccomp profile.
	SeccompProfileDefault = "builtin"
	// SeccompProfileUnconfined is a special profile name for seccomp to use an
	// "unconfined" seccomp profile.
	SeccompProfileUnconfined = "unconfined"
	// LibnetDataPath is the path to libnetwork's data directory, relative to cfg.Root.
	// Windows tolerates the "/".
	LibnetDataPath = "network/files"
)

// flatOptions contains configuration keys
// that MUST NOT be parsed as deep structures.
// Use this to differentiate these options
// with others like the ones in TLSOptions.
var flatOptions = map[string]bool{
	"cluster-store-opts":   true,
	"default-network-opts": true,
	"log-opts":             true,
	"runtimes":             true,
	"default-ulimits":      true,
	"features":             true,
	"builder":              true,
	"nri":                  true,
}

// skipValidateOptions contains configuration keys
// that will be skipped from findConfigurationConflicts
// for unknown flag validation.
var skipValidateOptions = map[string]bool{
	"features": true,
	"builder":  true,

	// Only available in daemon.json, no flags
	"min-api-version": true,

	// Deprecated options that are safe to ignore if present.
	"deprecated-key-path":              true,
	"allow-nondistributable-artifacts": true,
}

// skipDuplicates contains configuration keys that
// will be skipped when checking duplicated
// configuration field defined in both daemon
// config file and from dockerd cli flags.
// This allows some configurations to be merged
// during the parsing.
var skipDuplicates = map[string]bool{
	"runtimes": true,

Review comment (suggestion):
Last bike-shed for this PR; wondering if a slightly more verbose, but perhaps more descriptive `nri-opts` or `nri-config`  would make sense. I see we use `opts` for various other ones, so could perhaps work, but off course our type is named `NRIConfig`, so 🤷 


(Happy to hear your thoughts though!)

Code after:
	defaultMinAPIVersion = "1.44"
	// MinAPIVersion is the minimum API version supported by the daemon.
	MinAPIVersion = "1.24"
	// SeccompProfileDefault is the built-in default seccomp profile.
	SeccompProfileDefault = "builtin"
	// SeccompProfileUnconfined is a special profile name for seccomp to use an
	// "unconfined" seccomp profile.
	SeccompProfileUnconfined = "unconfined"
	// LibnetDataPath is the path to libnetwork's data directory, relative to cfg.Root.
	// Windows tolerates the "/".
	LibnetDataPath = "network/files"
)

// flatOptions contains configuration keys
// that MUST NOT be parsed as deep structures.
// Use this to differentiate these options
// with others like the ones in TLSOptions.
var flatOptions = map[string]bool{
	"cluster-store-opts":   true,
	"default-network-opts": true,
	"log-opts":             true,
	"runtimes":             true,
	"default-ulimits":      true,
	"features":             true,
	"builder":              true,
	"nri-opts":             true,
}

// skipValidateOptions contains configuration keys
// that will be skipped from findConfigurationConflicts
// for unknown flag validation.
var skipValidateOptions = map[string]bool{
	"features": true,
	"builder":  true,

	// Only available in daemon.json, no flags
	"min-api-version": true,

	// Deprecated options that are safe to ignore if present.
	"deprecated-key-path":              true,
	"allow-nondistributable-artifacts": true,
}

// skipDuplicates contains configuration keys that
// will be skipped when checking duplicated
// configuration field defined in both daemon
// config file and from dockerd cli flags.
// This allows some configurations to be merged
// during the parsing.
var skipDuplicates = map[string]bool{
	"runtimes": true,