Skip to content

Commit

Permalink
Extend functionality of Test Mode to enable privileged mode for Segme…
Browse files Browse the repository at this point in the history
…nt Store containers #507

Signed-off-by: Pavel Lipsky <[email protected]>
  • Loading branch information
Pavel Lipsky authored and plipsky committed Feb 16, 2021
1 parent 2daf478 commit 265ec03
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/controller/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ package config
// the following changes:
// - Disables Pravega Controller minimum number of replicas
// - Disables Segment Store minimum number of replicas
// - Enable privilidged mode for Segment Store containters
var TestMode bool
4 changes: 4 additions & 0 deletions pkg/controller/pravega/pravega_segmentstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (

api "github.com/pravega/pravega-operator/pkg/apis/pravega/v1beta1"
"github.com/pravega/pravega-operator/pkg/util"
"github.com/pravega/pravega-operator/pkg/controller/config"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
policyv1beta1 "k8s.io/api/policy/v1beta1"
Expand Down Expand Up @@ -149,6 +150,9 @@ func makeSegmentstorePodSpec(p *api.PravegaCluster) corev1.PodSpec {
PeriodSeconds: 15,
FailureThreshold: 4,
},
SecurityContext: &corev1.SecurityContext{
Privileged: &config.TestMode,
},
},
},
Affinity: p.Spec.Pravega.SegmentStorePodAffinity,
Expand Down

0 comments on commit 265ec03

Please sign in to comment.