Skip to content

Instantly share code, notes, and snippets.

@sjenning
Last active November 7, 2022 20:09
Show Gist options
  • Save sjenning/a8cf3ff2a30886e62a47880d78841ef0 to your computer and use it in GitHub Desktop.
Save sjenning/a8cf3ff2a30886e62a47880d78841ef0 to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: Namespace
metadata:
name: sjenning
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: hypershift
namespace: sjenning
rules:
- apiGroups:
- hypershift.openshift.io
resources:
- hostedclusters
- nodepools
- nodepools/admin
verbs:
- create
- get
- list
- watch
- update
- patch
- delete
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: hypershift
namespace: sjenning
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: hypershift
subjects:
- kind: ServiceAccount
name: sjenning-dev
namespace: sjenning
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: sjenning-dev
namespace: sjenning
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: sjenning-dev
namespace: sjenning
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: admin-sjenning
namespace: sjenning
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: admin
subjects:
- kind: ServiceAccount
name: sjenning-dev
namespace: sjenning
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: sjenning-namespace-patcher
rules:
- apiGroups:
- ""
resourceNames:
- sjenning
resources:
- namespaces
verbs:
- patch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: sjenning-namespace-patcher
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: sjenning-namespace-patcher
subjects:
- kind: ServiceAccount
name: sjenning-dev
namespace: sjenning
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment