Skip to content

Commit

Permalink
feat: update to Ganesha 6.2 and Fedora 40
Browse files Browse the repository at this point in the history
Using self-compiled ntirpc and including libacl (introduced within Ganesha 5)
  • Loading branch information
Hi-Fi committed Oct 22, 2024
1 parent 175acac commit 0a928c4
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Lower case owner
id: owner
run: |
Expand All @@ -53,4 +53,4 @@ jobs:
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x
push: true
# keep tag in sync with deploy/base/Dockerfile:GANESHA_VERSION
tags: ghcr.io/${{ steps.owner.outputs.repo-owner }}/nfs-ganesha:V4.0.8
tags: ghcr.io/${{ steps.owner.outputs.repo-owner }}/nfs-ganesha:V6.2
2 changes: 1 addition & 1 deletion charts/nfs-server-provisioner/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v1
appVersion: 4.0.8
appVersion: 6.2
description: nfs-server-provisioner is an out-of-tree dynamic provisioner for Kubernetes. You can use it to quickly & easily deploy shared storage that works almost anywhere.
name: nfs-server-provisioner
version: 1.8.0
Expand Down
4 changes: 2 additions & 2 deletions charts/nfs-server-provisioner/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ their default values.
|:-------------------------------|:----------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------|
| `extraArgs` | [Additional command line arguments](https://github.com/kubernetes-incubator/external-storage/blob/HEAD/nfs/docs/deployment.md#arguments) | `{}`
| `imagePullSecrets` | Specify image pull secrets | `nil` (does not add image pull secrets to deployed pods) |
| `image.repository` | The image repository to pull from | `registry.k8s.io/sig-storage/nfs-provisioner:v4.0.8` |
| `image.tag` | The image tag to pull | `v4.0.8` |
| `image.repository` | The image repository to pull from | `registry.k8s.io/sig-storage/nfs-provisioner:v6.2` |
| `image.tag` | The image tag to pull | `v6.2` |
| `image.digest` | The image digest to pull, this option has precedence over `image.tag` | `nil` |
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
| `service.type` | service type | `ClusterIP` |
Expand Down
2 changes: 1 addition & 1 deletion charts/nfs-server-provisioner/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ replicaCount: 1

image:
repository: registry.k8s.io/sig-storage/nfs-provisioner
tag: v4.0.8
tag: v6.2
# digest:
pullPolicy: IfNotPresent

Expand Down
13 changes: 7 additions & 6 deletions deploy/base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# arm64 architectures.
#
# List of Fedora versions: https://en.wikipedia.org/wiki/Fedora_version_history#Version_history
ARG FEDORA_VERSION=36
ARG FEDORA_VERSION=40



Expand All @@ -42,22 +42,23 @@ RUN dnf install -y \
libblkid-devel \
libnfsidmap-devel \
libnsl2-devel \
libntirpc-devel \
libuuid-devel \
ninja-build \
patch \
userspace-rcu-devel \
xfsprogs-devel
xfsprogs-devel \
libacl-devel

# Clone specific version of ganesha
# Keep version in sync with .github/workflows/docker-build.yml
ARG GANESHA_VERSION=V4.0.8
ARG GANESHA_VERSION=V6.2
RUN git clone --branch ${GANESHA_VERSION} --recurse-submodules https://github.com/nfs-ganesha/nfs-ganesha
WORKDIR /nfs-ganesha

RUN mkdir -p /usr/local \
&& cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local \
-DBUILD_CONFIG=vfs_only -DUSE_FSAL_GLUSTER=OFF -DUSE_FSAL_RGW=OFF \
-DUSE_RADOS_RECOV=OFF -DRADOS_URLS=OFF -DUSE_SYSTEM_NTIRPC=ON \
-DUSE_RADOS_RECOV=OFF -DRADOS_URLS=OFF -DUSE_SYSTEM_NTIRPC=OFF \
-G Ninja src/ \
&& sed -i 's|@SYSSTATEDIR@/lib/nfs/ganesha|/export|' src/include/config-h.in.cmake \
&& ninja \
Expand All @@ -77,12 +78,12 @@ RUN microdnf install -y \
jemalloc \
libblkid \
libnfsidmap \
libntirpc \
libuuid \
nfs-utils \
rpcbind \
userspace-rcu \
xfsprogs \
libacl \
&& microdnf clean all

RUN mkdir -p /var/run/dbus \
Expand Down
2 changes: 1 addition & 1 deletion deploy/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

# Update only after new version of deploy/base/Dockerfile change has built
ARG GANESHA_VERSION=V4.0.8
ARG GANESHA_VERSION=V6.2


FROM ghcr.io/kubernetes-sigs/nfs-ganesha:${GANESHA_VERSION}
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ spec:
serviceAccount: nfs-provisioner
containers:
- name: nfs-provisioner
image: registry.k8s.io/sig-storage/nfs-provisioner:v4.0.8
image: registry.k8s.io/sig-storage/nfs-provisioner:v6.2
ports:
- name: nfs
containerPort: 2049
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes/pod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
serviceAccount: nfs-provisioner
containers:
- name: nfs-provisioner
image: registry.k8s.io/sig-storage/nfs-provisioner:v4.0.8
image: registry.k8s.io/sig-storage/nfs-provisioner:v6.2
ports:
- name: nfs
containerPort: 2049
Expand Down
2 changes: 1 addition & 1 deletion deploy/kubernetes/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ spec:
terminationGracePeriodSeconds: 10
containers:
- name: nfs-provisioner
image: registry.k8s.io/sig-storage/nfs-provisioner:v4.0.8
image: registry.k8s.io/sig-storage/nfs-provisioner:v6.2
ports:
- name: nfs
containerPort: 2049
Expand Down
8 changes: 4 additions & 4 deletions docs/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ $ make container
If you are running in Kubernetes, it will pull the image from GCR for you. Or you can do it yourself.

```
$ docker pull registry.k8s.io/sig-storage/nfs-provisioner:v4.0.8
$ docker pull registry.k8s.io/sig-storage/nfs-provisioner:v6.2
```

## Deploying the provisioner
Expand Down Expand Up @@ -87,15 +87,15 @@ You may want to specify the hostname the NFS server exports from, i.e. the serve
$ docker run --cap-add DAC_READ_SEARCH --cap-add SYS_RESOURCE \
--security-opt seccomp:deploy/docker/nfs-provisioner-seccomp.json \
-v $HOME/.kube:/.kube:Z \
registry.k8s.io/sig-storage/nfs-provisioner:v4.0.8 \
registry.k8s.io/sig-storage/nfs-provisioner:v6.2 \
-provisioner=example.com/nfs \
-kubeconfig=/.kube/config
```
or
```
$ docker run --cap-add DAC_READ_SEARCH --cap-add SYS_RESOURCE \
--security-opt seccomp:deploy/docker/nfs-provisioner-seccomp.json \
registry.k8s.io/sig-storage/nfs-provisioner:v4.0.8 \
registry.k8s.io/sig-storage/nfs-provisioner:v6.2 \
-provisioner=example.com/nfs \
-master=http://172.17.0.1:8080
```
Expand All @@ -110,7 +110,7 @@ With the two above options, the run command will look something like this.
$ docker run --privileged \
-v $HOME/.kube:/.kube:Z \
-v /xfs:/export:Z \
registry.k8s.io/sig-storage/nfs-provisioner:v4.0.8 \
registry.k8s.io/sig-storage/nfs-provisioner:v6.2 \
-provisioner=example.com/nfs \
-kubeconfig=/.kube/config \
-enable-xfs-quota=true
Expand Down
1 change: 1 addition & 0 deletions pkg/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ NFS_Core_Param
MNT_Port = 20048;
NLM_Port = 32803;
fsid_device = true;
allow_set_io_flusher_fail = true;
}
NFSV4
Expand Down

0 comments on commit 0a928c4

Please sign in to comment.