Skip to content

Commit

Permalink
Run make generate-kustomize
Browse files Browse the repository at this point in the history
  • Loading branch information
wongma7 committed Mar 16, 2021
1 parent b1561af commit dbf91b0
Show file tree
Hide file tree
Showing 17 changed files with 52 additions and 62 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ bin /tmp/helm /tmp/kubeval:
@mkdir -p $@

bin/helm: | /tmp/helm bin
@curl -o /tmp/helm/helm.tar.gz -sSL https://get.helm.sh/helm-v3.1.2-${GOOS}-amd64.tar.gz
@curl -o /tmp/helm/helm.tar.gz -sSL https://get.helm.sh/helm-v3.5.3-${GOOS}-amd64.tar.gz
@tar -zxf /tmp/helm/helm.tar.gz -C bin --strip-components=1
@rm -rf /tmp/helm/*

Expand Down Expand Up @@ -157,5 +157,5 @@ generate-kustomize: bin/helm
cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/role-snapshot-controller-leaderelection.yaml -f ../../deploy/kubernetes/values/snapshotter.yaml > ../../deploy/kubernetes/overlays/alpha/rbac_add_snapshot_controller_leaderelection_role.yaml
cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/rolebinding-snapshot-controller-leaderelection.yaml -f ../../deploy/kubernetes/values/snapshotter.yaml > ../../deploy/kubernetes/overlays/alpha/rbac_add_snapshot_controller_leaderelection_rolebinding.yaml
cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/serviceaccount-snapshot-controller.yaml -f ../../deploy/kubernetes/values/snapshotter.yaml > ../../deploy/kubernetes/overlays/alpha/serviceaccount-snapshot-controller.yaml
cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/statefulset.yaml -f ../../deploy/kubernetes/values/snapshotter.yaml > ../../deploy/kubernetes/overlays/alpha/snapshot_controller.yaml
cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/snapshot-controller.yaml -f ../../deploy/kubernetes/values/snapshotter.yaml > ../../deploy/kubernetes/overlays/alpha/snapshot_controller.yaml
cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/serviceaccount-csi-node.yaml > ../../deploy/kubernetes/base/serviceaccount-csi-node.yaml
6 changes: 3 additions & 3 deletions deploy/kubernetes/base/clusterrole-attacher.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ rules:
- apiGroups: ["storage.k8s.io"]
resources: ["volumeattachments"]
verbs: ["get", "list", "watch", "update", "patch"]
- apiGroups: ["storage.k8s.io"]
resources: ["volumeattachments/status"]
verbs: ["patch"]
- apiGroups: [ "storage.k8s.io" ]
resources: [ "volumeattachments/status" ]
verbs: [ "patch" ]
54 changes: 27 additions & 27 deletions deploy/kubernetes/base/clusterrole-provisioner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,33 @@ metadata:
labels:
app.kubernetes.io/name: aws-ebs-csi-driver
rules:
- apiGroups: [""]
resources: ["persistentvolumes"]
verbs: ["get", "list", "watch", "create", "delete"]
- apiGroups: [""]
resources: ["persistentvolumeclaims"]
verbs: ["get", "list", "watch", "update"]
- apiGroups: ["storage.k8s.io"]
resources: ["storageclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["events"]
verbs: ["list", "watch", "create", "update", "patch"]
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshots"]
verbs: ["get", "list"]
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshotcontents"]
verbs: ["get", "list"]
- apiGroups: ["storage.k8s.io"]
resources: ["csinodes"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["nodes"]
verbs: ["get", "list", "watch"]
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["get", "watch", "list", "delete", "update", "create"]
- apiGroups: [ "" ]
resources: [ "persistentvolumes" ]
verbs: [ "get", "list", "watch", "create", "delete" ]
- apiGroups: [ "" ]
resources: [ "persistentvolumeclaims" ]
verbs: [ "get", "list", "watch", "update" ]
- apiGroups: [ "storage.k8s.io" ]
resources: [ "storageclasses" ]
verbs: [ "get", "list", "watch" ]
- apiGroups: [ "" ]
resources: [ "events" ]
verbs: [ "list", "watch", "create", "update", "patch" ]
- apiGroups: [ "snapshot.storage.k8s.io" ]
resources: [ "volumesnapshots" ]
verbs: [ "get", "list" ]
- apiGroups: [ "snapshot.storage.k8s.io" ]
resources: [ "volumesnapshotcontents" ]
verbs: [ "get", "list" ]
- apiGroups: [ "storage.k8s.io" ]
resources: [ "csinodes" ]
verbs: [ "get", "list", "watch" ]
- apiGroups: [ "" ]
resources: [ "nodes" ]
verbs: [ "get", "list", "watch" ]
- apiGroups: [ "coordination.k8s.io" ]
resources: [ "leases" ]
verbs: [ "get", "watch", "list", "delete", "update", "create" ]
- apiGroups: [ "storage.k8s.io" ]
resources: [ "volumeattachments" ]
verbs: [ "get", "list", "watch" ]
2 changes: 1 addition & 1 deletion deploy/kubernetes/base/clusterrolebinding-attacher.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ metadata:
subjects:
- kind: ServiceAccount
name: ebs-csi-controller-sa
namespace: kube-system
namespace: default
roleRef:
kind: ClusterRole
name: ebs-external-attacher-role
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes/base/clusterrolebinding-provisioner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ metadata:
subjects:
- kind: ServiceAccount
name: ebs-csi-controller-sa
namespace: kube-system
namespace: default
roleRef:
kind: ClusterRole
name: ebs-external-provisioner-role
Expand Down
7 changes: 1 addition & 6 deletions deploy/kubernetes/base/controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ kind: Deployment
apiVersion: apps/v1
metadata:
name: ebs-csi-controller
namespace: kube-system
labels:
app.kubernetes.io/name: aws-ebs-csi-driver
spec:
Expand All @@ -25,14 +24,10 @@ spec:
serviceAccountName: ebs-csi-controller-sa
priorityClassName: system-cluster-critical
tolerations:
- key: CriticalAddonsOnly
operator: Exists
- operator: Exists
effect: NoExecute
tolerationSeconds: 300
containers:
- name: ebs-plugin
image: k8s.gcr.io/provider-aws/aws-ebs-csi-driver:v0.9.0
image: k8s.gcr.io/provider-aws/aws-ebs-csi-driver:latest
imagePullPolicy: IfNotPresent
args:
# - {all,controller,node} # specify the driver mode
Expand Down
9 changes: 2 additions & 7 deletions deploy/kubernetes/base/node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ kind: DaemonSet
apiVersion: apps/v1
metadata:
name: ebs-csi-node
namespace: kube-system
labels:
app.kubernetes.io/name: aws-ebs-csi-driver
spec:
Expand All @@ -32,18 +31,14 @@ spec:
kubernetes.io/os: linux
hostNetwork: true
serviceAccountName: ebs-csi-node-sa
priorityClassName: system-node-critical
priorityClassName: system-cluster-critical
tolerations:
- key: CriticalAddonsOnly
operator: Exists
- operator: Exists
effect: NoExecute
tolerationSeconds: 300
containers:
- name: ebs-plugin
securityContext:
privileged: true
image: k8s.gcr.io/provider-aws/aws-ebs-csi-driver:v0.9.0
image: k8s.gcr.io/provider-aws/aws-ebs-csi-driver:latest
args:
- node
- --endpoint=$(CSI_ENDPOINT)
Expand Down
1 change: 0 additions & 1 deletion deploy/kubernetes/base/serviceaccount-csi-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: ebs-csi-controller-sa
namespace: kube-system
labels:
app.kubernetes.io/name: aws-ebs-csi-driver
#Enable if EKS IAM for SA is used
Expand Down
1 change: 0 additions & 1 deletion deploy/kubernetes/base/serviceaccount-csi-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: ebs-csi-node-sa
namespace: kube-system
labels:
app.kubernetes.io/name: aws-ebs-csi-driver
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ rules:
- apiGroups: [""]
resources: ["events"]
verbs: ["list", "watch", "create", "update", "patch"]
- apiGroups: [ "" ]
resources: [ "pods" ]
verbs: [ "get", "list", "watch" ]
- apiGroups: [""]
resources: ["pods"]
verbs: ["get", "list", "watch"]
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ metadata:
subjects:
- kind: ServiceAccount
name: ebs-csi-controller-sa
namespace: kube-system
namespace: default
roleRef:
kind: ClusterRole
name: ebs-external-resizer-role
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ metadata:
subjects:
- kind: ServiceAccount
name: ebs-snapshot-controller
namespace: kube-system
namespace: default
roleRef:
kind: ClusterRole
name: ebs-snapshot-controller-role
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: ebs-snapshot-controller-leaderelection
namespace: kube-system
labels:
app.kubernetes.io/name: aws-ebs-csi-driver
rules:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@ kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: ebs-snapshot-controller-leaderelection
namespace: kube-system
labels:
app.kubernetes.io/name: aws-ebs-csi-driver
subjects:
- kind: ServiceAccount
name: ebs-snapshot-controller
namespace: kube-system
namespace: default
roleRef:
kind: Role
name: ebs-snapshot-controller-leaderelection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ metadata:
subjects:
- kind: ServiceAccount
name: ebs-csi-controller-sa
namespace: kube-system
namespace: default
roleRef:
kind: ClusterRole
name: ebs-external-snapshotter-role
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: ebs-snapshot-controller
namespace: kube-system
labels:
app.kubernetes.io/name: aws-ebs-csi-driver
11 changes: 8 additions & 3 deletions deploy/kubernetes/overlays/alpha/snapshot_controller.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
---
# Source: aws-ebs-csi-driver/templates/statefulset.yaml
# Source: aws-ebs-csi-driver/templates/snapshot-controller.yaml
#Snapshot controller
kind: StatefulSet
apiVersion: apps/v1
metadata:
name: ebs-snapshot-controller
namespace: kube-system
labels:
app.kubernetes.io/name: aws-ebs-csi-driver
spec:
Expand All @@ -22,9 +21,15 @@ spec:
app.kubernetes.io/name: aws-ebs-csi-driver
spec:
serviceAccountName: ebs-snapshot-controller
nodeSelector:
kubernetes.io/os: linux
priorityClassName: system-cluster-critical
tolerations:
- operator: Exists
containers:
- name: snapshot-controller
image: k8s.gcr.io/sig-storage/snapshot-controller:v3.0.3
image: k8s.gcr.io/sig-storage/snapshot-controller:v4.0.0
env:
args:
- --v=5
- --leader-election=false

0 comments on commit dbf91b0

Please sign in to comment.