networkfs-manager

command module
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 26, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

README

networkfs-manager

Network FS(Filesystem) Manager helps manage the network filesystem. Now, it only supports Longhorn RWX volume (NFS).

Building

make

This will build both amd64 and arm64 binaries, plus a container image which will be named something like harvester/networkfs-manager:dev.

To build a container image and push it to your own repo on dockerhub, do this:

export REPO="your dockerhub username"
make
docker push $REPO/networkfs-manager:dev

Features

  • Support Longhorn RWX Volume (NFS)
  • Support General NFS Filesystem
  • Support CIFS/SMB Filesystem
  • Support CephFS

Overview

Network FS Manager could generate the network filesystem information like endpoint, path, and recommended mount options for the user to mount the network filesystem. The information was collected from the endpoint or specific CR from the storage provider (e.g., ShareManager CR from Longhorn).

Architecture

The Network FS Manager is a Kubernetes controller developed by Go and leverages Rancher's wrangler framework.

networkfs-manager is a single binary built by Go and could be deployed as a Kubernetes DaemonSet. You can also install it as a Helm chart.

The Network FS Manager mainly focuses on the CR Endpoint and ShareManager from Longhorn. And provides its own CR Networkfilesystem to store the network filesystem information.

Networkfilesystem Custom Resource(CR)

The Networkfilesystem CR is used to store the corresponding network filesystem information. The CR structure is as follows:

apiVersion: harvesterhci.io/v1beta1
kind: NetworkFilesystem
metadata: 
    name: pvc-76d28565-fa65-4b37-962b-62da3ee668f8
    namespace: harvester-system
spec:
    desiredState: Disabled
    networkFSName: pvc-76d28565-fa65-4b37-962b-62da3ee668f8
status:
    conditions:
    endpoint: ""
    state: Disabled
    status: NotReady
    mountOptions: ""    
    type: NFS

The desiredState is used to control the state of the network filesystem. Usually Enabled or Disabled. The networkFSName is the name (usually path) of the network filesystem and is used for the mount path, like the entry point. The state is the state that the current state compares with the desiredState. The status is the status of the network filesystem. The mountOptions are the recommended mount options to hint the user to mount the network filesystem. The type is the type of the network filesystem. Now, only support NFS.

License

Copyright (c) 2024 Rancher Labs, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg
apis/harvesterhci.io/v1beta1
+k8s:deepcopy-gen=package +groupName=harvesterhci.io
+k8s:deepcopy-gen=package +groupName=harvesterhci.io
generated/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
generated/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
generated/clientset/versioned/typed/harvesterhci.io/v1beta1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
generated/clientset/versioned/typed/harvesterhci.io/v1beta1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
generated/clientset/versioned/typed/longhorn.io/v1beta2
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
generated/clientset/versioned/typed/longhorn.io/v1beta2/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL