example: Fix example rwx
1. Use different names for the 2 roles (and the related role bindings) 2. Make sure the role binding namespace is the same as the namespace where nfs provisioner is deployed Signed-off-by: Shuo Wu <shuo@rancher.com>
This commit is contained in:
parent
43318cd24f
commit
b478c3a1bf
@ -63,7 +63,8 @@ roleRef:
|
|||||||
kind: Role
|
kind: Role
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
metadata:
|
metadata:
|
||||||
name: longhorn-nfs-provisioner
|
name: leader-locking-longhorn-nfs-provisioner
|
||||||
|
namespace: longhorn-system
|
||||||
rules:
|
rules:
|
||||||
- apiGroups: [""]
|
- apiGroups: [""]
|
||||||
resources: ["endpoints"]
|
resources: ["endpoints"]
|
||||||
@ -72,14 +73,13 @@ rules:
|
|||||||
kind: RoleBinding
|
kind: RoleBinding
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
metadata:
|
metadata:
|
||||||
name: longhorn-nfs-provisioner
|
name: leader-locking-longhorn-nfs-provisioner
|
||||||
|
namespace: longhorn-system
|
||||||
subjects:
|
subjects:
|
||||||
- kind: ServiceAccount
|
- kind: ServiceAccount
|
||||||
name: longhorn-nfs-provisioner
|
name: longhorn-nfs-provisioner
|
||||||
namespace: longhorn-system
|
namespace: longhorn-system
|
||||||
roleRef:
|
roleRef:
|
||||||
kind: Role
|
kind: Role
|
||||||
name: longhorn-nfs-provisioner
|
name: leader-locking-longhorn-nfs-provisioner
|
||||||
apiGroup: rbac.authorization.k8s.io
|
apiGroup: rbac.authorization.k8s.io
|
||||||
---
|
|
||||||
|
|
||||||
|
@ -2,11 +2,13 @@ apiVersion: v1
|
|||||||
kind: ServiceAccount
|
kind: ServiceAccount
|
||||||
metadata:
|
metadata:
|
||||||
name: longhorn-nfs-provisioner
|
name: longhorn-nfs-provisioner
|
||||||
|
namespace: longhorn-system
|
||||||
---
|
---
|
||||||
kind: Service
|
kind: Service
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
metadata:
|
metadata:
|
||||||
name: longhorn-nfs-provisioner
|
name: longhorn-nfs-provisioner
|
||||||
|
namespace: longhorn-system
|
||||||
labels:
|
labels:
|
||||||
app: longhorn-nfs-provisioner
|
app: longhorn-nfs-provisioner
|
||||||
spec:
|
spec:
|
||||||
@ -52,6 +54,7 @@ kind: Deployment
|
|||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
metadata:
|
metadata:
|
||||||
name: longhorn-nfs-provisioner
|
name: longhorn-nfs-provisioner
|
||||||
|
namespace: longhorn-system
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
@ -156,6 +159,7 @@ apiVersion: v1
|
|||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
metadata:
|
metadata:
|
||||||
name: longhorn-nfs-provisioner # longhorn backing pvc
|
name: longhorn-nfs-provisioner # longhorn backing pvc
|
||||||
|
namespace: longhorn-system
|
||||||
spec:
|
spec:
|
||||||
storageClassName: longhorn
|
storageClassName: longhorn
|
||||||
accessModes:
|
accessModes:
|
||||||
|
Loading…
Reference in New Issue
Block a user