UNCLASSIFIED - NO CUI

Skip to content
Snippets Groups Projects

#120 : Ensure security contexts are being correctly applied across all containers

Merged #120 : Ensure security contexts are being correctly applied across all containers
Merged Andrew Kesterson requested to merge 120_securitycontext into main

General MR

Summary

This MR fixes an insufficiency in the default test values when deploying with kyverno enabled. The security context doesn't sufficiently drop privileges to satisfy Kyverno, which blocks deployment of the set.

Relevant logs/screenshots

Before the fix, deploying with kyverno enabled results in failures:

62s (x16 over 3m47s)    Warning   FailedCreate            StatefulSet/confluence            create Pod confluence-0 in StatefulSet confluence failed error: admission webhook "validate.kyverno.svc-fail" denied the request:                                                                                                                                                                                                                                                                                           
resource Pod/confluence/confluence-0 was blocked due to the following policies                                                                                          
                                                                                                                                                                        require-drop-all-capabilities:                                                                                                                                          
  drop-all-capabilities: 'validation failure: Containers must drop all Linux capabilities                                                                               
    by setting the fields spec.containers[*].securityContext.capabilities.drop, spec.initContainers[*].securityContext.capabilities.drop,                               
    and spec.ephemeralContainers[*].securityContext.capabilities.drop to `ALL`.'

After this patch, deployment succeeds.

Linked Issue

#120 (closed)

Upgrade Notices

N/A

Closes: #120 (closed)

Edited by Jacob Kershaw

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading