@@ -4,13 +4,14 @@ package reconciler
4
4
import (
5
5
"strings"
6
6
7
+ v1 "k8s.io/api/core/v1"
8
+ "k8s.io/apimachinery/pkg/api/resource"
9
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
10
+
7
11
"github.com/operator-framework/api/pkg/operators/v1alpha1"
8
12
controllerclient "github.com/operator-framework/operator-lifecycle-manager/pkg/lib/controller-runtime/client"
9
13
"github.com/operator-framework/operator-lifecycle-manager/pkg/lib/operatorclient"
10
14
"github.com/operator-framework/operator-lifecycle-manager/pkg/lib/operatorlister"
11
- v1 "k8s.io/api/core/v1"
12
- "k8s.io/apimachinery/pkg/api/resource"
13
- metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
14
15
)
15
16
16
17
type nowFunc func () metav1.Time
@@ -102,6 +103,8 @@ func Pod(source *v1alpha1.CatalogSource, name string, image string, saName strin
102
103
pullPolicy = v1 .PullAlways
103
104
}
104
105
106
+ readOnlyRootFilesystem := false
107
+
105
108
pod := & v1.Pod {
106
109
ObjectMeta : metav1.ObjectMeta {
107
110
GenerateName : source .GetName () + "-" ,
@@ -143,6 +146,9 @@ func Pod(source *v1alpha1.CatalogSource, name string, image string, saName strin
143
146
v1 .ResourceMemory : resource .MustParse ("50Mi" ),
144
147
},
145
148
},
149
+ SecurityContext : & v1.SecurityContext {
150
+ ReadOnlyRootFilesystem : & readOnlyRootFilesystem ,
151
+ },
146
152
ImagePullPolicy : pullPolicy ,
147
153
TerminationMessagePolicy : v1 .TerminationMessageFallbackToLogsOnError ,
148
154
},
0 commit comments