Skip to content

Commit

Permalink
fix including-space issue in the rbac name (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
2005wind authored Jul 24, 2024
1 parent 3effe7b commit e9bbdc3
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions chart/operator/templates/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ rules:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: skywalking-swck-manager-role
name: {{ include "operator.fullname" . | trunc (int (sub 63 (len "-manager-role"))) | printf "%s-manager-role" }}
rules:
- apiGroups:
- certificates.k8s.io
Expand Down Expand Up @@ -459,7 +459,7 @@ rules:
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ include "operator.fullname" . | trunc (int (sub 63 (len "-leader-election-role"))) | printf "%s-leader-election-role" }} binding
name: {{ include "operator.fullname" . | trunc (int (sub 63 (len "-leader-election-role"))) | printf "%s-leader-election-role" }}binding
namespace: {{ .Release.Namespace }}
roleRef:
apiGroup: rbac.authorization.k8s.io
Expand All @@ -473,7 +473,7 @@ subjects:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ include "operator.fullname" . | trunc (int (sub 63 (len "-manager-role"))) | printf "%s-manager-role" }} binding
name: {{ include "operator.fullname" . | trunc (int (sub 63 (len "-manager-role"))) | printf "%s-manager-role" }}binding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
Expand All @@ -492,6 +492,19 @@ roleRef:
kind: ClusterRole
name: {{ include "operator.fullname" . | trunc (int (sub 63 (len "-proxy-role"))) | printf "%s-proxy-role" }}
subjects:
- kind: ServiceAccount
name: {{ include "operator.fullname" . | trunc (int (sub 63 (len "-controller-manager"))) | printf "%s-controller-manager" }}
namespace: {{ .Release.Namespace }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ include "operator.fullname" . | trunc (int (sub 63 (len "-metrics-reader"))) | printf "%s-metrics-reader" }}-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ include "operator.fullname" . | trunc (int (sub 63 (len "-metrics-reader"))) | printf "%s-metrics-reader" }}
subjects:
- kind: ServiceAccount
name: {{ include "operator.fullname" . | trunc (int (sub 63 (len "-controller-manager"))) | printf "%s-controller-manager" }}
namespace: {{ .Release.Namespace }}

0 comments on commit e9bbdc3

Please sign in to comment.