-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RBAC: restrict SeedImage controller auth to fleet-default (#864)
* RBAC: restrict SeedImage controller auth to fleet-default do not allow the seedimage-controller to operate on pods, services and configmaps outside of the fleet-default namespace. Fixes #457 Signed-off-by: Francesco Giudici <francesco.giudici@suse.com> * RBAC: move all rbac resources to rbac.yaml Also have all of them collected and generated via kustomize Signed-off-by: Francesco Giudici <francesco.giudici@suse.com> --------- Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
- Loading branch information
Showing
8 changed files
with
190 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
...-helm/templates/cluster_role_binding.yaml → config/rbac/bases/cluster_role_binding.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: {{ .Release.Name }} | ||
name: manager-role | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: {{ .Release.Name }} | ||
name: manager-role | ||
subjects: | ||
- kind: ServiceAccount | ||
name: {{ .Release.Name }} | ||
namespace: {{.Release.Namespace}} | ||
name: manager-role | ||
namespace: manager-role-namespace | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
name: manager-role | ||
namespace: fleet-default | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: Role | ||
name: manager-role | ||
namespace: fleet-default | ||
subjects: | ||
- kind: ServiceAccount | ||
name: manager-role | ||
namespace: manager-role-namespace | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
- op: replace | ||
path: /metadata/name | ||
value: "{{ .Release.Name }}" | ||
- op: replace | ||
path: /subjects/0/name | ||
value: "{{ .Release.Name }}" | ||
- op: replace | ||
path: /subjects/0/namespace | ||
value: "{{ .Release.Namespace }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters