Skip to content

Commit

Permalink
Made fsGroupChangePolicy OnRootMismatch to reduce latencies
Browse files Browse the repository at this point in the history
  • Loading branch information
akondur committed Feb 23, 2024
1 parent f5b9ce6 commit 30e901c
Show file tree
Hide file tree
Showing 12 changed files with 98 additions and 92 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ require (
github.com/go-logr/logr v1.3.0
github.com/google/go-cmp v0.6.0
github.com/minio/minio-go/v7 v7.0.16
github.com/onsi/ginkgo/v2 v2.14.0
github.com/onsi/gomega v1.30.0
github.com/onsi/ginkgo/v2 v2.15.0
github.com/onsi/gomega v1.31.1
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.14.0
github.com/stretchr/testify v1.8.1
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,12 @@ github.com/onsi/ginkgo/v2 v2.13.2 h1:Bi2gGVkfn6gQcjNjZJVO8Gf0FHzMPf2phUei9tejVMs
github.com/onsi/ginkgo/v2 v2.13.2/go.mod h1:XStQ8QcGwLyF4HdfcZB8SFOS/MWCgDuXMSBe6zrvLgM=
github.com/onsi/ginkgo/v2 v2.14.0 h1:vSmGj2Z5YPb9JwCWT6z6ihcUvDhuXLc3sJiqd3jMKAY=
github.com/onsi/ginkgo/v2 v2.14.0/go.mod h1:JkUdW7JkN0V6rFvsHcJ478egV3XH9NxpD27Hal/PhZw=
github.com/onsi/ginkgo/v2 v2.15.0 h1:79HwNRBAZHOEwrczrgSOPy+eFTTlIGELKy5as+ClttY=
github.com/onsi/ginkgo/v2 v2.15.0/go.mod h1:HlxMHtYF57y6Dpf+mc5529KKmSq9h2FpCF+/ZkwUxKM=
github.com/onsi/gomega v1.30.0 h1:hvMK7xYz4D3HapigLTeGdId/NcfQx1VHMJc60ew99+8=
github.com/onsi/gomega v1.30.0/go.mod h1:9sxs+SwGrKI0+PWe4Fxa9tFQQBG5xSsSbMXOI8PPpoQ=
github.com/onsi/gomega v1.31.1 h1:KYppCUK+bUgAZwHOu7EXVBKyQA6ILvOESHkn/tgoqvo=
github.com/onsi/gomega v1.31.1/go.mod h1:y40C95dwAD1Nz36SsEnxvfFe8FFfNxzI5eJ0EYGyAy0=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
Expand Down
70 changes: 35 additions & 35 deletions pkg/splunk/common/urls_testingcode.go

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions pkg/splunk/enterprise/clustermanager_test.go

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions pkg/splunk/enterprise/clustermaster_test.go

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions pkg/splunk/enterprise/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"reflect"
"strconv"

"github.com/wk8/go-ordered-map/v2"
orderedmap "github.com/wk8/go-ordered-map/v2"
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
k8serrors "k8s.io/apimachinery/pkg/api/errors"
Expand Down Expand Up @@ -833,10 +833,12 @@ func updateSplunkPodTemplateWithConfig(ctx context.Context, client splcommon.Con
runAsUser := int64(41812)
fsGroup := int64(41812)
runAsNonRoot := true
fsGroupChangePolicy := corev1.FSGroupChangeOnRootMismatch
podTemplateSpec.Spec.SecurityContext = &corev1.PodSecurityContext{
RunAsUser: &runAsUser,
FSGroup: &fsGroup,
RunAsNonRoot: &runAsNonRoot,
RunAsUser: &runAsUser,
FSGroup: &fsGroup,
RunAsNonRoot: &runAsNonRoot,
FSGroupChangePolicy: &fsGroupChangePolicy,
}

livenessProbe := getLivenessProbe(ctx, cr, instanceType, spec)
Expand Down
12 changes: 6 additions & 6 deletions pkg/splunk/enterprise/indexercluster_test.go

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions pkg/splunk/enterprise/licensemanager_test.go

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions pkg/splunk/enterprise/licensemaster_test.go

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions pkg/splunk/enterprise/monitoringconsole_test.go

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions pkg/splunk/enterprise/searchheadcluster_test.go

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions pkg/splunk/enterprise/standalone_test.go

Large diffs are not rendered by default.

0 comments on commit 30e901c

Please sign in to comment.