-
Notifications
You must be signed in to change notification settings - Fork 3k
config: use built-in TOML merge and adhere to label setting #5225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vrothberg The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
I would rather get in containers.conf, but I have not figured out the last Test failure. |
libpod/config/config.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit interatively -> iteratively
libpod/config/config.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we should make a backlog jira card to help to remember to remove this.
|
LGTM |
|
My thinking was mostly that, if I set |
I don't know any other flag where we're doing that as the CLI always (?) wins. Especially in case of booleans we had to distinguish between unset, set and unspecified in the configurations to know if the admin cares and compare that with the CLI but we don't have that. |
|
I disagree, I might want to run the bulk of my containers without SELinux separation, but a couple of untrusted ones, I want to run with SELinux. |
|
LGTM |
|
Let me add a commit on top to clarify that in the libpod.conf. The man page is not strictly clear on that and I can understand Matt's idea as well. |
Instead of manually merging the configs, use the built-in features of TOMP to merge/extend the fields of a data type when encoding a file. This erases the need for the merge code in libpod/config and also addresses issues when merging booleans. Signed-off-by: Valentin Rothberg <[email protected]>
Set the (default) process labels in `pkg/spec`. This way, we can also query libpod.conf and disable labeling if needed. Fixes: containers#5087 Signed-off-by: Valentin Rothberg <[email protected]>
Clarify that the label option sets the defaults which can still be overriden by the CLI. Signed-off-by: Valentin Rothberg <[email protected]>
|
Done ✔️ |
|
/lgtm |
1 similar comment
|
/lgtm |
Podman did not check the
labelsetting in the libpod.conf and ignored if the libpod.conf set it to false to disable process labels in the container. While working on that, I found a bug in the config-merge code related to a false merging of booleans. To fix that, use the built-in features of the TOML library to merge/extend config instead of manually working around that.Fixes: #5087