Skip to content

Commit

Permalink
Merge pull request containers#667 from rhatdan/secrets
Browse files Browse the repository at this point in the history
Fix default definition of secrets in containers.conf
  • Loading branch information
openshift-merge-robot authored Jul 6, 2021
2 parents b8d9e48 + ca5f9ee commit a7351a8
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/containers.conf.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ Currently valid values are:
* file
* pass

**opts**={}
**[secrets.opts]**

The driver specific options object.

Expand Down
10 changes: 10 additions & 0 deletions pkg/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,16 @@ var _ = Describe("Config", func() {
gomega.Expect(content).To(gomega.ContainSubstring("Failed to decode the keys [\\\"foo\\\" \\\"containers.image_default_transport\\\"] from \\\"testdata/containers_broken.conf\\\""))
logrus.SetOutput(os.Stderr)
})

It("test default config errors", func() {
conf := Config{}
content := bytes.NewBufferString("")
logrus.SetOutput(content)
err := readConfigFromFile("containers.conf", &conf)
gomega.Expect(err).To(gomega.BeNil())
gomega.Expect(content.String()).To(gomega.Equal(""))
logrus.SetOutput(os.Stderr)
})
})

Describe("Reload", func() {
Expand Down
12 changes: 6 additions & 6 deletions pkg/config/containers.conf
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,12 @@ default_sysctls = [
# The network table contains settings pertaining to the management of
# CNI plugins.

[secrets]
# driver = "file"

[secrets.opts]
# root = "/example/directory"

[network]

# Path to directory where CNI plugin binaries are located.
Expand Down Expand Up @@ -503,9 +509,3 @@ default_sysctls = [
# TOML does not provide a way to end a table other than a further table being
# defined, so every key hereafter will be part of [volume_plugins] and not the
# main config.

[secret]
# driver = "file"

[secret.opts]
# root = "/example/directory"

0 comments on commit a7351a8

Please sign in to comment.