Skip to content

Commit

Permalink
Merge pull request #48 from ravi100k/V1.2.5
Browse files Browse the repository at this point in the history
V1.2.5
  • Loading branch information
ravi100k authored Jun 14, 2024
2 parents 93146c8 + e76c9b2 commit 2509aba
Show file tree
Hide file tree
Showing 19 changed files with 1,686 additions and 1,292 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
bin/
tmp/
hammerspace-cs-driver
hammerspace-csi-driver
csi-plugin
deploy-test/
vendor/

*.swp
*.test
Expand Down
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
repos:
- repo: https://github.com/dnephin/pre-commit-golang
rev: v0.4.0
hooks:
- id: go-fmt
- id: go-vet
- id: go-imports
- id: go-mod-tidy
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ FROM registry.access.redhat.com/ubi8/ubi:8.4
ADD ubi/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo
ADD ubi/CentOS-AppStream.repo /etc/yum.repos.d/CentOS-AppStream.repo
ADD ubi/RPM-GPG-KEY-centosofficial /etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
RUN dnf --disableplugin=subscription-manager -y install python2-pip libcom_err-devel \
RUN dnf --disableplugin=subscription-manager --nobest -y install python2-pip libcom_err-devel \
ca-certificates-2021.2.50-80.0.el8_4.noarch \
e2fsprogs-1.45.6-2.el8.x86_64 \
#-1.45.6-1.el8.x86_64 \
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ build-dev:

build:
@echo "==> Building Docker Image Latest"
@docker build -t "hammerspaceinc/csi-plugin-ubi:latest" . -f Dockerfile --no-cache
@docker build -t "hammerspaceinc/csi-plugin:latest" . -f Dockerfile --no-cache

build-release:
@echo "==> Building Docker Image ${VERSION} ${GITHASH}"
@docker build --build-arg version=${VERSION} -t "hammerspaceinc/csi-plugin-ubi:${VERSION}" . -f Dockerfile
@docker build --build-arg version=${VERSION} -t "hammerspaceinc/csi-plugin:${VERSION}" . -f Dockerfile

build-alpine:
@echo "==> Building Alpine Docker Image Latest"
Expand Down
50 changes: 39 additions & 11 deletions deploy/kubernetes/kubernetes-1.25/plugin.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
#### Controller Service
#### CSI Object
apiVersion: storage.k8s.io/v1
kind: CSIDriver
metadata:
name: com.hammerspace.csi
spec:
podInfoOnMount: true
requiresRepublish: true
volumeLifecycleModes:
- Persistent
storageCapacity: true

#### Controller Service
---
# needed for StatefulSet
kind: Service
Expand Down Expand Up @@ -31,12 +43,12 @@ spec:
labels:
app: csi-provisioner
spec:
serviceAccount: csi-provisioner
serviceAccountName: csi-provisioner
hostNetwork: true
containers:
- name: csi-provisioner
imagePullPolicy: Always
image: quay.io/k8scsi/csi-provisioner:v1.5.0
image: registry.k8s.io/sig-storage/csi-provisioner:v3.6.0
args:
- "--csi-address=$(CSI_ENDPOINT)"
- "--timeout=60s" # Recommended as shares may take some time to create
Expand All @@ -49,7 +61,7 @@ spec:
mountPath: /var/lib/csi/
- name: csi-attacher
imagePullPolicy: Always
image: quay.io/k8scsi/csi-attacher:v2.1.0
image: registry.k8s.io/sig-storage/csi-attacher:v4.4.0
args:
- "--csi-address=$(CSI_ENDPOINT)"
- "--v=5"
Expand All @@ -61,7 +73,7 @@ spec:
mountPath: /var/lib/csi/
- name: csi-snapshotter
imagePullPolicy: Always
image: quay.io/k8scsi/csi-snapshotter:v2.0.1
image: registry.k8s.io/sig-storage/csi-snapshotter:v6.2.1
args:
- "--csi-address=$(CSI_ENDPOINT)"
- "--v=5"
Expand All @@ -73,7 +85,7 @@ spec:
mountPath: /var/lib/csi/
- name: csi-resizer
imagePullPolicy: Always
image: k8s.gcr.io/sig-storage/csi-resizer:v1.2.0
image: registry.k8s.io/sig-storage/csi-resizer:v1.10.1
args:
- "--csi-address=$(CSI_ENDPOINT)"
- "--v=5"
Expand Down Expand Up @@ -174,7 +186,7 @@ rules:
resources: ["customresourcedefinitions"]
verbs: ["create", "list", "watch", "delete"]
- apiGroups: ["storage.k8s.io"]
resources: ["volumeattachments"]
resources: ["volumeattachments", "volumeattachments/status"]
verbs: ["get", "list", "watch", "update", "patch"]
- apiGroups: ["storage.k8s.io"]
resources: ["storageclasses"]
Expand Down Expand Up @@ -214,7 +226,7 @@ spec:
containers:
- name: csi-resizer
imagePullPolicy: Always
image: k8s.gcr.io/sig-storage/csi-resizer:v1.2.0
image: registry.k8s.io/sig-storage/csi-resizer:v1.10.1
args:
- "--csi-address=$(CSI_ENDPOINT)"
- "--v=5"
Expand All @@ -226,7 +238,7 @@ spec:
mountPath: /csi
- name: driver-registrar
imagePullPolicy: Always
image: quay.io/k8scsi/csi-node-driver-registrar:v1.2.0
image: registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.9.0
lifecycle:
preStop:
exec:
Expand Down Expand Up @@ -343,11 +355,12 @@ rules:
resources: ["namespaces", "events"]
verbs: ["get", "list", "create"]
- apiGroups: [""]
resources: ["persistentvolumes", "persistentvolumeclaims", "persistentvolumeclaims/status", "events"]
resources: ["persistentvolumes", "persistentvolumeclaims", "persistentvolumeclaims/status","events"]
verbs: ["get", "list", "watch", "update", "patch"]
- apiGroups: ["storage.k8s.io"]
resources: ["volumeattachments"]
resources: ["volumeattachments", "volumeattachments/status"]
verbs: ["get", "list", "watch", "update", "patch"]

---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
Expand All @@ -362,3 +375,18 @@ roleRef:
kind: ClusterRole
name: csi-node
apiGroup: rbac.authorization.k8s.io

---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: csi-provisioner-volumeattachment-status-binding
namespace: kube-system
subjects:
- kind: ServiceAccount
name: csi-provisioner
namespace: kube-system
roleRef:
kind: ClusterRole
name: csi-provisioner-volumeattachment-status
apiGroup: rbac.authorization.k8s.io
2 changes: 1 addition & 1 deletion deploy/kubernetes/kubernetes-latest
Loading

0 comments on commit 2509aba

Please sign in to comment.