Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combine driver manifests #254

Merged
merged 1 commit into from
Mar 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 100 additions & 0 deletions deploy/kubernetes/controller.yaml → deploy/kubernetes/manifest.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Controller Service
apiVersion: v1
kind: ServiceAccount
metadata:
Expand Down Expand Up @@ -268,3 +269,102 @@ spec:
volumes:
- name: socket-dir
emptyDir: {}

---
# Node Service
kind: DaemonSet
apiVersion: apps/v1beta2
metadata:
name: ebs-csi-node
namespace: kube-system
spec:
selector:
matchLabels:
app: ebs-csi-node
template:
metadata:
labels:
app: ebs-csi-node
spec:
hostNetwork: true
priorityClassName: system-node-critical
tolerations:
- key: CriticalAddonsOnly
operator: Exists
containers:
- name: ebs-plugin
securityContext:
privileged: true
image: amazon/aws-ebs-csi-driver:latest
args:
- --endpoint=$(CSI_ENDPOINT)
- --logtostderr
- --v=5
env:
- name: CSI_ENDPOINT
value: unix:/csi/csi.sock
volumeMounts:
- name: kubelet-dir
mountPath: /var/lib/kubelet
mountPropagation: "Bidirectional"
- name: plugin-dir
mountPath: /csi
- name: device-dir
mountPath: /dev
ports:
- name: healthz
containerPort: 9808
protocol: TCP
livenessProbe:
httpGet:
path: /healthz
port: healthz
initialDelaySeconds: 10
timeoutSeconds: 3
periodSeconds: 10
failureThreshold: 5
- name: node-driver-registrar
image: quay.io/k8scsi/csi-node-driver-registrar:v1.0.2
args:
- --csi-address=$(ADDRESS)
- --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
- --v=5
lifecycle:
preStop:
exec:
command: ["/bin/sh", "-c", "rm -rf /registration/ebs.csi.aws.com-reg.sock /csi/csi.sock"]
env:
- name: ADDRESS
value: /csi/csi.sock
- name: DRIVER_REG_SOCK_PATH
value: /var/lib/kubelet/plugins/ebs.csi.aws.com/csi.sock
volumeMounts:
- name: plugin-dir
mountPath: /csi
- name: registration-dir
mountPath: /registration
- name: liveness-probe
image: quay.io/k8scsi/livenessprobe:v1.0.1
args:
- --csi-address=/csi/csi.sock
- --connection-timeout=3s
volumeMounts:
- name: plugin-dir
mountPath: /csi
volumes:
- name: kubelet-dir
hostPath:
path: /var/lib/kubelet
type: Directory
- name: plugin-dir
hostPath:
path: /var/lib/kubelet/plugins/ebs.csi.aws.com/
type: DirectoryOrCreate
- name: registration-dir
hostPath:
path: /var/lib/kubelet/plugins_registry/
type: Directory
- name: device-dir
hostPath:
path: /dev
type: Directory
96 changes: 0 additions & 96 deletions deploy/kubernetes/node.yaml

This file was deleted.

3 changes: 1 addition & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ kubectl create -f https://raw.githubusercontent.com/kubernetes/csi-api/release-1

Then deploy the driver:
```sh
kubectl apply -f deploy/kubernetes/controller.yaml
kubectl apply -f deploy/kubernetes/node.yaml
kubectl apply -f deploy/kubernetes/manifest.yaml
```

Verify driver is running:
Expand Down
11 changes: 3 additions & 8 deletions hack/run-e2e-test
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,11 @@ docker push $IMAGE_NAME

# Update manifest files
cp deploy/kubernetes/*.yaml $TEST_DIR
sed "s/image: amazon\/aws-ebs-csi-driver:.*/image: $AWS_ACCOUNT_ID.dkr.ecr.$REGION.amazonaws.com\/aws-ebs-csi-driver:$IMAGE_TAG/g" -i $TEST_DIR/controller.yaml
sed "s/image: amazon\/aws-ebs-csi-driver:.*/image: $AWS_ACCOUNT_ID.dkr.ecr.$REGION.amazonaws.com\/aws-ebs-csi-driver:$IMAGE_TAG/g" -i $TEST_DIR/node.yaml
sed "s/image: amazon\/aws-ebs-csi-driver:.*/image: $AWS_ACCOUNT_ID.dkr.ecr.$REGION.amazonaws.com\/aws-ebs-csi-driver:$IMAGE_TAG/g" -i $TEST_DIR/manifest.yaml

echo "Deploying driver"
kubectl create -f https://raw.githubusercontent.com/kubernetes/csi-api/release-1.13/pkg/crd/manifests/csinodeinfo.yaml --validate=false
kubectl apply -f $TEST_DIR/controller.yaml
kubectl apply -f $TEST_DIR/node.yaml
kubectl apply -f $TEST_DIR/secret.yaml
kubectl apply -f $TEST_DIR/manifest.yaml

# Run the test
go get -u github.com/onsi/ginkgo/ginkgo
Expand All @@ -96,9 +93,7 @@ ginkgo -p -nodes=$NODES -v --focus="$FOCUS" tests/e2e
TEST_PASS=$?

echo "Removing driver"
kubectl delete -f $TEST_DIR/controller.yaml
kubectl delete -f $TEST_DIR/node.yaml
kubectl delete -f $TEST_DIR/secret.yaml
kubectl delete -f $TEST_DIR/manifest.yaml

echo "Deleting cluster $CLUSTER_NAME"
$KOPS_PATH delete cluster --name $CLUSTER_NAME.k8s.local --state $KOPS_STATE_FILE --yes
Expand Down