Commit 8c3af961 by remche Committed by kmova

Fix namespace and bump to Deployment apps/v1

(cherry picked from commit 846206d6091d0cda2b926c15271792d552a72d7f)
parent 7f85c7b5
...@@ -34,7 +34,7 @@ Kubernetes: ...@@ -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
``` ```
......
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
......
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:
......
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: ...@@ -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 ...@@ -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"]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment