Skip to content

Commit 6dbf115

Browse files
authored
Merge pull request #79 from cybozu-go/add-syncwindow-roles
Add RBAC aggregation labels for sync window roles
2 parents d14909d + 7ca2875 commit 6dbf115

File tree

8 files changed

+10
-4
lines changed

8 files changed

+10
-4
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ help: ## Display this help.
4444
.PHONY: manifests
4545
manifests: ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
4646
controller-gen $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases
47-
kustomize build config/helm/crds | yq e "." - > charts/cattage/crds/tenant.yaml
47+
kustomize build config/helm/crds | yq e "." - > charts/cattage/crds/crds.yaml
4848
kustomize build config/helm/templates | yq e "." - > charts/cattage/templates/generated.yaml
4949

5050

charts/cattage/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.6.0-chart-patch-version-placeholder
18+
version: 0.7.0-chart-patch-version-placeholder
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to
File renamed without changes.

charts/cattage/templates/generated.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ metadata:
156156
app.kubernetes.io/name: '{{ include "cattage.name" . }}'
157157
app.kubernetes.io/version: '{{ .Chart.AppVersion }}'
158158
helm.sh/chart: '{{ include "cattage.chart" . }}'
159+
rbac.authorization.k8s.io/aggregate-to-admin: "true"
160+
rbac.authorization.k8s.io/aggregate-to-edit: "true"
159161
name: '{{ template "cattage.fullname" . }}-syncwindow-editor-role'
160162
rules:
161163
- apiGroups:
@@ -185,6 +187,7 @@ metadata:
185187
app.kubernetes.io/name: '{{ include "cattage.name" . }}'
186188
app.kubernetes.io/version: '{{ .Chart.AppVersion }}'
187189
helm.sh/chart: '{{ include "cattage.chart" . }}'
190+
rbac.authorization.k8s.io/aggregate-to-view: "true"
188191
name: '{{ template "cattage.fullname" . }}-syncwindow-viewer-role'
189192
rules:
190193
- apiGroups:

config/rbac/syncwindow_editor_role.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ kind: ClusterRole
44
metadata:
55
labels:
66
app.kubernetes.io/name: cattage
7-
app.kubernetes.io/managed-by: kustomize
7+
rbac.authorization.k8s.io/aggregate-to-admin: "true"
8+
rbac.authorization.k8s.io/aggregate-to-edit: "true"
89
name: syncwindow-editor-role
910
rules:
1011
- apiGroups:

config/rbac/syncwindow_viewer_role.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ kind: ClusterRole
44
metadata:
55
labels:
66
app.kubernetes.io/name: cattage
7-
app.kubernetes.io/managed-by: kustomize
7+
rbac.authorization.k8s.io/aggregate-to-view: "true"
88
name: syncwindow-viewer-role
99
rules:
1010
- apiGroups:

config/rbac/tenant_editor_role.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ kind: ClusterRole
44
metadata:
55
name: tenant-editor-role
66
labels:
7+
app.kubernetes.io/name: cattage
78
rbac.authorization.k8s.io/aggregate-to-admin: "true"
89
rbac.authorization.k8s.io/aggregate-to-edit: "true"
910
rules:

config/rbac/tenant_viewer_role.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ kind: ClusterRole
44
metadata:
55
name: tenant-viewer-role
66
labels:
7+
app.kubernetes.io/name: cattage
78
rbac.authorization.k8s.io/aggregate-to-view: "true"
89
rules:
910
- apiGroups:

0 commit comments

Comments
 (0)