@@ -6,8 +6,6 @@ local params = inv.parameters.rook_ceph;
6
6
7
7
local helpers = import 'helpers.libsonnet' ;
8
8
9
- local on_openshift = inv.parameters.facts.distribution == 'openshift4' ;
10
-
11
9
local serviceaccounts =
12
10
if params.ceph_cluster.namespace != params.namespace then {
13
11
[std.strReplace (suffix, '-' , '_' )]: kube.ServiceAccount('rook-ceph-%s' % suffix) {
@@ -26,7 +24,7 @@ local roles =
26
24
if params.ceph_cluster.namespace != params.namespace then {
27
25
// For OCP4 we need the metrics discovery role in the cluster
28
26
// namespace, if it differs from the operator namespace.
29
- [if on_openshift then 'metrics' ]:
27
+ [if helpers. on_openshift then 'metrics' ]:
30
28
helpers.metrics_role(params.ceph_cluster.namespace),
31
29
osd: kube.Role('rook-ceph-osd' ) {
32
30
metadata+: {
@@ -100,7 +98,7 @@ local rolebindings =
100
98
if params.ceph_cluster.namespace != params.namespace then
101
99
(
102
100
// For OCP4, we need the metrics discovery rolebinding
103
- if on_openshift then [
101
+ if helpers. on_openshift then [
104
102
helpers.ocp_metrics_rolebinding(
105
103
params.ceph_cluster.namespace,
106
104
roles.metrics,
@@ -284,7 +282,7 @@ local toolbox =
284
282
super .containers[0 ] {
285
283
image: '%(registry)s/%(image)s:%(tag)s' % params.images.rook,
286
284
// Remove securityContext config on OCP4
287
- [if on_openshift then 'securityContext' ]: {},
285
+ [if helpers. on_openshift then 'securityContext' ]: {},
288
286
},
289
287
],
290
288
tolerations: params.tolerations,
0 commit comments