Fix namespace and bump to Deployment apps/v1
(cherry picked from commit 846206d609)
This commit is contained in:
parent
7f85c7b5ff
commit
8c3af96130
|
|
@ -34,7 +34,7 @@ Kubernetes:
|
||||||
# Set the subject of the RBAC objects to the current namespace where the provisioner is being deployed
|
# Set the subject of the RBAC objects to the current namespace where the provisioner is being deployed
|
||||||
$ NS=$(kubectl config get-contexts|grep -e "^\*" |awk '{print $5}')
|
$ NS=$(kubectl config get-contexts|grep -e "^\*" |awk '{print $5}')
|
||||||
$ NAMESPACE=${NS:-default}
|
$ NAMESPACE=${NS:-default}
|
||||||
$ sed -i'' "s/namespace:.*/namespace: $NAMESPACE/g" ./deploy/rbac.yaml
|
$ sed -i'' "s/namespace:.*/namespace: $NAMESPACE/g" ./deploy/rbac.yaml ./deploy/deployment.yaml
|
||||||
$ kubectl create -f deploy/rbac.yaml
|
$ kubectl create -f deploy/rbac.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,24 @@
|
||||||
apiVersion: v1
|
apiVersion: apps/v1
|
||||||
kind: ServiceAccount
|
|
||||||
metadata:
|
|
||||||
name: nfs-client-provisioner
|
|
||||||
---
|
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
apiVersion: extensions/v1beta1
|
|
||||||
metadata:
|
metadata:
|
||||||
name: nfs-client-provisioner
|
name: nfs-client-provisioner
|
||||||
|
labels:
|
||||||
|
app: nfs-client-provisioner
|
||||||
|
# replace with namespace where provisioner is deployed
|
||||||
|
namespace: default
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
strategy:
|
strategy:
|
||||||
type: Recreate
|
type: Recreate
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: nfs-client-provisioner
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: nfs-client-provisioner
|
app: nfs-client-provisioner
|
||||||
spec:
|
spec:
|
||||||
serviceAccount: nfs-client-provisioner
|
serviceAccountName: nfs-client-provisioner
|
||||||
containers:
|
containers:
|
||||||
- name: nfs-client-provisioner
|
- name: nfs-client-provisioner
|
||||||
image: quay.io/external_storage/nfs-client-provisioner-arm:latest
|
image: quay.io/external_storage/nfs-client-provisioner-arm:latest
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,18 @@
|
||||||
apiVersion: v1
|
apiVersion: apps/v1
|
||||||
kind: ServiceAccount
|
|
||||||
metadata:
|
|
||||||
name: nfs-client-provisioner
|
|
||||||
---
|
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
apiVersion: extensions/v1beta1
|
|
||||||
metadata:
|
metadata:
|
||||||
name: nfs-client-provisioner
|
name: nfs-client-provisioner
|
||||||
|
labels:
|
||||||
|
app: nfs-client-provisioner
|
||||||
|
# replace with namespace where provisioner is deployed
|
||||||
|
namespace: default
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
strategy:
|
strategy:
|
||||||
type: Recreate
|
type: Recreate
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: nfs-client-provisioner
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
kind: ServiceAccount
|
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
metadata:
|
metadata:
|
||||||
name: nfs-client-provisioner
|
name: nfs-client-provisioner
|
||||||
|
# replace with namespace where provisioner is deployed
|
||||||
|
namespace: default
|
||||||
---
|
---
|
||||||
kind: ClusterRole
|
kind: ClusterRole
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
|
@ -28,6 +30,7 @@ metadata:
|
||||||
subjects:
|
subjects:
|
||||||
- kind: ServiceAccount
|
- kind: ServiceAccount
|
||||||
name: nfs-client-provisioner
|
name: nfs-client-provisioner
|
||||||
|
# replace with namespace where provisioner is deployed
|
||||||
namespace: default
|
namespace: default
|
||||||
roleRef:
|
roleRef:
|
||||||
kind: ClusterRole
|
kind: ClusterRole
|
||||||
|
|
@ -38,6 +41,8 @@ kind: Role
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
metadata:
|
metadata:
|
||||||
name: leader-locking-nfs-client-provisioner
|
name: leader-locking-nfs-client-provisioner
|
||||||
|
# replace with namespace where provisioner is deployed
|
||||||
|
namespace: default
|
||||||
rules:
|
rules:
|
||||||
- apiGroups: [""]
|
- apiGroups: [""]
|
||||||
resources: ["endpoints"]
|
resources: ["endpoints"]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue