Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update base #6

Merged
merged 3 commits into from
Nov 17, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
feat: Add authorization mechanism demo
  • Loading branch information
mrmuli committed Nov 16, 2022
commit faf17b44ada815dfa3b16a9f75bcea9679d2d4b6
13 changes: 13 additions & 0 deletions ops/blue-team-development-namespace-role-binding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: read-write-binding
namespace: development
roleRef:
kind: Role
name: blue-development-role
apiGroup: rbac.authorization.k8s.io
subjects:
- kind: User
name: developer
apiGroup: rbac.authorization.k8s.io
11 changes: 11 additions & 0 deletions ops/blue-team-development-namespace-role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: blue-development-role
namespace: development
rules:
- apiGroups:
- ""
resources: ["*"]
verbs: [ "get", "list", "watch", "create", "update", "patch", "delete" ]
13 changes: 13 additions & 0 deletions ops/blue-team-production-namespace-role-binding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: blue-developer-role-binding
namespace: production
roleRef:
kind: Role
name: blue-production-role
apiGroup: rbac.authorization.k8s.io
subjects:
- kind: User
name: developer
apiGroup: rbac.authorization.k8s.io
11 changes: 11 additions & 0 deletions ops/blue-team-production-namespace-role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: blue-developer-role
namespace: production
rules:
- apiGroups:
- ""
resources: ["*"]
verbs: [ "get", "list", "watch", "create", "update", "patch", "delete" ]
4 changes: 4 additions & 0 deletions ops/blue-team-service-account.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: developer
7 changes: 7 additions & 0 deletions ops/developer-token.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: v1
kind: Secret
metadata:
name: developer-access
annotations:
kubernetes.io/service-account.name: developer
type: kubernetes.io/service-account-token
13 changes: 13 additions & 0 deletions ops/platform-team-cluster-role-binding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: platform-team-cluster-role-binding
namespace: development
roleRef:
kind: ClusterRole
name: platform-team-role
apiGroup: rbac.authorization.k8s.io
subjects:
- kind: User
name: administrator
apiGroup: rbac.authorization.k8s.io
10 changes: 10 additions & 0 deletions ops/platform-team-cluster-role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: platform-team-role
rules:
- apiGroups:
- ""
resources: ["*"]
verbs: [ "get", "list", "watch", "create", "update", "patch", "delete" ]
4 changes: 4 additions & 0 deletions ops/platform-team-service-account.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: administrator