Skip to content

Instantly share code, notes, and snippets.

@icheko
Created September 14, 2022 04:21
Show Gist options
  • Save icheko/454f099e3bfabb56163d9e3d742139ab to your computer and use it in GitHub Desktop.
Save icheko/454f099e3bfabb56163d9e3d742139ab to your computer and use it in GitHub Desktop.
apiVersion: v1
kind: ServiceAccount
metadata:
name: nonrootbuilder-sa
namespace: jenkins-sandbox
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: nonrootbuilder
rules:
- apiGroups:
- security.openshift.io
resourceNames:
- nonrootbuilder
resources:
- securitycontextconstraints
verbs:
- use
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: nonrootbuilder-binding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: nonrootbuilder
subjects:
- kind: ServiceAccount
name: nonrootbuilder-sa
namespace: jenkins-sandbox
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment