-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
play kube: fix segfault #3958
play kube: fix segfault #3958
Conversation
when securityContext wasn't specified in yaml. add a test as well Signed-off-by: Peter Hunt <pehunt@redhat.com>
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: haircommander, mheon The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Sure, LGTM |
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.
/lgtm
if containerYAML.SecurityContext.Privileged != nil { | ||
containerConfig.Privileged = *containerYAML.SecurityContext.Privileged | ||
} | ||
if containerYAML.SecurityContext != nil { |
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.
Could have made this a lot simpler by combining these two if commands on same line.
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.
for some reason, the AllowPRivilegeEscalation check was outside of the containerConfig.SecurityOpts check, so doing it this way maintained the branch structure. I didn't know enough about why that happened to choose to change it
when securityContext wasn't specified in yaml.
add a test as well
fixes: #3956
Signed-off-by: Peter Hunt pehunt@redhat.com