Skip to content

Commit

Permalink
fix: example now uses a hostmount-anyuid to facilitate testing
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Bastide <pbastide@us.ibm.com>
  • Loading branch information
prb112 committed Jan 28, 2025
1 parent 2471b76 commit 2f11e09
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
6 changes: 3 additions & 3 deletions examples/02-rbac.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
kind: RoleBinding
metadata:
name: ex-device-plugin
name: ex-sa-rbac
namespace: ex-device-plugin
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: system:openshift:scc:hostmount-anyuid
subjects:
- kind: ServiceAccount
name: ex-device-plugin
name: ex-sa
namespace: ex-device-plugin
10 changes: 6 additions & 4 deletions examples/04-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ spec:
metadata:
labels:
app: ex-device-plugin
annotations:
openshift.io/required-scc: 'hostmount-anyuid'
spec:
containers:
- name: plugin
Expand All @@ -35,19 +37,19 @@ spec:
serviceAccountName: ex-sa
securityContext:
privileged: false
runAsUser: 1000
capabilities:
drop:
- ALL
runAsNonRoot: true
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
seccompProfile:
type: RuntimeDefault
serviceAccount: ex-sa
serviceAccountName: ex-sa
volumes:
- name: test-vol
persistentVolumeClaim:
claimName: vol-test
hostPath:
path: /var/demo
type: DirectoryOrCreate
updateStrategy:
type: RollingUpdate
16 changes: 7 additions & 9 deletions examples/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
metadata:
name: ex-device-plugin
namespace: ex-device-plugin

namespace: ex-device-plugin

generatorOptions:
disableNameSuffixHash: true

sortOptions:
order: fifo

resources:
- 00-project.yaml
- 01-sa.yaml
- 02-rbac.yaml
- 03-pvc.yaml
- 04-deployment.yaml
- 01-sa.yaml
- 02-rbac.yaml
- 03-pvc.yaml
- 04-deployment.yaml

0 comments on commit 2f11e09

Please sign in to comment.