Skip to content

Commit

Permalink
Create SecurityContext if nil
Browse files Browse the repository at this point in the history
  • Loading branch information
robskillington committed May 27, 2019
1 parent 02569c9 commit a309423
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/k8sops/statefulset.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ func NewBaseStatefulSet(ssName, isolationGroup string, cluster *myspec.M3DBClust
// Add SYS_RESOURCE security capability if not set (required to raise
// rlimit nofile from the process in container)
specSecurityCtx := cluster.Spec.SecurityContext
if specSecurityCtx == nil {
specSecurityCtx = &v1.SecurityContext{}
}
if specSecurityCtx.Capabilities == nil {
specSecurityCtx.Capabilities = &v1.Capabilities{}
}
Expand Down

0 comments on commit a309423

Please sign in to comment.