From 507dfe11f63af64826e0467e4d533b3183a8c1a6 Mon Sep 17 00:00:00 2001 From: Blaine Gardner Date: Wed, 29 Sep 2021 16:43:44 -0600 Subject: [PATCH] helm: remove chart content not in common.yaml Assume common.yaml is the right source of truth, and remove major content from helm charts that does not exist in common.yaml. Signed-off-by: Blaine Gardner --- .commitlintrc.json | 1 + build/rbac/rbac.yaml | 32 ------------------- .../rook-ceph/templates/clusterrole.yaml | 18 ----------- .../templates/clusterrolebinding.yaml | 17 ---------- 4 files changed, 1 insertion(+), 67 deletions(-) diff --git a/.commitlintrc.json b/.commitlintrc.json index 1ea48804f..f3f7c591a 100644 --- a/.commitlintrc.json +++ b/.commitlintrc.json @@ -15,6 +15,7 @@ "core", "csi", "docs", + "helm", "mds", "mgr", "mon", diff --git a/build/rbac/rbac.yaml b/build/rbac/rbac.yaml index d9eb6a9a9..230d01736 100644 --- a/build/rbac/rbac.yaml +++ b/build/rbac/rbac.yaml @@ -177,21 +177,6 @@ rules: resources: [serviceaccounts] verbs: [get] --- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: rook-ceph-agent-mount - labels: - operator: rook - storage-backend: ceph -rules: - - apiGroups: - - '' - resources: - - secrets - verbs: - - get ---- # The cluster role for managing all the cluster-specific resources in a namespace apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole @@ -470,7 +455,6 @@ rules: verbs: - get - list -# Use a default dict to avoid 'can't give argument to non-function' errors from text/template --- kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 @@ -636,22 +620,6 @@ subjects: --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding -metadata: - name: rook-ceph-system-psp-users - labels: - operator: rook - storage-backend: ceph -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: rook-ceph-system-psp-user -subjects: - - kind: ServiceAccount - name: rook-ceph-system - namespace: rook-ceph ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding metadata: name: rook-csi-cephfs-plugin-sa-psp roleRef: diff --git a/cluster/charts/rook-ceph/templates/clusterrole.yaml b/cluster/charts/rook-ceph/templates/clusterrole.yaml index f424b8b06..a1b37c6c2 100644 --- a/cluster/charts/rook-ceph/templates/clusterrole.yaml +++ b/cluster/charts/rook-ceph/templates/clusterrole.yaml @@ -296,24 +296,6 @@ rules: verbs: - get - list -# Use a default dict to avoid 'can't give argument to non-function' errors from text/template -{{- if ne ((.Values.agent | default (dict "mountSecurityMode" "")).mountSecurityMode | default "") "Any" }} ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: rook-ceph-agent-mount - labels: - operator: rook - storage-backend: ceph -rules: -- apiGroups: - - "" - resources: - - secrets - verbs: - - get -{{- end }} --- kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 diff --git a/cluster/charts/rook-ceph/templates/clusterrolebinding.yaml b/cluster/charts/rook-ceph/templates/clusterrolebinding.yaml index 1ec060475..ec036d703 100644 --- a/cluster/charts/rook-ceph/templates/clusterrolebinding.yaml +++ b/cluster/charts/rook-ceph/templates/clusterrolebinding.yaml @@ -153,23 +153,6 @@ subjects: --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding -metadata: - name: rook-ceph-system-psp-users - labels: - operator: rook - storage-backend: ceph - chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: rook-ceph-system-psp-user -subjects: -- kind: ServiceAccount - name: rook-ceph-system - namespace: {{ .Release.Namespace }} ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding metadata: name: rook-csi-cephfs-provisioner-sa-psp roleRef: