Last active
August 7, 2020 15:55
-
-
Save noseka1/89a66cc5d313773e12ffd69b593d8393 to your computer and use it in GitHub Desktop.
Allow cluster-wide mounting of NFS volumes
This file contains hidden or 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
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: ClusterRole | |
metadata: | |
name: mount-nfs | |
rules: | |
- apiGroups: | |
- security.openshift.io | |
resources: | |
- securitycontextconstraints | |
verbs: | |
- use | |
resourceNames: | |
- restricted-nfs |
This file contains hidden or 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
kind: ClusterRoleBinding | |
apiVersion: rbac.authorization.k8s.io/v1 | |
metadata: | |
name: mount-nfs | |
subjects: | |
- kind: Group | |
name: system:serviceaccounts | |
roleRef: | |
kind: ClusterRole | |
apiGroup: rbac.authorization.k8s.io | |
name: mount-nfs |
This file contains hidden or 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
apiVersion: security.openshift.io/v1 | |
kind: SecurityContextConstraints | |
metadata: | |
annotations: | |
kubernetes.io/description: this is a restricted SCC with addition of nfs volumes | |
name: restricted-nfs | |
allowHostDirVolumePlugin: false | |
allowHostIPC: false | |
allowHostNetwork: false | |
allowHostPID: false | |
allowHostPorts: false | |
allowPrivilegeEscalation: true | |
allowPrivilegedContainer: false | |
allowedCapabilities: null | |
defaultAddCapabilities: null | |
fsGroup: | |
type: MustRunAs | |
groups: [] | |
readOnlyRootFilesystem: false | |
requiredDropCapabilities: | |
- KILL | |
- MKNOD | |
- SETUID | |
- SETGID | |
runAsUser: | |
type: MustRunAsRange | |
seLinuxContext: | |
type: MustRunAs | |
supplementalGroups: | |
type: RunAsAny | |
users: [] | |
volumes: | |
- configMap | |
- downwardAPI | |
- emptyDir | |
- persistentVolumeClaim | |
- projected | |
- secret | |
- nfs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment