Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Nikolay Demchuk <[email protected]>
  • Loading branch information
NikolayDemchuk committed Apr 23, 2024
1 parent bf991fc commit 825c832
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 46 deletions.
2 changes: 1 addition & 1 deletion templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: ConfigMap
apiVersion: v1
metadata:
name: rook-ceph-operator-config
namespace: {{ .Values.operatorCeph.namespace }}
namespace: {{ .Values.sdsElastic.namespace }}
{{- include "helm_lib_module_labels" (list . (dict "app" .Chart.Name )) | nindent 2 }}
data:
ROOK_LOG_LEVEL: "INFO"
Expand Down
6 changes: 3 additions & 3 deletions templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Chart.Name }}
namespace: {{ .Values.operatorCeph.namespace }}
namespace: {{ .Values.sdsElastic.namespace }}
{{- include "helm_lib_module_labels" (list . (dict "app" .Chart.Name )) | nindent 2 }}
spec:
replicas: 1
Expand All @@ -19,7 +19,7 @@ spec:
labels:
app: {{ .Chart.Name }}
spec:
{{- with .Values.operatorCeph.registry }}
{{- with .Values.sdsElastic.registry }}
imagePullSecrets:
- name: {{ $.Chart.Name }}-registrysecret
{{- end }}
Expand Down Expand Up @@ -71,7 +71,7 @@ spec:
fieldRef:
fieldPath: metadata.namespace
resources:
{{ include "helm_lib_resources_management_pod_resources" (list $.Values.operatorCeph.resourcesManagement) | nindent 10 }}
{{ include "helm_lib_resources_management_pod_resources" (list $.Values.sdsElastic.resourcesManagement) | nindent 10 }}
volumes:
- name: tmp
emptyDir: {}
Expand Down
84 changes: 42 additions & 42 deletions templates/rbac-for-us.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: rook-ceph-system
namespace: {{ .Values.operatorCeph.namespace }}
namespace: {{ .Values.sdsElastic.namespace }}
imagePullSecrets:
- name: {{ .Chart.Name }}-registrysecret
---
Expand All @@ -12,7 +12,7 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: rook-csi-cephfs-plugin-sa
namespace: {{ .Values.operatorCeph.namespace }}
namespace: {{ .Values.sdsElastic.namespace }}
imagePullSecrets:
- name: {{ .Chart.Name }}-registrysecret
---
Expand All @@ -21,7 +21,7 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: rook-csi-cephfs-provisioner-sa
namespace: {{ .Values.operatorCeph.namespace }}
namespace: {{ .Values.sdsElastic.namespace }}
imagePullSecrets:
- name: {{ .Chart.Name }}-registrysecret
---
Expand All @@ -30,7 +30,7 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: rook-csi-rbd-plugin-sa
namespace: {{ .Values.operatorCeph.namespace }}
namespace: {{ .Values.sdsElastic.namespace }}
imagePullSecrets:
- name: {{ .Chart.Name }}-registrysecret
---
Expand All @@ -39,7 +39,7 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: rook-csi-rbd-provisioner-sa
namespace: {{ .Values.operatorCeph.namespace }}
namespace: {{ .Values.sdsElastic.namespace }}
imagePullSecrets:
- name: {{ .Chart.Name }}-registrysecret

Expand Down Expand Up @@ -572,7 +572,7 @@ roleRef:
subjects:
- kind: ServiceAccount
name: rook-ceph-mgr
namespace: {{ .Values.operatorCeph.namespace }}
namespace: {{ .Values.sdsElastic.namespace }}
---
# Allow the ceph osd to access cluster-wide resources necessary for determining their topology location
kind: ClusterRoleBinding
Expand All @@ -586,7 +586,7 @@ roleRef:
subjects:
- kind: ServiceAccount
name: rook-ceph-osd
namespace: {{ .Values.operatorCeph.namespace }}
namespace: {{ .Values.sdsElastic.namespace }}
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
Expand All @@ -599,7 +599,7 @@ roleRef:
subjects:
- kind: ServiceAccount
name: rook-ceph-system
namespace: {{ .Values.operatorCeph.namespace }}
namespace: {{ .Values.sdsElastic.namespace }}
---
# Grant the rook system daemons cluster-wide access to manage the Rook CRDs, PVCs, and storage classes
kind: ClusterRoleBinding
Expand All @@ -613,7 +613,7 @@ roleRef:
subjects:
- kind: ServiceAccount
name: rook-ceph-system
namespace: {{ .Values.operatorCeph.namespace }}
namespace: {{ .Values.sdsElastic.namespace }}
---
kind: ClusterRoleBinding
# Give Rook-Ceph Operator permissions to provision ObjectBuckets in response to ObjectBucketClaims.
Expand All @@ -627,7 +627,7 @@ roleRef:
subjects:
- kind: ServiceAccount
name: rook-ceph-system
namespace: {{ .Values.operatorCeph.namespace }}
namespace: {{ .Values.sdsElastic.namespace }}
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
Expand All @@ -636,7 +636,7 @@ metadata:
subjects:
- kind: ServiceAccount
name: rook-csi-rbd-plugin-sa
namespace: {{ .Values.operatorCeph.namespace }}
namespace: {{ .Values.sdsElastic.namespace }}
roleRef:
kind: ClusterRole
name: rbd-csi-nodeplugin
Expand All @@ -649,7 +649,7 @@ metadata:
subjects:
- kind: ServiceAccount
name: rook-csi-cephfs-provisioner-sa
namespace: {{ .Values.operatorCeph.namespace }}
namespace: {{ .Values.sdsElastic.namespace }}
roleRef:
kind: ClusterRole
name: cephfs-external-provisioner-runner
Expand All @@ -664,7 +664,7 @@ metadata:
subjects:
- kind: ServiceAccount
name: rook-csi-cephfs-plugin-sa
namespace: {{ .Values.operatorCeph.namespace }}
namespace: {{ .Values.sdsElastic.namespace }}
roleRef:
kind: ClusterRole
name: cephfs-csi-nodeplugin
Expand All @@ -677,7 +677,7 @@ metadata:
subjects:
- kind: ServiceAccount
name: rook-csi-rbd-provisioner-sa
namespace: {{ .Values.operatorCeph.namespace }}
namespace: {{ .Values.sdsElastic.namespace }}
roleRef:
kind: ClusterRole
name: rbd-external-provisioner-runner
Expand All @@ -687,7 +687,7 @@ kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: rook-ceph-osd
namespace: {{ .Values.operatorCeph.namespace }}
namespace: {{ .Values.sdsElastic.namespace }}
rules:
# this is needed for rook's "key-management" CLI to fetch the vault token from the secret when
# validating the connection details
Expand All @@ -705,7 +705,7 @@ kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: rook-ceph-rgw
namespace: {{ .Values.operatorCeph.namespace }}
namespace: {{ .Values.sdsElastic.namespace }}
rules:
# Placeholder role so the rgw service account will
# be generated in the csv. Remove this role and role binding
Expand All @@ -722,7 +722,7 @@ kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: rook-ceph-mgr
namespace: {{ .Values.operatorCeph.namespace }}
namespace: {{ .Values.sdsElastic.namespace }}
rules:
- apiGroups:
- ""
Expand Down Expand Up @@ -794,7 +794,7 @@ kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: rook-ceph-cmd-reporter
namespace: {{ .Values.operatorCeph.namespace }}
namespace: {{ .Values.sdsElastic.namespace }}
rules:
- apiGroups:
- ""
Expand All @@ -814,7 +814,7 @@ kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: rook-ceph-purge-osd
namespace: {{ .Values.operatorCeph.namespace }}
namespace: {{ .Values.sdsElastic.namespace }}
rules:
- apiGroups: [""]
resources: ["configmaps"]
Expand All @@ -834,7 +834,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: rook-ceph-system
namespace: {{ .Values.operatorCeph.namespace }}
namespace: {{ .Values.sdsElastic.namespace }}
rules:
- apiGroups:
- ""
Expand Down Expand Up @@ -891,7 +891,7 @@ kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: cephfs-external-provisioner-cfg
namespace: {{ .Values.operatorCeph.namespace }}
namespace: {{ .Values.sdsElastic.namespace }}
rules:
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
Expand All @@ -901,7 +901,7 @@ kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: rbd-external-provisioner-cfg
namespace: {{ .Values.operatorCeph.namespace }}
namespace: {{ .Values.sdsElastic.namespace }}
rules:
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
Expand All @@ -912,129 +912,129 @@ kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: rook-ceph-cluster-mgmt
namespace: {{ .Values.operatorCeph.namespace }}
namespace: {{ .Values.sdsElastic.namespace }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: rook-ceph-cluster-mgmt
subjects:
- kind: ServiceAccount
name: rook-ceph-system
namespace: {{ .Values.operatorCeph.namespace }}
namespace: {{ .Values.sdsElastic.namespace }}
---
# Allow the osd pods in this namespace to work with configmaps
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: rook-ceph-osd
namespace: {{ .Values.operatorCeph.namespace }}
namespace: {{ .Values.sdsElastic.namespace }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: rook-ceph-osd
subjects:
- kind: ServiceAccount
name: rook-ceph-osd
namespace: {{ .Values.operatorCeph.namespace }}
namespace: {{ .Values.sdsElastic.namespace }}
---
# Allow the rgw pods in this namespace to work with configmaps
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: rook-ceph-rgw
namespace: {{ .Values.operatorCeph.namespace }}
namespace: {{ .Values.sdsElastic.namespace }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: rook-ceph-rgw
subjects:
- kind: ServiceAccount
name: rook-ceph-rgw
namespace: {{ .Values.operatorCeph.namespace }}
namespace: {{ .Values.sdsElastic.namespace }}
---
# Allow the ceph mgr to access resources scoped to the CephCluster namespace necessary for mgr modules
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: rook-ceph-mgr
namespace: {{ .Values.operatorCeph.namespace }}
namespace: {{ .Values.sdsElastic.namespace }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: rook-ceph-mgr
subjects:
- kind: ServiceAccount
name: rook-ceph-mgr
namespace: {{ .Values.operatorCeph.namespace }}
namespace: {{ .Values.sdsElastic.namespace }}
---
# Allow the ceph mgr to access resources in the Rook operator namespace necessary for mgr modules
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: rook-ceph-mgr-system
namespace: {{ .Values.operatorCeph.namespace }}
namespace: {{ .Values.sdsElastic.namespace }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: rook-ceph-mgr-system
subjects:
- kind: ServiceAccount
name: rook-ceph-mgr
namespace: {{ .Values.operatorCeph.namespace }}
namespace: {{ .Values.sdsElastic.namespace }}
---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: rook-ceph-cmd-reporter
namespace: {{ .Values.operatorCeph.namespace }}
namespace: {{ .Values.sdsElastic.namespace }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: rook-ceph-cmd-reporter
subjects:
- kind: ServiceAccount
name: rook-ceph-cmd-reporter
namespace: {{ .Values.operatorCeph.namespace }}
namespace: {{ .Values.sdsElastic.namespace }}
---
# Allow the osd purge job to run in this namespace
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: rook-ceph-purge-osd
namespace: {{ .Values.operatorCeph.namespace }}
namespace: {{ .Values.sdsElastic.namespace }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: rook-ceph-purge-osd
subjects:
- kind: ServiceAccount
name: rook-ceph-purge-osd
namespace: {{ .Values.operatorCeph.namespace }}
namespace: {{ .Values.sdsElastic.namespace }}
---
# Grant the operator, agent, and discovery agents access to resources in the rook-ceph-system namespace
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: rook-ceph-system
namespace: {{ .Values.operatorCeph.namespace }}
namespace: {{ .Values.sdsElastic.namespace }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: rook-ceph-system
subjects:
- kind: ServiceAccount
name: rook-ceph-system
namespace: {{ .Values.operatorCeph.namespace }}
namespace: {{ .Values.sdsElastic.namespace }}
---
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: cephfs-csi-provisioner-role-cfg
namespace: {{ .Values.operatorCeph.namespace }}
namespace: {{ .Values.sdsElastic.namespace }}
subjects:
- kind: ServiceAccount
name: rook-csi-cephfs-provisioner-sa
namespace: {{ .Values.operatorCeph.namespace }}
namespace: {{ .Values.sdsElastic.namespace }}
roleRef:
kind: Role
name: cephfs-external-provisioner-cfg
Expand All @@ -1044,11 +1044,11 @@ kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: rbd-csi-provisioner-role-cfg
namespace: {{ .Values.operatorCeph.namespace }}
namespace: {{ .Values.sdsElastic.namespace }}
subjects:
- kind: ServiceAccount
name: rook-csi-rbd-provisioner-sa
namespace: {{ .Values.operatorCeph.namespace }}
namespace: {{ .Values.sdsElastic.namespace }}
roleRef:
kind: Role
name: rbd-external-provisioner-cfg
Expand Down

0 comments on commit 825c832

Please sign in to comment.